@camunda8/cli 2.6.0-alpha.18 → 2.6.0-alpha.19

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 (131) hide show
  1. package/dist/client.d.ts +10 -2
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +7 -17
  4. package/dist/client.js.map +1 -1
  5. package/dist/commands/completion.d.ts.map +1 -1
  6. package/dist/commands/completion.js +41 -41
  7. package/dist/commands/completion.js.map +1 -1
  8. package/dist/commands/deployments.d.ts.map +1 -1
  9. package/dist/commands/deployments.js +158 -131
  10. package/dist/commands/deployments.js.map +1 -1
  11. package/dist/commands/forms.d.ts.map +1 -1
  12. package/dist/commands/forms.js +52 -28
  13. package/dist/commands/forms.js.map +1 -1
  14. package/dist/commands/help.d.ts.map +1 -1
  15. package/dist/commands/help.js +586 -168
  16. package/dist/commands/help.js.map +1 -1
  17. package/dist/commands/identity-authorizations.d.ts +1 -1
  18. package/dist/commands/identity-authorizations.d.ts.map +1 -1
  19. package/dist/commands/identity-authorizations.js +45 -33
  20. package/dist/commands/identity-authorizations.js.map +1 -1
  21. package/dist/commands/identity-groups.d.ts +2 -1
  22. package/dist/commands/identity-groups.d.ts.map +1 -1
  23. package/dist/commands/identity-groups.js +24 -21
  24. package/dist/commands/identity-groups.js.map +1 -1
  25. package/dist/commands/identity-mapping-rules.d.ts +1 -1
  26. package/dist/commands/identity-mapping-rules.d.ts.map +1 -1
  27. package/dist/commands/identity-mapping-rules.js +23 -24
  28. package/dist/commands/identity-mapping-rules.js.map +1 -1
  29. package/dist/commands/identity-roles.d.ts +2 -1
  30. package/dist/commands/identity-roles.d.ts.map +1 -1
  31. package/dist/commands/identity-roles.js +23 -20
  32. package/dist/commands/identity-roles.js.map +1 -1
  33. package/dist/commands/identity-tenants.d.ts +1 -1
  34. package/dist/commands/identity-tenants.d.ts.map +1 -1
  35. package/dist/commands/identity-tenants.js +22 -22
  36. package/dist/commands/identity-tenants.js.map +1 -1
  37. package/dist/commands/identity-users.d.ts +1 -1
  38. package/dist/commands/identity-users.d.ts.map +1 -1
  39. package/dist/commands/identity-users.js +24 -26
  40. package/dist/commands/identity-users.js.map +1 -1
  41. package/dist/commands/identity.d.ts +6 -6
  42. package/dist/commands/identity.d.ts.map +1 -1
  43. package/dist/commands/identity.js +170 -105
  44. package/dist/commands/identity.js.map +1 -1
  45. package/dist/commands/incidents.d.ts +1 -1
  46. package/dist/commands/incidents.d.ts.map +1 -1
  47. package/dist/commands/incidents.js +19 -17
  48. package/dist/commands/incidents.js.map +1 -1
  49. package/dist/commands/jobs.d.ts +1 -1
  50. package/dist/commands/jobs.d.ts.map +1 -1
  51. package/dist/commands/jobs.js +39 -39
  52. package/dist/commands/jobs.js.map +1 -1
  53. package/dist/commands/mcp-proxy.d.ts +2 -2
  54. package/dist/commands/mcp-proxy.d.ts.map +1 -1
  55. package/dist/commands/mcp-proxy.js +34 -33
  56. package/dist/commands/mcp-proxy.js.map +1 -1
  57. package/dist/commands/messages.d.ts.map +1 -1
  58. package/dist/commands/messages.js +23 -21
  59. package/dist/commands/messages.js.map +1 -1
  60. package/dist/commands/open.d.ts +2 -1
  61. package/dist/commands/open.d.ts.map +1 -1
  62. package/dist/commands/open.js +29 -20
  63. package/dist/commands/open.js.map +1 -1
  64. package/dist/commands/plugins.d.ts.map +1 -1
  65. package/dist/commands/plugins.js +184 -140
  66. package/dist/commands/plugins.js.map +1 -1
  67. package/dist/commands/process-definitions.d.ts +1 -1
  68. package/dist/commands/process-definitions.d.ts.map +1 -1
  69. package/dist/commands/process-definitions.js +10 -10
  70. package/dist/commands/process-definitions.js.map +1 -1
  71. package/dist/commands/process-instances.d.ts +2 -2
  72. package/dist/commands/process-instances.d.ts.map +1 -1
  73. package/dist/commands/process-instances.js +49 -45
  74. package/dist/commands/process-instances.js.map +1 -1
  75. package/dist/commands/profiles.d.ts.map +1 -1
  76. package/dist/commands/profiles.js +27 -27
  77. package/dist/commands/profiles.js.map +1 -1
  78. package/dist/commands/run.d.ts.map +1 -1
  79. package/dist/commands/run.js +21 -17
  80. package/dist/commands/run.js.map +1 -1
  81. package/dist/commands/search.d.ts +3 -3
  82. package/dist/commands/search.d.ts.map +1 -1
  83. package/dist/commands/search.js +227 -145
  84. package/dist/commands/search.js.map +1 -1
  85. package/dist/commands/session.d.ts.map +1 -1
  86. package/dist/commands/session.js +8 -8
  87. package/dist/commands/session.js.map +1 -1
  88. package/dist/commands/topology.d.ts.map +1 -1
  89. package/dist/commands/topology.js +2 -2
  90. package/dist/commands/topology.js.map +1 -1
  91. package/dist/commands/user-tasks.d.ts +1 -1
  92. package/dist/commands/user-tasks.d.ts.map +1 -1
  93. package/dist/commands/user-tasks.js +25 -23
  94. package/dist/commands/user-tasks.js.map +1 -1
  95. package/dist/commands/watch.d.ts.map +1 -1
  96. package/dist/commands/watch.js +25 -21
  97. package/dist/commands/watch.js.map +1 -1
  98. package/dist/config.d.ts +3 -3
  99. package/dist/config.d.ts.map +1 -1
  100. package/dist/config.js +95 -89
  101. package/dist/config.js.map +1 -1
  102. package/dist/date-filter.d.ts.map +1 -1
  103. package/dist/date-filter.js +10 -8
  104. package/dist/date-filter.js.map +1 -1
  105. package/dist/errors.d.ts +1 -1
  106. package/dist/errors.d.ts.map +1 -1
  107. package/dist/errors.js +1 -1
  108. package/dist/errors.js.map +1 -1
  109. package/dist/ignore.d.ts +1 -1
  110. package/dist/ignore.d.ts.map +1 -1
  111. package/dist/ignore.js +9 -13
  112. package/dist/ignore.js.map +1 -1
  113. package/dist/index.d.ts +5 -1
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +588 -476
  116. package/dist/index.js.map +1 -1
  117. package/dist/logger.d.ts +7 -7
  118. package/dist/logger.d.ts.map +1 -1
  119. package/dist/logger.js +78 -55
  120. package/dist/logger.js.map +1 -1
  121. package/dist/plugin-loader.d.ts.map +1 -1
  122. package/dist/plugin-loader.js +37 -34
  123. package/dist/plugin-loader.js.map +1 -1
  124. package/dist/plugin-registry.d.ts.map +1 -1
  125. package/dist/plugin-registry.js +22 -12
  126. package/dist/plugin-registry.js.map +1 -1
  127. package/dist/runtime.d.ts +2 -2
  128. package/dist/runtime.d.ts.map +1 -1
  129. package/dist/runtime.js +10 -9
  130. package/dist/runtime.js.map +1 -1
  131. package/package.json +4 -2
