@proletariat/cli 0.3.20 → 0.3.22
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.
- package/dist/commands/action/create.d.ts +0 -1
- package/dist/commands/action/delete.d.ts +0 -1
- package/dist/commands/action/index.d.ts +0 -1
- package/dist/commands/action/list.d.ts +0 -1
- package/dist/commands/action/list.js +2 -0
- package/dist/commands/action/run.d.ts +0 -1
- package/dist/commands/action/show.d.ts +0 -1
- package/dist/commands/action/update.d.ts +0 -1
- package/dist/commands/agent/auth.d.ts +0 -1
- package/dist/commands/agent/auth.js +3 -7
- package/dist/commands/agent/discover.d.ts +0 -1
- package/dist/commands/agent/discover.js +3 -7
- package/dist/commands/agent/index.d.ts +0 -1
- package/dist/commands/agent/index.js +2 -0
- package/dist/commands/agent/list.d.ts +0 -1
- package/dist/commands/agent/list.js +30 -1
- package/dist/commands/agent/login.d.ts +0 -1
- package/dist/commands/agent/login.js +4 -2
- package/dist/commands/agent/rebuild.d.ts +0 -1
- package/dist/commands/agent/rebuild.js +2 -0
- package/dist/commands/agent/remove.d.ts +1 -1
- package/dist/commands/agent/remove.js +38 -28
- package/dist/commands/agent/restart.d.ts +0 -1
- package/dist/commands/agent/restart.js +2 -0
- package/dist/commands/agent/shell.d.ts +0 -1
- package/dist/commands/agent/shell.js +4 -2
- package/dist/commands/agent/staff/add.d.ts +0 -1
- package/dist/commands/agent/staff/add.js +3 -7
- package/dist/commands/agent/staff/index.d.ts +0 -1
- package/dist/commands/agent/staff/index.js +2 -0
- package/dist/commands/agent/staff/remove.d.ts +0 -1
- package/dist/commands/agent/staff/remove.js +4 -2
- package/dist/commands/agent/status.d.ts +0 -1
- package/dist/commands/agent/status.js +4 -2
- package/dist/commands/agent/temp/cleanup.d.ts +0 -1
- package/dist/commands/agent/temp/cleanup.js +2 -0
- package/dist/commands/agent/temp/index.d.ts +0 -1
- package/dist/commands/agent/temp/index.js +2 -0
- package/dist/commands/agent/themes/add-names.d.ts +1 -0
- package/dist/commands/agent/themes/add-names.js +5 -1
- package/dist/commands/agent/themes/index.d.ts +0 -1
- package/dist/commands/agent/themes/index.js +3 -7
- package/dist/commands/agent/themes/set.d.ts +0 -1
- package/dist/commands/agent/themes/set.js +3 -7
- package/dist/commands/agent/visit.d.ts +0 -1
- package/dist/commands/agent/visit.js +4 -2
- package/dist/commands/autocomplete/setup.d.ts +0 -1
- package/dist/commands/board/index.d.ts +0 -1
- package/dist/commands/board/view.d.ts +0 -1
- package/dist/commands/board/watch.d.ts +0 -1
- package/dist/commands/branch/create.d.ts +0 -1
- package/dist/commands/branch/create.js +2 -0
- package/dist/commands/branch/index.d.ts +0 -1
- package/dist/commands/branch/index.js +2 -0
- package/dist/commands/branch/list.d.ts +0 -1
- package/dist/commands/branch/validate.d.ts +0 -1
- package/dist/commands/branch/where.d.ts +0 -1
- package/dist/commands/branch/where.js +2 -0
- package/dist/commands/category/create.d.ts +18 -0
- package/dist/commands/category/create.js +108 -0
- package/dist/commands/category/delete.d.ts +17 -0
- package/dist/commands/category/delete.js +103 -0
- package/dist/commands/category/index.d.ts +15 -0
- package/dist/commands/category/index.js +87 -0
- package/dist/commands/category/list.d.ts +17 -0
- package/dist/commands/category/list.js +85 -0
- package/dist/commands/category/rename.d.ts +18 -0
- package/dist/commands/category/rename.js +127 -0
- package/dist/commands/claude.js +2 -0
- package/dist/commands/commit.js +2 -0
- package/dist/commands/config/index.js +2 -0
- package/dist/commands/docker/clean.d.ts +0 -1
- package/dist/commands/docker/index.d.ts +0 -1
- package/dist/commands/docker/prune.d.ts +0 -1
- package/dist/commands/docker/restart.d.ts +0 -1
- package/dist/commands/docker/stop.d.ts +0 -1
- package/dist/commands/epic/activate.d.ts +0 -1
- package/dist/commands/epic/activate.js +2 -0
- package/dist/commands/epic/archive.d.ts +0 -1
- package/dist/commands/epic/archive.js +2 -0
- package/dist/commands/epic/create.d.ts +0 -1
- package/dist/commands/epic/create.js +3 -1
- package/dist/commands/epic/delete.d.ts +14 -0
- package/dist/commands/epic/delete.js +129 -0
- package/dist/commands/epic/index.d.ts +0 -1
- package/dist/commands/epic/index.js +6 -0
- package/dist/commands/epic/link/block.d.ts +0 -1
- package/dist/commands/epic/link/block.js +2 -0
- package/dist/commands/epic/link/duplicates.d.ts +0 -1
- package/dist/commands/epic/link/duplicates.js +2 -0
- package/dist/commands/epic/link/index.d.ts +0 -1
- package/dist/commands/epic/link/index.js +19 -0
- package/dist/commands/epic/link/relates.d.ts +0 -1
- package/dist/commands/epic/link/relates.js +2 -0
- package/dist/commands/epic/link/remove.d.ts +0 -1
- package/dist/commands/epic/link/remove.js +2 -0
- package/dist/commands/epic/list.d.ts +0 -1
- package/dist/commands/epic/move.d.ts +0 -1
- package/dist/commands/epic/move.js +2 -0
- package/dist/commands/epic/progress.d.ts +0 -1
- package/dist/commands/epic/progress.js +2 -0
- package/dist/commands/epic/project.d.ts +0 -1
- package/dist/commands/epic/project.js +2 -0
- package/dist/commands/epic/reorder.d.ts +0 -1
- package/dist/commands/epic/reorder.js +2 -0
- package/dist/commands/epic/spec.d.ts +0 -1
- package/dist/commands/epic/spec.js +2 -0
- package/dist/commands/epic/ticket.d.ts +0 -1
- package/dist/commands/epic/ticket.js +2 -0
- package/dist/commands/epic/view.d.ts +0 -1
- package/dist/commands/epic/view.js +2 -0
- package/dist/commands/execution/config.d.ts +0 -1
- package/dist/commands/execution/config.js +24 -0
- package/dist/commands/execution/index.d.ts +0 -1
- package/dist/commands/execution/index.js +3 -1
- package/dist/commands/execution/kill.d.ts +3 -0
- package/dist/commands/execution/kill.js +1 -0
- package/dist/commands/execution/list.d.ts +0 -1
- package/dist/commands/execution/list.js +5 -4
- package/dist/commands/execution/logs.d.ts +0 -1
- package/dist/commands/execution/logs.js +4 -1
- package/dist/commands/execution/stop.d.ts +0 -1
- package/dist/commands/execution/stop.js +3 -1
- package/dist/commands/execution/view.d.ts +0 -1
- package/dist/commands/execution/view.js +3 -1
- package/dist/commands/gh/index.d.ts +0 -1
- package/dist/commands/gh/login.d.ts +0 -1
- package/dist/commands/gh/status.d.ts +0 -1
- package/dist/commands/gh/token.d.ts +0 -1
- package/dist/commands/init.js +2 -0
- package/dist/commands/phase/create.d.ts +0 -1
- package/dist/commands/phase/create.js +1 -2
- package/dist/commands/phase/delete.d.ts +0 -1
- package/dist/commands/phase/delete.js +1 -1
- package/dist/commands/phase/list.d.ts +0 -1
- package/dist/commands/phase/move.d.ts +0 -1
- package/dist/commands/phase/move.js +10 -2
- package/dist/commands/phase/template/apply.d.ts +0 -1
- package/dist/commands/phase/template/apply.js +4 -2
- package/dist/commands/phase/template/create.d.ts +0 -1
- package/dist/commands/phase/template/create.js +6 -7
- package/dist/commands/phase/template/delete.d.ts +0 -1
- package/dist/commands/phase/template/delete.js +2 -0
- package/dist/commands/phase/template/index.d.ts +0 -1
- package/dist/commands/phase/template/index.js +2 -0
- package/dist/commands/phase/template/list.d.ts +0 -1
- package/dist/commands/phase/template/list.js +3 -1
- package/dist/commands/phase/template/update.d.ts +0 -1
- package/dist/commands/phase/update.d.ts +0 -1
- package/dist/commands/phase/update.js +2 -2
- package/dist/commands/pmo/init.js +2 -0
- package/dist/commands/pr/create.d.ts +0 -1
- package/dist/commands/pr/index.d.ts +0 -1
- package/dist/commands/pr/link.d.ts +0 -1
- package/dist/commands/pr/list.d.ts +0 -1
- package/dist/commands/pr/status.d.ts +0 -1
- package/dist/commands/project/archive.d.ts +0 -1
- package/dist/commands/project/create.d.ts +0 -1
- package/dist/commands/project/delete.d.ts +0 -1
- package/dist/commands/project/index.d.ts +0 -1
- package/dist/commands/project/list.d.ts +0 -1
- package/dist/commands/project/spec.d.ts +0 -1
- package/dist/commands/project/unarchive.d.ts +0 -1
- package/dist/commands/project/update.d.ts +0 -1
- package/dist/commands/project/view.d.ts +0 -1
- package/dist/commands/repo/add.d.ts +0 -1
- package/dist/commands/repo/add.js +2 -0
- package/dist/commands/repo/index.d.ts +0 -1
- package/dist/commands/repo/list.d.ts +0 -1
- package/dist/commands/repo/remove.d.ts +0 -1
- package/dist/commands/repo/view.d.ts +0 -1
- package/dist/commands/roadmap/add-project.d.ts +0 -1
- package/dist/commands/roadmap/add-project.js +2 -0
- package/dist/commands/roadmap/create.d.ts +0 -1
- package/dist/commands/roadmap/create.js +2 -0
- package/dist/commands/roadmap/delete.d.ts +0 -1
- package/dist/commands/roadmap/delete.js +12 -1
- package/dist/commands/roadmap/generate.d.ts +0 -1
- package/dist/commands/roadmap/generate.js +2 -0
- package/dist/commands/roadmap/index.d.ts +0 -1
- package/dist/commands/roadmap/index.js +2 -0
- package/dist/commands/roadmap/list.d.ts +0 -1
- package/dist/commands/roadmap/remove-project.d.ts +0 -1
- package/dist/commands/roadmap/remove-project.js +2 -0
- package/dist/commands/roadmap/reorder.d.ts +0 -1
- package/dist/commands/roadmap/reorder.js +2 -0
- package/dist/commands/roadmap/update.d.ts +0 -1
- package/dist/commands/roadmap/update.js +2 -0
- package/dist/commands/roadmap/view.d.ts +0 -1
- package/dist/commands/roadmap/view.js +2 -0
- package/dist/commands/session/attach.d.ts +0 -1
- package/dist/commands/session/attach.js +9 -0
- package/dist/commands/session/index.d.ts +0 -1
- package/dist/commands/session/index.js +2 -0
- package/dist/commands/session/list.d.ts +0 -1
- package/dist/commands/spec/create.d.ts +0 -1
- package/dist/commands/spec/create.js +1 -1
- package/dist/commands/spec/delete.d.ts +0 -1
- package/dist/commands/spec/edit.d.ts +0 -1
- package/dist/commands/spec/index.d.ts +0 -1
- package/dist/commands/spec/link/depends.d.ts +0 -1
- package/dist/commands/spec/link/duplicates.d.ts +0 -1
- package/dist/commands/spec/link/index.d.ts +0 -1
- package/dist/commands/spec/link/relates.d.ts +0 -1
- package/dist/commands/spec/link/remove.d.ts +0 -1
- package/dist/commands/spec/list.d.ts +0 -1
- package/dist/commands/spec/plan.d.ts +0 -1
- package/dist/commands/spec/ticket.d.ts +0 -3
- package/dist/commands/spec/ticket.js +7 -38
- package/dist/commands/spec/view.d.ts +0 -1
- package/dist/commands/status/category.d.ts +14 -0
- package/dist/commands/status/category.js +63 -0
- package/dist/commands/status/create.d.ts +0 -1
- package/dist/commands/status/create.js +1 -1
- package/dist/commands/status/delete.d.ts +0 -1
- package/dist/commands/status/index.d.ts +0 -1
- package/dist/commands/status/list.d.ts +0 -1
- package/dist/commands/status/list.js +5 -3
- package/dist/commands/status/move.d.ts +0 -1
- package/dist/commands/status/update.d.ts +0 -1
- package/dist/commands/template/delete.d.ts +0 -1
- package/dist/commands/template/delete.js +2 -0
- package/dist/commands/template/index.d.ts +0 -1
- package/dist/commands/template/list.d.ts +0 -1
- package/dist/commands/template/list.js +2 -0
- package/dist/commands/template/phase/apply.js +2 -0
- package/dist/commands/template/phase/create.d.ts +0 -1
- package/dist/commands/template/phase/create.js +3 -9
- package/dist/commands/template/phase/delete.js +2 -0
- package/dist/commands/template/phase/index.d.ts +0 -1
- package/dist/commands/template/phase/index.js +4 -4
- package/dist/commands/template/phase/list.js +2 -0
- package/dist/commands/template/phase/update.js +2 -0
- package/dist/commands/template/ticket/apply.js +2 -0
- package/dist/commands/template/ticket/create.js +2 -0
- package/dist/commands/template/ticket/delete.d.ts +1 -1
- package/dist/commands/template/ticket/delete.js +6 -2
- package/dist/commands/template/ticket/index.d.ts +0 -1
- package/dist/commands/template/ticket/list.js +2 -0
- package/dist/commands/template/ticket/save.d.ts +0 -1
- package/dist/commands/template/ticket/save.js +0 -6
- package/dist/commands/terminal/title.d.ts +0 -1
- package/dist/commands/ticket/bulk.d.ts +0 -1
- package/dist/commands/ticket/bulk.js +2 -0
- package/dist/commands/ticket/category.d.ts +14 -0
- package/dist/commands/ticket/category.js +63 -0
- package/dist/commands/ticket/complete.d.ts +0 -1
- package/dist/commands/ticket/complete.js +2 -0
- package/dist/commands/ticket/create.d.ts +0 -1
- package/dist/commands/ticket/create.js +7 -5
- package/dist/commands/ticket/delete.d.ts +0 -1
- package/dist/commands/ticket/delete.js +2 -0
- package/dist/commands/ticket/edit.d.ts +0 -1
- package/dist/commands/ticket/edit.js +5 -3
- package/dist/commands/ticket/epic.d.ts +0 -1
- package/dist/commands/ticket/epic.js +2 -0
- package/dist/commands/ticket/index.d.ts +0 -1
- package/dist/commands/ticket/index.js +2 -0
- package/dist/commands/ticket/link/block.d.ts +0 -1
- package/dist/commands/ticket/link/block.js +2 -0
- package/dist/commands/ticket/link/duplicates.d.ts +0 -1
- package/dist/commands/ticket/link/duplicates.js +2 -0
- package/dist/commands/ticket/link/index.d.ts +0 -1
- package/dist/commands/ticket/link/index.js +2 -0
- package/dist/commands/ticket/link/relates.d.ts +0 -1
- package/dist/commands/ticket/link/relates.js +2 -0
- package/dist/commands/ticket/link/remove.d.ts +0 -1
- package/dist/commands/ticket/link/remove.js +2 -0
- package/dist/commands/ticket/list.d.ts +2 -1
- package/dist/commands/ticket/list.js +39 -2
- package/dist/commands/ticket/move.d.ts +0 -1
- package/dist/commands/ticket/move.js +2 -0
- package/dist/commands/ticket/project.d.ts +0 -1
- package/dist/commands/ticket/project.js +2 -0
- package/dist/commands/ticket/reassign.d.ts +0 -1
- package/dist/commands/ticket/reassign.js +29 -0
- package/dist/commands/ticket/spec.d.ts +0 -1
- package/dist/commands/ticket/spec.js +2 -0
- package/dist/commands/ticket/status.d.ts +0 -1
- package/dist/commands/ticket/status.js +2 -0
- package/dist/commands/ticket/template/apply.d.ts +0 -1
- package/dist/commands/ticket/template/apply.js +2 -0
- package/dist/commands/ticket/template/create.d.ts +0 -1
- package/dist/commands/ticket/template/create.js +4 -2
- package/dist/commands/ticket/template/delete.d.ts +0 -1
- package/dist/commands/ticket/template/delete.js +2 -0
- package/dist/commands/ticket/template/index.d.ts +0 -1
- package/dist/commands/ticket/template/index.js +2 -0
- package/dist/commands/ticket/template/list.d.ts +0 -1
- package/dist/commands/ticket/template/list.js +2 -0
- package/dist/commands/ticket/template/save.d.ts +0 -1
- package/dist/commands/ticket/template/save.js +2 -0
- package/dist/commands/ticket/update.d.ts +0 -1
- package/dist/commands/ticket/update.js +4 -2
- package/dist/commands/ticket/view.d.ts +0 -1
- package/dist/commands/ticket/view.js +2 -0
- package/dist/commands/work/complete.d.ts +0 -1
- package/dist/commands/work/complete.js +2 -0
- package/dist/commands/work/index.d.ts +0 -1
- package/dist/commands/work/index.js +2 -0
- package/dist/commands/work/ready.d.ts +1 -2
- package/dist/commands/work/ready.js +11 -5
- package/dist/commands/work/revise.d.ts +0 -1
- package/dist/commands/work/revise.js +3 -1
- package/dist/commands/work/spawn-all.d.ts +0 -1
- package/dist/commands/work/spawn-all.js +2 -0
- package/dist/commands/work/spawn.d.ts +0 -1
- package/dist/commands/work/spawn.js +34 -8
- package/dist/commands/work/start.d.ts +0 -1
- package/dist/commands/work/start.js +6 -0
- package/dist/commands/work/watch.d.ts +0 -1
- package/dist/commands/work/watch.js +5 -1
- package/dist/commands/workflow/create.d.ts +0 -1
- package/dist/commands/workflow/delete.d.ts +0 -1
- package/dist/commands/workflow/index.d.ts +0 -1
- package/dist/commands/workflow/index.js +2 -0
- package/dist/commands/workflow/list.d.ts +0 -1
- package/dist/commands/workflow/switch.d.ts +0 -1
- package/dist/commands/workflow/view.d.ts +0 -1
- package/dist/commands/workspace/list.js +2 -0
- package/dist/commands/workspace/prune.d.ts +13 -0
- package/dist/commands/workspace/prune.js +186 -0
- package/dist/commands/workspace/remove.js +2 -0
- package/dist/commands/workspace/use.js +2 -0
- package/dist/lib/agents/commands.d.ts +7 -0
- package/dist/lib/agents/commands.js +11 -0
- package/dist/lib/execution/runners.js +1 -2
- package/dist/lib/pmo/base-command.d.ts +2 -4
- package/dist/lib/pmo/base-command.js +8 -10
- package/dist/lib/pmo/schema.d.ts +2 -0
- package/dist/lib/pmo/schema.js +17 -0
- package/dist/lib/pmo/storage/base.d.ts +4 -0
- package/dist/lib/pmo/storage/base.js +31 -0
- package/dist/lib/pmo/storage/categories.d.ts +50 -0
- package/dist/lib/pmo/storage/categories.js +205 -0
- package/dist/lib/pmo/storage/epics.js +20 -10
- package/dist/lib/pmo/storage/helpers.d.ts +10 -0
- package/dist/lib/pmo/storage/helpers.js +59 -1
- package/dist/lib/pmo/storage/index.d.ts +14 -1
- package/dist/lib/pmo/storage/index.js +35 -1
- package/dist/lib/pmo/storage/projects.js +20 -8
- package/dist/lib/pmo/storage/specs.js +23 -13
- package/dist/lib/pmo/storage/statuses.js +39 -18
- package/dist/lib/pmo/storage/subtasks.js +19 -8
- package/dist/lib/pmo/storage/tickets.d.ts +5 -0
- package/dist/lib/pmo/storage/tickets.js +57 -17
- package/dist/lib/pmo/storage/types.d.ts +10 -0
- package/dist/lib/pmo/types.d.ts +25 -0
- package/dist/lib/prompt-json.d.ts +10 -16
- package/dist/lib/prompt-json.js +8 -16
- package/oclif.manifest.json +3831 -3864
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PMOCommand } from '../../lib/pmo/index.js';
|
|
2
|
+
export default class CategoryRename extends PMOCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
oldName: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
7
|
+
newName: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
type: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
protected getPMOOptions(): {
|
|
15
|
+
promptIfMultiple: boolean;
|
|
16
|
+
};
|
|
17
|
+
execute(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import inquirer from 'inquirer';
|
|
3
|
+
import { PMOCommand, pmoBaseFlags } from '../../lib/pmo/index.js';
|
|
4
|
+
import { styles } from '../../lib/styles.js';
|
|
5
|
+
import { shouldOutputJson, outputPromptAsJson, buildPromptConfig, createMetadata } from '../../lib/prompt-json.js';
|
|
6
|
+
export default class CategoryRename extends PMOCommand {
|
|
7
|
+
static description = 'Rename a category (custom categories only)';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> <%= command.id %> --type ticket spike investigation',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --type status reviewing in-review',
|
|
11
|
+
];
|
|
12
|
+
static args = {
|
|
13
|
+
oldName: Args.string({
|
|
14
|
+
description: 'Current name of the category',
|
|
15
|
+
}),
|
|
16
|
+
newName: Args.string({
|
|
17
|
+
description: 'New name for the category',
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
static flags = {
|
|
21
|
+
...pmoBaseFlags,
|
|
22
|
+
type: Flags.string({
|
|
23
|
+
char: 't',
|
|
24
|
+
description: 'Category type',
|
|
25
|
+
options: ['ticket', 'status'],
|
|
26
|
+
required: true,
|
|
27
|
+
}),
|
|
28
|
+
json: Flags.boolean({
|
|
29
|
+
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
30
|
+
default: false,
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
getPMOOptions() {
|
|
34
|
+
return { promptIfMultiple: false };
|
|
35
|
+
}
|
|
36
|
+
async execute() {
|
|
37
|
+
const { args, flags } = await this.parse(CategoryRename);
|
|
38
|
+
const categoryType = flags.type;
|
|
39
|
+
const jsonMode = shouldOutputJson(flags);
|
|
40
|
+
let oldName = args.oldName;
|
|
41
|
+
let newName = args.newName;
|
|
42
|
+
// Get custom categories for selection
|
|
43
|
+
const customCategories = await this.storage.listCategories({ type: categoryType, isBuiltin: false });
|
|
44
|
+
if (customCategories.length === 0) {
|
|
45
|
+
this.log(styles.muted('\nNo custom categories to rename. Built-in categories cannot be renamed.'));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// Prompt for category if not provided
|
|
49
|
+
if (!oldName) {
|
|
50
|
+
const message = 'Select category to rename:';
|
|
51
|
+
const choices = customCategories.map(c => ({
|
|
52
|
+
name: c.name + (c.description ? ` - ${c.description}` : ''),
|
|
53
|
+
value: c.name,
|
|
54
|
+
}));
|
|
55
|
+
if (jsonMode) {
|
|
56
|
+
outputPromptAsJson(buildPromptConfig('list', 'oldName', message, choices), createMetadata('category rename', flags));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const result = await this.selectFromList({
|
|
60
|
+
message,
|
|
61
|
+
items: customCategories,
|
|
62
|
+
getName: (c) => c.name + (c.description ? ` - ${c.description}` : ''),
|
|
63
|
+
getValue: (c) => c.name,
|
|
64
|
+
getCommand: (c) => `prlt category rename --type ${categoryType} ${c.name}`,
|
|
65
|
+
allowCancel: true,
|
|
66
|
+
});
|
|
67
|
+
if (!result) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
oldName = result;
|
|
71
|
+
}
|
|
72
|
+
// Find the category
|
|
73
|
+
const category = await this.storage.getCategoryByName(oldName, categoryType);
|
|
74
|
+
if (!category) {
|
|
75
|
+
this.error(`Category "${oldName}" not found for type "${categoryType}"`);
|
|
76
|
+
}
|
|
77
|
+
if (category.isBuiltin) {
|
|
78
|
+
this.error(`Cannot rename built-in category "${oldName}"`);
|
|
79
|
+
}
|
|
80
|
+
// Prompt for new name if not provided
|
|
81
|
+
if (!newName) {
|
|
82
|
+
const message = `Enter new name for "${oldName}":`;
|
|
83
|
+
if (jsonMode) {
|
|
84
|
+
outputPromptAsJson(buildPromptConfig('input', 'newName', message, []), createMetadata('category rename', { ...flags, oldName }));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const { categoryNewName } = await inquirer.prompt([{
|
|
88
|
+
type: 'input',
|
|
89
|
+
name: 'categoryNewName',
|
|
90
|
+
message,
|
|
91
|
+
validate: (input) => {
|
|
92
|
+
if (!input.trim())
|
|
93
|
+
return 'New name is required';
|
|
94
|
+
if (!/^[a-z][a-z0-9-]*$/.test(input.trim())) {
|
|
95
|
+
return 'Category name must start with a letter and contain only lowercase letters, numbers, and hyphens';
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
},
|
|
99
|
+
}]);
|
|
100
|
+
newName = categoryNewName;
|
|
101
|
+
}
|
|
102
|
+
// At this point newName and oldName should be defined
|
|
103
|
+
if (!newName) {
|
|
104
|
+
this.error('New name is required');
|
|
105
|
+
}
|
|
106
|
+
if (!oldName) {
|
|
107
|
+
this.error('Old name is required');
|
|
108
|
+
}
|
|
109
|
+
// Validate new name format
|
|
110
|
+
if (!/^[a-z][a-z0-9-]*$/.test(newName)) {
|
|
111
|
+
this.error('Category name must start with a letter and contain only lowercase letters, numbers, and hyphens');
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const updatedCategory = await this.storage.renameCategory(category.id, newName);
|
|
115
|
+
this.log(`\n${styles.success(`Category renamed successfully!`)}`);
|
|
116
|
+
this.log(` Old name: ${oldName}`);
|
|
117
|
+
this.log(` New name: ${styles.emphasis(updatedCategory.name)}`);
|
|
118
|
+
this.log('');
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
if (error instanceof Error) {
|
|
122
|
+
this.error(error.message);
|
|
123
|
+
}
|
|
124
|
+
throw error;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
package/dist/commands/claude.js
CHANGED
package/dist/commands/commit.js
CHANGED
|
@@ -3,7 +3,6 @@ export default class DockerClean extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
7
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
8
|
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -3,7 +3,6 @@ export default class Docker extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
7
|
};
|
|
9
8
|
run(): Promise<void>;
|
|
@@ -3,7 +3,6 @@ export default class DockerPrune extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
7
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
8
|
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -3,7 +3,6 @@ export default class DockerRestart extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
7
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
8
|
time: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -3,7 +3,6 @@ export default class DockerStop extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
7
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
8
|
time: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -7,7 +7,6 @@ export default class EpicActivate extends PMOCommand {
|
|
|
7
7
|
};
|
|
8
8
|
static flags: {
|
|
9
9
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
10
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
11
|
};
|
|
13
12
|
execute(): Promise<void>;
|
|
@@ -19,6 +19,8 @@ export default class EpicActivate extends PMOCommand {
|
|
|
19
19
|
static flags = {
|
|
20
20
|
...pmoBaseFlags,
|
|
21
21
|
json: Flags.boolean({
|
|
22
|
+
char: 'm',
|
|
23
|
+
aliases: ['machine'],
|
|
22
24
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
23
25
|
default: false,
|
|
24
26
|
}),
|
|
@@ -8,7 +8,6 @@ export default class EpicArchive extends PMOCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
11
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
12
|
};
|
|
14
13
|
execute(): Promise<void>;
|
|
@@ -19,6 +19,8 @@ export default class EpicArchive extends PMOCommand {
|
|
|
19
19
|
static flags = {
|
|
20
20
|
...pmoBaseFlags,
|
|
21
21
|
json: Flags.boolean({
|
|
22
|
+
char: 'm',
|
|
23
|
+
aliases: ['machine'],
|
|
22
24
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
23
25
|
default: false,
|
|
24
26
|
}),
|
|
@@ -8,7 +8,6 @@ export default class EpicCreate extends PMOCommand {
|
|
|
8
8
|
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
spec: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
11
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
12
|
};
|
|
14
13
|
execute(): Promise<void>;
|
|
@@ -32,6 +32,8 @@ export default class EpicCreate extends PMOCommand {
|
|
|
32
32
|
description: 'Link to spec ID (the design spec that describes this epic)',
|
|
33
33
|
}),
|
|
34
34
|
json: Flags.boolean({
|
|
35
|
+
char: 'm',
|
|
36
|
+
aliases: ['machine'],
|
|
35
37
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
36
38
|
default: false,
|
|
37
39
|
}),
|
|
@@ -123,7 +125,7 @@ export default class EpicCreate extends PMOCommand {
|
|
|
123
125
|
const answers = await inquirer.prompt(fields.map(field => ({
|
|
124
126
|
...field,
|
|
125
127
|
validate: field.name === 'title'
|
|
126
|
-
? ((input) => input.
|
|
128
|
+
? ((input) => input.trim() ? true : 'Title cannot be empty')
|
|
127
129
|
: undefined,
|
|
128
130
|
when: field.name === 'specId' ? () => hasSpecs : undefined,
|
|
129
131
|
})));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PMOCommand } from '../../lib/pmo/index.js';
|
|
2
|
+
export default class EpicDelete extends PMOCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
execute(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import inquirer from 'inquirer';
|
|
3
|
+
import { autoExportToBoard, PMOCommand, pmoBaseFlags } from '../../lib/pmo/index.js';
|
|
4
|
+
import { styles } from '../../lib/styles.js';
|
|
5
|
+
import { deleteEpicFile } from '../../lib/pmo/epic-files.js';
|
|
6
|
+
import { shouldOutputJson, outputPromptAsJson, outputErrorAsJson, createMetadata, buildPromptConfig, } from '../../lib/prompt-json.js';
|
|
7
|
+
export default class EpicDelete extends PMOCommand {
|
|
8
|
+
static description = 'Delete an epic permanently';
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> <%= command.id %> EPIC-001',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> EPIC-001 --force',
|
|
12
|
+
'<%= config.bin %> <%= command.id %> # Interactive mode',
|
|
13
|
+
];
|
|
14
|
+
static args = {
|
|
15
|
+
id: Args.string({
|
|
16
|
+
description: 'Epic ID to delete',
|
|
17
|
+
required: false,
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
static flags = {
|
|
21
|
+
...pmoBaseFlags,
|
|
22
|
+
json: Flags.boolean({
|
|
23
|
+
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
24
|
+
default: false,
|
|
25
|
+
}),
|
|
26
|
+
force: Flags.boolean({
|
|
27
|
+
char: 'f',
|
|
28
|
+
description: 'Skip confirmation prompt',
|
|
29
|
+
default: false,
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
async execute() {
|
|
33
|
+
const { args, flags } = await this.parse(EpicDelete);
|
|
34
|
+
const projectId = await this.requireProject();
|
|
35
|
+
// Check if JSON output mode is active
|
|
36
|
+
const jsonMode = shouldOutputJson(flags);
|
|
37
|
+
// Helper to handle errors in JSON mode
|
|
38
|
+
const handleError = (code, message) => {
|
|
39
|
+
if (jsonMode) {
|
|
40
|
+
outputErrorAsJson(code, message, createMetadata('epic delete', flags));
|
|
41
|
+
this.exit(1);
|
|
42
|
+
}
|
|
43
|
+
this.error(message);
|
|
44
|
+
};
|
|
45
|
+
let epicId = args.id;
|
|
46
|
+
// If no ID provided, prompt for selection
|
|
47
|
+
if (!epicId) {
|
|
48
|
+
const epics = await this.storage.listEpics(projectId);
|
|
49
|
+
if (epics.length === 0) {
|
|
50
|
+
if (jsonMode) {
|
|
51
|
+
outputErrorAsJson('NO_EPICS', 'No epics found.', createMetadata('epic delete', flags));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.log(styles.muted('\nNo epics found.'));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
// Build choices with ticket counts
|
|
58
|
+
const choices = await Promise.all(epics.map(async (e) => {
|
|
59
|
+
const tickets = await this.storage.getTicketsForEpic(projectId, e.id);
|
|
60
|
+
return {
|
|
61
|
+
name: `${e.id} ${e.title} (${e.status}) [${tickets.length} tickets]`,
|
|
62
|
+
value: e.id,
|
|
63
|
+
};
|
|
64
|
+
}));
|
|
65
|
+
// In JSON mode, output epic selection prompt
|
|
66
|
+
if (jsonMode) {
|
|
67
|
+
outputPromptAsJson(buildPromptConfig('list', 'id', 'Select epic to delete:', choices), createMetadata('epic delete', flags));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const { selected } = await inquirer.prompt([{
|
|
71
|
+
type: 'list',
|
|
72
|
+
name: 'selected',
|
|
73
|
+
message: 'Select epic to delete:',
|
|
74
|
+
choices,
|
|
75
|
+
}]);
|
|
76
|
+
epicId = selected;
|
|
77
|
+
}
|
|
78
|
+
// Get the epic to show details
|
|
79
|
+
const epic = await this.storage.getEpic(epicId);
|
|
80
|
+
if (!epic) {
|
|
81
|
+
return handleError('EPIC_NOT_FOUND', `Epic not found: ${epicId}`);
|
|
82
|
+
}
|
|
83
|
+
// Get associated tickets count
|
|
84
|
+
const tickets = await this.storage.getTicketsForEpic(projectId, epicId);
|
|
85
|
+
// Confirmation prompt (unless --force)
|
|
86
|
+
if (!flags.force) {
|
|
87
|
+
// In JSON mode, output confirmation prompt
|
|
88
|
+
if (jsonMode) {
|
|
89
|
+
const confirmChoices = [
|
|
90
|
+
{ name: 'No, cancel', value: 'false' },
|
|
91
|
+
{ name: 'Yes, delete permanently', value: 'true' },
|
|
92
|
+
];
|
|
93
|
+
outputPromptAsJson(buildPromptConfig('list', 'confirm', `Delete epic '${epic.title}'?`, confirmChoices), createMetadata('epic delete', flags));
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.log(`\nDelete epic ${styles.emphasis(epicId)}?`);
|
|
97
|
+
this.log(` Title: ${epic.title}`);
|
|
98
|
+
this.log(` Status: ${epic.status}`);
|
|
99
|
+
this.log(` Tickets: ${tickets.length} (will be unlinked, not deleted)`);
|
|
100
|
+
const { confirmed } = await inquirer.prompt([{
|
|
101
|
+
type: 'list',
|
|
102
|
+
name: 'confirmed',
|
|
103
|
+
message: `Delete epic '${epic.title}'?`,
|
|
104
|
+
choices: [
|
|
105
|
+
{ name: 'No, cancel', value: false },
|
|
106
|
+
{ name: 'Yes, delete permanently', value: true },
|
|
107
|
+
],
|
|
108
|
+
default: 0,
|
|
109
|
+
}]);
|
|
110
|
+
if (!confirmed) {
|
|
111
|
+
this.log(styles.muted('Deletion cancelled.'));
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Delete the epic file first
|
|
116
|
+
const fileDeleted = deleteEpicFile(this.pmoPath, epicId, epic.status, projectId);
|
|
117
|
+
// Delete from database (this also unlinks tickets)
|
|
118
|
+
await this.storage.deleteEpic(epicId);
|
|
119
|
+
// Auto-export to board.md after deletion
|
|
120
|
+
await autoExportToBoard(this.pmoPath, this.storage, (msg) => this.log(styles.muted(msg)));
|
|
121
|
+
this.log(styles.success(`\n✅ Deleted epic ${styles.emphasis(epicId)} "${epic.title}"`));
|
|
122
|
+
if (tickets.length > 0) {
|
|
123
|
+
this.log(styles.muted(` ${tickets.length} ticket(s) unlinked from epic`));
|
|
124
|
+
}
|
|
125
|
+
if (fileDeleted) {
|
|
126
|
+
this.log(styles.muted(' Epic file removed'));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -4,7 +4,6 @@ export default class Epic extends PMOCommand {
|
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
7
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
8
|
};
|
|
10
9
|
protected getPMOOptions(): {
|
|
@@ -9,6 +9,8 @@ export default class Epic extends PMOCommand {
|
|
|
9
9
|
static flags = {
|
|
10
10
|
...pmoBaseFlags,
|
|
11
11
|
json: Flags.boolean({
|
|
12
|
+
char: 'm',
|
|
13
|
+
aliases: ['machine'],
|
|
12
14
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
13
15
|
default: false,
|
|
14
16
|
}),
|
|
@@ -34,6 +36,7 @@ export default class Epic extends PMOCommand {
|
|
|
34
36
|
{ id: 'activate', name: 'Activate epic', command: 'prlt epic activate --json' },
|
|
35
37
|
{ id: 'move', name: 'Reorder epic', command: 'prlt epic move --json' },
|
|
36
38
|
{ id: 'project', name: 'Move to different project', command: 'prlt epic project --json' },
|
|
39
|
+
{ id: 'delete', name: 'Delete epic', command: 'prlt epic delete --json' },
|
|
37
40
|
{ id: 'cancel', name: 'Cancel', command: '' },
|
|
38
41
|
];
|
|
39
42
|
const message = 'Epic Operations - What would you like to do?';
|
|
@@ -83,6 +86,9 @@ export default class Epic extends PMOCommand {
|
|
|
83
86
|
case 'project':
|
|
84
87
|
await this.config.runCommand('epic:project', []);
|
|
85
88
|
break;
|
|
89
|
+
case 'delete':
|
|
90
|
+
await this.config.runCommand('epic:delete', []);
|
|
91
|
+
break;
|
|
86
92
|
}
|
|
87
93
|
}
|
|
88
94
|
}
|
|
@@ -9,7 +9,6 @@ export default class EpicLinkBlock extends PMOCommand {
|
|
|
9
9
|
static flags: {
|
|
10
10
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
12
|
};
|
|
14
13
|
execute(): Promise<void>;
|
|
15
14
|
}
|
|
@@ -16,6 +16,8 @@ export default class EpicLinkBlock extends PMOCommand {
|
|
|
16
16
|
...pmoBaseFlags,
|
|
17
17
|
project: Flags.string({ char: 'P', description: 'Project ID' }),
|
|
18
18
|
json: Flags.boolean({
|
|
19
|
+
char: 'm',
|
|
20
|
+
aliases: ['machine'],
|
|
19
21
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
20
22
|
default: false,
|
|
21
23
|
}),
|
|
@@ -9,7 +9,6 @@ export default class EpicLinkDuplicates extends PMOCommand {
|
|
|
9
9
|
static flags: {
|
|
10
10
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
12
|
};
|
|
14
13
|
execute(): Promise<void>;
|
|
15
14
|
}
|
|
@@ -14,6 +14,8 @@ export default class EpicLinkDuplicates extends PMOCommand {
|
|
|
14
14
|
...pmoBaseFlags,
|
|
15
15
|
project: Flags.string({ char: 'P', description: 'Project ID' }),
|
|
16
16
|
json: Flags.boolean({
|
|
17
|
+
char: 'm',
|
|
18
|
+
aliases: ['machine'],
|
|
17
19
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
18
20
|
default: false,
|
|
19
21
|
}),
|
|
@@ -12,7 +12,6 @@ export default class EpicLink extends PMOCommand {
|
|
|
12
12
|
duplicates: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
14
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
15
|
};
|
|
17
16
|
execute(): Promise<void>;
|
|
18
17
|
private addDependency;
|
|
@@ -42,6 +42,8 @@ export default class EpicLink extends PMOCommand {
|
|
|
42
42
|
default: false,
|
|
43
43
|
}),
|
|
44
44
|
json: Flags.boolean({
|
|
45
|
+
char: 'm',
|
|
46
|
+
aliases: ['machine'],
|
|
45
47
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
46
48
|
default: false,
|
|
47
49
|
}),
|
|
@@ -97,6 +99,23 @@ export default class EpicLink extends PMOCommand {
|
|
|
97
99
|
return;
|
|
98
100
|
}
|
|
99
101
|
// Interactive mode: show menu in a loop
|
|
102
|
+
// In JSON mode, output the interactive menu config instead of prompting
|
|
103
|
+
if (jsonMode) {
|
|
104
|
+
const menuChoices = [
|
|
105
|
+
{ name: 'View dependencies', value: 'view' },
|
|
106
|
+
{ name: 'Add blocking dependency (blocked by...)', value: 'blocks' },
|
|
107
|
+
{ name: 'Add relates_to dependency', value: 'relates_to' },
|
|
108
|
+
{ name: 'Add duplicates dependency', value: 'duplicates' },
|
|
109
|
+
{ name: 'Remove dependency', value: 'remove' },
|
|
110
|
+
{ name: 'Done', value: 'done' },
|
|
111
|
+
];
|
|
112
|
+
outputPromptAsJson(buildPromptConfig('list', 'action', `Dependencies for ${epicId}:`, menuChoices), createMetadata('epic link', flags));
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
// Check for TTY before showing interactive menu
|
|
116
|
+
if (!process.stdin.isTTY) {
|
|
117
|
+
this.error('Interactive mode requires a TTY. Use --json for scripted usage or provide flags like --blocks, --relates, or --duplicates.');
|
|
118
|
+
}
|
|
100
119
|
let continueLoop = true;
|
|
101
120
|
while (continueLoop) {
|
|
102
121
|
// eslint-disable-next-line no-await-in-loop -- Interactive user loop
|
|
@@ -9,7 +9,6 @@ export default class EpicLinkRelates extends PMOCommand {
|
|
|
9
9
|
static flags: {
|
|
10
10
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
12
|
};
|
|
14
13
|
execute(): Promise<void>;
|
|
15
14
|
}
|
|
@@ -14,6 +14,8 @@ export default class EpicLinkRelates extends PMOCommand {
|
|
|
14
14
|
...pmoBaseFlags,
|
|
15
15
|
project: Flags.string({ char: 'P', description: 'Project ID' }),
|
|
16
16
|
json: Flags.boolean({
|
|
17
|
+
char: 'm',
|
|
18
|
+
aliases: ['machine'],
|
|
17
19
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
18
20
|
default: false,
|
|
19
21
|
}),
|
|
@@ -11,7 +11,6 @@ export default class EpicLinkRemove extends PMOCommand {
|
|
|
11
11
|
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
14
|
};
|
|
16
15
|
execute(): Promise<void>;
|
|
17
16
|
}
|
|
@@ -19,6 +19,8 @@ export default class EpicLinkRemove extends PMOCommand {
|
|
|
19
19
|
type: Flags.string({ char: 't', description: 'Dependency type', options: ['blocks', 'relates_to', 'duplicates'] }),
|
|
20
20
|
all: Flags.boolean({ char: 'a', description: 'Remove all dependencies', default: false }),
|
|
21
21
|
json: Flags.boolean({
|
|
22
|
+
char: 'm',
|
|
23
|
+
aliases: ['machine'],
|
|
22
24
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
23
25
|
default: false,
|
|
24
26
|
}),
|
|
@@ -4,7 +4,6 @@ export default class EpicList extends PMOCommand {
|
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
6
|
status: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
7
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
8
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
9
|
};
|
|
@@ -9,7 +9,6 @@ export default class EpicMove extends PMOCommand {
|
|
|
9
9
|
static flags: {
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
12
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
13
|
};
|
|
15
14
|
execute(): Promise<void>;
|
|
@@ -8,7 +8,6 @@ export default class EpicProgress extends PMOCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
11
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
12
|
};
|
|
14
13
|
execute(): Promise<void>;
|
|
@@ -25,6 +25,8 @@ export default class EpicProgress extends PMOCommand {
|
|
|
25
25
|
static flags = {
|
|
26
26
|
...pmoBaseFlags,
|
|
27
27
|
json: Flags.boolean({
|
|
28
|
+
char: 'm',
|
|
29
|
+
aliases: ['machine'],
|
|
28
30
|
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
29
31
|
default: false,
|
|
30
32
|
}),
|