@uluops/cli 0.2.0

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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +825 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +93 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/analytics.d.ts +6 -0
  8. package/dist/commands/analytics.d.ts.map +1 -0
  9. package/dist/commands/analytics.js +445 -0
  10. package/dist/commands/analytics.js.map +1 -0
  11. package/dist/commands/auth.d.ts +6 -0
  12. package/dist/commands/auth.d.ts.map +1 -0
  13. package/dist/commands/auth.js +496 -0
  14. package/dist/commands/auth.js.map +1 -0
  15. package/dist/commands/completion.d.ts +7 -0
  16. package/dist/commands/completion.d.ts.map +1 -0
  17. package/dist/commands/completion.js +188 -0
  18. package/dist/commands/completion.js.map +1 -0
  19. package/dist/commands/config.d.ts +6 -0
  20. package/dist/commands/config.d.ts.map +1 -0
  21. package/dist/commands/config.js +279 -0
  22. package/dist/commands/config.js.map +1 -0
  23. package/dist/commands/definitions.d.ts +6 -0
  24. package/dist/commands/definitions.d.ts.map +1 -0
  25. package/dist/commands/definitions.js +229 -0
  26. package/dist/commands/definitions.js.map +1 -0
  27. package/dist/commands/deps.d.ts +6 -0
  28. package/dist/commands/deps.d.ts.map +1 -0
  29. package/dist/commands/deps.js +87 -0
  30. package/dist/commands/deps.js.map +1 -0
  31. package/dist/commands/exec.d.ts +6 -0
  32. package/dist/commands/exec.d.ts.map +1 -0
  33. package/dist/commands/exec.js +334 -0
  34. package/dist/commands/exec.js.map +1 -0
  35. package/dist/commands/executions.d.ts +6 -0
  36. package/dist/commands/executions.d.ts.map +1 -0
  37. package/dist/commands/executions.js +63 -0
  38. package/dist/commands/executions.js.map +1 -0
  39. package/dist/commands/forks.d.ts +6 -0
  40. package/dist/commands/forks.d.ts.map +1 -0
  41. package/dist/commands/forks.js +145 -0
  42. package/dist/commands/forks.js.map +1 -0
  43. package/dist/commands/issues.d.ts +6 -0
  44. package/dist/commands/issues.d.ts.map +1 -0
  45. package/dist/commands/issues.js +458 -0
  46. package/dist/commands/issues.js.map +1 -0
  47. package/dist/commands/models.d.ts +6 -0
  48. package/dist/commands/models.d.ts.map +1 -0
  49. package/dist/commands/models.js +156 -0
  50. package/dist/commands/models.js.map +1 -0
  51. package/dist/commands/projects.d.ts +6 -0
  52. package/dist/commands/projects.d.ts.map +1 -0
  53. package/dist/commands/projects.js +262 -0
  54. package/dist/commands/projects.js.map +1 -0
  55. package/dist/commands/render.d.ts +6 -0
  56. package/dist/commands/render.d.ts.map +1 -0
  57. package/dist/commands/render.js +59 -0
  58. package/dist/commands/render.js.map +1 -0
  59. package/dist/commands/runs.d.ts +6 -0
  60. package/dist/commands/runs.d.ts.map +1 -0
  61. package/dist/commands/runs.js +442 -0
  62. package/dist/commands/runs.js.map +1 -0
  63. package/dist/commands/taxonomy.d.ts +6 -0
  64. package/dist/commands/taxonomy.d.ts.map +1 -0
  65. package/dist/commands/taxonomy.js +45 -0
  66. package/dist/commands/taxonomy.js.map +1 -0
  67. package/dist/commands/translation.d.ts +6 -0
  68. package/dist/commands/translation.d.ts.map +1 -0
  69. package/dist/commands/translation.js +85 -0
  70. package/dist/commands/translation.js.map +1 -0
  71. package/dist/commands/versions.d.ts +6 -0
  72. package/dist/commands/versions.d.ts.map +1 -0
  73. package/dist/commands/versions.js +61 -0
  74. package/dist/commands/versions.js.map +1 -0
  75. package/dist/context.d.ts +85 -0
  76. package/dist/context.d.ts.map +1 -0
  77. package/dist/context.js +386 -0
  78. package/dist/context.js.map +1 -0
  79. package/dist/formatters/core.d.ts +31 -0
  80. package/dist/formatters/core.d.ts.map +1 -0
  81. package/dist/formatters/core.js +176 -0
  82. package/dist/formatters/core.js.map +1 -0
  83. package/dist/formatters/ops.d.ts +43 -0
  84. package/dist/formatters/ops.d.ts.map +1 -0
  85. package/dist/formatters/ops.js +112 -0
  86. package/dist/formatters/ops.js.map +1 -0
  87. package/dist/formatters/registry.d.ts +41 -0
  88. package/dist/formatters/registry.d.ts.map +1 -0
  89. package/dist/formatters/registry.js +167 -0
  90. package/dist/formatters/registry.js.map +1 -0
  91. package/dist/formatters/table.d.ts +18 -0
  92. package/dist/formatters/table.d.ts.map +1 -0
  93. package/dist/formatters/table.js +76 -0
  94. package/dist/formatters/table.js.map +1 -0
  95. package/dist/utils.d.ts +99 -0
  96. package/dist/utils.d.ts.map +1 -0
  97. package/dist/utils.js +201 -0
  98. package/dist/utils.js.map +1 -0
  99. package/package.json +57 -0