@@ -1,129 +1,544 @@
1
1
  /**
2
2
  * Help and version commands
3
3
  */
4
- import { readFileSync } from 'node:fs';
5
- import { join, dirname } from 'node:path';
6
- import { fileURLToPath } from 'node:url';
4
+ import { readFileSync } from "node:fs";
5
+ import { dirname, join } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
7
  import { getLogger } from "../logger.js";
8
- import { getPluginCommandsInfo } from "../plugin-loader.js";
8
+ import { getPluginCommandsInfo, } from "../plugin-loader.js";
9
9
  const __filename = fileURLToPath(import.meta.url);
10
10
  const __dirname = dirname(__filename);
11
- /**
12
- * Build structured JSON help data for machine/agent consumption.
13
- * Returned by showHelp() and showCommandHelp() in JSON output mode.
14
- */
15
11
  function buildHelpJson(version, pluginCommandsInfo) {
16
12
  return {
17
13
  version,
18
- usage: 'c8ctl <command> [resource] [options]',
14
+ usage: "c8ctl <command> [resource] [options]",
19
15
  commands: [
20
- { verb: 'list', resource: '<resource>', resources: ['pi', 'pd', 'ut', 'inc', 'jobs', 'profiles', 'plugins', 'users', 'roles', 'groups', 'tenants', 'auth', 'mapping-rules'], description: 'List resources (process, identity)', mutating: false },
21
- { verb: 'search', resource: '<resource>', resources: ['pi', 'pd', 'ut', 'inc', 'jobs', 'vars', 'users', 'roles', 'groups', 'tenants', 'auth', 'mapping-rules'], description: 'Search resources with filters', mutating: false },
22
- { verb: 'get', resource: '<resource> <key>', resources: ['pi', 'pd', 'inc', 'topology', 'form', 'user', 'role', 'group', 'tenant', 'auth', 'mapping-rule'], description: 'Get resource by key', mutating: false },
23
- { verb: 'create', resource: '<resource>', resources: ['pi', 'user', 'role', 'group', 'tenant', 'auth', 'mapping-rule'], description: 'Create resource', mutating: true },
24
- { verb: 'delete', resource: '<resource> <key>', resources: ['user', 'role', 'group', 'tenant', 'auth', 'mapping-rule'], description: 'Delete resource', mutating: true },
25
- { verb: 'assign', resource: '<resource> <id> --to-<target>=<id>', resources: ['role', 'user', 'group', 'mapping-rule'], description: 'Assign resource to target', mutating: true },
26
- { verb: 'unassign', resource: '<resource> <id> --from-<target>=<id>', resources: ['role', 'user', 'group', 'mapping-rule'], description: 'Unassign resource from target', mutating: true },
27
- { verb: 'cancel', resource: '<resource> <key>', resources: ['pi'], description: 'Cancel resource', mutating: true },
28
- { verb: 'await', resource: '<resource>', resources: ['pi'], description: 'Create and await completion (alias for create --awaitCompletion)', mutating: true },
29
- { verb: 'complete', resource: '<resource> <key>', resources: ['ut', 'job'], description: 'Complete resource', mutating: true },
30
- { verb: 'fail', resource: 'job <key>', resources: ['job'], description: 'Fail a job', mutating: true },
31
- { verb: 'activate', resource: 'jobs <type>', resources: ['jobs'], description: 'Activate jobs by type', mutating: true },
32
- { verb: 'resolve', resource: 'inc <key>', resources: ['inc'], description: 'Resolve incident', mutating: true },
33
- { verb: 'publish', resource: 'msg <name>', resources: ['msg'], description: 'Publish message', mutating: true },
34
- { verb: 'correlate', resource: 'msg <name>', resources: ['msg'], description: 'Correlate message', mutating: true },
35
- { verb: 'deploy', resource: '[path...]', resources: [], description: 'Deploy BPMN/DMN/forms', mutating: true },
36
- { verb: 'run', resource: '<path>', resources: [], description: 'Deploy and start process', mutating: true },
37
- { verb: 'watch', resource: '[path...]', resources: [], description: 'Watch files for changes and auto-deploy', mutating: false },
38
- { verb: 'open', resource: '<app>', resources: ['operate', 'tasklist', 'modeler', 'optimize'], description: 'Open Camunda web application in browser', mutating: false },
39
- { verb: 'add', resource: 'profile <name>', resources: ['profile'], description: 'Add a profile', mutating: false },
40
- { verb: 'remove', resource: 'profile <name>', resources: ['profile'], description: 'Remove a profile (alias: rm)', mutating: false },
41
- { verb: 'load', resource: 'plugin <name>', resources: ['plugin'], description: 'Load a c8ctl plugin', mutating: false },
42
- { verb: 'unload', resource: 'plugin <name>', resources: ['plugin'], description: 'Unload a c8ctl plugin', mutating: false },
43
- { verb: 'upgrade', resource: 'plugin <name>', resources: ['plugin'], description: 'Upgrade a plugin', mutating: false },
44
- { verb: 'downgrade', resource: 'plugin <name> <version>', resources: ['plugin'], description: 'Downgrade a plugin to a specific version', mutating: false },
45
- { verb: 'sync', resource: 'plugin', resources: ['plugin'], description: 'Synchronize plugins', mutating: false },
46
- { verb: 'init', resource: 'plugin [name]', resources: ['plugin'], description: 'Create a new plugin from TypeScript template', mutating: false },
47
- { verb: 'use', resource: 'profile|tenant', resources: ['profile', 'tenant'], description: 'Set active profile or tenant', mutating: false },
48
- { verb: 'output', resource: '[json|text]', resources: ['json', 'text'], description: 'Show or set output format', mutating: false },
49
- { verb: 'completion', resource: 'bash|zsh|fish', resources: ['bash', 'zsh', 'fish'], description: 'Generate shell completion script', mutating: false },
50
- { verb: 'mcp-proxy', resource: '[mcp-path]', resources: [], description: 'Start a STDIO to remote HTTP MCP proxy server', mutating: false },
51
- { verb: 'feedback', resource: '', resources: [], description: 'Open the feedback page to report issues or request features', mutating: false },
52
- { verb: 'help', resource: '[command]', resources: [], description: 'Show help', mutating: false },
53
- ...pluginCommandsInfo.map(cmd => ({
54
- verb: cmd.commandName, resource: '', resources: [], description: cmd.description || '', mutating: false,
16
+ {
17
+ verb: "list",
18
+ resource: "<resource>",
19
+ resources: [
20
+ "pi",
21
+ "pd",
22
+ "ut",
23
+ "inc",
24
+ "jobs",
25
+ "profiles",
26
+ "plugins",
27
+ "users",
28
+ "roles",
29
+ "groups",
30
+ "tenants",
31
+ "auth",
32
+ "mapping-rules",
33
+ ],
34
+ description: "List resources (process, identity)",
35
+ mutating: false,
36
+ },
37
+ {
38
+ verb: "search",
39
+ resource: "<resource>",
40
+ resources: [
41
+ "pi",
42
+ "pd",
43
+ "ut",
44
+ "inc",
45
+ "jobs",
46
+ "vars",
47
+ "users",
48
+ "roles",
49
+ "groups",
50
+ "tenants",
51
+ "auth",
52
+ "mapping-rules",
53
+ ],
54
+ description: "Search resources with filters",
55
+ mutating: false,
56
+ },
57
+ {
58
+ verb: "get",
59
+ resource: "<resource> <key>",
60
+ resources: [
61
+ "pi",
62
+ "pd",
63
+ "inc",
64
+ "topology",
65
+ "form",
66
+ "user",
67
+ "role",
68
+ "group",
69
+ "tenant",
70
+ "auth",
71
+ "mapping-rule",
72
+ ],
73
+ description: "Get resource by key",
74
+ mutating: false,
75
+ },
76
+ {
77
+ verb: "create",
78
+ resource: "<resource>",
79
+ resources: [
80
+ "pi",
81
+ "user",
82
+ "role",
83
+ "group",
84
+ "tenant",
85
+ "auth",
86
+ "mapping-rule",
87
+ ],
88
+ description: "Create resource",
89
+ mutating: true,
90
+ },
91
+ {
92
+ verb: "delete",
93
+ resource: "<resource> <key>",
94
+ resources: ["user", "role", "group", "tenant", "auth", "mapping-rule"],
95
+ description: "Delete resource",
96
+ mutating: true,
97
+ },
98
+ {
99
+ verb: "assign",
100
+ resource: "<resource> <id> --to-<target>=<id>",
101
+ resources: ["role", "user", "group", "mapping-rule"],
102
+ description: "Assign resource to target",
103
+ mutating: true,
104
+ },
105
+ {
106
+ verb: "unassign",
107
+ resource: "<resource> <id> --from-<target>=<id>",
108
+ resources: ["role", "user", "group", "mapping-rule"],
109
+ description: "Unassign resource from target",
110
+ mutating: true,
111
+ },
112
+ {
113
+ verb: "cancel",
114
+ resource: "<resource> <key>",
115
+ resources: ["pi"],
116
+ description: "Cancel resource",
117
+ mutating: true,
118
+ },
119
+ {
120
+ verb: "await",
121
+ resource: "<resource>",
122
+ resources: ["pi"],
123
+ description: "Create and await completion (alias for create --awaitCompletion)",
124
+ mutating: true,
125
+ },
126
+ {
127
+ verb: "complete",
128
+ resource: "<resource> <key>",
129
+ resources: ["ut", "job"],
130
+ description: "Complete resource",
131
+ mutating: true,
132
+ },
133
+ {
134
+ verb: "fail",
135
+ resource: "job <key>",
136
+ resources: ["job"],
137
+ description: "Fail a job",
138
+ mutating: true,
139
+ },
140
+ {
141
+ verb: "activate",
142
+ resource: "jobs <type>",
143
+ resources: ["jobs"],
144
+ description: "Activate jobs by type",
145
+ mutating: true,
146
+ },
147
+ {
148
+ verb: "resolve",
149
+ resource: "inc <key>",
150
+ resources: ["inc"],
151
+ description: "Resolve incident",
152
+ mutating: true,
153
+ },
154
+ {
155
+ verb: "publish",
156
+ resource: "msg <name>",
157
+ resources: ["msg"],
158
+ description: "Publish message",
159
+ mutating: true,
160
+ },
161
+ {
162
+ verb: "correlate",
163
+ resource: "msg <name>",
164
+ resources: ["msg"],
165
+ description: "Correlate message",
166
+ mutating: true,
167
+ },
168
+ {
169
+ verb: "deploy",
170
+ resource: "[path...]",
171
+ resources: [],
172
+ description: "Deploy BPMN/DMN/forms",
173
+ mutating: true,
174
+ },
175
+ {
176
+ verb: "run",
177
+ resource: "<path>",
178
+ resources: [],
179
+ description: "Deploy and start process",
180
+ mutating: true,
181
+ },
182
+ {
183
+ verb: "watch",
184
+ resource: "[path...]",
185
+ resources: [],
186
+ description: "Watch files for changes and auto-deploy",
187
+ mutating: false,
188
+ },
189
+ {
190
+ verb: "open",
191
+ resource: "<app>",
192
+ resources: ["operate", "tasklist", "modeler", "optimize"],
193
+ description: "Open Camunda web application in browser",
194
+ mutating: false,
195
+ },
196
+ {
197
+ verb: "add",
198
+ resource: "profile <name>",
199
+ resources: ["profile"],
200
+ description: "Add a profile",
201
+ mutating: false,
202
+ },
203
+ {
204
+ verb: "remove",
205
+ resource: "profile <name>",
206
+ resources: ["profile"],
207
+ description: "Remove a profile (alias: rm)",
208
+ mutating: false,
209
+ },
210
+ {
211
+ verb: "load",
212
+ resource: "plugin <name>",
213
+ resources: ["plugin"],
214
+ description: "Load a c8ctl plugin",
215
+ mutating: false,
216
+ },
217
+ {
218
+ verb: "unload",
219
+ resource: "plugin <name>",
220
+ resources: ["plugin"],
221
+ description: "Unload a c8ctl plugin",
222
+ mutating: false,
223
+ },
224
+ {
225
+ verb: "upgrade",
226
+ resource: "plugin <name>",
227
+ resources: ["plugin"],
228
+ description: "Upgrade a plugin",
229
+ mutating: false,
230
+ },
231
+ {
232
+ verb: "downgrade",
233
+ resource: "plugin <name> <version>",
234
+ resources: ["plugin"],
235
+ description: "Downgrade a plugin to a specific version",
236
+ mutating: false,
237
+ },
238
+ {
239
+ verb: "sync",
240
+ resource: "plugin",
241
+ resources: ["plugin"],
242
+ description: "Synchronize plugins",
243
+ mutating: false,
244
+ },
245
+ {
246
+ verb: "init",
247
+ resource: "plugin [name]",
248
+ resources: ["plugin"],
249
+ description: "Create a new plugin from TypeScript template",
250
+ mutating: false,
251
+ },
252
+ {
253
+ verb: "use",
254
+ resource: "profile|tenant",
255
+ resources: ["profile", "tenant"],
256
+ description: "Set active profile or tenant",
257
+ mutating: false,
258
+ },
259
+ {
260
+ verb: "output",
261
+ resource: "[json|text]",
262
+ resources: ["json", "text"],
263
+ description: "Show or set output format",
264
+ mutating: false,
265
+ },
266
+ {
267
+ verb: "completion",
268
+ resource: "bash|zsh|fish",
269
+ resources: ["bash", "zsh", "fish"],
270
+ description: "Generate shell completion script",
271
+ mutating: false,
272
+ },
273
+ {
274
+ verb: "mcp-proxy",
275
+ resource: "[mcp-path]",
276
+ resources: [],
277
+ description: "Start a STDIO to remote HTTP MCP proxy server",
278
+ mutating: false,
279
+ },
280
+ {
281
+ verb: "feedback",
282
+ resource: "",
283
+ resources: [],
284
+ description: "Open the feedback page to report issues or request features",
285
+ mutating: false,
286
+ },
287
+ {
288
+ verb: "help",
289
+ resource: "[command]",
290
+ resources: [],
291
+ description: "Show help",
292
+ mutating: false,
293
+ },
294
+ ...pluginCommandsInfo.map((cmd) => ({
295
+ verb: cmd.commandName,
296
+ resource: "",
297
+ resources: [],
298
+ description: cmd.description || "",
299
+ mutating: false,
55
300
  examples: cmd.examples || [],
56
301
  })),
57
302
  ],
58
303
  resourceAliases: {
59
- pi: 'process-instance(s)',
60
- pd: 'process-definition(s)',
61
- ut: 'user-task(s)',
62
- inc: 'incident(s)',
63
- msg: 'message',
64
- vars: 'variable(s)',
65
- auth: 'authorization(s)',
66
- mr: 'mapping-rule(s)',
304
+ pi: "process-instance(s)",
305
+ pd: "process-definition(s)",
306
+ ut: "user-task(s)",
307
+ inc: "incident(s)",
308
+ msg: "message",
309
+ vars: "variable(s)",
310
+ auth: "authorization(s)",
311
+ mr: "mapping-rule(s)",
67
312
  },
68
313
  globalFlags: [
69
- { flag: '--profile', type: 'string', description: 'Use specific profile for this command' },
70
- { flag: '--sortBy', type: 'string', description: 'Sort list/search output by column name' },
71
- { flag: '--asc', type: 'boolean', description: 'Sort in ascending order (default)' },
72
- { flag: '--desc', type: 'boolean', description: 'Sort in descending order' },
73
- { flag: '--limit', type: 'string', description: 'Maximum number of items to fetch (default: 1000000)' },
74
- { flag: '--between', type: 'string', description: 'Filter by date range: <from>..<to> (YYYY-MM-DD or ISO 8601; open-ended: ..to or from..)' },
75
- { flag: '--dateField', type: 'string', description: 'Date field to filter on with --between (default depends on resource)' },
76
- { flag: '--state', type: 'string', description: 'Filter by state (ACTIVE, COMPLETED, etc.)' },
77
- { flag: '--id', type: 'string', description: 'Process definition ID (alias for --bpmnProcessId)' },
78
- { flag: '--verbose', type: 'boolean', description: 'Enable SDK trace logging and show full error details' },
79
- { flag: '--version', type: 'string', short: '-v', description: 'Show version' },
80
- { flag: '--help', type: 'boolean', short: '-h', description: 'Show help' },
314
+ {
315
+ flag: "--profile",
316
+ type: "string",
317
+ description: "Use specific profile for this command",
318
+ },
319
+ {
320
+ flag: "--sortBy",
321
+ type: "string",
322
+ description: "Sort list/search output by column name",
323
+ },
324
+ {
325
+ flag: "--asc",
326
+ type: "boolean",
327
+ description: "Sort in ascending order (default)",
328
+ },
329
+ {
330
+ flag: "--desc",
331
+ type: "boolean",
332
+ description: "Sort in descending order",
333
+ },
334
+ {
335
+ flag: "--limit",
336
+ type: "string",
337
+ description: "Maximum number of items to fetch (default: 1000000)",
338
+ },
339
+ {
340
+ flag: "--between",
341
+ type: "string",
342
+ description: "Filter by date range: <from>..<to> (YYYY-MM-DD or ISO 8601; open-ended: ..to or from..)",
343
+ },
344
+ {
345
+ flag: "--dateField",
346
+ type: "string",
347
+ description: "Date field to filter on with --between (default depends on resource)",
348
+ },
349
+ {
350
+ flag: "--state",
351
+ type: "string",
352
+ description: "Filter by state (ACTIVE, COMPLETED, etc.)",
353
+ },
354
+ {
355
+ flag: "--id",
356
+ type: "string",
357
+ description: "Process definition ID (alias for --bpmnProcessId)",
358
+ },
359
+ {
360
+ flag: "--verbose",
361
+ type: "boolean",
362
+ description: "Enable SDK trace logging and show full error details",
363
+ },
364
+ {
365
+ flag: "--version",
366
+ type: "string",
367
+ short: "-v",
368
+ description: "Show version",
369
+ },
370
+ {
371
+ flag: "--help",
372
+ type: "boolean",
373
+ short: "-h",
374
+ description: "Show help",
375
+ },
81
376
  ],
82
377
  searchFlags: [
83
- { flag: '--bpmnProcessId', type: 'string', description: 'Filter by process definition ID' },
84
- { flag: '--processDefinitionKey', type: 'string', description: 'Filter by process definition key' },
85
- { flag: '--processInstanceKey', type: 'string', description: 'Filter by process instance key' },
86
- { flag: '--parentProcessInstanceKey', type: 'string', description: 'Filter by parent process instance key' },
87
- { flag: '--name', type: 'string', description: 'Filter by name (variables, process definitions); supports wildcards * and ?' },
88
- { flag: '--key', type: 'string', description: 'Filter by key' },
89
- { flag: '--assignee', type: 'string', description: 'Filter by assignee (user tasks)' },
90
- { flag: '--elementId', type: 'string', description: 'Filter by element ID (user tasks)' },
91
- { flag: '--errorType', type: 'string', description: 'Filter by error type (incidents)' },
92
- { flag: '--errorMessage', type: 'string', description: 'Filter by error message (incidents); supports wildcards' },
93
- { flag: '--type', type: 'string', description: 'Filter by type (jobs); supports wildcards' },
94
- { flag: '--value', type: 'string', description: 'Filter by variable value' },
95
- { flag: '--scopeKey', type: 'string', description: 'Filter by scope key (variables)' },
96
- { flag: '--fullValue', type: 'boolean', description: 'Return full variable values (default: truncated)' },
97
- { flag: '--iname', type: 'string', description: 'Case-insensitive --name filter (supports wildcards)' },
98
- { flag: '--iid', type: 'string', description: 'Case-insensitive --bpmnProcessId filter' },
99
- { flag: '--iassignee', type: 'string', description: 'Case-insensitive --assignee filter' },
100
- { flag: '--ierrorMessage', type: 'string', description: 'Case-insensitive --errorMessage filter' },
101
- { flag: '--itype', type: 'string', description: 'Case-insensitive --type filter' },
102
- { flag: '--ivalue', type: 'string', description: 'Case-insensitive --value filter' },
103
- { flag: '--username', type: 'string', description: 'Filter by username (users)' },
104
- { flag: '--email', type: 'string', description: 'Filter by email (users)' },
105
- { flag: '--roleId', type: 'string', description: 'Filter by role ID (roles)' },
106
- { flag: '--groupId', type: 'string', description: 'Filter by group ID (groups)' },
107
- { flag: '--ownerId', type: 'string', description: 'Filter by owner ID (authorizations)' },
108
- { flag: '--ownerType', type: 'string', description: 'Filter by owner type (authorizations)' },
109
- { flag: '--resourceType', type: 'string', description: 'Filter by resource type (authorizations)' },
110
- { flag: '--resourceId', type: 'string', description: 'Filter by resource ID (authorizations)' },
111
- { flag: '--claimName', type: 'string', description: 'Filter by claim name (mapping rules)' },
112
- { flag: '--claimValue', type: 'string', description: 'Filter by claim value (mapping rules)' },
113
- { flag: '--mappingRuleId', type: 'string', description: 'Filter by mapping rule ID (mapping rules)' },
378
+ {
379
+ flag: "--bpmnProcessId",
380
+ type: "string",
381
+ description: "Filter by process definition ID",
382
+ },
383
+ {
384
+ flag: "--processDefinitionKey",
385
+ type: "string",
386
+ description: "Filter by process definition key",
387
+ },
388
+ {
389
+ flag: "--processInstanceKey",
390
+ type: "string",
391
+ description: "Filter by process instance key",
392
+ },
393
+ {
394
+ flag: "--parentProcessInstanceKey",
395
+ type: "string",
396
+ description: "Filter by parent process instance key",
397
+ },
398
+ {
399
+ flag: "--name",
400
+ type: "string",
401
+ description: "Filter by name (variables, process definitions); supports wildcards * and ?",
402
+ },
403
+ { flag: "--key", type: "string", description: "Filter by key" },
404
+ {
405
+ flag: "--assignee",
406
+ type: "string",
407
+ description: "Filter by assignee (user tasks)",
408
+ },
409
+ {
410
+ flag: "--elementId",
411
+ type: "string",
412
+ description: "Filter by element ID (user tasks)",
413
+ },
414
+ {
415
+ flag: "--errorType",
416
+ type: "string",
417
+ description: "Filter by error type (incidents)",
418
+ },
419
+ {
420
+ flag: "--errorMessage",
421
+ type: "string",
422
+ description: "Filter by error message (incidents); supports wildcards",
423
+ },
424
+ {
425
+ flag: "--type",
426
+ type: "string",
427
+ description: "Filter by type (jobs); supports wildcards",
428
+ },
429
+ {
430
+ flag: "--value",
431
+ type: "string",
432
+ description: "Filter by variable value",
433
+ },
434
+ {
435
+ flag: "--scopeKey",
436
+ type: "string",
437
+ description: "Filter by scope key (variables)",
438
+ },
439
+ {
440
+ flag: "--fullValue",
441
+ type: "boolean",
442
+ description: "Return full variable values (default: truncated)",
443
+ },
444
+ {
445
+ flag: "--iname",
446
+ type: "string",
447
+ description: "Case-insensitive --name filter (supports wildcards)",
448
+ },
449
+ {
450
+ flag: "--iid",
451
+ type: "string",
452
+ description: "Case-insensitive --bpmnProcessId filter",
453
+ },
454
+ {
455
+ flag: "--iassignee",
456
+ type: "string",
457
+ description: "Case-insensitive --assignee filter",
458
+ },
459
+ {
460
+ flag: "--ierrorMessage",
461
+ type: "string",
462
+ description: "Case-insensitive --errorMessage filter",
463
+ },
464
+ {
465
+ flag: "--itype",
466
+ type: "string",
467
+ description: "Case-insensitive --type filter",
468
+ },
469
+ {
470
+ flag: "--ivalue",
471
+ type: "string",
472
+ description: "Case-insensitive --value filter",
473
+ },
474
+ {
475
+ flag: "--username",
476
+ type: "string",
477
+ description: "Filter by username (users)",
478
+ },
479
+ {
480
+ flag: "--email",
481
+ type: "string",
482
+ description: "Filter by email (users)",
483
+ },
484
+ {
485
+ flag: "--roleId",
486
+ type: "string",
487
+ description: "Filter by role ID (roles)",
488
+ },
489
+ {
490
+ flag: "--groupId",
491
+ type: "string",
492
+ description: "Filter by group ID (groups)",
493
+ },
494
+ {
495
+ flag: "--ownerId",
496
+ type: "string",
497
+ description: "Filter by owner ID (authorizations)",
498
+ },
499
+ {
500
+ flag: "--ownerType",
501
+ type: "string",
502
+ description: "Filter by owner type (authorizations)",
503
+ },
504
+ {
505
+ flag: "--resourceType",
506
+ type: "string",
507
+ description: "Filter by resource type (authorizations)",
508
+ },
509
+ {
510
+ flag: "--resourceId",
511
+ type: "string",
512
+ description: "Filter by resource ID (authorizations)",
513
+ },
514
+ {
515
+ flag: "--claimName",
516
+ type: "string",
517
+ description: "Filter by claim name (mapping rules)",
518
+ },
519
+ {
520
+ flag: "--claimValue",
521
+ type: "string",
522
+ description: "Filter by claim value (mapping rules)",
523
+ },
524
+ {
525
+ flag: "--mappingRuleId",
526
+ type: "string",
527
+ description: "Filter by mapping rule ID (mapping rules)",
528
+ },
114
529
  ],
115
530
  agentFlags: [
116
531
  {
117
- flag: '--fields',
118
- type: 'string',
119
- description: 'Comma-separated list of output fields to include. Reduces context window size. Case-insensitive. Example: --fields Key,State,processDefinitionId',
120
- appliesTo: 'all list/search/get commands',
532
+ flag: "--fields",
533
+ type: "string",
534
+ description: "Comma-separated list of output fields to include. Reduces context window size. Case-insensitive. Example: --fields Key,State,processDefinitionId",
535
+ appliesTo: "all list/search/get commands",
121
536
  },
122
537
  {
123
- flag: '--dry-run',
124
- type: 'boolean',
125
- description: 'Preview the API request that would be sent without executing it. Emits { dryRun, command, method, url, body } as JSON. Always exits 0.',
126
- appliesTo: 'mutating commands: create, cancel, deploy, complete, fail, activate, resolve, publish, correlate, delete, assign, unassign',
538
+ flag: "--dry-run",
539
+ type: "boolean",
540
+ description: "Preview the API request that would be sent without executing it. Emits { dryRun, command, method, url, body } as JSON. Always exits 0.",
541
+ appliesTo: "mutating commands: create, cancel, deploy, complete, fail, activate, resolve, publish, correlate, delete, assign, unassign",
127
542
  },
128
543
  ],
129
544
  };
@@ -132,8 +547,8 @@ function buildHelpJson(version, pluginCommandsInfo) {
132
547
  * Get package version
133
548
  */
134
549
  export function getVersion() {
135
- const packagePath = join(__dirname, '../../package.json');
136
- const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8'));
550
+ const packagePath = join(__dirname, "../../package.json");
551
+ const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
137
552
  return packageJson.version;
138
553
  }
139
554
  /**
@@ -151,19 +566,19 @@ export function showHelp() {
151
566
  const version = getVersion();
152
567
  const pluginCommandsInfo = getPluginCommandsInfo();
153
568
  // JSON mode: emit structured command tree for machine consumption
154
- if (logger.mode === 'json') {
569
+ if (logger.mode === "json") {
155
570
  logger.json(buildHelpJson(version, pluginCommandsInfo));
156
571
  return;
157
572
  }
158
- let pluginSection = '';
573
+ let pluginSection = "";
159
574
  if (pluginCommandsInfo.length > 0) {
160
- pluginSection = '\n\nPlugin Commands:';
575
+ pluginSection = "\n\nPlugin Commands:";
161
576
  for (const cmd of pluginCommandsInfo) {
162
- const desc = cmd.description ? ` ${cmd.description}` : '';
577
+ const desc = cmd.description ? ` ${cmd.description}` : "";
163
578
  pluginSection += `\n ${cmd.commandName.padEnd(20)}${desc}`;
164
579
  }
165
580
  }
166
- let pluginExamples = '';
581
+ let pluginExamples = "";
167
582
  for (const cmd of pluginCommandsInfo) {
168
583
  for (const ex of cmd.examples ?? []) {
169
584
  pluginExamples += `\n ${ex.command.padEnd(35)}${ex.description}`;
@@ -373,36 +788,36 @@ Feedback & Issues:
373
788
  */
374
789
  export function showVerbResources(verb) {
375
790
  const resources = {
376
- list: 'process-instances (pi), process-definitions (pd), user-tasks (ut), incidents (inc), jobs, profiles, plugins, users, roles, groups, tenants, authorizations (auth), mapping-rules (mr)',
377
- search: 'process-instances (pi), process-definitions (pd), user-tasks (ut), incidents (inc), jobs, variables (vars), users, roles, groups, tenants, authorizations (auth), mapping-rules (mr)',
378
- get: 'process-instance (pi), process-definition (pd), incident (inc), topology, form, user, role, group, tenant, authorization (auth), mapping-rule (mr)',
379
- create: 'process-instance (pi), user, role, group, tenant, authorization (auth), mapping-rule (mr)',
380
- delete: 'user, role, group, tenant, authorization (auth), mapping-rule (mr)',
381
- assign: 'role, user, group, mapping-rule',
382
- unassign: 'role, user, group, mapping-rule',
383
- complete: 'user-task (ut), job',
384
- cancel: 'process-instance (pi)',
385
- await: 'process-instance (pi)',
386
- resolve: 'incident (inc)',
387
- activate: 'jobs',
388
- fail: 'job',
389
- publish: 'message (msg)',
390
- correlate: 'message (msg)',
391
- add: 'profile',
392
- remove: 'profile',
393
- rm: 'profile',
394
- load: 'plugin',
395
- unload: 'plugin',
396
- sync: 'plugin',
397
- upgrade: 'plugin',
398
- downgrade: 'plugin',
399
- init: 'plugin',
400
- use: 'profile, tenant',
401
- which: 'profile',
402
- output: 'json, text',
403
- open: 'operate, tasklist, modeler, optimize',
404
- completion: 'bash, zsh, fish',
405
- help: 'list, get, create, complete, await, search, deploy, run, watch, open, cancel, resolve, fail, activate, publish, correlate, delete, assign, unassign, upgrade, downgrade, init, profiles, profile, plugin, plugins',
791
+ list: "process-instances (pi), process-definitions (pd), user-tasks (ut), incidents (inc), jobs, profiles, plugins, users, roles, groups, tenants, authorizations (auth), mapping-rules (mr)",
792
+ search: "process-instances (pi), process-definitions (pd), user-tasks (ut), incidents (inc), jobs, variables (vars), users, roles, groups, tenants, authorizations (auth), mapping-rules (mr)",
793
+ get: "process-instance (pi), process-definition (pd), incident (inc), topology, form, user, role, group, tenant, authorization (auth), mapping-rule (mr)",
794
+ create: "process-instance (pi), user, role, group, tenant, authorization (auth), mapping-rule (mr)",
795
+ delete: "user, role, group, tenant, authorization (auth), mapping-rule (mr)",
796
+ assign: "role, user, group, mapping-rule",
797
+ unassign: "role, user, group, mapping-rule",
798
+ complete: "user-task (ut), job",
799
+ cancel: "process-instance (pi)",
800
+ await: "process-instance (pi)",
801
+ resolve: "incident (inc)",
802
+ activate: "jobs",
803
+ fail: "job",
804
+ publish: "message (msg)",
805
+ correlate: "message (msg)",
806
+ add: "profile",
807
+ remove: "profile",
808
+ rm: "profile",
809
+ load: "plugin",
810
+ unload: "plugin",
811
+ sync: "plugin",
812
+ upgrade: "plugin",
813
+ downgrade: "plugin",
814
+ init: "plugin",
815
+ use: "profile, tenant",
816
+ which: "profile",
817
+ output: "json, text",
818
+ open: "operate, tasklist, modeler, optimize",
819
+ completion: "bash, zsh, fish",
820
+ help: "list, get, create, complete, await, search, deploy, run, watch, open, cancel, resolve, fail, activate, publish, correlate, delete, assign, unassign, upgrade, downgrade, init, profiles, profile, plugin, plugins",
406
821
  };
407
822
  const available = resources[verb];
408
823
  if (available) {
@@ -1556,14 +1971,17 @@ Examples:
1556
1971
  export function showCommandHelp(command) {
1557
1972
  const logger = getLogger();
1558
1973
  // JSON mode: emit structured help for machine/agent consumption
1559
- if (logger.mode === 'json') {
1974
+ if (logger.mode === "json") {
1560
1975
  const version = getVersion();
1561
1976
  const pluginCommandsInfo = getPluginCommandsInfo();
1562
1977
  const allHelp = buildHelpJson(version, pluginCommandsInfo);
1563
- const commandEntry = allHelp.commands?.find((c) => c.verb === command);
1978
+ const commandEntry = allHelp.commands.find((c) => c.verb === command);
1564
1979
  logger.json({
1565
1980
  command,
1566
- ...(commandEntry ?? { verb: command, description: `No detailed help available for: ${command}` }),
1981
+ ...(commandEntry ?? {
1982
+ verb: command,
1983
+ description: `No detailed help available for: ${command}`,
1984
+ }),
1567
1985
  globalFlags: allHelp.globalFlags,
1568
1986
  searchFlags: allHelp.searchFlags,
1569
1987
  agentFlags: allHelp.agentFlags,
@@ -1571,73 +1989,73 @@ export function showCommandHelp(command) {
1571
1989
  return;
1572
1990
  }
1573
1991
  switch (command) {
1574
- case 'list':
1992
+ case "list":
1575
1993
  showListHelp();
1576
1994
  break;
1577
- case 'get':
1995
+ case "get":
1578
1996
  showGetHelp();
1579
1997
  break;
1580
- case 'create':
1998
+ case "create":
1581
1999
  showCreateHelp();
1582
2000
  break;
1583
- case 'complete':
2001
+ case "complete":
1584
2002
  showCompleteHelp();
1585
2003
  break;
1586
- case 'await':
2004
+ case "await":
1587
2005
  showAwaitHelp();
1588
2006
  break;
1589
- case 'mcp-proxy':
2007
+ case "mcp-proxy":
1590
2008
  showMcpProxyHelp();
1591
2009
  break;
1592
- case 'search':
2010
+ case "search":
1593
2011
  showSearchHelp();
1594
2012
  break;
1595
- case 'deploy':
2013
+ case "deploy":
1596
2014
  showDeployHelp();
1597
2015
  break;
1598
- case 'run':
2016
+ case "run":
1599
2017
  showRunHelp();
1600
2018
  break;
1601
- case 'watch':
1602
- case 'w':
2019
+ case "watch":
2020
+ case "w":
1603
2021
  showWatchHelp();
1604
2022
  break;
1605
- case 'open':
2023
+ case "open":
1606
2024
  showOpenHelp();
1607
2025
  break;
1608
- case 'cancel':
2026
+ case "cancel":
1609
2027
  showCancelHelp();
1610
2028
  break;
1611
- case 'resolve':
2029
+ case "resolve":
1612
2030
  showResolveHelp();
1613
2031
  break;
1614
- case 'fail':
2032
+ case "fail":
1615
2033
  showFailHelp();
1616
2034
  break;
1617
- case 'activate':
2035
+ case "activate":
1618
2036
  showActivateHelp();
1619
2037
  break;
1620
- case 'publish':
2038
+ case "publish":
1621
2039
  showPublishHelp();
1622
2040
  break;
1623
- case 'correlate':
2041
+ case "correlate":
1624
2042
  showCorrelateHelp();
1625
2043
  break;
1626
- case 'delete':
2044
+ case "delete":
1627
2045
  showDeleteHelp();
1628
2046
  break;
1629
- case 'assign':
2047
+ case "assign":
1630
2048
  showAssignHelp();
1631
2049
  break;
1632
- case 'unassign':
2050
+ case "unassign":
1633
2051
  showUnassignHelp();
1634
2052
  break;
1635
- case 'profiles':
1636
- case 'profile':
2053
+ case "profiles":
2054
+ case "profile":
1637
2055
  showProfilesHelp();
1638
2056
  break;
1639
- case 'plugin':
1640
- case 'plugins':
2057
+ case "plugin":
2058
+ case "plugins":
1641
2059
  showPluginHelp();
1642
2060
  break;
1643
2061
  default: