@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.
Files changed (218) hide show
  1. package/README.md +114 -0
  2. package/build/api.d.ts +4 -0
  3. package/build/api.d.ts.map +1 -0
  4. package/build/api.js +10 -0
  5. package/build/commands/ai/agent.d.ts +4 -0
  6. package/build/commands/ai/agent.d.ts.map +1 -0
  7. package/build/commands/ai/agent.js +83 -0
  8. package/build/commands/ai/chat.d.ts +4 -0
  9. package/build/commands/ai/chat.d.ts.map +1 -0
  10. package/build/commands/ai/chat.js +71 -0
  11. package/build/commands/ai/document.d.ts +4 -0
  12. package/build/commands/ai/document.d.ts.map +1 -0
  13. package/build/commands/ai/document.js +59 -0
  14. package/build/commands/ai/file.d.ts +4 -0
  15. package/build/commands/ai/file.d.ts.map +1 -0
  16. package/build/commands/ai/file.js +74 -0
  17. package/build/commands/ai/index.d.ts +4 -0
  18. package/build/commands/ai/index.d.ts.map +1 -0
  19. package/build/commands/ai/index.js +33 -0
  20. package/build/commands/ai/mcpClient.d.ts +4 -0
  21. package/build/commands/ai/mcpClient.d.ts.map +1 -0
  22. package/build/commands/ai/mcpClient.js +31 -0
  23. package/build/commands/ai/mcpServer.d.ts +4 -0
  24. package/build/commands/ai/mcpServer.d.ts.map +1 -0
  25. package/build/commands/ai/mcpServer.js +62 -0
  26. package/build/commands/ai/memory.d.ts +4 -0
  27. package/build/commands/ai/memory.d.ts.map +1 -0
  28. package/build/commands/ai/memory.js +50 -0
  29. package/build/commands/ai/message.d.ts +4 -0
  30. package/build/commands/ai/message.d.ts.map +1 -0
  31. package/build/commands/ai/message.js +86 -0
  32. package/build/commands/ai/prompt.d.ts +4 -0
  33. package/build/commands/ai/prompt.d.ts.map +1 -0
  34. package/build/commands/ai/prompt.js +34 -0
  35. package/build/commands/ai/release.d.ts +4 -0
  36. package/build/commands/ai/release.d.ts.map +1 -0
  37. package/build/commands/ai/release.js +150 -0
  38. package/build/commands/ai/skill.d.ts +4 -0
  39. package/build/commands/ai/skill.d.ts.map +1 -0
  40. package/build/commands/ai/skill.js +96 -0
  41. package/build/commands/ai/suggestedAction.d.ts +4 -0
  42. package/build/commands/ai/suggestedAction.d.ts.map +1 -0
  43. package/build/commands/ai/suggestedAction.js +37 -0
  44. package/build/commands/ai/template.d.ts +4 -0
  45. package/build/commands/ai/template.d.ts.map +1 -0
  46. package/build/commands/ai/template.js +14 -0
  47. package/build/commands/ai/vote.d.ts +4 -0
  48. package/build/commands/ai/vote.d.ts.map +1 -0
  49. package/build/commands/ai/vote.js +28 -0
  50. package/build/commands/auth.d.ts +3 -0
  51. package/build/commands/auth.d.ts.map +1 -0
  52. package/build/commands/auth.js +73 -0
  53. package/build/commands/billing/index.d.ts +4 -0
  54. package/build/commands/billing/index.d.ts.map +1 -0
  55. package/build/commands/billing/index.js +9 -0
  56. package/build/commands/billing/subscription.d.ts +4 -0
  57. package/build/commands/billing/subscription.d.ts.map +1 -0
  58. package/build/commands/billing/subscription.js +119 -0
  59. package/build/commands/billing/usage.d.ts +4 -0
  60. package/build/commands/billing/usage.d.ts.map +1 -0
  61. package/build/commands/billing/usage.js +33 -0
  62. package/build/commands/connection/connector.d.ts +4 -0
  63. package/build/commands/connection/connector.d.ts.map +1 -0
  64. package/build/commands/connection/connector.js +129 -0
  65. package/build/commands/connection/index.d.ts +4 -0
  66. package/build/commands/connection/index.d.ts.map +1 -0
  67. package/build/commands/connection/index.js +11 -0
  68. package/build/commands/connection/integration.d.ts +4 -0
  69. package/build/commands/connection/integration.d.ts.map +1 -0
  70. package/build/commands/connection/integration.js +35 -0
  71. package/build/commands/connection/nativeIntegration.d.ts +4 -0
  72. package/build/commands/connection/nativeIntegration.d.ts.map +1 -0
  73. package/build/commands/connection/nativeIntegration.js +14 -0
  74. package/build/commands/expression/expressionEval.d.ts +4 -0
  75. package/build/commands/expression/expressionEval.d.ts.map +1 -0
  76. package/build/commands/expression/expressionEval.js +32 -0
  77. package/build/commands/expression/favoriteRecipe.d.ts +4 -0
  78. package/build/commands/expression/favoriteRecipe.d.ts.map +1 -0
  79. package/build/commands/expression/favoriteRecipe.js +24 -0
  80. package/build/commands/expression/index.d.ts +4 -0
  81. package/build/commands/expression/index.d.ts.map +1 -0
  82. package/build/commands/expression/index.js +11 -0
  83. package/build/commands/expression/recipe.d.ts +4 -0
  84. package/build/commands/expression/recipe.d.ts.map +1 -0
  85. package/build/commands/expression/recipe.js +98 -0
  86. package/build/commands/init.d.ts +4 -0
  87. package/build/commands/init.d.ts.map +1 -0
  88. package/build/commands/init.js +11 -0
  89. package/build/commands/orchestration/batch.d.ts +4 -0
  90. package/build/commands/orchestration/batch.d.ts.map +1 -0
  91. package/build/commands/orchestration/batch.js +106 -0
  92. package/build/commands/orchestration/draftRelease.d.ts +4 -0
  93. package/build/commands/orchestration/draftRelease.d.ts.map +1 -0
  94. package/build/commands/orchestration/draftRelease.js +73 -0
  95. package/build/commands/orchestration/index.d.ts +4 -0
  96. package/build/commands/orchestration/index.d.ts.map +1 -0
  97. package/build/commands/orchestration/index.js +25 -0
  98. package/build/commands/orchestration/node.d.ts +4 -0
  99. package/build/commands/orchestration/node.d.ts.map +1 -0
  100. package/build/commands/orchestration/node.js +44 -0
  101. package/build/commands/orchestration/play.d.ts +4 -0
  102. package/build/commands/orchestration/play.d.ts.map +1 -0
  103. package/build/commands/orchestration/play.js +63 -0
  104. package/build/commands/orchestration/record.d.ts +4 -0
  105. package/build/commands/orchestration/record.d.ts.map +1 -0
  106. package/build/commands/orchestration/record.js +194 -0
  107. package/build/commands/orchestration/release.d.ts +4 -0
  108. package/build/commands/orchestration/release.d.ts.map +1 -0
  109. package/build/commands/orchestration/release.js +27 -0
  110. package/build/commands/orchestration/run.d.ts +4 -0
  111. package/build/commands/orchestration/run.d.ts.map +1 -0
  112. package/build/commands/orchestration/run.js +196 -0
  113. package/build/commands/orchestration/template.d.ts +4 -0
  114. package/build/commands/orchestration/template.d.ts.map +1 -0
  115. package/build/commands/orchestration/template.js +22 -0
  116. package/build/commands/orchestration/tool.d.ts +4 -0
  117. package/build/commands/orchestration/tool.d.ts.map +1 -0
  118. package/build/commands/orchestration/tool.js +72 -0
  119. package/build/commands/orchestration/workflow.d.ts +4 -0
  120. package/build/commands/orchestration/workflow.d.ts.map +1 -0
  121. package/build/commands/orchestration/workflow.js +14 -0
  122. package/build/commands/revenueOrganization/allocation.d.ts +4 -0
  123. package/build/commands/revenueOrganization/allocation.d.ts.map +1 -0
  124. package/build/commands/revenueOrganization/allocation.js +45 -0
  125. package/build/commands/revenueOrganization/capacity.d.ts +4 -0
  126. package/build/commands/revenueOrganization/capacity.d.ts.map +1 -0
  127. package/build/commands/revenueOrganization/capacity.js +94 -0
  128. package/build/commands/revenueOrganization/index.d.ts +4 -0
  129. package/build/commands/revenueOrganization/index.d.ts.map +1 -0
  130. package/build/commands/revenueOrganization/index.js +13 -0
  131. package/build/commands/revenueOrganization/member.d.ts +4 -0
  132. package/build/commands/revenueOrganization/member.d.ts.map +1 -0
  133. package/build/commands/revenueOrganization/member.js +62 -0
  134. package/build/commands/revenueOrganization/territory.d.ts +4 -0
  135. package/build/commands/revenueOrganization/territory.d.ts.map +1 -0
  136. package/build/commands/revenueOrganization/territory.js +72 -0
  137. package/build/commands/runHandler.d.ts +4 -0
  138. package/build/commands/runHandler.d.ts.map +1 -0
  139. package/build/commands/runHandler.js +33 -0
  140. package/build/commands/segmentation/change.d.ts +4 -0
  141. package/build/commands/segmentation/change.d.ts.map +1 -0
  142. package/build/commands/segmentation/change.js +61 -0
  143. package/build/commands/segmentation/index.d.ts +4 -0
  144. package/build/commands/segmentation/index.d.ts.map +1 -0
  145. package/build/commands/segmentation/index.js +11 -0
  146. package/build/commands/segmentation/record.d.ts +4 -0
  147. package/build/commands/segmentation/record.d.ts.map +1 -0
  148. package/build/commands/segmentation/record.js +21 -0
  149. package/build/commands/segmentation/segment.d.ts +4 -0
  150. package/build/commands/segmentation/segment.d.ts.map +1 -0
  151. package/build/commands/segmentation/segment.js +130 -0
  152. package/build/commands/storage/column.d.ts +4 -0
  153. package/build/commands/storage/column.d.ts.map +1 -0
  154. package/build/commands/storage/column.js +84 -0
  155. package/build/commands/storage/dataset.d.ts +4 -0
  156. package/build/commands/storage/dataset.d.ts.map +1 -0
  157. package/build/commands/storage/dataset.js +20 -0
  158. package/build/commands/storage/index.d.ts +4 -0
  159. package/build/commands/storage/index.d.ts.map +1 -0
  160. package/build/commands/storage/index.js +17 -0
  161. package/build/commands/storage/model.d.ts +4 -0
  162. package/build/commands/storage/model.d.ts.map +1 -0
  163. package/build/commands/storage/model.js +141 -0
  164. package/build/commands/storage/record.d.ts +4 -0
  165. package/build/commands/storage/record.d.ts.map +1 -0
  166. package/build/commands/storage/record.js +15 -0
  167. package/build/commands/storage/relationship.d.ts +4 -0
  168. package/build/commands/storage/relationship.d.ts.map +1 -0
  169. package/build/commands/storage/relationship.js +27 -0
  170. package/build/commands/storage/run.d.ts +4 -0
  171. package/build/commands/storage/run.d.ts.map +1 -0
  172. package/build/commands/storage/run.js +42 -0
  173. package/build/commands/systemOfRecordIntegration/client.d.ts +4 -0
  174. package/build/commands/systemOfRecordIntegration/client.d.ts.map +1 -0
  175. package/build/commands/systemOfRecordIntegration/client.js +46 -0
  176. package/build/commands/systemOfRecordIntegration/index.d.ts +4 -0
  177. package/build/commands/systemOfRecordIntegration/index.d.ts.map +1 -0
  178. package/build/commands/systemOfRecordIntegration/index.js +11 -0
  179. package/build/commands/systemOfRecordIntegration/log.d.ts +4 -0
  180. package/build/commands/systemOfRecordIntegration/log.d.ts.map +1 -0
  181. package/build/commands/systemOfRecordIntegration/log.js +36 -0
  182. package/build/commands/systemOfRecordIntegration/systemOfRecord.d.ts +4 -0
  183. package/build/commands/systemOfRecordIntegration/systemOfRecord.d.ts.map +1 -0
  184. package/build/commands/systemOfRecordIntegration/systemOfRecord.js +72 -0
  185. package/build/commands/userManagement/index.d.ts +4 -0
  186. package/build/commands/userManagement/index.d.ts.map +1 -0
  187. package/build/commands/userManagement/index.js +32 -0
  188. package/build/commands/workspace/file.d.ts +4 -0
  189. package/build/commands/workspace/file.d.ts.map +1 -0
  190. package/build/commands/workspace/file.js +44 -0
  191. package/build/commands/workspace/folder.d.ts +4 -0
  192. package/build/commands/workspace/folder.d.ts.map +1 -0
  193. package/build/commands/workspace/folder.js +64 -0
  194. package/build/commands/workspace/index.d.ts +4 -0
  195. package/build/commands/workspace/index.d.ts.map +1 -0
  196. package/build/commands/workspace/index.js +17 -0
  197. package/build/commands/workspace/role.d.ts +4 -0
  198. package/build/commands/workspace/role.d.ts.map +1 -0
  199. package/build/commands/workspace/role.js +12 -0
  200. package/build/commands/workspace/token.d.ts +4 -0
  201. package/build/commands/workspace/token.d.ts.map +1 -0
  202. package/build/commands/workspace/token.js +31 -0
  203. package/build/commands/workspace/user.d.ts +4 -0
  204. package/build/commands/workspace/user.d.ts.map +1 -0
  205. package/build/commands/workspace/user.js +105 -0
  206. package/build/commands/workspace/workspaces.d.ts +4 -0
  207. package/build/commands/workspace/workspaces.d.ts.map +1 -0
  208. package/build/commands/workspace/workspaces.js +74 -0
  209. package/build/config.d.ts +7 -0
  210. package/build/config.d.ts.map +1 -0
  211. package/build/config.js +45 -0
  212. package/build/credentials.d.ts +10 -0
  213. package/build/credentials.d.ts.map +1 -0
  214. package/build/credentials.js +31 -0
  215. package/build/index.d.ts +2 -0
  216. package/build/index.d.ts.map +1 -0
  217. package/build/index.js +37 -0
  218. package/package.json +44 -0