@@ -0,0 +1,458 @@
1
+ import { createOpsContext, handleOpsError } from '../context.js';
2
+ import { withSpinner, parseIntOption } from '../utils.js';
3
+ import { formatIssues, formatIssue } from '../formatters/ops.js';
4
+ /**
5
+ * Register issue commands
6
+ */
7
+ export function registerIssueCommands(program) {
8
+ const issues = program
9
+ .command('issues')
10
+ .description('Manage validation issues');
11
+ // ulu issues list <project>
12
+ issues
13
+ .command('list <project>')
14
+ .description('List issues for a project')
15
+ .option('-s, --status <status>', 'Filter by status (open, completed, deferred, wontfix)')
16
+ .option('-p, --priority <priority>', 'Filter by priority (critical, suggested, backlog)')
17
+ .option('--severity <severity>', 'Filter by severity (critical, high, medium, low, info)')
18
+ .option('-a, --agent <name>', 'Filter by agent')
19
+ .option('-d, --domain <domain>', 'Filter by failure domain (STR, SEM, PRA, EPI)')
20
+ .option('-l, --limit <number>', 'Maximum number of issues', '50')
21
+ .option('--include-resolved', 'Include resolved issues')
22
+ .action(async (project, options, cmd) => {
23
+ const globalOpts = cmd.optsWithGlobals();
24
+ const ctx = createOpsContext(globalOpts);
25
+ try {
26
+ const data = await withSpinner(ctx, { start: 'Fetching issues...', failure: 'Failed to fetch issues' }, () => ctx.client.issues.listByProject(project, {
27
+ status: options.status,
28
+ priority: options.priority,
29
+ severity: options.severity,
30
+ agent: options.agent,
31
+ failureDomain: options.domain,
32
+ limit: parseIntOption(options.limit, '--limit'),
33
+ includeResolved: options.includeResolved,
34
+ }));
35
+ if (ctx.json) {
36
+ console.log(JSON.stringify(data, null, 2));
37
+ }
38
+ else if (data.length === 0) {
39
+ console.log('No issues found');
40
+ }
41
+ else {
42
+ console.log(formatIssues(data));
43
+ }
44
+ }
45
+ catch (error) {
46
+ handleOpsError(error, ctx);
47
+ }
48
+ });
49
+ // ulu issues get <id>
50
+ issues
51
+ .command('get <id>')
52
+ .description('Get issue details')
53
+ .option('--full', 'Include occurrences and notes')
54
+ .action(async (id, options, cmd) => {
55
+ const globalOpts = cmd.optsWithGlobals();
56
+ const ctx = createOpsContext(globalOpts);
57
+ try {
58
+ if (options.full) {
59
+ const details = await withSpinner(ctx, { start: 'Fetching issue...', failure: 'Failed to fetch issue' }, () => ctx.client.issues.getDetails(id));
60
+ if (ctx.json) {
61
+ console.log(JSON.stringify(details, null, 2));
62
+ }
63
+ else {
64
+ console.log(formatIssue(details.issue));
65
+ if (details.occurrences.length > 0) {
66
+ console.log(`\nOccurrences (${details.occurrences.length}):`);
67
+ for (const occ of details.occurrences.slice(0, 5)) {
68
+ console.log(` - ${occ.agentName} at ${occ.filePath ?? '(no file)'}${occ.lineNumber ? `:${occ.lineNumber}` : ''}`);
69
+ }
70
+ if (details.occurrences.length > 5) {
71
+ console.log(` ... and ${details.occurrences.length - 5} more`);
72
+ }
73
+ }
74
+ if (details.notes.length > 0) {
75
+ console.log(`\nNotes (${details.notes.length}):`);
76
+ for (const note of details.notes) {
77
+ console.log(` [${note.noteType}] ${note.content.slice(0, 100)}${note.content.length > 100 ? '...' : ''}`);
78
+ }
79
+ }
80
+ if (details.history && details.history.length > 0) {
81
+ console.log(`\nStatus History (${details.history.length} changes)`);
82
+ }
83
+ }
84
+ }
85
+ else {
86
+ const issue = await withSpinner(ctx, { start: 'Fetching issue...', failure: 'Failed to fetch issue' }, () => ctx.client.issues.get(id));
87
+ if (ctx.json) {
88
+ console.log(JSON.stringify(issue, null, 2));
89
+ }
90
+ else {
91
+ console.log(formatIssue(issue));
92
+ }
93
+ }
94
+ }
95
+ catch (error) {
96
+ handleOpsError(error, ctx);
97
+ }
98
+ });
99
+ // ulu issues search
100
+ issues
101
+ .command('search')
102
+ .description('Search issues across projects')
103
+ .requiredOption('--query <text>', 'Search query')
104
+ .option('-p, --projects <names>', 'Filter by project names (comma-separated)')
105
+ .option('-s, --status <status>', 'Filter by status')
106
+ .option('--priority <priority>', 'Filter by priority')
107
+ .option('-l, --limit <number>', 'Maximum number of results', '20')
108
+ .action(async (options, cmd) => {
109
+ const globalOpts = cmd.optsWithGlobals();
110
+ const ctx = createOpsContext(globalOpts);
111
+ try {
112
+ const data = await withSpinner(ctx, { start: 'Searching...', failure: 'Search failed' }, () => ctx.client.issues.search({
113
+ query: options.query,
114
+ projects: options.projects?.split(','),
115
+ status: options.status,
116
+ priority: options.priority,
117
+ limit: parseIntOption(options.limit, '--limit'),
118
+ }));
119
+ if (ctx.json) {
120
+ console.log(JSON.stringify(data, null, 2));
121
+ }
122
+ else if (data.length === 0) {
123
+ console.log('No issues found');
124
+ }
125
+ else {
126
+ console.log(formatIssues(data));
127
+ }
128
+ }
129
+ catch (error) {
130
+ handleOpsError(error, ctx);
131
+ }
132
+ });
133
+ // ulu issues update <id>
134
+ issues
135
+ .command('update <id>')
136
+ .description('Update issue status')
137
+ .requiredOption('-s, --status <status>', 'New status (open, completed, deferred, wontfix)')
138
+ .option('-r, --reason <text>', 'Reason for status change')
139
+ .action(async (id, options, cmd) => {
140
+ const globalOpts = cmd.optsWithGlobals();
141
+ const ctx = createOpsContext(globalOpts);
142
+ try {
143
+ const issue = await withSpinner(ctx, { start: 'Updating issue...', success: 'Issue updated', failure: 'Failed to update issue' }, () => ctx.client.issues.updateStatus(id, {
144
+ status: options.status,
145
+ reason: options.reason,
146
+ }));
147
+ if (ctx.json) {
148
+ console.log(JSON.stringify(issue, null, 2));
149
+ }
150
+ else {
151
+ console.log(`Issue ${id.slice(0, 8)} status changed to: ${issue.status}`);
152
+ }
153
+ }
154
+ catch (error) {
155
+ handleOpsError(error, ctx);
156
+ }
157
+ });
158
+ // ulu issues close <id>
159
+ issues
160
+ .command('close <id>')
161
+ .description('Close an issue (mark as completed)')
162
+ .option('-r, --reason <text>', 'Reason for closing')
163
+ .action(async (id, options, cmd) => {
164
+ const globalOpts = cmd.optsWithGlobals();
165
+ const ctx = createOpsContext(globalOpts);
166
+ try {
167
+ const issue = await withSpinner(ctx, { start: 'Closing issue...', success: 'Issue closed', failure: 'Failed to close issue' }, () => ctx.client.issues.updateStatus(id, {
168
+ status: 'completed',
169
+ reason: options.reason ?? 'Closed via CLI',
170
+ }));
171
+ if (ctx.json) {
172
+ console.log(JSON.stringify(issue, null, 2));
173
+ }
174
+ else {
175
+ console.log(`Issue ${id.slice(0, 8)} closed`);
176
+ }
177
+ }
178
+ catch (error) {
179
+ handleOpsError(error, ctx);
180
+ }
181
+ });
182
+ // ulu issues add-note <id>
183
+ issues
184
+ .command('add-note <id>')
185
+ .description('Add a note to an issue')
186
+ .requiredOption('-m, --message <text>', 'Note content')
187
+ .option('-t, --type <type>', 'Note type (context, resolution, blocker)', 'context')
188
+ .action(async (id, options, cmd) => {
189
+ const globalOpts = cmd.optsWithGlobals();
190
+ const ctx = createOpsContext(globalOpts);
191
+ try {
192
+ const note = await withSpinner(ctx, { start: 'Adding note...', success: 'Note added', failure: 'Failed to add note' }, () => ctx.client.issues.addNote(id, {
193
+ content: options.message,
194
+ noteType: options.type,
195
+ }));
196
+ if (ctx.json) {
197
+ console.log(JSON.stringify(note, null, 2));
198
+ }
199
+ else {
200
+ console.log(`Note added to issue ${id.slice(0, 8)}`);
201
+ }
202
+ }
203
+ catch (error) {
204
+ handleOpsError(error, ctx);
205
+ }
206
+ });
207
+ // ulu issues history <id>
208
+ issues
209
+ .command('history <id>')
210
+ .description('Show issue status history')
211
+ .action(async (id, _, cmd) => {
212
+ const globalOpts = cmd.optsWithGlobals();
213
+ const ctx = createOpsContext(globalOpts);
214
+ try {
215
+ const history = await withSpinner(ctx, { start: 'Fetching history...', failure: 'Failed to fetch history' }, () => ctx.client.issues.getHistory(id));
216
+ if (ctx.json) {
217
+ console.log(JSON.stringify(history, null, 2));
218
+ }
219
+ else if (history.length === 0) {
220
+ console.log('No status history');
221
+ }
222
+ else {
223
+ console.log('Status History:');
224
+ for (const entry of history) {
225
+ const date = new Date(entry.changedAt).toLocaleString();
226
+ console.log(` ${date}: ${entry.oldStatus ?? '(new)'} → ${entry.newStatus}`);
227
+ if (entry.reason) {
228
+ console.log(` Reason: ${entry.reason}`);
229
+ }
230
+ }
231
+ }
232
+ }
233
+ catch (error) {
234
+ handleOpsError(error, ctx);
235
+ }
236
+ });
237
+ // ulu issues undo <id>
238
+ issues
239
+ .command('undo <id>')
240
+ .description('Undo the last status change')
241
+ .action(async (id, _, cmd) => {
242
+ const globalOpts = cmd.optsWithGlobals();
243
+ const ctx = createOpsContext(globalOpts);
244
+ try {
245
+ const issue = await withSpinner(ctx, { start: 'Undoing change...', success: 'Change undone', failure: 'Failed to undo change' }, () => ctx.client.issues.undoLastChange(id));
246
+ if (ctx.json) {
247
+ console.log(JSON.stringify(issue, null, 2));
248
+ }
249
+ else {
250
+ console.log(`Issue ${id.slice(0, 8)} restored to: ${issue.status}`);
251
+ }
252
+ }
253
+ catch (error) {
254
+ handleOpsError(error, ctx);
255
+ }
256
+ });
257
+ // ulu issues create
258
+ issues
259
+ .command('create')
260
+ .description('Create a user-submitted issue')
261
+ .requiredOption('-p, --project <name>', 'Project name')
262
+ .requiredOption('-t, --title <text>', 'Issue title')
263
+ .requiredOption('--priority <priority>', 'Priority (critical, suggested, backlog)')
264
+ .option('--severity <severity>', 'Severity (critical, high, medium, low, info)')
265
+ .option('-a, --agent <name>', 'Agent name')
266
+ .option('--category <category>', 'Issue category')
267
+ .option('--description <text>', 'Detailed description')
268
+ .option('--file-path <path>', 'File path where issue was found')
269
+ .option('--line <number>', 'Line number in file')
270
+ .option('--failure-code <code>', 'Failure code (e.g., SEM-VAL/H)')
271
+ .option('--domain <domain>', 'Failure domain (STR, SEM, PRA, EPI)')
272
+ .option('--type <type>', 'Issue type (bug, feature, refactor, config, docs, infra, security, test)')
273
+ .action(async (options, cmd) => {
274
+ const globalOpts = cmd.optsWithGlobals();
275
+ const ctx = createOpsContext(globalOpts);
276
+ try {
277
+ const issue = await withSpinner(ctx, { start: 'Creating issue...', success: 'Issue created', failure: 'Failed to create issue' }, () => ctx.client.issues.create({
278
+ project: options.project,
279
+ title: options.title,
280
+ priority: options.priority,
281
+ severity: options.severity,
282
+ agent: options.agent,
283
+ category: options.category,
284
+ description: options.description,
285
+ filePath: options.filePath,
286
+ lineNumber: options.line ? parseIntOption(options.line, '--line') : undefined,
287
+ failureCode: options.failureCode,
288
+ failureDomain: options.domain,
289
+ type: options.type,
290
+ }));
291
+ if (ctx.json) {
292
+ console.log(JSON.stringify(issue, null, 2));
293
+ }
294
+ else {
295
+ console.log(formatIssue(issue));
296
+ }
297
+ }
298
+ catch (error) {
299
+ handleOpsError(error, ctx);
300
+ }
301
+ });
302
+ // ulu issues edit <id>
303
+ issues
304
+ .command('edit <id>')
305
+ .description('Edit issue metadata')
306
+ .option('-t, --title <text>', 'New title')
307
+ .option('--severity <severity>', 'New severity (critical, high, medium, low, info)')
308
+ .option('--priority <priority>', 'New priority (critical, suggested, backlog)')
309
+ .option('--category <category>', 'New category')
310
+ .option('--file-path <path>', 'New file path')
311
+ .option('--line <number>', 'New line number')
312
+ .option('--failure-code <code>', 'New failure code')
313
+ .option('--domain <domain>', 'New failure domain (STR, SEM, PRA, EPI)')
314
+ .option('--type <type>', 'New issue type')
315
+ .action(async (id, options, cmd) => {
316
+ const globalOpts = cmd.optsWithGlobals();
317
+ const ctx = createOpsContext(globalOpts);
318
+ const input = {};
319
+ if (options.title !== undefined)
320
+ input.title = options.title;
321
+ if (options.severity !== undefined)
322
+ input.severity = options.severity;
323
+ if (options.priority !== undefined)
324
+ input.priority = options.priority;
325
+ if (options.category !== undefined)
326
+ input.category = options.category;
327
+ if (options.filePath !== undefined)
328
+ input.filePath = options.filePath;
329
+ if (options.line !== undefined)
330
+ input.lineNumber = parseIntOption(options.line, '--line');
331
+ if (options.failureCode !== undefined)
332
+ input.failureCode = options.failureCode;
333
+ if (options.domain !== undefined)
334
+ input.failureDomain = options.domain;
335
+ if (options.type !== undefined)
336
+ input.type = options.type;
337
+ if (Object.keys(input).length === 0) {
338
+ console.error('Error: At least one field to edit is required');
339
+ process.exit(1);
340
+ }
341
+ try {
342
+ const issue = await withSpinner(ctx, { start: 'Updating issue...', success: 'Issue updated', failure: 'Failed to update issue' }, () => ctx.client.issues.update(id, input));
343
+ if (ctx.json) {
344
+ console.log(JSON.stringify(issue, null, 2));
345
+ }
346
+ else {
347
+ console.log(formatIssue(issue));
348
+ }
349
+ }
350
+ catch (error) {
351
+ handleOpsError(error, ctx);
352
+ }
353
+ });
354
+ // ulu issues restore <id>
355
+ issues
356
+ .command('restore <id>')
357
+ .description('Restore a soft-deleted issue')
358
+ .action(async (id, _, cmd) => {
359
+ const globalOpts = cmd.optsWithGlobals();
360
+ const ctx = createOpsContext(globalOpts);
361
+ try {
362
+ const issue = await withSpinner(ctx, { start: 'Restoring issue...', success: 'Issue restored', failure: 'Failed to restore issue' }, () => ctx.client.issues.restore(id));
363
+ if (ctx.json) {
364
+ console.log(JSON.stringify(issue, null, 2));
365
+ }
366
+ else {
367
+ console.log(`Issue ${id.slice(0, 8)} restored (status: ${issue.status})`);
368
+ }
369
+ }
370
+ catch (error) {
371
+ handleOpsError(error, ctx);
372
+ }
373
+ });
374
+ // ulu issues bulk-update
375
+ issues
376
+ .command('bulk-update')
377
+ .description('Bulk update issue statuses')
378
+ .requiredOption('-s, --status <status>', 'New status (open, completed, deferred, wontfix)')
379
+ .requiredOption('-i, --ids <ids>', 'Comma-separated issue IDs')
380
+ .option('-r, --reason <text>', 'Reason for status change')
381
+ .action(async (options, cmd) => {
382
+ const globalOpts = cmd.optsWithGlobals();
383
+ const ctx = createOpsContext(globalOpts);
384
+ const ids = options.ids.split(',').map((id) => id.trim()).filter(Boolean);
385
+ if (ids.length === 0) {
386
+ console.error('Error: At least one issue ID is required');
387
+ process.exit(1);
388
+ }
389
+ const updates = ids.map((id) => ({
390
+ issueId: id,
391
+ status: options.status,
392
+ reason: options.reason,
393
+ }));
394
+ try {
395
+ const results = await withSpinner(ctx, { start: `Updating ${ids.length} issues...`, success: 'Issues updated', failure: 'Failed to update issues' }, () => ctx.client.issues.bulkUpdateStatus(updates));
396
+ if (ctx.json) {
397
+ console.log(JSON.stringify(results, null, 2));
398
+ }
399
+ else {
400
+ console.log(`Updated ${results.updated} issues to: ${options.status}`);
401
+ if (results.failed.length > 0) {
402
+ console.log(`Failed: ${results.failed.join(', ')}`);
403
+ }
404
+ }
405
+ }
406
+ catch (error) {
407
+ handleOpsError(error, ctx);
408
+ }
409
+ });
410
+ // ulu issues by-fingerprint <fingerprint>
411
+ issues
412
+ .command('by-fingerprint <fingerprint>')
413
+ .description('Get issue by fingerprint')
414
+ .requiredOption('-p, --project <name>', 'Project name')
415
+ .action(async (fingerprint, options, cmd) => {
416
+ const globalOpts = cmd.optsWithGlobals();
417
+ const ctx = createOpsContext(globalOpts);
418
+ try {
419
+ const issue = await withSpinner(ctx, { start: 'Fetching issue...', failure: 'Failed to fetch issue' }, () => ctx.client.issues.getByFingerprint(fingerprint, options.project));
420
+ if (ctx.json) {
421
+ console.log(JSON.stringify(issue, null, 2));
422
+ }
423
+ else {
424
+ console.log(formatIssue(issue));
425
+ }
426
+ }
427
+ catch (error) {
428
+ handleOpsError(error, ctx);
429
+ }
430
+ });
431
+ // ulu issues update-by-fingerprint <fingerprint>
432
+ issues
433
+ .command('update-by-fingerprint <fingerprint>')
434
+ .description('Update issue status by fingerprint')
435
+ .requiredOption('-p, --project <name>', 'Project name')
436
+ .requiredOption('-s, --status <status>', 'New status (open, completed, deferred, wontfix)')
437
+ .option('-r, --reason <text>', 'Reason for status change')
438
+ .action(async (fingerprint, options, cmd) => {
439
+ const globalOpts = cmd.optsWithGlobals();
440
+ const ctx = createOpsContext(globalOpts);
441
+ try {
442
+ const result = await withSpinner(ctx, { start: 'Updating issue...', success: 'Issue updated', failure: 'Failed to update issue' }, () => ctx.client.issues.updateStatusByFingerprint(fingerprint, options.project, {
443
+ status: options.status,
444
+ reason: options.reason,
445
+ }));
446
+ if (ctx.json) {
447
+ console.log(JSON.stringify(result, null, 2));
448
+ }
449
+ else {
450
+ console.log(`Issue ${result.id.slice(0, 8)}: ${result.previousStatus} → ${result.newStatus}`);
451
+ }
452
+ }
453
+ catch (error) {
454
+ handleOpsError(error, ctx);
455
+ }
456
+ });
457
+ }
458
+ //# sourceMappingURL=issues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues.js","sourceRoot":"","sources":["../../src/commands/issues.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAsB,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGjE;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,MAAM,MAAM,GAAG,OAAO;SACnB,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAE3C,4BAA4B;IAC5B,MAAM;SACH,OAAO,CAAC,gBAAgB,CAAC;SACzB,WAAW,CAAC,2BAA2B,CAAC;SACxC,MAAM,CAAC,uBAAuB,EAAE,uDAAuD,CAAC;SACxF,MAAM,CAAC,2BAA2B,EAAE,mDAAmD,CAAC;SACxF,MAAM,CAAC,uBAAuB,EAAE,wDAAwD,CAAC;SACzF,MAAM,CAAC,oBAAoB,EAAE,iBAAiB,CAAC;SAC/C,MAAM,CAAC,uBAAuB,EAAE,+CAA+C,CAAC;SAChF,MAAM,CAAC,sBAAsB,EAA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BAAqB,EAAE,0BAA0B,CAAC;SACzD,MAAM,CAAC,KAAK,EAAE,WAAmB,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;QAClD,MAAM,UAAU,GAAG,GAAG,CAAC,eAAe,EAAmB,CAAC;QAC1D,MAAM,GAAG,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAEzC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,GAAG,EACH,EAAE,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,wBAAwB,EAAE,EAC3F,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,yBAAyB,CAAC,WAAW,EAAE,OAAO,CAAC,OAAO,EAAE;gBAC9E,MAAM,EAAE,OAAO,CAAC,MAAgB;gBAChC,MAAM,EAAE,OAAO,CAAC,MAAM;aACvB,CAAC,CACH,CAAC;YAEF,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,cAAc,MAAM,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;YAChG,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ /**
3
+ * Register model commands
4
+ */
5
+ export declare function registerModelCommands(program: Command): void;
6
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/commands/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8K5D"}
@@ -0,0 +1,156 @@
1
+ import { createRegistryContext, handleRegistryError } from '../context.js';
2
+ import { withSpinner } from '../utils.js';
3
+ import { formatModels, formatModel, formatAliases, formatAliasResolution } from '../formatters/registry.js';
4
+ /**
5
+ * Register model commands
6
+ */
7
+ export function registerModelCommands(program) {
8
+ const models = program
9
+ .command('models')
10
+ .description('Browse the model catalog');
11
+ // ulu models list
12
+ models
13
+ .command('list')
14
+ .description('List available models')
15
+ .option('-p, --provider <provider>', 'Filter by provider')
16
+ .option('-t, --tier <tier>', 'Filter by tier (free|standard|premium)')
17
+ .option('-s, --status <status>', 'Filter by status (available|deprecated|preview)')
18
+ .option('-c, --capability <cap>', 'Filter by capability (vision|tools|streaming|extendedThinking)')
19
+ .action(async (options, cmd) => {
20
+ const globalOpts = cmd.optsWithGlobals();
21
+ const ctx = createRegistryContext(globalOpts);
22
+ try {
23
+ const result = await withSpinner(ctx, { start: 'Fetching models...', failure: 'Failed to fetch models' }, () => ctx.client.models.list({
24
+ provider: options.provider,
25
+ tier: options.tier,
26
+ status: options.status,
27
+ capability: options.capability,
28
+ }));
29
+ if (ctx.json) {
30
+ console.log(JSON.stringify(result, null, 2));
31
+ }
32
+ else if (result.models.length === 0) {
33
+ console.log('No models found');
34
+ }
35
+ else {
36
+ console.log(formatModels(result.models));
37
+ console.log(`\n${result.models.length} models`);
38
+ }
39
+ }
40
+ catch (error) {
41
+ handleRegistryError(error, ctx);
42
+ }
43
+ });
44
+ // ulu models get <provider> <model-id>
45
+ models
46
+ .command('get <provider> <modelId>')
47
+ .description('Get model details')
48
+ .action(async (provider, modelId, _, cmd) => {
49
+ const globalOpts = cmd.optsWithGlobals();
50
+ const ctx = createRegistryContext(globalOpts);
51
+ try {
52
+ const model = await withSpinner(ctx, { start: 'Fetching model...', failure: 'Failed to fetch model' }, () => ctx.client.models.get(provider, modelId));
53
+ if (ctx.json) {
54
+ console.log(JSON.stringify(model, null, 2));
55
+ }
56
+ else {
57
+ console.log(formatModel(model));
58
+ }
59
+ }
60
+ catch (error) {
61
+ handleRegistryError(error, ctx);
62
+ }
63
+ });
64
+ // ulu models providers
65
+ models
66
+ .command('providers')
67
+ .description('List model providers')
68
+ .action(async (_, cmd) => {
69
+ const globalOpts = cmd.optsWithGlobals();
70
+ const ctx = createRegistryContext(globalOpts);
71
+ try {
72
+ const result = await withSpinner(ctx, { start: 'Fetching providers...', failure: 'Failed to fetch providers' }, () => ctx.client.models.listProviders());
73
+ if (ctx.json) {
74
+ console.log(JSON.stringify(result, null, 2));
75
+ }
76
+ else if (result.providers.length === 0) {
77
+ console.log('No providers found');
78
+ }
79
+ else {
80
+ for (const provider of result.providers) {
81
+ console.log(`${provider.id}: ${provider.name} (${provider.status})`);
82
+ }
83
+ }
84
+ }
85
+ catch (error) {
86
+ handleRegistryError(error, ctx);
87
+ }
88
+ });
89
+ // ulu models aliases
90
+ models
91
+ .command('aliases')
92
+ .description('List model aliases')
93
+ .action(async (_, cmd) => {
94
+ const globalOpts = cmd.optsWithGlobals();
95
+ const ctx = createRegistryContext(globalOpts);
96
+ try {
97
+ const result = await withSpinner(ctx, { start: 'Fetching aliases...', failure: 'Failed to fetch aliases' }, () => ctx.client.models.listAliases());
98
+ if (ctx.json) {
99
+ console.log(JSON.stringify(result, null, 2));
100
+ }
101
+ else if (result.aliases.length === 0) {
102
+ console.log('No aliases found');
103
+ }
104
+ else {
105
+ console.log(formatAliases(result.aliases));
106
+ }
107
+ }
108
+ catch (error) {
109
+ handleRegistryError(error, ctx);
110
+ }
111
+ });
112
+ // ulu models resolve <alias>
113
+ models
114
+ .command('resolve <alias>')
115
+ .description('Resolve a model alias')
116
+ .action(async (alias, _, cmd) => {
117
+ const globalOpts = cmd.optsWithGlobals();
118
+ const ctx = createRegistryContext(globalOpts);
119
+ try {
120
+ const resolution = await withSpinner(ctx, { start: 'Resolving alias...', failure: 'Failed to resolve alias' }, () => ctx.client.models.resolveAlias(alias));
121
+ if (ctx.json) {
122
+ console.log(JSON.stringify(resolution, null, 2));
123
+ }
124
+ else {
125
+ console.log(formatAliasResolution(resolution));
126
+ }
127
+ }
128
+ catch (error) {
129
+ handleRegistryError(error, ctx);
130
+ }
131
+ });
132
+ // ulu models sync (admin)
133
+ models
134
+ .command('sync')
135
+ .description('Sync models from providers (admin only)')
136
+ .action(async (_, cmd) => {
137
+ const globalOpts = cmd.optsWithGlobals();
138
+ const ctx = createRegistryContext(globalOpts);
139
+ try {
140
+ const result = await withSpinner(ctx, { start: 'Syncing models...', success: 'Models synced', failure: 'Failed to sync models' }, () => ctx.client.models.sync());
141
+ if (ctx.json) {
142
+ console.log(JSON.stringify(result, null, 2));
143
+ }
144
+ else {
145
+ console.log(`Providers: +${result.providersAdded} added, ~${result.providersUpdated} updated`);
146
+ console.log(`Models: +${result.modelsAdded} added, ~${result.modelsUpdated} updated`);
147
+ if (result.duration)
148
+ console.log(`Duration: ${result.duration}`);
149
+ }
150
+ }
151
+ catch (error) {
152
+ handleRegistryError(error, ctx);
153
+ }
154
+ });
155
+ }
156
+ //# sourceMappingURL=models.js.map