@proletariat/cli 0.3.33 → 0.3.35
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 +1 -0
- package/dist/commands/action/delete.d.ts +1 -0
- package/dist/commands/action/index.d.ts +1 -0
- package/dist/commands/action/list.d.ts +1 -0
- package/dist/commands/action/list.js +0 -6
- package/dist/commands/action/run.d.ts +1 -0
- package/dist/commands/action/show.d.ts +1 -0
- package/dist/commands/action/update.d.ts +1 -0
- package/dist/commands/agent/auth.d.ts +5 -2
- package/dist/commands/agent/auth.js +10 -17
- package/dist/commands/agent/cleanup.d.ts +2 -1
- package/dist/commands/agent/cleanup.js +0 -6
- package/dist/commands/agent/discover.d.ts +2 -1
- package/dist/commands/agent/discover.js +2 -6
- package/dist/commands/agent/index.d.ts +1 -0
- package/dist/commands/agent/index.js +11 -9
- package/dist/commands/agent/list.d.ts +1 -0
- package/dist/commands/agent/login.d.ts +1 -0
- package/dist/commands/agent/login.js +1 -7
- package/dist/commands/agent/rebuild.d.ts +2 -1
- package/dist/commands/agent/rebuild.js +0 -6
- package/dist/commands/agent/remove.d.ts +2 -1
- package/dist/commands/agent/remove.js +0 -6
- package/dist/commands/agent/restart.d.ts +1 -0
- package/dist/commands/agent/restart.js +1 -7
- package/dist/commands/agent/shell.d.ts +1 -0
- package/dist/commands/agent/shell.js +1 -7
- package/dist/commands/agent/staff/add.d.ts +1 -0
- package/dist/commands/agent/staff/add.js +1 -0
- package/dist/commands/agent/staff/index.d.ts +15 -0
- package/dist/commands/agent/staff/index.js +83 -0
- package/dist/commands/agent/staff/list.d.ts +1 -0
- package/dist/commands/agent/staff/list.js +1 -0
- package/dist/commands/agent/staff/remove.d.ts +1 -0
- package/dist/commands/agent/staff/remove.js +1 -0
- package/dist/commands/agent/status.d.ts +1 -0
- package/dist/commands/agent/status.js +1 -7
- package/dist/commands/agent/themes/add-names.d.ts +1 -0
- package/dist/commands/agent/themes/add-names.js +1 -0
- package/dist/commands/agent/themes/create.d.ts +1 -0
- package/dist/commands/agent/themes/create.js +1 -0
- package/dist/commands/agent/themes/index.d.ts +10 -0
- package/dist/commands/agent/themes/index.js +144 -0
- package/dist/commands/agent/themes/list.d.ts +1 -0
- package/dist/commands/agent/themes/list.js +1 -0
- package/dist/commands/agent/themes/set.d.ts +1 -0
- package/dist/commands/agent/themes/set.js +1 -0
- package/dist/commands/agent/visit.d.ts +1 -0
- package/dist/commands/agent/visit.js +1 -7
- package/dist/commands/agents/themes/add-names.d.ts +1 -0
- package/dist/commands/agents/themes/add-names.js +1 -0
- package/dist/commands/agents/themes/create.d.ts +1 -0
- package/dist/commands/agents/themes/create.js +1 -0
- package/dist/commands/agents/themes/list.d.ts +1 -0
- package/dist/commands/agents/themes/list.js +1 -0
- package/dist/commands/autocomplete/setup.d.ts +1 -0
- package/dist/commands/board/index.d.ts +1 -0
- package/dist/commands/board/view.d.ts +1 -0
- package/dist/commands/board/watch.d.ts +1 -0
- package/dist/commands/branch/create.d.ts +1 -0
- package/dist/commands/branch/create.js +0 -6
- package/dist/commands/branch/index.d.ts +1 -0
- package/dist/commands/branch/index.js +0 -7
- package/dist/commands/branch/list.d.ts +1 -0
- package/dist/commands/branch/validate.d.ts +1 -0
- package/dist/commands/branch/where.d.ts +1 -0
- package/dist/commands/branch/where.js +3 -9
- package/dist/commands/category/create.d.ts +1 -0
- package/dist/commands/category/delete.d.ts +1 -0
- package/dist/commands/category/index.d.ts +1 -0
- package/dist/commands/category/list.d.ts +1 -0
- package/dist/commands/category/list.js +2 -2
- package/dist/commands/category/rename.d.ts +1 -0
- package/dist/commands/claude.d.ts +2 -1
- package/dist/commands/claude.js +2 -6
- package/dist/commands/commit.d.ts +2 -1
- package/dist/commands/commit.js +2 -6
- package/dist/commands/config/index.d.ts +2 -1
- package/dist/commands/config/index.js +3 -7
- package/dist/commands/diet.d.ts +1 -0
- package/dist/commands/docker/clean.d.ts +1 -0
- package/dist/commands/docker/index.d.ts +1 -0
- package/dist/commands/docker/list.d.ts +1 -0
- package/dist/commands/docker/logs.d.ts +2 -0
- package/dist/commands/docker/logs.js +2 -0
- package/dist/commands/docker/prune.d.ts +1 -0
- package/dist/commands/docker/restart.d.ts +1 -0
- package/dist/commands/docker/shell.d.ts +2 -0
- package/dist/commands/docker/shell.js +2 -0
- package/dist/commands/docker/start.d.ts +2 -0
- package/dist/commands/docker/start.js +2 -0
- package/dist/commands/docker/status.d.ts +1 -0
- package/dist/commands/docker/stop.d.ts +1 -0
- package/dist/commands/epic/activate.d.ts +1 -0
- package/dist/commands/epic/activate.js +1 -7
- package/dist/commands/epic/archive.d.ts +2 -1
- package/dist/commands/epic/archive.js +0 -6
- package/dist/commands/epic/create.d.ts +2 -1
- package/dist/commands/epic/create.js +0 -6
- package/dist/commands/epic/delete.d.ts +1 -0
- package/dist/commands/epic/index.d.ts +1 -0
- package/dist/commands/epic/index.js +0 -7
- package/dist/commands/epic/list.d.ts +1 -0
- package/dist/commands/epic/move.d.ts +2 -1
- package/dist/commands/epic/move.js +0 -6
- package/dist/commands/epic/progress.d.ts +2 -1
- package/dist/commands/epic/progress.js +0 -6
- package/dist/commands/epic/project.d.ts +2 -1
- package/dist/commands/epic/project.js +0 -6
- package/dist/commands/epic/reorder.d.ts +1 -0
- package/dist/commands/epic/reorder.js +0 -6
- package/dist/commands/epic/spec.d.ts +2 -1
- package/dist/commands/epic/spec.js +0 -6
- package/dist/commands/epic/ticket.d.ts +2 -1
- package/dist/commands/epic/ticket.js +0 -6
- package/dist/commands/epic/view.d.ts +1 -0
- package/dist/commands/epic/view.js +1 -7
- package/dist/commands/execution/config.d.ts +2 -1
- package/dist/commands/execution/config.js +1 -7
- package/dist/commands/execution/index.d.ts +1 -0
- package/dist/commands/execution/index.js +1 -8
- package/dist/commands/execution/list.d.ts +1 -0
- package/dist/commands/execution/logs.d.ts +1 -0
- package/dist/commands/execution/logs.js +1 -7
- package/dist/commands/execution/stop.d.ts +1 -0
- package/dist/commands/execution/stop.js +1 -7
- package/dist/commands/execution/view.d.ts +1 -0
- package/dist/commands/execution/view.js +2 -8
- package/dist/commands/feedback/index.d.ts +1 -0
- package/dist/commands/feedback/list.d.ts +1 -0
- package/dist/commands/feedback/submit.d.ts +1 -0
- package/dist/commands/feedback/view.d.ts +1 -0
- package/dist/commands/gh/index.d.ts +1 -0
- package/dist/commands/gh/login.d.ts +1 -0
- package/dist/commands/gh/status.d.ts +1 -0
- package/dist/commands/gh/token.d.ts +1 -0
- package/dist/commands/init.d.ts +2 -1
- package/dist/commands/init.js +3 -8
- package/dist/commands/label/create.d.ts +20 -0
- package/dist/commands/label/create.js +56 -0
- package/dist/commands/label/delete.d.ts +17 -0
- package/dist/commands/label/delete.js +31 -0
- package/dist/commands/label/group/create.d.ts +20 -0
- package/dist/commands/label/group/create.js +54 -0
- package/dist/commands/label/group/list.d.ts +14 -0
- package/dist/commands/label/group/list.js +51 -0
- package/dist/commands/label/index.d.ts +15 -0
- package/dist/commands/label/index.js +58 -0
- package/dist/commands/label/list.d.ts +16 -0
- package/dist/commands/label/list.js +82 -0
- package/dist/commands/link/create.d.ts +1 -0
- package/dist/commands/link/create.js +0 -6
- package/dist/commands/link/index.d.ts +1 -0
- package/dist/commands/link/index.js +1 -7
- package/dist/commands/link/list.d.ts +1 -0
- package/dist/commands/link/list.js +3 -8
- package/dist/commands/link/remove.d.ts +1 -0
- package/dist/commands/link/remove.js +0 -6
- package/dist/commands/mcp-server.js +2 -1
- package/dist/commands/phase/create.d.ts +1 -0
- package/dist/commands/phase/create.js +1 -1
- package/dist/commands/phase/delete.d.ts +1 -0
- package/dist/commands/phase/delete.js +1 -1
- package/dist/commands/phase/list.d.ts +1 -0
- package/dist/commands/phase/move.d.ts +1 -0
- package/dist/commands/phase/move.js +2 -2
- package/dist/commands/phase/template/apply.d.ts +26 -0
- package/dist/commands/phase/template/apply.js +14 -0
- package/dist/commands/phase/template/create.d.ts +23 -0
- package/dist/commands/phase/template/create.js +14 -0
- package/dist/commands/phase/template/delete.d.ts +18 -0
- package/dist/commands/phase/template/delete.js +61 -0
- package/dist/commands/phase/template/list.d.ts +17 -0
- package/dist/commands/phase/template/list.js +88 -0
- package/dist/commands/phase/template/update.d.ts +1 -0
- package/dist/commands/phase/template/update.js +1 -0
- package/dist/commands/phase/update.d.ts +1 -0
- package/dist/commands/phase/update.js +2 -2
- package/dist/commands/pmo/init.d.ts +4 -3
- package/dist/commands/pmo/init.js +2 -7
- package/dist/commands/pr/create.d.ts +1 -0
- package/dist/commands/pr/index.d.ts +1 -0
- package/dist/commands/pr/link.d.ts +1 -0
- package/dist/commands/pr/list.d.ts +1 -0
- package/dist/commands/pr/status.d.ts +1 -0
- package/dist/commands/priority/add.d.ts +1 -0
- package/dist/commands/priority/add.js +1 -1
- package/dist/commands/priority/list.d.ts +1 -0
- package/dist/commands/priority/remove.d.ts +1 -0
- package/dist/commands/priority/set.d.ts +1 -0
- package/dist/commands/project/archive.d.ts +1 -0
- package/dist/commands/project/create.d.ts +1 -0
- package/dist/commands/project/delete.d.ts +1 -0
- package/dist/commands/project/index.d.ts +1 -0
- package/dist/commands/project/list.d.ts +1 -0
- package/dist/commands/project/spec.d.ts +1 -0
- package/dist/commands/project/unarchive.d.ts +1 -0
- package/dist/commands/project/update.d.ts +1 -0
- package/dist/commands/project/update.js +0 -2
- package/dist/commands/project/view.d.ts +1 -0
- package/dist/commands/pull.d.ts +1 -0
- package/dist/commands/repo/add.d.ts +1 -0
- package/dist/commands/repo/add.js +0 -6
- package/dist/commands/repo/create.d.ts +1 -0
- package/dist/commands/repo/index.d.ts +1 -0
- package/dist/commands/repo/list.d.ts +1 -0
- package/dist/commands/repo/remove.d.ts +1 -0
- package/dist/commands/repo/view.d.ts +1 -0
- package/dist/commands/roadmap/add-project.d.ts +1 -0
- package/dist/commands/roadmap/add-project.js +0 -6
- package/dist/commands/roadmap/create.d.ts +1 -0
- package/dist/commands/roadmap/create.js +0 -6
- package/dist/commands/roadmap/delete.d.ts +1 -0
- package/dist/commands/roadmap/delete.js +0 -6
- package/dist/commands/roadmap/generate.d.ts +1 -0
- package/dist/commands/roadmap/generate.js +1 -8
- package/dist/commands/roadmap/index.d.ts +1 -0
- package/dist/commands/roadmap/index.js +0 -7
- package/dist/commands/roadmap/list.d.ts +1 -0
- package/dist/commands/roadmap/remove-project.d.ts +1 -0
- package/dist/commands/roadmap/remove-project.js +0 -6
- package/dist/commands/roadmap/reorder.d.ts +1 -0
- package/dist/commands/roadmap/reorder.js +0 -6
- package/dist/commands/roadmap/update.d.ts +1 -0
- package/dist/commands/roadmap/update.js +0 -6
- package/dist/commands/roadmap/view.d.ts +1 -0
- package/dist/commands/roadmap/view.js +1 -7
- package/dist/commands/session/attach.d.ts +2 -1
- package/dist/commands/session/attach.js +0 -6
- package/dist/commands/session/health.d.ts +1 -0
- package/dist/commands/session/health.js +1 -1
- package/dist/commands/session/index.d.ts +1 -0
- package/dist/commands/session/index.js +0 -7
- package/dist/commands/session/list.d.ts +1 -0
- package/dist/commands/spec/create.d.ts +1 -0
- package/dist/commands/spec/delete.d.ts +1 -0
- package/dist/commands/spec/edit.d.ts +1 -0
- package/dist/commands/spec/index.d.ts +1 -0
- package/dist/commands/spec/link/depends.d.ts +18 -0
- package/dist/commands/spec/link/depends.js +86 -0
- package/dist/commands/spec/link/index.d.ts +17 -0
- package/dist/commands/spec/link/index.js +92 -0
- package/dist/commands/spec/link/remove.d.ts +18 -0
- package/dist/commands/spec/link/remove.js +90 -0
- package/dist/commands/spec/list.d.ts +1 -0
- package/dist/commands/spec/plan.d.ts +1 -0
- package/dist/commands/spec/ticket.d.ts +1 -0
- package/dist/commands/spec/view.d.ts +1 -0
- package/dist/commands/staff/add.d.ts +3 -2
- package/dist/commands/staff/add.js +2 -6
- package/dist/commands/staff/index.d.ts +2 -1
- package/dist/commands/staff/index.js +0 -6
- package/dist/commands/staff/list.d.ts +1 -0
- package/dist/commands/staff/remove.d.ts +2 -1
- package/dist/commands/staff/remove.js +0 -6
- package/dist/commands/status/category.d.ts +1 -0
- package/dist/commands/status/create.d.ts +1 -0
- package/dist/commands/status/delete.d.ts +1 -0
- package/dist/commands/status/index.d.ts +1 -0
- package/dist/commands/status/list.d.ts +1 -0
- package/dist/commands/status/move.d.ts +1 -0
- package/dist/commands/status/update.d.ts +1 -0
- package/dist/commands/support/book.d.ts +1 -0
- package/dist/commands/support/discord.d.ts +1 -0
- package/dist/commands/support/docs.d.ts +1 -0
- package/dist/commands/support/index.d.ts +1 -0
- package/dist/commands/support/issues.d.ts +1 -0
- package/dist/commands/support/logs.d.ts +1 -0
- package/dist/commands/support/logs.js +2 -2
- package/dist/commands/template/apply.d.ts +1 -0
- package/dist/commands/template/apply.js +5 -10
- package/dist/commands/template/create.d.ts +1 -0
- package/dist/commands/template/create.js +1 -7
- package/dist/commands/template/delete.d.ts +1 -0
- package/dist/commands/template/delete.js +0 -6
- package/dist/commands/template/index.d.ts +1 -0
- package/dist/commands/template/index.js +2 -7
- package/dist/commands/template/list.d.ts +1 -0
- package/dist/commands/template/list.js +1 -7
- package/dist/commands/template/save.d.ts +1 -0
- package/dist/commands/template/save.js +0 -6
- package/dist/commands/template/update.d.ts +1 -0
- package/dist/commands/template/update.js +0 -6
- package/dist/commands/terminal/title.d.ts +1 -0
- package/dist/commands/theme/index.d.ts +1 -0
- package/dist/commands/theme/index.js +2 -7
- package/dist/commands/theme/list.d.ts +1 -0
- package/dist/commands/theme/set.d.ts +1 -0
- package/dist/commands/theme/set.js +3 -7
- package/dist/commands/ticket/bulk.d.ts +1 -0
- package/dist/commands/ticket/bulk.js +0 -7
- package/dist/commands/ticket/category.d.ts +1 -0
- package/dist/commands/ticket/complete.d.ts +2 -1
- package/dist/commands/ticket/complete.js +2 -8
- package/dist/commands/ticket/create.d.ts +2 -1
- package/dist/commands/ticket/create.js +0 -6
- package/dist/commands/ticket/delete.d.ts +2 -1
- package/dist/commands/ticket/delete.js +0 -6
- package/dist/commands/ticket/edit.d.ts +1 -0
- package/dist/commands/ticket/edit.js +0 -6
- package/dist/commands/ticket/epic.d.ts +2 -1
- package/dist/commands/ticket/epic.js +0 -6
- package/dist/commands/ticket/index.d.ts +1 -0
- package/dist/commands/ticket/index.js +6 -9
- package/dist/commands/ticket/link/block.d.ts +15 -0
- package/dist/commands/ticket/link/block.js +95 -0
- package/dist/commands/ticket/link/index.d.ts +14 -0
- package/dist/commands/ticket/link/index.js +96 -0
- package/dist/commands/ticket/list.d.ts +2 -0
- package/dist/commands/ticket/list.js +6 -0
- package/dist/commands/ticket/move.d.ts +2 -1
- package/dist/commands/ticket/move.js +2 -8
- package/dist/commands/ticket/project.d.ts +2 -1
- package/dist/commands/ticket/project.js +0 -6
- package/dist/commands/ticket/reassign.d.ts +2 -1
- package/dist/commands/ticket/reassign.js +0 -6
- package/dist/commands/ticket/resolve.d.ts +68 -0
- package/dist/commands/ticket/resolve.js +294 -0
- package/dist/commands/ticket/spec.d.ts +2 -1
- package/dist/commands/ticket/spec.js +0 -6
- package/dist/commands/ticket/status.d.ts +1 -0
- package/dist/commands/ticket/status.js +1 -7
- package/dist/commands/ticket/template/apply.d.ts +26 -0
- package/dist/commands/ticket/template/apply.js +14 -0
- package/dist/commands/ticket/template/delete.d.ts +18 -0
- package/dist/commands/ticket/template/delete.js +61 -0
- package/dist/commands/ticket/template/list.d.ts +17 -0
- package/dist/commands/ticket/template/list.js +77 -0
- package/dist/commands/ticket/template/save.d.ts +17 -0
- package/dist/commands/ticket/template/save.js +97 -0
- package/dist/commands/ticket/update.d.ts +2 -1
- package/dist/commands/ticket/update.js +0 -6
- package/dist/commands/ticket/view.d.ts +2 -0
- package/dist/commands/ticket/view.js +2 -7
- package/dist/commands/whoami.d.ts +1 -0
- package/dist/commands/work/complete.d.ts +1 -0
- package/dist/commands/work/complete.js +1 -7
- package/dist/commands/work/index.d.ts +1 -0
- package/dist/commands/work/index.js +4 -7
- package/dist/commands/work/ready.d.ts +2 -1
- package/dist/commands/work/ready.js +38 -14
- package/dist/commands/work/resolve.d.ts +15 -0
- package/dist/commands/work/resolve.js +76 -0
- package/dist/commands/work/revise.d.ts +2 -1
- package/dist/commands/work/revise.js +0 -6
- package/dist/commands/work/spawn-all.d.ts +2 -1
- package/dist/commands/work/spawn-all.js +2 -6
- package/dist/commands/work/spawn.d.ts +2 -1
- package/dist/commands/work/spawn.js +4 -10
- package/dist/commands/work/start.d.ts +3 -1
- package/dist/commands/work/start.js +52 -23
- package/dist/commands/work/watch.d.ts +2 -1
- package/dist/commands/work/watch.js +0 -6
- package/dist/commands/workflow/create.d.ts +1 -0
- package/dist/commands/workflow/delete.d.ts +1 -0
- package/dist/commands/workflow/index.d.ts +1 -0
- package/dist/commands/workflow/index.js +1 -7
- package/dist/commands/workflow/list.d.ts +1 -0
- package/dist/commands/workflow/switch.d.ts +1 -0
- package/dist/commands/workflow/view.d.ts +1 -0
- package/dist/commands/workspace/add.d.ts +2 -0
- package/dist/commands/workspace/add.js +2 -0
- package/dist/commands/workspace/list.d.ts +1 -0
- package/dist/commands/workspace/list.js +4 -8
- package/dist/commands/workspace/prune.d.ts +1 -0
- package/dist/commands/workspace/prune.js +4 -6
- package/dist/commands/workspace/remove.d.ts +1 -0
- package/dist/commands/workspace/remove.js +3 -7
- package/dist/commands/workspace/use.d.ts +1 -0
- package/dist/commands/workspace/use.js +3 -7
- package/dist/lib/database/drizzle-schema.d.ts +1 -1
- package/dist/lib/database/index.d.ts +1 -1
- package/dist/lib/database/index.js +20 -0
- package/dist/lib/execution/devcontainer.js +3 -1
- package/dist/lib/execution/runners.d.ts +7 -2
- package/dist/lib/execution/runners.js +18 -10
- package/dist/lib/execution/types.d.ts +1 -0
- package/dist/lib/flags/resolver.js +1 -0
- package/dist/lib/mcp/helpers.d.ts +1 -2
- package/dist/lib/mcp/tools/diet.js +1 -0
- package/dist/lib/mcp/tools/index.d.ts +1 -0
- package/dist/lib/mcp/tools/index.js +1 -0
- package/dist/lib/mcp/tools/label.d.ts +6 -0
- package/dist/lib/mcp/tools/label.js +338 -0
- package/dist/lib/mcp/tools/ticket.js +53 -17
- package/dist/lib/multiline-input.js +6 -18
- package/dist/lib/pmo/base-command.d.ts +4 -2
- package/dist/lib/pmo/base-command.js +9 -4
- package/dist/lib/pmo/schema.d.ts +6 -0
- package/dist/lib/pmo/schema.js +44 -0
- package/dist/lib/pmo/storage/base.d.ts +6 -0
- package/dist/lib/pmo/storage/base.js +185 -7
- package/dist/lib/pmo/storage/index.d.ts +23 -1
- package/dist/lib/pmo/storage/index.js +59 -1
- package/dist/lib/pmo/storage/labels.d.ts +55 -0
- package/dist/lib/pmo/storage/labels.js +346 -0
- package/dist/lib/pmo/storage/tickets.js +17 -0
- package/dist/lib/pmo/storage/types.d.ts +24 -0
- package/dist/lib/pmo/types.d.ts +44 -0
- package/dist/lib/pmo/utils.js +1 -1
- package/dist/lib/prompt-json.d.ts +5 -2
- package/dist/lib/prompt-json.js +4 -4
- package/oclif.manifest.json +6571 -3748
- package/package.json +1 -1
|
@@ -7,11 +7,12 @@ export default class TicketMove extends PMOCommand {
|
|
|
7
7
|
column: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
8
|
};
|
|
9
9
|
static flags: {
|
|
10
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
10
|
position: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
11
|
'to-project': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
12
|
bulk: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
13
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
17
|
};
|
|
17
18
|
execute(): Promise<void>;
|
|
@@ -24,12 +24,6 @@ export default class TicketMove extends PMOCommand {
|
|
|
24
24
|
};
|
|
25
25
|
static flags = {
|
|
26
26
|
...pmoBaseFlags,
|
|
27
|
-
json: Flags.boolean({
|
|
28
|
-
char: 'm',
|
|
29
|
-
aliases: ['machine'],
|
|
30
|
-
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
31
|
-
default: false,
|
|
32
|
-
}),
|
|
33
27
|
position: Flags.integer({
|
|
34
28
|
description: 'Position within the column (0 = top)',
|
|
35
29
|
}),
|
|
@@ -212,7 +206,7 @@ export default class TicketMove extends PMOCommand {
|
|
|
212
206
|
}
|
|
213
207
|
async executeBulk(allTickets, flags, projectId) {
|
|
214
208
|
// Only show header in interactive mode
|
|
215
|
-
if (!flags.json) {
|
|
209
|
+
if (!(flags.json || flags.machine)) {
|
|
216
210
|
this.log(styles.emphasis('📦 Move Multiple Tickets\n'));
|
|
217
211
|
}
|
|
218
212
|
// Get columns
|
|
@@ -222,7 +216,7 @@ export default class TicketMove extends PMOCommand {
|
|
|
222
216
|
}
|
|
223
217
|
const columns = board.columns.map(col => col.name);
|
|
224
218
|
// Agent mode config for prompts
|
|
225
|
-
const jsonModeConfig = flags.json ? { flags, commandName: 'ticket move --bulk' } : null;
|
|
219
|
+
const jsonModeConfig = (flags.json || flags.machine) ? { flags, commandName: 'ticket move --bulk' } : null;
|
|
226
220
|
// Select tickets to move (now agent-compatible!)
|
|
227
221
|
const { selectedTickets } = await this.prompt([{
|
|
228
222
|
type: 'checkbox',
|
|
@@ -7,10 +7,11 @@ export default class TicketProject extends PMOCommand {
|
|
|
7
7
|
targetProject: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
8
|
};
|
|
9
9
|
static flags: {
|
|
10
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
10
|
'keep-epic': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
11
|
bulk: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
12
|
target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
15
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
};
|
|
16
17
|
execute(): Promise<void>;
|
|
@@ -22,12 +22,6 @@ export default class TicketProject extends PMOCommand {
|
|
|
22
22
|
};
|
|
23
23
|
static flags = {
|
|
24
24
|
...pmoBaseFlags,
|
|
25
|
-
json: Flags.boolean({
|
|
26
|
-
char: 'm',
|
|
27
|
-
aliases: ['machine'],
|
|
28
|
-
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
29
|
-
default: false,
|
|
30
|
-
}),
|
|
31
25
|
'keep-epic': Flags.boolean({
|
|
32
26
|
description: 'Keep ticket assigned to its epic (if epic is in source project, will unlink)',
|
|
33
27
|
default: false,
|
|
@@ -7,11 +7,12 @@ export default class TicketReassign extends PMOCommand {
|
|
|
7
7
|
assignee: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
8
|
};
|
|
9
9
|
static flags: {
|
|
10
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
10
|
to: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
11
|
from: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
12
|
bulk: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
13
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
17
|
};
|
|
17
18
|
execute(): Promise<void>;
|
|
@@ -24,12 +24,6 @@ export default class TicketReassign extends PMOCommand {
|
|
|
24
24
|
};
|
|
25
25
|
static flags = {
|
|
26
26
|
...pmoBaseFlags,
|
|
27
|
-
json: Flags.boolean({
|
|
28
|
-
char: 'm',
|
|
29
|
-
aliases: ['machine'],
|
|
30
|
-
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
31
|
-
default: false,
|
|
32
|
-
}),
|
|
33
27
|
to: Flags.string({
|
|
34
28
|
description: 'Target agent name (for bulk mode)',
|
|
35
29
|
}),
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { PMOCommand } from '../../lib/pmo/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Canonical question format regex for parsing Q1/Q2/etc from descriptions.
|
|
4
|
+
*
|
|
5
|
+
* Matches patterns like:
|
|
6
|
+
* **Q1:** What should the timeout be?
|
|
7
|
+
* **Q2:** Should we use REST or GraphQL?
|
|
8
|
+
* Q1: What should the timeout be?
|
|
9
|
+
* Q3: How should errors be handled?
|
|
10
|
+
*
|
|
11
|
+
* Captures:
|
|
12
|
+
* - Group 1: Question number (e.g., "1", "2")
|
|
13
|
+
* - Group 2: Question text
|
|
14
|
+
*/
|
|
15
|
+
export declare const QUESTION_REGEX: RegExp;
|
|
16
|
+
/**
|
|
17
|
+
* Canonical answer format for resolved questions.
|
|
18
|
+
*
|
|
19
|
+
* Matches patterns like:
|
|
20
|
+
* **A1:** Use 30 minute timeout
|
|
21
|
+
* A1: Use 30 minute timeout
|
|
22
|
+
*/
|
|
23
|
+
export declare const ANSWER_REGEX: RegExp;
|
|
24
|
+
export interface ParsedQuestion {
|
|
25
|
+
/** Question number (e.g., 1, 2, 3) */
|
|
26
|
+
number: number;
|
|
27
|
+
/** The question text */
|
|
28
|
+
text: string;
|
|
29
|
+
/** Line index in the description where the question appears */
|
|
30
|
+
lineIndex: number;
|
|
31
|
+
/** Whether this question already has an answer */
|
|
32
|
+
answered: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Parse questions (Q1/Q2/etc) from a ticket description.
|
|
36
|
+
*
|
|
37
|
+
* @param description - The ticket description markdown
|
|
38
|
+
* @returns Array of parsed questions
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseQuestions(description: string): ParsedQuestion[];
|
|
41
|
+
/**
|
|
42
|
+
* Rewrite a ticket description by injecting answers below each question.
|
|
43
|
+
*
|
|
44
|
+
* For each answered question, inserts a line like:
|
|
45
|
+
* **A1:** The answer text
|
|
46
|
+
*
|
|
47
|
+
* If an answer already exists for that question, it is replaced.
|
|
48
|
+
*
|
|
49
|
+
* @param description - The original ticket description
|
|
50
|
+
* @param answers - Map of question number to answer text
|
|
51
|
+
* @returns The rewritten description
|
|
52
|
+
*/
|
|
53
|
+
export declare function rewriteDescription(description: string, answers: Map<number, string>): string;
|
|
54
|
+
export default class TicketResolve extends PMOCommand {
|
|
55
|
+
static description: string;
|
|
56
|
+
static examples: string[];
|
|
57
|
+
static strict: boolean;
|
|
58
|
+
static args: {
|
|
59
|
+
ticketId: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
60
|
+
};
|
|
61
|
+
static flags: {
|
|
62
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
63
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
64
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
65
|
+
};
|
|
66
|
+
execute(): Promise<void>;
|
|
67
|
+
private resolveTicket;
|
|
68
|
+
}
|
|
@@ -0,0 +1,294 @@
|
|
|
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 { shouldOutputJson, outputErrorAsJson, outputSuccessAsJson, createMetadata, } from '../../lib/prompt-json.js';
|
|
6
|
+
/**
|
|
7
|
+
* Canonical question format regex for parsing Q1/Q2/etc from descriptions.
|
|
8
|
+
*
|
|
9
|
+
* Matches patterns like:
|
|
10
|
+
* **Q1:** What should the timeout be?
|
|
11
|
+
* **Q2:** Should we use REST or GraphQL?
|
|
12
|
+
* Q1: What should the timeout be?
|
|
13
|
+
* Q3: How should errors be handled?
|
|
14
|
+
*
|
|
15
|
+
* Captures:
|
|
16
|
+
* - Group 1: Question number (e.g., "1", "2")
|
|
17
|
+
* - Group 2: Question text
|
|
18
|
+
*/
|
|
19
|
+
export const QUESTION_REGEX = /^\*{0,2}Q(\d+)[.:]\*{0,2}\s*(.+)$/;
|
|
20
|
+
/**
|
|
21
|
+
* Canonical answer format for resolved questions.
|
|
22
|
+
*
|
|
23
|
+
* Matches patterns like:
|
|
24
|
+
* **A1:** Use 30 minute timeout
|
|
25
|
+
* A1: Use 30 minute timeout
|
|
26
|
+
*/
|
|
27
|
+
export const ANSWER_REGEX = /^\*{0,2}A(\d+)[.:]\*{0,2}\s*(.+)$/;
|
|
28
|
+
/**
|
|
29
|
+
* Parse questions (Q1/Q2/etc) from a ticket description.
|
|
30
|
+
*
|
|
31
|
+
* @param description - The ticket description markdown
|
|
32
|
+
* @returns Array of parsed questions
|
|
33
|
+
*/
|
|
34
|
+
export function parseQuestions(description) {
|
|
35
|
+
if (!description)
|
|
36
|
+
return [];
|
|
37
|
+
const lines = description.split('\n');
|
|
38
|
+
const questions = [];
|
|
39
|
+
// First pass: find all questions
|
|
40
|
+
for (let i = 0; i < lines.length; i++) {
|
|
41
|
+
const match = lines[i].trim().match(QUESTION_REGEX);
|
|
42
|
+
if (match) {
|
|
43
|
+
questions.push({
|
|
44
|
+
number: parseInt(match[1], 10),
|
|
45
|
+
text: match[2].trim(),
|
|
46
|
+
lineIndex: i,
|
|
47
|
+
answered: false,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// Second pass: check which questions already have answers
|
|
52
|
+
for (const question of questions) {
|
|
53
|
+
for (let i = 0; i < lines.length; i++) {
|
|
54
|
+
const match = lines[i].trim().match(ANSWER_REGEX);
|
|
55
|
+
if (match && parseInt(match[1], 10) === question.number) {
|
|
56
|
+
question.answered = true;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return questions;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Rewrite a ticket description by injecting answers below each question.
|
|
65
|
+
*
|
|
66
|
+
* For each answered question, inserts a line like:
|
|
67
|
+
* **A1:** The answer text
|
|
68
|
+
*
|
|
69
|
+
* If an answer already exists for that question, it is replaced.
|
|
70
|
+
*
|
|
71
|
+
* @param description - The original ticket description
|
|
72
|
+
* @param answers - Map of question number to answer text
|
|
73
|
+
* @returns The rewritten description
|
|
74
|
+
*/
|
|
75
|
+
export function rewriteDescription(description, answers) {
|
|
76
|
+
if (!description || answers.size === 0)
|
|
77
|
+
return description;
|
|
78
|
+
const lines = description.split('\n');
|
|
79
|
+
const result = [];
|
|
80
|
+
for (let i = 0; i < lines.length; i++) {
|
|
81
|
+
const trimmed = lines[i].trim();
|
|
82
|
+
// Check if this line is an existing answer that we're replacing
|
|
83
|
+
const answerMatch = trimmed.match(ANSWER_REGEX);
|
|
84
|
+
if (answerMatch) {
|
|
85
|
+
const answerNum = parseInt(answerMatch[1], 10);
|
|
86
|
+
if (answers.has(answerNum)) {
|
|
87
|
+
// Replace this existing answer with the new one
|
|
88
|
+
result.push(`**A${answerNum}:** ${answers.get(answerNum)}`);
|
|
89
|
+
answers.delete(answerNum); // Mark as handled
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Check if this line is a question
|
|
94
|
+
const questionMatch = trimmed.match(QUESTION_REGEX);
|
|
95
|
+
if (questionMatch) {
|
|
96
|
+
const questionNum = parseInt(questionMatch[1], 10);
|
|
97
|
+
result.push(lines[i]); // Keep the question line as-is
|
|
98
|
+
// Check if the next line is already an answer for this question
|
|
99
|
+
const nextLine = i + 1 < lines.length ? lines[i + 1].trim() : '';
|
|
100
|
+
const nextAnswerMatch = nextLine.match(ANSWER_REGEX);
|
|
101
|
+
if (nextAnswerMatch && parseInt(nextAnswerMatch[1], 10) === questionNum) {
|
|
102
|
+
// Next line is the answer - it will be handled in the next iteration
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
// Insert answer if we have one and it hasn't been handled yet
|
|
106
|
+
if (answers.has(questionNum)) {
|
|
107
|
+
result.push(`**A${questionNum}:** ${answers.get(questionNum)}`);
|
|
108
|
+
answers.delete(questionNum);
|
|
109
|
+
}
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
result.push(lines[i]);
|
|
113
|
+
}
|
|
114
|
+
return result.join('\n');
|
|
115
|
+
}
|
|
116
|
+
export default class TicketResolve extends PMOCommand {
|
|
117
|
+
static description = 'Resolve ambiguity questions on tickets flagged by groom';
|
|
118
|
+
static examples = [
|
|
119
|
+
'<%= config.bin %> <%= command.id %> TKT-001',
|
|
120
|
+
'<%= config.bin %> <%= command.id %> TKT-001 TKT-002',
|
|
121
|
+
'<%= config.bin %> <%= command.id %> # Interactive picker for needs-clarification tickets',
|
|
122
|
+
];
|
|
123
|
+
static strict = false;
|
|
124
|
+
static args = {
|
|
125
|
+
ticketId: Args.string({
|
|
126
|
+
description: 'Ticket ID(s) to resolve - prompts with picker if not provided',
|
|
127
|
+
required: false,
|
|
128
|
+
}),
|
|
129
|
+
};
|
|
130
|
+
static flags = {
|
|
131
|
+
...pmoBaseFlags,
|
|
132
|
+
json: Flags.boolean({
|
|
133
|
+
char: 'm',
|
|
134
|
+
aliases: ['machine'],
|
|
135
|
+
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
136
|
+
default: false,
|
|
137
|
+
}),
|
|
138
|
+
};
|
|
139
|
+
async execute() {
|
|
140
|
+
const { flags, argv } = await this.parse(TicketResolve);
|
|
141
|
+
const projectId = flags.project;
|
|
142
|
+
const jsonMode = shouldOutputJson(flags);
|
|
143
|
+
const handleError = (code, message) => {
|
|
144
|
+
if (jsonMode) {
|
|
145
|
+
outputErrorAsJson(code, message, createMetadata('ticket resolve', flags));
|
|
146
|
+
this.exit(1);
|
|
147
|
+
}
|
|
148
|
+
this.error(message);
|
|
149
|
+
};
|
|
150
|
+
// Collect ticket IDs from argv (supports multiple args)
|
|
151
|
+
let ticketIds = argv.filter(a => !a.startsWith('-'));
|
|
152
|
+
if (ticketIds.length === 0) {
|
|
153
|
+
// No tickets specified - show picker of needs-clarification tickets
|
|
154
|
+
const allTickets = await this.storage.listTickets(projectId);
|
|
155
|
+
const clarificationTickets = allTickets.filter((t) => t.labels.includes('needs-clarification') ||
|
|
156
|
+
t.statusName?.toLowerCase() === 'needs clarification');
|
|
157
|
+
if (clarificationTickets.length === 0) {
|
|
158
|
+
return handleError('NO_TICKETS', 'No tickets need clarification. Run "prlt work start --action groom" to groom tickets first.');
|
|
159
|
+
}
|
|
160
|
+
const selected = await this.selectFromList({
|
|
161
|
+
message: 'Select ticket to resolve:',
|
|
162
|
+
items: clarificationTickets,
|
|
163
|
+
getName: (t) => `${t.id} - ${t.title} (${t.statusName})`,
|
|
164
|
+
getValue: (t) => t.id,
|
|
165
|
+
getCommand: (t) => `prlt ticket resolve ${t.id}${projectId ? ` -P ${projectId}` : ''} --json`,
|
|
166
|
+
jsonMode: jsonMode ? { flags, commandName: 'ticket resolve' } : null,
|
|
167
|
+
});
|
|
168
|
+
if (!selected) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
ticketIds = [selected];
|
|
172
|
+
}
|
|
173
|
+
// Process each ticket
|
|
174
|
+
for (const ticketId of ticketIds) {
|
|
175
|
+
// eslint-disable-next-line no-await-in-loop
|
|
176
|
+
await this.resolveTicket(ticketId, jsonMode, flags);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async resolveTicket(ticketId, jsonMode, flags) {
|
|
180
|
+
const handleError = (code, message) => {
|
|
181
|
+
if (jsonMode) {
|
|
182
|
+
outputErrorAsJson(code, message, createMetadata('ticket resolve', flags));
|
|
183
|
+
this.exit(1);
|
|
184
|
+
}
|
|
185
|
+
this.error(message);
|
|
186
|
+
};
|
|
187
|
+
// Fetch the ticket
|
|
188
|
+
const ticket = await this.storage.getTicket(ticketId);
|
|
189
|
+
if (!ticket) {
|
|
190
|
+
return handleError('TICKET_NOT_FOUND', `Ticket "${ticketId}" not found.`);
|
|
191
|
+
}
|
|
192
|
+
// Parse questions from description
|
|
193
|
+
const questions = parseQuestions(ticket.description || '');
|
|
194
|
+
const unanswered = questions.filter((q) => !q.answered);
|
|
195
|
+
if (unanswered.length === 0) {
|
|
196
|
+
if (questions.length === 0) {
|
|
197
|
+
this.log(styles.warning(`\nNo questions found in ${styles.emphasis(ticketId)}. Nothing to resolve.`));
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
this.log(styles.success(`\nAll questions in ${styles.emphasis(ticketId)} are already answered.`));
|
|
201
|
+
}
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
// JSON mode: output all questions for agent interaction
|
|
205
|
+
if (jsonMode) {
|
|
206
|
+
const questionData = unanswered.map((q) => ({
|
|
207
|
+
number: q.number,
|
|
208
|
+
text: q.text,
|
|
209
|
+
flag: `--a${q.number}`,
|
|
210
|
+
}));
|
|
211
|
+
outputSuccessAsJson({
|
|
212
|
+
ticketId,
|
|
213
|
+
title: ticket.title,
|
|
214
|
+
questions: questionData,
|
|
215
|
+
hint: `Answer questions by running: prlt ticket resolve ${ticketId} --json and providing answers interactively, or use prlt ticket edit to update the description directly.`,
|
|
216
|
+
}, createMetadata('ticket resolve', flags));
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this.log(styles.title(`\nResolving ${unanswered.length} question(s) for ${styles.emphasis(ticketId)} - ${ticket.title}\n`));
|
|
220
|
+
// Interactive mode: prompt for each answer
|
|
221
|
+
const answers = new Map();
|
|
222
|
+
let cancelled = false;
|
|
223
|
+
for (const question of unanswered) {
|
|
224
|
+
this.log(styles.emphasis(` Q${question.number}: ${question.text}`));
|
|
225
|
+
// eslint-disable-next-line no-await-in-loop
|
|
226
|
+
const { answer } = await inquirer.prompt([
|
|
227
|
+
{
|
|
228
|
+
type: 'input',
|
|
229
|
+
name: 'answer',
|
|
230
|
+
message: ` A${question.number}:`,
|
|
231
|
+
validate: (input) => {
|
|
232
|
+
if (!input.trim())
|
|
233
|
+
return 'Please provide an answer (or type "skip" to skip)';
|
|
234
|
+
return true;
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
]);
|
|
238
|
+
if (answer.toLowerCase() === 'cancel') {
|
|
239
|
+
cancelled = true;
|
|
240
|
+
this.log(styles.warning('\nResolution cancelled.'));
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
if (answer.toLowerCase() !== 'skip') {
|
|
244
|
+
answers.set(question.number, answer.trim());
|
|
245
|
+
}
|
|
246
|
+
this.log(''); // Blank line between questions
|
|
247
|
+
}
|
|
248
|
+
if (cancelled || answers.size === 0) {
|
|
249
|
+
if (!cancelled) {
|
|
250
|
+
this.log(styles.muted('\nNo answers provided. Nothing changed.'));
|
|
251
|
+
}
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
// Rewrite description with answers
|
|
255
|
+
const newDescription = rewriteDescription(ticket.description || '', answers);
|
|
256
|
+
// Update the ticket description
|
|
257
|
+
await this.storage.updateTicket(ticketId, { description: newDescription });
|
|
258
|
+
// Label management: remove needs-clarification, add ready
|
|
259
|
+
const currentLabels = [...ticket.labels];
|
|
260
|
+
const updatedLabels = currentLabels.filter((l) => l !== 'needs-clarification');
|
|
261
|
+
const allAnswered = answers.size === unanswered.length;
|
|
262
|
+
if (allAnswered && !updatedLabels.includes('ready')) {
|
|
263
|
+
updatedLabels.push('ready');
|
|
264
|
+
}
|
|
265
|
+
if (JSON.stringify(updatedLabels) !== JSON.stringify(currentLabels)) {
|
|
266
|
+
await this.storage.updateTicket(ticketId, { labels: updatedLabels });
|
|
267
|
+
}
|
|
268
|
+
// Move to Ready column if all questions answered and ticket has a project
|
|
269
|
+
if (allAnswered && ticket.projectId) {
|
|
270
|
+
try {
|
|
271
|
+
const project = await this.storage.getProject(ticket.projectId);
|
|
272
|
+
if (project?.workflowId) {
|
|
273
|
+
const statuses = await this.storage.listStatuses(project.workflowId);
|
|
274
|
+
// Find the "Ready" status (or first unstarted status that isn't "Needs Clarification")
|
|
275
|
+
const readyStatus = statuses.find((s) => s.name.toLowerCase() === 'ready' ||
|
|
276
|
+
(s.category === 'unstarted' && s.name.toLowerCase() !== 'needs clarification'));
|
|
277
|
+
if (readyStatus && readyStatus.name !== ticket.statusName) {
|
|
278
|
+
await this.storage.moveTicket(ticket.projectId, ticketId, readyStatus.name);
|
|
279
|
+
this.log(styles.muted(` Moved to column: ${readyStatus.name}`));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
catch {
|
|
284
|
+
// Non-fatal: column move is best-effort
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
// Auto-export to board.md
|
|
288
|
+
await autoExportToBoard(this.pmoPath, this.storage, (msg) => this.log(styles.muted(msg)));
|
|
289
|
+
this.log(styles.success(`\n✅ Resolved ${answers.size}/${unanswered.length} question(s) on ${styles.emphasis(ticketId)}`));
|
|
290
|
+
if (allAnswered) {
|
|
291
|
+
this.log(styles.muted(' Label: needs-clarification → ready'));
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
@@ -7,10 +7,11 @@ export default class TicketSpec extends PMOCommand {
|
|
|
7
7
|
specId: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
8
|
};
|
|
9
9
|
static flags: {
|
|
10
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
10
|
unlink: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
11
|
bulk: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
12
|
spec: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
15
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
};
|
|
16
17
|
execute(): Promise<void>;
|
|
@@ -23,12 +23,6 @@ export default class TicketSpec extends PMOCommand {
|
|
|
23
23
|
};
|
|
24
24
|
static flags = {
|
|
25
25
|
...pmoBaseFlags,
|
|
26
|
-
json: Flags.boolean({
|
|
27
|
-
char: 'm',
|
|
28
|
-
aliases: ['machine'],
|
|
29
|
-
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
30
|
-
default: false,
|
|
31
|
-
}),
|
|
32
26
|
unlink: Flags.boolean({
|
|
33
27
|
char: 'u',
|
|
34
28
|
description: 'Remove spec from ticket instead of adding',
|
|
@@ -7,6 +7,7 @@ export default class TicketStatus 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>;
|
|
10
11
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
13
|
execute(): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Args
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
2
|
import { PMOCommand, pmoBaseFlags } from '../../lib/pmo/index.js';
|
|
3
3
|
import { styles, formatPriority, formatCategory } from '../../lib/styles.js';
|
|
4
4
|
import { shouldOutputJson, outputErrorAsJson, createMetadata, } from '../../lib/prompt-json.js';
|
|
@@ -16,12 +16,6 @@ export default class TicketStatus extends PMOCommand {
|
|
|
16
16
|
};
|
|
17
17
|
static flags = {
|
|
18
18
|
...pmoBaseFlags,
|
|
19
|
-
json: Flags.boolean({
|
|
20
|
-
char: 'm',
|
|
21
|
-
aliases: ['machine'],
|
|
22
|
-
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
23
|
-
default: false,
|
|
24
|
-
}),
|
|
25
19
|
};
|
|
26
20
|
async execute() {
|
|
27
21
|
const { args, flags } = await this.parse(TicketStatus);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import TemplateApply from '../../template/apply.js';
|
|
2
|
+
export default class TicketTemplateApply extends TemplateApply {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
template: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
title: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
column: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
priority: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
category: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
assignee: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
owner: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
epic: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'no-subtasks': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
interactive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
};
|
|
24
|
+
static examples: string[];
|
|
25
|
+
run(): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import TemplateApply from '../../template/apply.js';
|
|
2
|
+
export default class TicketTemplateApply extends TemplateApply {
|
|
3
|
+
static description = 'Apply a ticket template to create a new ticket';
|
|
4
|
+
static args = TemplateApply.args;
|
|
5
|
+
static flags = TemplateApply.flags;
|
|
6
|
+
static examples = TemplateApply.examples;
|
|
7
|
+
async run() {
|
|
8
|
+
const argv = this.argv;
|
|
9
|
+
if (!argv.includes('--type') && !argv.includes('-t')) {
|
|
10
|
+
argv.push('--type', 'ticket');
|
|
11
|
+
}
|
|
12
|
+
return super.run();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PMOCommand } from '../../../lib/pmo/index.js';
|
|
2
|
+
export default class TicketTemplateDelete extends PMOCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
machine: 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,61 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { PMOCommand, pmoBaseFlags } from '../../../lib/pmo/index.js';
|
|
3
|
+
import { styles } from '../../../lib/styles.js';
|
|
4
|
+
import { shouldOutputJson, outputErrorAsJson, createMetadata, } from '../../../lib/prompt-json.js';
|
|
5
|
+
export default class TicketTemplateDelete extends PMOCommand {
|
|
6
|
+
static description = 'Delete a ticket template';
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> <%= command.id %> my-template --force',
|
|
9
|
+
];
|
|
10
|
+
static args = {
|
|
11
|
+
id: Args.string({
|
|
12
|
+
description: 'Template ID to delete',
|
|
13
|
+
required: true,
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
16
|
+
static flags = {
|
|
17
|
+
...pmoBaseFlags,
|
|
18
|
+
force: Flags.boolean({
|
|
19
|
+
char: 'f',
|
|
20
|
+
description: 'Skip confirmation',
|
|
21
|
+
default: false,
|
|
22
|
+
}),
|
|
23
|
+
};
|
|
24
|
+
getPMOOptions() {
|
|
25
|
+
return { promptIfMultiple: false };
|
|
26
|
+
}
|
|
27
|
+
async execute() {
|
|
28
|
+
const { args, flags } = await this.parse(TicketTemplateDelete);
|
|
29
|
+
const jsonMode = shouldOutputJson(flags);
|
|
30
|
+
const handleError = (code, message) => {
|
|
31
|
+
if (jsonMode) {
|
|
32
|
+
outputErrorAsJson(code, message, createMetadata('ticket template delete', flags));
|
|
33
|
+
}
|
|
34
|
+
this.error(message);
|
|
35
|
+
};
|
|
36
|
+
const template = await this.storage.getTicketTemplate(args.id);
|
|
37
|
+
if (!template) {
|
|
38
|
+
return handleError('NOT_FOUND', `Ticket template not found: ${args.id}`);
|
|
39
|
+
}
|
|
40
|
+
if (template.isBuiltin) {
|
|
41
|
+
return handleError('BUILTIN', `Cannot delete built-in template "${template.name}".`);
|
|
42
|
+
}
|
|
43
|
+
if (!flags.force) {
|
|
44
|
+
const { confirm } = await this.prompt([{
|
|
45
|
+
type: 'list',
|
|
46
|
+
name: 'confirm',
|
|
47
|
+
message: `Delete ticket template "${template.name}"?`,
|
|
48
|
+
choices: [
|
|
49
|
+
{ name: 'No', value: false },
|
|
50
|
+
{ name: 'Yes', value: true },
|
|
51
|
+
],
|
|
52
|
+
}], jsonMode ? { flags, commandName: 'ticket template delete' } : null);
|
|
53
|
+
if (!confirm) {
|
|
54
|
+
this.log(styles.muted('Cancelled.'));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
await this.storage.deleteTicketTemplate(args.id);
|
|
59
|
+
this.log(styles.success(`\nDeleted template "${template.name}"`));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PMOCommand } from '../../../lib/pmo/index.js';
|
|
2
|
+
export default class TicketTemplateList extends PMOCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
builtin: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
custom: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
protected getPMOOptions(): {
|
|
13
|
+
promptIfMultiple: boolean;
|
|
14
|
+
};
|
|
15
|
+
execute(): Promise<void>;
|
|
16
|
+
private printTemplate;
|
|
17
|
+
}
|