@@ -0,0 +1,50 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerMemoryCommands(parent, getApi) {
3
+ const memory = parent.command("memory").description("Memory operations");
4
+ memory
5
+ .command("list")
6
+ .description("List memories")
7
+ .requiredOption("--scope <scope>", "Scope (workspace, user, agent)")
8
+ .option("--agent-uuid <uuid>", "Agent UUID (required when scope is agent)")
9
+ .action(async (opts) => {
10
+ const api = getApi();
11
+ const payload = opts.scope === "agent"
12
+ ? { scope: "agent", agentUuid: opts.agentUuid }
13
+ : { scope: opts.scope };
14
+ const result = await handleApiCall(() => api.ai.memory.list(payload));
15
+ outputJson(result);
16
+ });
17
+ memory
18
+ .command("remove")
19
+ .description("Remove a memory")
20
+ .requiredOption("--mem0-id <id>", "Memory ID")
21
+ .requiredOption("--scope <scope>", "Scope (workspace, user, agent)")
22
+ .option("--agent-uuid <uuid>", "Agent UUID (required when scope is agent)")
23
+ .action(async (opts) => {
24
+ const api = getApi();
25
+ const scopePayload = opts.scope === "agent"
26
+ ? { scope: "agent", agentUuid: opts.agentUuid }
27
+ : { scope: opts.scope };
28
+ await handleApiCall(() => api.ai.memory.remove({ mem0Id: opts.mem0Id, ...scopePayload }));
29
+ outputJson({ ok: true });
30
+ });
31
+ memory
32
+ .command("update")
33
+ .description("Update a memory")
34
+ .requiredOption("--mem0-id <id>", "Memory ID")
35
+ .requiredOption("--content <text>", "Memory content")
36
+ .requiredOption("--scope <scope>", "Scope (workspace, user, agent)")
37
+ .option("--agent-uuid <uuid>", "Agent UUID (required when scope is agent)")
38
+ .action(async (opts) => {
39
+ const api = getApi();
40
+ const scopePayload = opts.scope === "agent"
41
+ ? { scope: "agent", agentUuid: opts.agentUuid }
42
+ : { scope: opts.scope };
43
+ const result = await handleApiCall(() => api.ai.memory.update({
44
+ mem0Id: opts.mem0Id,
45
+ content: opts.content,
46
+ ...scopePayload,
47
+ }));
48
+ outputJson(result);
49
+ });
50
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerMessageCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +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;AAGxC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAyIN"}
@@ -0,0 +1,86 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerMessageCommands(parent, getApi) {
3
+ const message = parent.command("message").description("Message operations");
4
+ message
5
+ .command("create")
6
+ .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>", 'Message parts (JSON array, e.g. [{"type":"text","text":"Hello"}])')
9
+ .option("--tools <json>", 'Tools (JSON array, e.g. [{"slug":"my-tool","kind":"tool","config":{}}])')
10
+ .option("--resources <json>", 'Resources (JSON array, e.g. [{"slug":"my-resource","kind":"model","modelUuid":"..."}])')
11
+ .option("--capabilities <json>", 'Capabilities (JSON array, e.g. [{"slug":"web-browsing"}])')
12
+ .option("--mcp-clients <json>", 'MCP clients (JSON array, e.g. [{"name":"my-mcp","url":"..."}])')
13
+ .option("--skill-uuids <uuids>", "Skill UUIDs (comma-separated)")
14
+ .option("--system-prompt <text>", "System prompt")
15
+ .option("--with-reasoning", "Enable reasoning")
16
+ .option("--temperature <n>", "Sampling temperature")
17
+ .option("--max-steps <n>", "Maximum number of steps")
18
+ .option("--integration-slug <slug>", "Integration slug")
19
+ .option("--connector-uuid <uuid>", "Connector UUID")
20
+ .option("--language-model-slug <slug>", "Language model slug")
21
+ .action(async (opts) => {
22
+ const api = getApi();
23
+ const result = await handleApiCall(() => api.ai.message.create({
24
+ chatUuid: opts.chatUuid,
25
+ parts: parseJson(opts.parts, "--parts"),
26
+ tools: opts.tools !== undefined
27
+ ? parseJson(opts.tools, "--tools")
28
+ : undefined,
29
+ resources: opts.resources !== undefined
30
+ ? parseJson(opts.resources, "--resources")
31
+ : undefined,
32
+ capabilities: opts.capabilities !== undefined
33
+ ? parseJson(opts.capabilities, "--capabilities")
34
+ : undefined,
35
+ mcpClients: opts.mcpClients !== undefined
36
+ ? parseJson(opts.mcpClients, "--mcp-clients")
37
+ : undefined,
38
+ skillUuids: opts.skillUuids !== undefined
39
+ ? opts.skillUuids.split(",").map((s) => s.trim())
40
+ : undefined,
41
+ systemPrompt: opts.systemPrompt,
42
+ withReasoning: opts.withReasoning,
43
+ temperature: opts.temperature !== undefined
44
+ ? parseFloat(opts.temperature)
45
+ : undefined,
46
+ maxSteps: opts.maxSteps !== undefined
47
+ ? parseInt(opts.maxSteps, 10)
48
+ : undefined,
49
+ integrationSlug: opts.integrationSlug,
50
+ connectorUuid: opts.connectorUuid,
51
+ languageModelSlug: opts.languageModelSlug,
52
+ }));
53
+ outputJson(result);
54
+ });
55
+ message
56
+ .command("get <uuid>")
57
+ .description("Get message by UUID")
58
+ .action(async (uuid) => {
59
+ const api = getApi();
60
+ const result = await handleApiCall(() => api.ai.message.get(uuid));
61
+ outputJson(result);
62
+ });
63
+ message
64
+ .command("list")
65
+ .description("List messages")
66
+ .requiredOption("--chat-uuid <uuid>", "Chat UUID")
67
+ .option("--limit <n>", "Limit")
68
+ .option("--offset <n>", "Offset")
69
+ .action(async (opts) => {
70
+ const api = getApi();
71
+ const result = await handleApiCall(() => api.ai.message.list({
72
+ chatUuid: opts.chatUuid,
73
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
74
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
75
+ }));
76
+ outputJson(result);
77
+ });
78
+ message
79
+ .command("remove <uuid>")
80
+ .description("Remove a message")
81
+ .action(async (uuid) => {
82
+ const api = getApi();
83
+ await handleApiCall(() => api.ai.message.remove(uuid));
84
+ outputJson({ ok: true });
85
+ });
86
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerPromptCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=prompt.d.ts.map
@@ -0,0 +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,CAyDN"}
@@ -0,0 +1,34 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerPromptCommands(parent, getApi) {
3
+ const prompt = parent.command("prompt").description("Prompt operations");
4
+ prompt
5
+ .command("optimize")
6
+ .description("Optimize a prompt")
7
+ .requiredOption("--prompt <text>", "Prompt text to optimize")
8
+ .action(async (opts) => {
9
+ const api = getApi();
10
+ const result = await handleApiCall(() => api.ai.prompt.optimize({ prompt: opts.prompt }));
11
+ outputJson(result);
12
+ });
13
+ prompt
14
+ .command("evaluate")
15
+ .description("Evaluate a prompt")
16
+ .requiredOption("--prompt <text>", "Prompt text to evaluate")
17
+ .option("--tools <json>", 'Tools (JSON array, e.g. [{"slug":"my-tool","kind":"tool","config":{}}])')
18
+ .option("--resources <json>", 'Resources (JSON array, e.g. [{"slug":"my-resource","kind":"model","modelUuid":"..."}])')
19
+ .option("--capabilities <json>", 'Capabilities (JSON array, e.g. [{"slug":"web-browsing"}])')
20
+ .action(async (opts) => {
21
+ const api = getApi();
22
+ const result = await handleApiCall(() => api.ai.prompt.evaluate({
23
+ prompt: opts.prompt,
24
+ tools: opts.tools !== undefined ? parseJson(opts.tools, "--tools") : [],
25
+ resources: opts.resources !== undefined
26
+ ? parseJson(opts.resources, "--resources")
27
+ : [],
28
+ capabilities: opts.capabilities !== undefined
29
+ ? parseJson(opts.capabilities, "--capabilities")
30
+ : [],
31
+ }));
32
+ outputJson(result);
33
+ });
34
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerReleaseCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=release.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,150 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerReleaseCommands(parent, getApi) {
3
+ const release = parent
4
+ .command("release")
5
+ .description("AI release operations");
6
+ release
7
+ .command("list")
8
+ .description("List AI releases")
9
+ .option("--agent-uuid <uuid>", "Agent UUID")
10
+ .option("--user-uuid <uuid>", "User UUID")
11
+ .option("--statuses <statuses>", "Statuses (comma-separated)")
12
+ .option("--limit <n>", "Limit")
13
+ .option("--offset <n>", "Offset")
14
+ .action(async (opts) => {
15
+ const api = getApi();
16
+ const result = await handleApiCall(() => api.ai.release.list({
17
+ agentUuid: opts.agentUuid,
18
+ userUuid: opts.userUuid,
19
+ statuses: opts.statuses !== undefined
20
+ ? opts.statuses.split(",").map((s) => s.trim())
21
+ : undefined,
22
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
23
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
24
+ }));
25
+ outputJson(result);
26
+ });
27
+ release
28
+ .command("get <uuid>")
29
+ .description("Get AI release by UUID")
30
+ .action(async (uuid) => {
31
+ const api = getApi();
32
+ const result = await handleApiCall(() => api.ai.release.get(uuid));
33
+ outputJson(result);
34
+ });
35
+ release
36
+ .command("get-draft")
37
+ .description("Get draft AI release")
38
+ .requiredOption("--agent-uuid <uuid>", "Agent UUID")
39
+ .action(async (opts) => {
40
+ const api = getApi();
41
+ const result = await handleApiCall(() => api.ai.release.getDraft({ agentUuid: opts.agentUuid }));
42
+ outputJson(result);
43
+ });
44
+ release
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>", "Temperature")
52
+ .option("--max-steps <n>", "Max steps")
53
+ .option("--integration-slug <slug>", "Integration slug")
54
+ .option("--connector-uuid <uuid>", "Connector UUID")
55
+ .option("--language-model-slug <slug>", "Language model slug")
56
+ .option("--tools <json>", 'Tools (JSON array, e.g. [{"slug":"my-tool","kind":"tool","config":{}}])')
57
+ .option("--mcp-clients <json>", 'MCP clients (JSON array, e.g. [{"name":"client","url":"https://...","authentication":null,"disabledToolSlugs":[]}])')
58
+ .option("--resources <json>", 'Resources (JSON array, e.g. [{"slug":"my-resource","kind":"model","modelUuid":"..."}])')
59
+ .option("--capabilities <json>", 'Capabilities (JSON array, e.g. [{"slug":"web-browsing"}])')
60
+ .option("--suggested-actions <json>", 'Suggested actions (JSON array, e.g. [{"text":"Summarize","tools":[{"slug":"..."}]}])')
61
+ .option("--options <json>", "Options (JSON object)")
62
+ .action(async (opts) => {
63
+ const api = getApi();
64
+ const result = await handleApiCall(() => api.ai.release.updateDraft({
65
+ agentUuid: opts.agentUuid,
66
+ parentUuid: opts.parentUuid,
67
+ systemPrompt: opts.systemPrompt,
68
+ withReasoning: opts.withReasoning,
69
+ temperature: opts.temperature !== undefined
70
+ ? parseFloat(opts.temperature)
71
+ : undefined,
72
+ maxSteps: opts.maxSteps !== undefined
73
+ ? parseInt(opts.maxSteps, 10)
74
+ : undefined,
75
+ integrationSlug: opts.integrationSlug,
76
+ connectorUuid: opts.connectorUuid,
77
+ languageModelSlug: opts.languageModelSlug,
78
+ tools: opts.tools !== undefined
79
+ ? parseJson(opts.tools, "--tools")
80
+ : undefined,
81
+ mcpClients: opts.mcpClients !== undefined
82
+ ? parseJson(opts.mcpClients, "--mcp-clients")
83
+ : undefined,
84
+ resources: opts.resources !== undefined
85
+ ? parseJson(opts.resources, "--resources")
86
+ : undefined,
87
+ capabilities: opts.capabilities !== undefined
88
+ ? parseJson(opts.capabilities, "--capabilities")
89
+ : undefined,
90
+ suggestedActions: opts.suggestedActions !== undefined
91
+ ? parseJson(opts.suggestedActions, "--suggested-actions")
92
+ : undefined,
93
+ options: opts.options !== undefined
94
+ ? parseJson(opts.options, "--options")
95
+ : undefined,
96
+ }));
97
+ outputJson(result);
98
+ });
99
+ release
100
+ .command("deploy-draft")
101
+ .description("Deploy draft AI release")
102
+ .requiredOption("--agent-uuid <uuid>", "Agent UUID")
103
+ .requiredOption("--integration-slug <slug>", "Integration slug")
104
+ .requiredOption("--language-model-slug <slug>", "Language model slug")
105
+ .requiredOption("--version <version>", "Release version")
106
+ .requiredOption("--tools <json>", 'Tools (JSON array, e.g. [{"slug":"my-tool","kind":"tool","config":{}}])')
107
+ .requiredOption("--mcp-clients <json>", 'MCP clients (JSON array, e.g. [{"name":"client","url":"https://...","authentication":null,"disabledToolSlugs":[]}])')
108
+ .requiredOption("--resources <json>", 'Resources (JSON array, e.g. [{"slug":"my-resource","kind":"model","modelUuid":"..."}])')
109
+ .requiredOption("--capabilities <json>", 'Capabilities (JSON array, e.g. [{"slug":"web-browsing"}])')
110
+ .requiredOption("--suggested-actions <json>", 'Suggested actions (JSON array, e.g. [{"text":"Summarize","tools":[{"slug":"..."}]}])')
111
+ .option("--system-prompt <text>", "System prompt")
112
+ .option("--with-reasoning", "Enable reasoning")
113
+ .option("--temperature <n>", "Temperature")
114
+ .option("--max-steps <n>", "Max steps")
115
+ .option("--connector-uuid <uuid>", "Connector UUID")
116
+ .option("--description <text>", "Release description")
117
+ .option("--skill-uuids <uuids>", "Skill UUIDs (comma-separated)")
118
+ .option("--options <json>", "Options (JSON)")
119
+ .action(async (opts) => {
120
+ const api = getApi();
121
+ const result = await handleApiCall(() => api.ai.release.deployDraft({
122
+ agentUuid: opts.agentUuid,
123
+ integrationSlug: opts.integrationSlug,
124
+ languageModelSlug: opts.languageModelSlug,
125
+ version: opts.version,
126
+ tools: parseJson(opts.tools, "--tools"),
127
+ mcpClients: parseJson(opts.mcpClients, "--mcp-clients"),
128
+ resources: parseJson(opts.resources, "--resources"),
129
+ capabilities: parseJson(opts.capabilities, "--capabilities"),
130
+ suggestedActions: parseJson(opts.suggestedActions, "--suggested-actions"),
131
+ skillUuids: opts.skillUuids !== undefined
132
+ ? opts.skillUuids.split(",").map((uuid) => uuid.trim())
133
+ : [],
134
+ systemPrompt: opts.systemPrompt,
135
+ withReasoning: opts.withReasoning,
136
+ temperature: opts.temperature !== undefined
137
+ ? parseFloat(opts.temperature)
138
+ : undefined,
139
+ maxSteps: opts.maxSteps !== undefined
140
+ ? parseInt(opts.maxSteps, 10)
141
+ : undefined,
142
+ connectorUuid: opts.connectorUuid,
143
+ description: opts.description,
144
+ options: opts.options !== undefined
145
+ ? parseJson(opts.options, "--options")
146
+ : undefined,
147
+ }));
148
+ outputJson(result);
149
+ });
150
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerSkillCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=skill.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,96 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerSkillCommands(parent, getApi) {
3
+ const skill = parent
4
+ .command("skill")
5
+ .description("Skill operations (list, get, create, install, remove)");
6
+ skill
7
+ .command("all")
8
+ .description("Get all workspace skills")
9
+ .action(async () => {
10
+ const api = getApi();
11
+ const result = await handleApiCall(() => api.ai.skill.all());
12
+ outputJson(result);
13
+ });
14
+ skill
15
+ .command("get <uuid>")
16
+ .description("Get skill metadata")
17
+ .action(async (uuid) => {
18
+ const api = getApi();
19
+ const result = await handleApiCall(() => api.ai.skill.get(uuid));
20
+ outputJson(result);
21
+ });
22
+ skill
23
+ .command("content <uuid>")
24
+ .description("Get skill with body content and files")
25
+ .action(async (uuid) => {
26
+ const api = getApi();
27
+ const result = await handleApiCall(() => api.ai.skill.getContent(uuid));
28
+ outputJson(result);
29
+ });
30
+ skill
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")
38
+ .action(async (options) => {
39
+ const api = getApi();
40
+ const payload = {
41
+ slug: options.slug,
42
+ name: options.name,
43
+ description: options.description,
44
+ 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));
50
+ outputJson(result);
51
+ });
52
+ skill
53
+ .command("update <uuid>")
54
+ .description("Update a custom skill")
55
+ .option("--name <name>", "New display name")
56
+ .option("--description <description>", "New description")
57
+ .option("--body <body>", "New body content")
58
+ .option("--files <json>", "JSON array of {path, content} file entries")
59
+ .action(async (uuid, options) => {
60
+ const api = getApi();
61
+ const payload = { uuid };
62
+ if (options.name !== undefined) {
63
+ payload.name = options.name;
64
+ }
65
+ if (options.description !== undefined) {
66
+ payload.description = options.description;
67
+ }
68
+ if (options.body !== undefined) {
69
+ payload.body = options.body;
70
+ }
71
+ if (options.files !== undefined) {
72
+ payload.files = JSON.parse(options.files);
73
+ }
74
+ const result = await handleApiCall(() => api.ai.skill.update(payload));
75
+ outputJson(result);
76
+ });
77
+ 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) => {
84
+ const api = getApi();
85
+ const result = await handleApiCall(() => api.ai.skill.install(options));
86
+ outputJson(result);
87
+ });
88
+ skill
89
+ .command("remove <uuid>")
90
+ .description("Remove a skill")
91
+ .action(async (uuid) => {
92
+ const api = getApi();
93
+ await handleApiCall(() => api.ai.skill.remove(uuid));
94
+ outputJson({ outcome: "removed" });
95
+ });
96
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerSuggestedActionCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=suggestedAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestedAction.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/suggestedAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CA6DN"}
@@ -0,0 +1,37 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerSuggestedActionCommands(parent, getApi) {
3
+ const suggestedAction = parent
4
+ .command("suggested-action")
5
+ .description("Suggested action operations");
6
+ suggestedAction
7
+ .command("generate")
8
+ .description("Generate suggested actions")
9
+ .option("--message-uuid <uuid>", "Message UUID")
10
+ .option("--system-prompt <text>", "System prompt")
11
+ .option("--context-prompt <text>", "Context prompt")
12
+ .option("--agent-uuid <uuid>", "Agent UUID")
13
+ .option("--tools <json>", 'Tools (JSON array, e.g. [{"slug":"my-tool","kind":"tool","config":{}}])')
14
+ .option("--resources <json>", 'Resources (JSON array, e.g. [{"slug":"my-resource","kind":"model","modelUuid":"..."}])')
15
+ .option("--capabilities <json>", 'Capabilities (JSON array, e.g. [{"slug":"web-browsing"}])')
16
+ .option("--cache-key <key>", "Cache key")
17
+ .action(async (opts) => {
18
+ const api = getApi();
19
+ const result = await handleApiCall(() => api.ai.suggestedAction.generate({
20
+ messageUuid: opts.messageUuid,
21
+ systemPrompt: opts.systemPrompt,
22
+ contextPrompt: opts.contextPrompt,
23
+ agentUuid: opts.agentUuid,
24
+ tools: opts.tools !== undefined
25
+ ? parseJson(opts.tools, "--tools")
26
+ : undefined,
27
+ resources: opts.resources !== undefined
28
+ ? parseJson(opts.resources, "--resources")
29
+ : undefined,
30
+ capabilities: opts.capabilities !== undefined
31
+ ? parseJson(opts.capabilities, "--capabilities")
32
+ : undefined,
33
+ cacheKey: opts.cacheKey,
34
+ }));
35
+ outputJson(result);
36
+ });
37
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerTemplateCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,MAAM,GAAG,GAChB,IAAI,CAaN"}
@@ -0,0 +1,14 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerTemplateCommands(parent, getApi) {
3
+ const template = parent
4
+ .command("template")
5
+ .description("AI template operations");
6
+ template
7
+ .command("list")
8
+ .description("List all AI templates")
9
+ .action(async () => {
10
+ const api = getApi();
11
+ const result = await handleApiCall(() => api.ai.template.all());
12
+ outputJson(result);
13
+ });
14
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerVoteCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=vote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vote.d.ts","sourceRoot":"","sources":["../../../src/commands/ai/vote.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,CAsC7E"}
@@ -0,0 +1,28 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerVoteCommands(parent, getApi) {
3
+ const vote = parent.command("vote").description("Vote operations");
4
+ vote
5
+ .command("upsert")
6
+ .description("Upsert a vote")
7
+ .requiredOption("--chat-uuid <uuid>", "Chat UUID")
8
+ .requiredOption("--message-uuid <uuid>", "Message UUID")
9
+ .option("--is-upvoted", "Upvote the message")
10
+ .action(async (opts) => {
11
+ const api = getApi();
12
+ const result = await handleApiCall(() => api.ai.vote.upsert({
13
+ chatUuid: opts.chatUuid,
14
+ messageUuid: opts.messageUuid,
15
+ isUpvoted: opts.isUpvoted === true,
16
+ }));
17
+ outputJson(result);
18
+ });
19
+ vote
20
+ .command("list")
21
+ .description("List votes")
22
+ .requiredOption("--chat-uuid <uuid>", "Chat UUID")
23
+ .action(async (opts) => {
24
+ const api = getApi();
25
+ const result = await handleApiCall(() => api.ai.vote.list({ chatUuid: opts.chatUuid }));
26
+ outputJson(result);
27
+ });
28
+ }
@@ -0,0 +1,3 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerAuthCommands(program: Command): void;
3
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +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;AAYzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiF3D"}