@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
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { PMOCommand, pmoBaseFlags } from '../../../lib/pmo/index.js';
|
|
3
|
+
import { styles } from '../../../lib/styles.js';
|
|
4
|
+
import { shouldOutputJson, outputPromptAsJson, createMetadata, buildPromptConfig, } from '../../../lib/prompt-json.js';
|
|
5
|
+
export default class SpecLink extends PMOCommand {
|
|
6
|
+
static description = 'Manage links (dependencies) for a spec';
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> <%= command.id %>',
|
|
9
|
+
'<%= config.bin %> <%= command.id %> SPEC-001',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --machine',
|
|
11
|
+
];
|
|
12
|
+
static args = {
|
|
13
|
+
spec: Args.string({
|
|
14
|
+
description: 'Spec ID',
|
|
15
|
+
required: false,
|
|
16
|
+
}),
|
|
17
|
+
};
|
|
18
|
+
static flags = {
|
|
19
|
+
...pmoBaseFlags,
|
|
20
|
+
};
|
|
21
|
+
getPMOOptions() {
|
|
22
|
+
return { promptIfMultiple: false };
|
|
23
|
+
}
|
|
24
|
+
async execute() {
|
|
25
|
+
const { args, flags } = await this.parse(SpecLink);
|
|
26
|
+
const jsonMode = shouldOutputJson(flags);
|
|
27
|
+
// If no spec ID provided, prompt for selection
|
|
28
|
+
if (!args.spec) {
|
|
29
|
+
const specs = await this.storage.listSpecs();
|
|
30
|
+
if (specs.length === 0) {
|
|
31
|
+
this.log(styles.muted('No specs found.'));
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const choices = specs.map(s => ({
|
|
35
|
+
name: `${s.id} - ${s.title}`,
|
|
36
|
+
value: s.id,
|
|
37
|
+
command: `prlt spec link ${s.id} --machine`,
|
|
38
|
+
}));
|
|
39
|
+
const message = 'Select a spec to manage links:';
|
|
40
|
+
if (jsonMode) {
|
|
41
|
+
outputPromptAsJson(buildPromptConfig('list', 'id', message, choices), createMetadata('spec link', flags));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const { selected } = await this.prompt([{
|
|
45
|
+
type: 'list',
|
|
46
|
+
name: 'selected',
|
|
47
|
+
message,
|
|
48
|
+
choices,
|
|
49
|
+
}], null);
|
|
50
|
+
args.spec = selected;
|
|
51
|
+
}
|
|
52
|
+
const spec = await this.storage.getSpec(args.spec);
|
|
53
|
+
if (!spec) {
|
|
54
|
+
this.error(`Spec not found: ${args.spec}`);
|
|
55
|
+
}
|
|
56
|
+
// Show link actions submenu
|
|
57
|
+
const menuChoices = [
|
|
58
|
+
{ name: 'Add dependency', value: 'depends', command: `prlt spec link depends ${args.spec} --machine` },
|
|
59
|
+
{ name: 'Remove dependency', value: 'remove', command: `prlt spec link remove ${args.spec} --machine` },
|
|
60
|
+
{ name: 'Cancel', value: 'cancel', command: '' },
|
|
61
|
+
];
|
|
62
|
+
const message = `Manage links for ${args.spec}: ${spec.title}`;
|
|
63
|
+
if (jsonMode) {
|
|
64
|
+
outputPromptAsJson(buildPromptConfig('list', 'action', message, menuChoices), createMetadata('spec link', flags));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const { action } = await this.prompt([{
|
|
68
|
+
type: 'list',
|
|
69
|
+
name: 'action',
|
|
70
|
+
message,
|
|
71
|
+
choices: menuChoices,
|
|
72
|
+
}], null);
|
|
73
|
+
if (action === 'cancel') {
|
|
74
|
+
this.log(styles.muted('Cancelled.'));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
switch (action) {
|
|
78
|
+
case 'depends': {
|
|
79
|
+
const { default: DependsCommand } = await import('./depends.js');
|
|
80
|
+
const cmd = new DependsCommand([args.spec], this.config);
|
|
81
|
+
await cmd.run();
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case 'remove': {
|
|
85
|
+
const { default: RemoveCommand } = await import('./remove.js');
|
|
86
|
+
const cmd = new RemoveCommand([args.spec], this.config);
|
|
87
|
+
await cmd.run();
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PMOCommand } from '../../../lib/pmo/index.js';
|
|
2
|
+
export default class SpecLinkRemove extends PMOCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
spec: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
target: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
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,90 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { PMOCommand, pmoBaseFlags } from '../../../lib/pmo/index.js';
|
|
3
|
+
import { styles } from '../../../lib/styles.js';
|
|
4
|
+
import { shouldOutputJson, outputPromptAsJson, outputErrorAsJson, createMetadata, buildPromptConfig, } from '../../../lib/prompt-json.js';
|
|
5
|
+
export default class SpecLinkRemove extends PMOCommand {
|
|
6
|
+
static description = 'Remove a dependency between specs';
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> <%= command.id %> SPEC-001 SPEC-002',
|
|
9
|
+
'<%= config.bin %> <%= command.id %> SPEC-001 --machine',
|
|
10
|
+
];
|
|
11
|
+
static args = {
|
|
12
|
+
spec: Args.string({
|
|
13
|
+
description: 'Source spec ID',
|
|
14
|
+
required: true,
|
|
15
|
+
}),
|
|
16
|
+
target: Args.string({
|
|
17
|
+
description: 'Target spec ID to remove dependency from',
|
|
18
|
+
required: false,
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
static flags = {
|
|
22
|
+
...pmoBaseFlags,
|
|
23
|
+
};
|
|
24
|
+
getPMOOptions() {
|
|
25
|
+
return { promptIfMultiple: false };
|
|
26
|
+
}
|
|
27
|
+
async execute() {
|
|
28
|
+
const { args, flags } = await this.parse(SpecLinkRemove);
|
|
29
|
+
const jsonMode = shouldOutputJson(flags);
|
|
30
|
+
const handleError = (code, message) => {
|
|
31
|
+
if (jsonMode) {
|
|
32
|
+
outputErrorAsJson(code, message, createMetadata('spec link remove', flags));
|
|
33
|
+
this.exit(1);
|
|
34
|
+
}
|
|
35
|
+
this.error(message);
|
|
36
|
+
};
|
|
37
|
+
// Verify source spec exists
|
|
38
|
+
const sourceSpec = await this.storage.getSpec(args.spec);
|
|
39
|
+
if (!sourceSpec) {
|
|
40
|
+
return handleError('SPEC_NOT_FOUND', `Spec not found: ${args.spec}`);
|
|
41
|
+
}
|
|
42
|
+
// If target not provided, show existing dependencies for selection
|
|
43
|
+
if (!args.target) {
|
|
44
|
+
const dependencies = await this.storage.listSpecDependencies(args.spec);
|
|
45
|
+
if (dependencies.length === 0) {
|
|
46
|
+
if (jsonMode) {
|
|
47
|
+
outputErrorAsJson('NO_DEPENDENCIES', `No dependencies found for ${args.spec}.`, createMetadata('spec link remove', flags));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.log(styles.muted(`No dependencies found for ${args.spec}.`));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// Get spec details for dependency targets
|
|
54
|
+
const choices = [];
|
|
55
|
+
for (const dep of dependencies) {
|
|
56
|
+
// eslint-disable-next-line no-await-in-loop
|
|
57
|
+
const targetSpec = await this.storage.getSpec(dep.dependsOnSpecId);
|
|
58
|
+
const name = targetSpec ? `${dep.dependsOnSpecId} - ${targetSpec.title} (${dep.dependencyType})` : `${dep.dependsOnSpecId} (${dep.dependencyType})`;
|
|
59
|
+
choices.push({
|
|
60
|
+
name,
|
|
61
|
+
value: dep.dependsOnSpecId,
|
|
62
|
+
command: `prlt spec link remove ${args.spec} ${dep.dependsOnSpecId} --json`,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const message = `Select dependency to remove from ${args.spec}:`;
|
|
66
|
+
if (jsonMode) {
|
|
67
|
+
outputPromptAsJson(buildPromptConfig('list', 'target', message, choices), createMetadata('spec link remove', flags));
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const { selected } = await this.prompt([{
|
|
71
|
+
type: 'list',
|
|
72
|
+
name: 'selected',
|
|
73
|
+
message,
|
|
74
|
+
choices,
|
|
75
|
+
}], null);
|
|
76
|
+
args.target = selected;
|
|
77
|
+
}
|
|
78
|
+
// Remove the dependency
|
|
79
|
+
try {
|
|
80
|
+
await this.storage.deleteSpecDependency(args.spec, args.target);
|
|
81
|
+
this.log(styles.success(`\nRemoved dependency: ${args.spec} no longer depends on ${args.target}`));
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
if (error instanceof Error && error.message.includes('not found')) {
|
|
85
|
+
return handleError('NOT_FOUND', `Dependency not found between ${args.spec} and ${args.target}`);
|
|
86
|
+
}
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -7,6 +7,7 @@ export default class SpecList extends PMOCommand {
|
|
|
7
7
|
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
search: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
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>;
|
|
@@ -9,6 +9,7 @@ export default class SpecPlan extends PMOCommand {
|
|
|
9
9
|
spec: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
execute(): Promise<void>;
|
|
@@ -10,6 +10,7 @@ export default class SpecTicket extends PMOCommand {
|
|
|
10
10
|
ticket: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
spec: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
execute(): Promise<void>;
|
|
@@ -9,6 +9,7 @@ export default class SpecView extends PMOCommand {
|
|
|
9
9
|
spec: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
full: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
execute(): Promise<void>;
|
|
@@ -6,10 +6,11 @@ export default class Add extends PromptCommand {
|
|
|
6
6
|
names: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
static flags: {
|
|
9
|
+
clone: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
12
|
'no-container': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
13
|
theme: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
clone: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
static strict: boolean;
|
|
15
16
|
run(): Promise<void>;
|
|
@@ -2,6 +2,7 @@ import { Args, Flags } from '@oclif/core';
|
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import inquirer from 'inquirer';
|
|
4
4
|
import { PromptCommand } from '../../lib/prompt-command.js';
|
|
5
|
+
import { machineOutputFlags } from '../../lib/pmo/index.js';
|
|
5
6
|
import { getWorkspaceInfo, validateAgentNames, addAgentsToWorkspace } from '../../lib/agents/commands.js';
|
|
6
7
|
import { ensureBuiltinThemes, BUILTIN_THEMES, isValidAgentName, normalizeAgentName } from '../../lib/themes.js';
|
|
7
8
|
import { getTheme, getThemes, getAvailableThemeNames, getActiveTheme } from '../../lib/database/index.js';
|
|
@@ -29,12 +30,7 @@ export default class Add extends PromptCommand {
|
|
|
29
30
|
char: 't',
|
|
30
31
|
description: 'Pick agent name(s) from a theme (billionaires, toyotas, companies, or custom)',
|
|
31
32
|
}),
|
|
32
|
-
|
|
33
|
-
char: 'm',
|
|
34
|
-
aliases: ['machine'],
|
|
35
|
-
description: 'Output as JSON for AI agents/scripts',
|
|
36
|
-
default: false,
|
|
37
|
-
}),
|
|
33
|
+
...machineOutputFlags,
|
|
38
34
|
clone: Flags.boolean({
|
|
39
35
|
description: 'Use independent git clone instead of worktree (more isolation, no real-time sync)',
|
|
40
36
|
default: false,
|
|
@@ -3,8 +3,9 @@ export default class Staff extends PMOCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
6
|
'no-interactive': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
protected getPMOOptions(): {
|
|
@@ -12,12 +12,6 @@ export default class Staff extends PMOCommand {
|
|
|
12
12
|
];
|
|
13
13
|
static flags = {
|
|
14
14
|
...pmoBaseFlags,
|
|
15
|
-
json: Flags.boolean({
|
|
16
|
-
char: 'm',
|
|
17
|
-
aliases: ['machine'],
|
|
18
|
-
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
19
|
-
default: false,
|
|
20
|
-
}),
|
|
21
15
|
'no-interactive': Flags.boolean({
|
|
22
16
|
description: 'Alias for --json flag',
|
|
23
17
|
default: false,
|
|
@@ -6,8 +6,9 @@ export default class Remove extends PMOCommand {
|
|
|
6
6
|
name: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
static flags: {
|
|
9
|
-
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
9
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
protected getPMOOptions(): {
|
|
@@ -18,12 +18,6 @@ export default class Remove extends PMOCommand {
|
|
|
18
18
|
};
|
|
19
19
|
static flags = {
|
|
20
20
|
...pmoBaseFlags,
|
|
21
|
-
json: Flags.boolean({
|
|
22
|
-
char: 'm',
|
|
23
|
-
aliases: ['machine'],
|
|
24
|
-
description: 'Output prompt configuration as JSON (for AI agents/scripts)',
|
|
25
|
-
default: false,
|
|
26
|
-
}),
|
|
27
21
|
force: Flags.boolean({
|
|
28
22
|
char: 'f',
|
|
29
23
|
description: 'Skip confirmation prompt (for non-interactive use)',
|
|
@@ -5,6 +5,7 @@ export default class StatusCategory extends PMOCommand {
|
|
|
5
5
|
static examples: string[];
|
|
6
6
|
static flags: {
|
|
7
7
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
protected getPMOOptions(): {
|
|
@@ -13,6 +13,7 @@ export default class StatusCreate extends PMOCommand {
|
|
|
13
13
|
default: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
14
|
interactive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
18
|
};
|
|
18
19
|
execute(): Promise<void>;
|
|
@@ -8,6 +8,7 @@ export default class StatusDelete extends PMOCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
};
|
|
12
13
|
execute(): Promise<void>;
|
|
13
14
|
}
|
|
@@ -5,6 +5,7 @@ export default class Status extends PMOCommand {
|
|
|
5
5
|
static examples: string[];
|
|
6
6
|
static flags: {
|
|
7
7
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
protected getPMOOptions(): {
|
|
@@ -5,6 +5,7 @@ export default class StatusList extends PMOCommand {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
category: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
execute(): Promise<void>;
|
|
@@ -8,6 +8,7 @@ export default class StatusMove extends PMOCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
position: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
};
|
|
13
14
|
execute(): Promise<void>;
|
|
@@ -13,6 +13,7 @@ export default class StatusUpdate extends PMOCommand {
|
|
|
13
13
|
default: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
14
|
interactive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
18
|
};
|
|
18
19
|
execute(): Promise<void>;
|
|
@@ -4,6 +4,7 @@ export default class SupportBook extends Command {
|
|
|
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>;
|
|
7
8
|
};
|
|
8
9
|
run(): Promise<void>;
|
|
9
10
|
private openUrl;
|
|
@@ -4,6 +4,7 @@ export default class SupportDiscord extends Command {
|
|
|
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>;
|
|
7
8
|
};
|
|
8
9
|
run(): Promise<void>;
|
|
9
10
|
private openUrl;
|
|
@@ -4,6 +4,7 @@ export default class SupportDocs extends Command {
|
|
|
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>;
|
|
7
8
|
};
|
|
8
9
|
run(): Promise<void>;
|
|
9
10
|
private openUrl;
|
|
@@ -14,6 +14,7 @@ export default class Support extends Command {
|
|
|
14
14
|
static examples: string[];
|
|
15
15
|
static flags: {
|
|
16
16
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
18
19
|
run(): Promise<void>;
|
|
19
20
|
}
|
|
@@ -5,6 +5,7 @@ export default class SupportIssues extends Command {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
browser: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
};
|
|
9
10
|
run(): Promise<void>;
|
|
10
11
|
private openUrl;
|
|
@@ -5,6 +5,7 @@ export default class SupportLogs extends PMOCommand {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
clipboard: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
protected execute(): Promise<void>;
|
|
@@ -210,8 +210,8 @@ export default class SupportLogs extends PMOCommand {
|
|
|
210
210
|
copyToClipboard(text) {
|
|
211
211
|
const platform = process.platform;
|
|
212
212
|
// Strip ANSI codes for clipboard
|
|
213
|
-
//
|
|
214
|
-
const plainText = text.replace(/\
|
|
213
|
+
// eslint-disable-next-line no-control-regex -- intentional ANSI escape code stripping
|
|
214
|
+
const plainText = text.replace(/\u001B\[[0-9;]*m/g, '');
|
|
215
215
|
try {
|
|
216
216
|
if (platform === 'darwin') {
|
|
217
217
|
execSync('pbcopy', { input: plainText, encoding: 'utf-8' });
|
|
@@ -19,6 +19,7 @@ export default class TemplateApply extends PMOCommand {
|
|
|
19
19
|
interactive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
20
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
21
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
23
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
24
|
};
|
|
24
25
|
execute(): Promise<void>;
|
|
@@ -70,12 +70,6 @@ export default class TemplateApply extends PMOCommand {
|
|
|
70
70
|
description: 'Skip confirmation (phase only)',
|
|
71
71
|
default: false,
|
|
72
72
|
}),
|
|
73
|
-
json: Flags.boolean({
|
|
74
|
-
char: 'm',
|
|
75
|
-
aliases: ['machine'],
|
|
76
|
-
description: 'Output as JSON for AI agents/scripts',
|
|
77
|
-
default: false,
|
|
78
|
-
}),
|
|
79
73
|
};
|
|
80
74
|
async execute() {
|
|
81
75
|
const { args, flags } = await this.parse(TemplateApply);
|
|
@@ -141,10 +135,10 @@ export default class TemplateApply extends PMOCommand {
|
|
|
141
135
|
let title = flags.title || template.titlePattern || '';
|
|
142
136
|
let column = flags.column || columns[0];
|
|
143
137
|
let priority = flags.priority || template.defaultPriority;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
138
|
+
const category = flags.category || template.defaultCategory;
|
|
139
|
+
const assignee = flags.assignee || template.defaultAssignee;
|
|
140
|
+
const owner = flags.owner || template.defaultOwner;
|
|
141
|
+
const description = flags.description || template.descriptionTemplate;
|
|
148
142
|
const labels = template.defaultLabels;
|
|
149
143
|
// Interactive mode
|
|
150
144
|
if (flags.interactive || !title) {
|
|
@@ -188,6 +182,7 @@ export default class TemplateApply extends PMOCommand {
|
|
|
188
182
|
// Add subtasks
|
|
189
183
|
if (!flags['no-subtasks'] && template.suggestedSubtasks.length > 0) {
|
|
190
184
|
for (const subtask of template.suggestedSubtasks) {
|
|
185
|
+
// eslint-disable-next-line no-await-in-loop
|
|
191
186
|
await this.storage.addSubtask(ticket.id, subtask.title);
|
|
192
187
|
}
|
|
193
188
|
}
|
|
@@ -16,6 +16,7 @@ export default class TemplateCreate extends PMOCommand {
|
|
|
16
16
|
ac: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
label: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
20
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
21
|
};
|
|
21
22
|
protected getPMOOptions(): {
|
|
@@ -58,12 +58,6 @@ export default class TemplateCreate extends PMOCommand {
|
|
|
58
58
|
description: 'Add a default label (ticket only, can repeat)',
|
|
59
59
|
multiple: true,
|
|
60
60
|
}),
|
|
61
|
-
json: Flags.boolean({
|
|
62
|
-
char: 'm',
|
|
63
|
-
aliases: ['machine'],
|
|
64
|
-
description: 'Output as JSON for AI agents/scripts',
|
|
65
|
-
default: false,
|
|
66
|
-
}),
|
|
67
61
|
};
|
|
68
62
|
getPMOOptions() {
|
|
69
63
|
return { promptIfMultiple: false };
|
|
@@ -141,7 +135,7 @@ export default class TemplateCreate extends PMOCommand {
|
|
|
141
135
|
}
|
|
142
136
|
// Get optional values
|
|
143
137
|
let description = flags.description;
|
|
144
|
-
|
|
138
|
+
const titlePattern = flags['title-pattern'];
|
|
145
139
|
let priority = flags.priority;
|
|
146
140
|
let category = flags.category;
|
|
147
141
|
const subtasks = flags.subtask || [];
|
|
@@ -6,6 +6,7 @@ export default class TemplateDelete extends PMOCommand {
|
|
|
6
6
|
type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
8
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
machine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
10
|
project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
};
|
|
11
12
|
protected getPMOOptions(): {
|
|
@@ -23,12 +23,6 @@ export default class TemplateDelete extends PMOCommand {
|
|
|
23
23
|
description: 'Skip confirmation',
|
|
24
24
|
default: false,
|
|
25
25
|
}),
|
|
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
|
};
|
|
33
27
|
getPMOOptions() {
|
|
34
28
|
return { promptIfMultiple: false };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Flags } from '@oclif/core';
|
|
2
1
|
import { styles } from '../../lib/styles.js';
|
|
3
2
|
import { shouldOutputJson, outputPromptAsJson, buildPromptConfig, createMetadata } from '../../lib/prompt-json.js';
|
|
4
3
|
import { PromptCommand } from '../../lib/prompt-command.js';
|
|
4
|
+
import { machineOutputFlags } from '../../lib/pmo/index.js';
|
|
5
5
|
export default class Template extends PromptCommand {
|
|
6
6
|
static description = 'Manage templates (ticket and phase)';
|
|
7
7
|
static aliases = ['templates'];
|
|
@@ -12,12 +12,7 @@ export default class Template extends PromptCommand {
|
|
|
12
12
|
'<%= config.bin %> <%= command.id %> apply --type phase agile',
|
|
13
13
|
];
|
|
14
14
|
static flags = {
|
|
15
|
-
|
|
16
|
-
char: 'm',
|
|
17
|
-
aliases: ['machine'],
|
|
18
|
-
description: 'Output as JSON for AI agents/scripts',
|
|
19
|
-
default: false,
|
|
20
|
-
}),
|
|
15
|
+
...machineOutputFlags,
|
|
21
16
|
};
|
|
22
17
|
async run() {
|
|
23
18
|
const { flags } = await this.parse(Template);
|
|
@@ -7,6 +7,7 @@ export default class TemplateList extends PMOCommand {
|
|
|
7
7
|
builtin: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
8
|
custom: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
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
|
protected getPMOOptions(): {
|
|
@@ -25,12 +25,6 @@ export default class TemplateList extends PMOCommand {
|
|
|
25
25
|
description: 'Show only custom templates',
|
|
26
26
|
exclusive: ['builtin'],
|
|
27
27
|
}),
|
|
28
|
-
json: Flags.boolean({
|
|
29
|
-
char: 'm',
|
|
30
|
-
aliases: ['machine'],
|
|
31
|
-
description: 'Output as JSON',
|
|
32
|
-
default: false,
|
|
33
|
-
}),
|
|
34
28
|
};
|
|
35
29
|
getPMOOptions() {
|
|
36
30
|
return { promptIfMultiple: false };
|
|
@@ -50,7 +44,7 @@ export default class TemplateList extends PMOCommand {
|
|
|
50
44
|
showTicket ? this.storage.listTicketTemplates(builtinFilter) : Promise.resolve([]),
|
|
51
45
|
showPhase ? this.storage.listPhaseTemplates(builtinFilter) : Promise.resolve([]),
|
|
52
46
|
]);
|
|
53
|
-
if (flags.json) {
|
|
47
|
+
if (flags.json || flags.machine) {
|
|
54
48
|
const result = {};
|
|
55
49
|
if (showTicket)
|
|
56
50
|
result.ticket = ticketTemplates;
|