@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,194 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerRecordCommands(parent, getApi) {
3
+ const record = parent.command("record").description("Record operations");
4
+ record
5
+ .command("list")
6
+ .description("List records")
7
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
8
+ .option("--ids <list>", "Record IDs (comma-separated)")
9
+ .option("--title <title>", "Record title")
10
+ .option("--title-or-id <value>", "Record title or ID")
11
+ .option("--release-uuid <uuid>", "Release UUID")
12
+ .option("--batch-uuid <uuid>", "Batch UUID")
13
+ .option("--statuses <list>", "Statuses (comma-separated)")
14
+ .option("--parent-batch-uuid <uuid>", "Parent batch UUID")
15
+ .option("--parent-run-uuid <uuid>", "Parent run UUID")
16
+ .option("--parent-node-uuid <uuid>", "Parent node UUID")
17
+ .option("--is-group-parent", "Only group parents")
18
+ .option("--executions-filter <json>", 'Executions filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[{"kind":"node","nodeSlug":"...","operator":"isRunning"}]}]})')
19
+ .option("--created-after <date>", "Created after date")
20
+ .option("--created-before <date>", "Created before date")
21
+ .option("--limit <n>", "Limit", "20")
22
+ .option("--offset <n>", "Offset", "0")
23
+ .action(async (opts) => {
24
+ const api = getApi();
25
+ const result = await handleApiCall(() => api.orchestration.record.list({
26
+ workflowUuid: opts.workflowUuid,
27
+ ids: opts.ids !== undefined
28
+ ? opts.ids.split(",").map((s) => s.trim())
29
+ : undefined,
30
+ title: opts.title,
31
+ titleOrId: opts.titleOrId,
32
+ releaseUuid: opts.releaseUuid,
33
+ batchUuid: opts.batchUuid,
34
+ statuses: opts.statuses !== undefined
35
+ ? opts.statuses.split(",").map((s) => s.trim())
36
+ : undefined,
37
+ parentBatchUuid: opts.parentBatchUuid,
38
+ parentRunUuid: opts.parentRunUuid,
39
+ parentNodeUuid: opts.parentNodeUuid,
40
+ isGroupParent: opts.isGroupParent,
41
+ executionsFilter: opts.executionsFilter !== undefined
42
+ ? parseJson(opts.executionsFilter, "--executions-filter")
43
+ : undefined,
44
+ createdAfter: opts.createdAfter,
45
+ createdBefore: opts.createdBefore,
46
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
47
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
48
+ }));
49
+ outputJson(result);
50
+ });
51
+ record
52
+ .command("count")
53
+ .description("Count records")
54
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
55
+ .option("--ids <list>", "Record IDs (comma-separated)")
56
+ .option("--title <title>", "Record title")
57
+ .option("--title-or-id <value>", "Record title or ID")
58
+ .option("--release-uuid <uuid>", "Release UUID")
59
+ .option("--batch-uuid <uuid>", "Batch UUID")
60
+ .option("--statuses <list>", "Statuses (comma-separated)")
61
+ .option("--parent-batch-uuid <uuid>", "Parent batch UUID")
62
+ .option("--parent-run-uuid <uuid>", "Parent run UUID")
63
+ .option("--parent-node-uuid <uuid>", "Parent node UUID")
64
+ .option("--is-group-parent", "Only group parents")
65
+ .option("--executions-filter <json>", 'Executions filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[{"kind":"node","nodeSlug":"...","operator":"isRunning"}]}]})')
66
+ .option("--created-after <date>", "Created after date")
67
+ .option("--created-before <date>", "Created before date")
68
+ .action(async (opts) => {
69
+ const api = getApi();
70
+ const result = await handleApiCall(() => api.orchestration.record.count({
71
+ workflowUuid: opts.workflowUuid,
72
+ ids: opts.ids !== undefined
73
+ ? opts.ids.split(",").map((s) => s.trim())
74
+ : undefined,
75
+ title: opts.title,
76
+ titleOrId: opts.titleOrId,
77
+ releaseUuid: opts.releaseUuid,
78
+ batchUuid: opts.batchUuid,
79
+ statuses: opts.statuses !== undefined
80
+ ? opts.statuses.split(",").map((s) => s.trim())
81
+ : undefined,
82
+ parentBatchUuid: opts.parentBatchUuid,
83
+ parentRunUuid: opts.parentRunUuid,
84
+ parentNodeUuid: opts.parentNodeUuid,
85
+ isGroupParent: opts.isGroupParent,
86
+ executionsFilter: opts.executionsFilter !== undefined
87
+ ? parseJson(opts.executionsFilter, "--executions-filter")
88
+ : undefined,
89
+ createdAfter: opts.createdAfter,
90
+ createdBefore: opts.createdBefore,
91
+ }));
92
+ outputJson(result);
93
+ });
94
+ record
95
+ .command("download")
96
+ .description("Download records")
97
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
98
+ .option("--ids <list>", "Record IDs (comma-separated)")
99
+ .option("--title <title>", "Record title")
100
+ .option("--title-or-id <value>", "Record title or ID")
101
+ .option("--release-uuid <uuid>", "Release UUID")
102
+ .option("--batch-uuid <uuid>", "Batch UUID")
103
+ .option("--statuses <list>", "Statuses (comma-separated)")
104
+ .option("--parent-batch-uuid <uuid>", "Parent batch UUID")
105
+ .option("--parent-run-uuid <uuid>", "Parent run UUID")
106
+ .option("--parent-node-uuid <uuid>", "Parent node UUID")
107
+ .option("--is-group-parent", "Only group parents")
108
+ .option("--executions-filter <json>", 'Executions filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[{"kind":"node","nodeSlug":"...","operator":"isRunning"}]}]})')
109
+ .option("--created-after <date>", "Created after date")
110
+ .option("--created-before <date>", "Created before date")
111
+ .action(async (opts) => {
112
+ const api = getApi();
113
+ const result = await handleApiCall(() => api.orchestration.record.download({
114
+ workflowUuid: opts.workflowUuid,
115
+ ids: opts.ids !== undefined
116
+ ? opts.ids.split(",").map((s) => s.trim())
117
+ : undefined,
118
+ title: opts.title,
119
+ titleOrId: opts.titleOrId,
120
+ releaseUuid: opts.releaseUuid,
121
+ batchUuid: opts.batchUuid,
122
+ statuses: opts.statuses !== undefined
123
+ ? opts.statuses.split(",").map((s) => s.trim())
124
+ : undefined,
125
+ parentBatchUuid: opts.parentBatchUuid,
126
+ parentRunUuid: opts.parentRunUuid,
127
+ parentNodeUuid: opts.parentNodeUuid,
128
+ isGroupParent: opts.isGroupParent,
129
+ executionsFilter: opts.executionsFilter !== undefined
130
+ ? parseJson(opts.executionsFilter, "--executions-filter")
131
+ : undefined,
132
+ createdAfter: opts.createdAfter,
133
+ createdBefore: opts.createdBefore,
134
+ }));
135
+ outputJson(result);
136
+ });
137
+ record
138
+ .command("get-metrics")
139
+ .description("Get record metrics")
140
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
141
+ .option("--release-uuid <uuid>", "Release UUID")
142
+ .option("--batch-uuid <uuid>", "Batch UUID")
143
+ .option("--created-after <date>", "Created after date")
144
+ .option("--created-before <date>", "Created before date")
145
+ .action(async (opts) => {
146
+ const api = getApi();
147
+ const result = await handleApiCall(() => api.orchestration.record.getMetrics({
148
+ workflowUuid: opts.workflowUuid,
149
+ releaseUuid: opts.releaseUuid,
150
+ batchUuid: opts.batchUuid,
151
+ createdAfter: opts.createdAfter,
152
+ createdBefore: opts.createdBefore,
153
+ }));
154
+ outputJson(result);
155
+ });
156
+ record
157
+ .command("cancel")
158
+ .description("Cancel records")
159
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
160
+ .option("--ids <list>", "Record IDs (comma-separated)")
161
+ .option("--title <title>", "Record title")
162
+ .option("--title-or-id <value>", "Record title or ID")
163
+ .option("--release-uuid <uuid>", "Release UUID")
164
+ .option("--batch-uuid <uuid>", "Batch UUID")
165
+ .option("--parent-batch-uuid <uuid>", "Parent batch UUID")
166
+ .option("--parent-run-uuid <uuid>", "Parent run UUID")
167
+ .option("--parent-node-uuid <uuid>", "Parent node UUID")
168
+ .option("--is-group-parent", "Only group parents")
169
+ .option("--executions-filter <json>", 'Executions filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[{"kind":"node","nodeSlug":"...","operator":"isRunning"}]}]})')
170
+ .action(async (opts) => {
171
+ const payload = opts.ids !== undefined
172
+ ? {
173
+ workflowUuid: opts.workflowUuid,
174
+ ids: opts.ids.split(",").map((s) => s.trim()),
175
+ }
176
+ : {
177
+ workflowUuid: opts.workflowUuid,
178
+ title: opts.title,
179
+ titleOrId: opts.titleOrId,
180
+ releaseUuid: opts.releaseUuid,
181
+ batchUuid: opts.batchUuid,
182
+ parentBatchUuid: opts.parentBatchUuid,
183
+ parentRunUuid: opts.parentRunUuid,
184
+ parentNodeUuid: opts.parentNodeUuid,
185
+ isGroupParent: opts.isGroupParent,
186
+ executionsFilter: opts.executionsFilter !== undefined
187
+ ? parseJson(opts.executionsFilter, "--executions-filter")
188
+ : undefined,
189
+ };
190
+ const api = getApi();
191
+ await handleApiCall(() => api.orchestration.record.cancel(payload));
192
+ outputJson({ ok: true });
193
+ });
194
+ }
@@ -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/orchestration/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,CAuCN"}
@@ -0,0 +1,27 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerReleaseCommands(parent, getApi) {
3
+ const release = parent.command("release").description("Release operations");
4
+ release
5
+ .command("list")
6
+ .description("List releases")
7
+ .option("--workflow-uuid <uuid>", "Workflow UUID")
8
+ .option("--limit <n>", "Limit", "20")
9
+ .option("--offset <n>", "Offset", "0")
10
+ .action(async (opts) => {
11
+ const api = getApi();
12
+ const result = await handleApiCall(() => api.orchestration.release.list({
13
+ workflowUuid: opts.workflowUuid,
14
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
15
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
16
+ }));
17
+ outputJson(result);
18
+ });
19
+ release
20
+ .command("get <uuid>")
21
+ .description("Get a release by UUID")
22
+ .action(async (uuid) => {
23
+ const api = getApi();
24
+ const result = await handleApiCall(() => api.orchestration.release.get(uuid));
25
+ outputJson(result);
26
+ });
27
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerRunCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,IAAI,CAoT5E"}
@@ -0,0 +1,196 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerRunCommands(parent, getApi) {
3
+ const run = parent.command("run").description("Run operations");
4
+ run
5
+ .command("list")
6
+ .description("List runs")
7
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
8
+ .option("--batch-uuid <uuid>", "Batch UUID")
9
+ .option("--release-uuid <uuid>", "Release UUID")
10
+ .option("--statuses <list>", "Statuses (comma-separated)")
11
+ .option("--parent-batch-uuid <uuid>", "Parent batch UUID")
12
+ .option("--parent-uuid <uuid>", "Parent run UUID")
13
+ .option("--parent-node-uuid <uuid>", "Parent node UUID")
14
+ .option("--is-group-parent", "Only group parents")
15
+ .option("--record-id <id>", "Record ID")
16
+ .option("--record-title <title>", "Record title")
17
+ .option("--record-title-or-id <value>", "Record title or ID")
18
+ .option("--is-finished", "Only finished runs")
19
+ .option("--executions-filter <json>", 'Executions filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[{"kind":"node","nodeSlug":"...","operator":"isRunning"}]}]})')
20
+ .option("--created-after <date>", "Created after date")
21
+ .option("--created-before <date>", "Created before date")
22
+ .option("--limit <n>", "Limit", "20")
23
+ .option("--offset <n>", "Offset", "0")
24
+ .action(async (opts) => {
25
+ const api = getApi();
26
+ const result = await handleApiCall(() => api.orchestration.run.list({
27
+ workflowUuid: opts.workflowUuid,
28
+ batchUuid: opts.batchUuid,
29
+ releaseUuid: opts.releaseUuid,
30
+ statuses: opts.statuses !== undefined
31
+ ? opts.statuses.split(",").map((s) => s.trim())
32
+ : undefined,
33
+ parentBatchUuid: opts.parentBatchUuid,
34
+ parentUuid: opts.parentUuid,
35
+ parentNodeUuid: opts.parentNodeUuid,
36
+ isGroupParent: opts.isGroupParent,
37
+ recordId: opts.recordId,
38
+ recordTitle: opts.recordTitle,
39
+ recordTitleOrId: opts.recordTitleOrId,
40
+ isFinished: opts.isFinished,
41
+ executionsFilter: opts.executionsFilter !== undefined
42
+ ? parseJson(opts.executionsFilter, "--executions-filter")
43
+ : undefined,
44
+ createdAfter: opts.createdAfter,
45
+ createdBefore: opts.createdBefore,
46
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
47
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
48
+ }));
49
+ outputJson(result);
50
+ });
51
+ run
52
+ .command("get <uuid>")
53
+ .description("Get a run by UUID")
54
+ .action(async (uuid) => {
55
+ const api = getApi();
56
+ const result = await handleApiCall(() => api.orchestration.run.get(uuid));
57
+ outputJson(result);
58
+ });
59
+ run
60
+ .command("create")
61
+ .description("Create a run")
62
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
63
+ .requiredOption("--data <json>", 'Run data (JSON, e.g. {"kind":"segment","segmentUuid":"..."} or {"kind":"record","record":{}})')
64
+ .option("--release-uuid <uuid>", "Release UUID")
65
+ .action(async (opts) => {
66
+ const data = parseJson(opts.data, "--data");
67
+ const api = getApi();
68
+ const result = await handleApiCall(() => api.orchestration.run.create({
69
+ workflowUuid: opts.workflowUuid,
70
+ releaseUuid: opts.releaseUuid,
71
+ data,
72
+ }));
73
+ outputJson(result);
74
+ });
75
+ run
76
+ .command("cancel")
77
+ .description("Cancel runs")
78
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
79
+ .option("--uuids <list>", "Run UUIDs (comma-separated)")
80
+ .action(async (opts) => {
81
+ const api = getApi();
82
+ const payload = opts.uuids !== undefined
83
+ ? {
84
+ workflowUuid: opts.workflowUuid,
85
+ uuids: opts.uuids.split(",").map((s) => s.trim()),
86
+ }
87
+ : { workflowUuid: opts.workflowUuid };
88
+ await handleApiCall(() => api.orchestration.run.cancel(payload));
89
+ outputJson({ ok: true });
90
+ });
91
+ run
92
+ .command("count")
93
+ .description("Count runs")
94
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
95
+ .option("--batch-uuid <uuid>", "Batch UUID")
96
+ .option("--release-uuid <uuid>", "Release UUID")
97
+ .option("--statuses <list>", "Statuses (comma-separated)")
98
+ .option("--parent-batch-uuid <uuid>", "Parent batch UUID")
99
+ .option("--parent-uuid <uuid>", "Parent run UUID")
100
+ .option("--parent-node-uuid <uuid>", "Parent node UUID")
101
+ .option("--is-group-parent", "Only group parents")
102
+ .option("--record-id <id>", "Record ID")
103
+ .option("--record-title <title>", "Record title")
104
+ .option("--record-title-or-id <value>", "Record title or ID")
105
+ .option("--is-finished", "Only finished runs")
106
+ .option("--executions-filter <json>", 'Executions filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[{"kind":"node","nodeSlug":"...","operator":"isRunning"}]}]})')
107
+ .option("--created-after <date>", "Created after date")
108
+ .option("--created-before <date>", "Created before date")
109
+ .action(async (opts) => {
110
+ const api = getApi();
111
+ const result = await handleApiCall(() => api.orchestration.run.count({
112
+ workflowUuid: opts.workflowUuid,
113
+ batchUuid: opts.batchUuid,
114
+ releaseUuid: opts.releaseUuid,
115
+ statuses: opts.statuses !== undefined
116
+ ? opts.statuses.split(",").map((s) => s.trim())
117
+ : undefined,
118
+ parentBatchUuid: opts.parentBatchUuid,
119
+ parentUuid: opts.parentUuid,
120
+ parentNodeUuid: opts.parentNodeUuid,
121
+ isGroupParent: opts.isGroupParent,
122
+ recordId: opts.recordId,
123
+ recordTitle: opts.recordTitle,
124
+ recordTitleOrId: opts.recordTitleOrId,
125
+ isFinished: opts.isFinished,
126
+ executionsFilter: opts.executionsFilter !== undefined
127
+ ? parseJson(opts.executionsFilter, "--executions-filter")
128
+ : undefined,
129
+ createdAfter: opts.createdAfter,
130
+ createdBefore: opts.createdBefore,
131
+ }));
132
+ outputJson(result);
133
+ });
134
+ run
135
+ .command("download")
136
+ .description("Download run results")
137
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
138
+ .option("--batch-uuid <uuid>", "Batch UUID")
139
+ .option("--release-uuid <uuid>", "Release UUID")
140
+ .option("--statuses <list>", "Statuses (comma-separated)")
141
+ .option("--parent-batch-uuid <uuid>", "Parent batch UUID")
142
+ .option("--parent-uuid <uuid>", "Parent run UUID")
143
+ .option("--parent-node-uuid <uuid>", "Parent node UUID")
144
+ .option("--is-group-parent", "Only group parents")
145
+ .option("--record-id <id>", "Record ID")
146
+ .option("--record-title <title>", "Record title")
147
+ .option("--record-title-or-id <value>", "Record title or ID")
148
+ .option("--is-finished", "Only finished runs")
149
+ .option("--executions-filter <json>", 'Executions filter (JSON, e.g. {"conjonction":"and","groups":[{"conjonction":"and","conditions":[{"kind":"node","nodeSlug":"...","operator":"isRunning"}]}]})')
150
+ .option("--created-after <date>", "Created after date")
151
+ .option("--created-before <date>", "Created before date")
152
+ .action(async (opts) => {
153
+ const api = getApi();
154
+ const result = await handleApiCall(() => api.orchestration.run.download({
155
+ workflowUuid: opts.workflowUuid,
156
+ batchUuid: opts.batchUuid,
157
+ releaseUuid: opts.releaseUuid,
158
+ statuses: opts.statuses !== undefined
159
+ ? opts.statuses.split(",").map((s) => s.trim())
160
+ : undefined,
161
+ parentBatchUuid: opts.parentBatchUuid,
162
+ parentUuid: opts.parentUuid,
163
+ parentNodeUuid: opts.parentNodeUuid,
164
+ isGroupParent: opts.isGroupParent,
165
+ recordId: opts.recordId,
166
+ recordTitle: opts.recordTitle,
167
+ recordTitleOrId: opts.recordTitleOrId,
168
+ isFinished: opts.isFinished,
169
+ executionsFilter: opts.executionsFilter !== undefined
170
+ ? parseJson(opts.executionsFilter, "--executions-filter")
171
+ : undefined,
172
+ createdAfter: opts.createdAfter,
173
+ createdBefore: opts.createdBefore,
174
+ }));
175
+ outputJson(result);
176
+ });
177
+ run
178
+ .command("get-metrics")
179
+ .description("Get run metrics")
180
+ .requiredOption("--workflow-uuid <uuid>", "Workflow UUID")
181
+ .option("--release-uuid <uuid>", "Release UUID")
182
+ .option("--batch-uuid <uuid>", "Batch UUID")
183
+ .option("--created-after <date>", "Created after date")
184
+ .option("--created-before <date>", "Created before date")
185
+ .action(async (opts) => {
186
+ const api = getApi();
187
+ const result = await handleApiCall(() => api.orchestration.run.getMetrics({
188
+ workflowUuid: opts.workflowUuid,
189
+ releaseUuid: opts.releaseUuid,
190
+ batchUuid: opts.batchUuid,
191
+ createdAfter: opts.createdAfter,
192
+ createdBefore: opts.createdBefore,
193
+ }));
194
+ outputJson(result);
195
+ });
196
+ }
@@ -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/orchestration/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,CA0BN"}
@@ -0,0 +1,22 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerTemplateCommands(parent, getApi) {
3
+ const template = parent
4
+ .command("template")
5
+ .description("Template operations");
6
+ template
7
+ .command("list")
8
+ .description("List all templates")
9
+ .action(async () => {
10
+ const api = getApi();
11
+ const result = await handleApiCall(() => api.orchestration.template.all());
12
+ outputJson(result);
13
+ });
14
+ template
15
+ .command("get <slug>")
16
+ .description("Get a template by slug")
17
+ .action(async (slug) => {
18
+ const api = getApi();
19
+ const result = await handleApiCall(() => api.orchestration.template.get({ slug }));
20
+ outputJson(result);
21
+ });
22
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerToolCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/tool.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,CAwG7E"}
@@ -0,0 +1,72 @@
1
+ import { handleApiCall, outputJson, parseJson } from "../runHandler.js";
2
+ export function registerToolCommands(parent, getApi) {
3
+ const tool = parent.command("tool").description("Tool operations");
4
+ tool
5
+ .command("list")
6
+ .description("List all tools")
7
+ .action(async () => {
8
+ const api = getApi();
9
+ const result = await handleApiCall(() => api.orchestration.tool.all());
10
+ outputJson(result);
11
+ });
12
+ tool
13
+ .command("create")
14
+ .description("Create a tool")
15
+ .requiredOption("--name <name>", "Tool name")
16
+ .requiredOption("--icon-kind <kind>", "Icon kind (raw or emoji)")
17
+ .option("--icon-data <data>", "Icon data (when kind is raw)")
18
+ .option("--icon-emoji-slug <slug>", "Icon emoji slug (when kind is emoji)")
19
+ .option("--description <text>", "Tool description")
20
+ .option("--folder-uuid <uuid>", "Folder UUID")
21
+ .action(async (opts) => {
22
+ const icon = opts.iconKind === "emoji"
23
+ ? { kind: "emoji", emojiSlug: opts.iconEmojiSlug }
24
+ : { kind: "raw", data: opts.iconData };
25
+ const api = getApi();
26
+ const result = await handleApiCall(() => api.orchestration.tool.create({
27
+ name: opts.name,
28
+ icon,
29
+ description: opts.description,
30
+ folderUuid: opts.folderUuid,
31
+ }));
32
+ outputJson(result);
33
+ });
34
+ tool
35
+ .command("update")
36
+ .description("Update a tool")
37
+ .requiredOption("--uuid <uuid>", "Tool UUID")
38
+ .option("--name <name>", "Tool name")
39
+ .option("--icon-kind <kind>", "Icon kind (raw or emoji)")
40
+ .option("--icon-data <data>", "Icon data (when kind is raw)")
41
+ .option("--icon-emoji-slug <slug>", "Icon emoji slug (when kind is emoji)")
42
+ .option("--description <text>", "Tool description")
43
+ .option("--folder-uuid <uuid>", "Folder UUID")
44
+ .option("--triggers <json>", 'Triggers (JSON array, e.g. [{"name":"Daily","type":"cron","cron":"0 9 * * *","data":{}}])')
45
+ .action(async (opts) => {
46
+ const icon = opts.iconKind !== undefined
47
+ ? opts.iconKind === "emoji"
48
+ ? { kind: "emoji", emojiSlug: opts.iconEmojiSlug }
49
+ : { kind: "raw", data: opts.iconData }
50
+ : undefined;
51
+ const api = getApi();
52
+ const result = await handleApiCall(() => api.orchestration.tool.update({
53
+ uuid: opts.uuid,
54
+ name: opts.name,
55
+ icon,
56
+ description: opts.description,
57
+ folderUuid: opts.folderUuid,
58
+ triggers: opts.triggers !== undefined
59
+ ? parseJson(opts.triggers, "--triggers")
60
+ : undefined,
61
+ }));
62
+ outputJson(result);
63
+ });
64
+ tool
65
+ .command("remove <uuid>")
66
+ .description("Remove a tool")
67
+ .action(async (uuid) => {
68
+ const api = getApi();
69
+ await handleApiCall(() => api.orchestration.tool.remove(uuid));
70
+ outputJson({ ok: true });
71
+ });
72
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerWorkflowCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../src/commands/orchestration/workflow.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,CAeN"}
@@ -0,0 +1,14 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerWorkflowCommands(parent, getApi) {
3
+ const workflow = parent
4
+ .command("workflow")
5
+ .description("Workflow operations");
6
+ workflow
7
+ .command("list")
8
+ .description("List all workflows")
9
+ .action(async () => {
10
+ const api = getApi();
11
+ const result = await handleApiCall(() => api.orchestration.workflow.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 registerAllocationCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=allocation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allocation.d.ts","sourceRoot":"","sources":["../../../src/commands/revenueOrganization/allocation.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,CAkEN"}
@@ -0,0 +1,45 @@
1
+ import { handleApiCall, outputJson } from "../runHandler.js";
2
+ export function registerAllocationCommands(parent, getApi) {
3
+ const allocation = parent
4
+ .command("allocation")
5
+ .description("Allocation operations");
6
+ allocation
7
+ .command("list")
8
+ .description("List allocations")
9
+ .option("--members-uuids <uuids>", "Member UUIDs (comma-separated)")
10
+ .option("--capacity-uuid <uuid>", "Capacity UUID")
11
+ .option("--expiration-policy <policy>", "Expiration policy")
12
+ .option("--territory-uuid <uuid>", "Territory UUID")
13
+ .option("--limit <n>", "Limit")
14
+ .option("--offset <n>", "Offset")
15
+ .action(async (opts) => {
16
+ const api = getApi();
17
+ const result = await handleApiCall(() => api.revenueOrganization.allocation.list({
18
+ membersUuids: opts.membersUuids !== undefined
19
+ ? opts.membersUuids.split(",").map((s) => s.trim())
20
+ : undefined,
21
+ capacityUuid: opts.capacityUuid,
22
+ expirationPolicy: opts.expirationPolicy,
23
+ territoryUuid: opts.territoryUuid,
24
+ limit: opts.limit !== undefined ? parseInt(opts.limit, 10) : undefined,
25
+ offset: opts.offset !== undefined ? parseInt(opts.offset, 10) : undefined,
26
+ }));
27
+ outputJson(result);
28
+ });
29
+ allocation
30
+ .command("get <uuid>")
31
+ .description("Get allocation by UUID")
32
+ .action(async (uuid) => {
33
+ const api = getApi();
34
+ const result = await handleApiCall(() => api.revenueOrganization.allocation.get(uuid));
35
+ outputJson(result);
36
+ });
37
+ allocation
38
+ .command("remove <uuid>")
39
+ .description("Remove an allocation")
40
+ .action(async (uuid) => {
41
+ const api = getApi();
42
+ await handleApiCall(() => api.revenueOrganization.allocation.remove(uuid));
43
+ outputJson({ ok: true });
44
+ });
45
+ }
@@ -0,0 +1,4 @@
1
+ import type { Command } from "commander";
2
+ import type { Api } from "../../api.js";
3
+ export declare function registerCapacityCommands(parent: Command, getApi: () => Api): void;
4
+ //# sourceMappingURL=capacity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capacity.d.ts","sourceRoot":"","sources":["../../../src/commands/revenueOrganization/capacity.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,CA4JN"}