task-o-matic 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/dist/commands/init.js +41 -8
  2. package/dist/commands/tasks/create.d.ts.map +1 -1
  3. package/dist/commands/tasks/create.js +6 -13
  4. package/dist/commands/tasks/document/add.d.ts +3 -0
  5. package/dist/commands/tasks/document/add.d.ts.map +1 -0
  6. package/dist/commands/tasks/document/add.js +35 -0
  7. package/dist/commands/tasks/document/analyze.d.ts +3 -0
  8. package/dist/commands/tasks/document/analyze.d.ts.map +1 -0
  9. package/dist/commands/tasks/document/analyze.js +49 -0
  10. package/dist/commands/tasks/document/get.d.ts +3 -0
  11. package/dist/commands/tasks/document/get.d.ts.map +1 -0
  12. package/dist/commands/tasks/document/get.js +29 -0
  13. package/dist/commands/tasks/document/index.d.ts +8 -0
  14. package/dist/commands/tasks/document/index.d.ts.map +1 -0
  15. package/dist/commands/tasks/document/index.js +13 -0
  16. package/dist/commands/tasks/enhance.d.ts.map +1 -1
  17. package/dist/commands/tasks/enhance.js +64 -61
  18. package/dist/commands/tasks/execute-loop.d.ts.map +1 -1
  19. package/dist/commands/tasks/execute-loop.js +64 -90
  20. package/dist/commands/tasks/execute.d.ts.map +1 -1
  21. package/dist/commands/tasks/execute.js +52 -16
  22. package/dist/commands/tasks/list.js +2 -2
  23. package/dist/commands/tasks/next.js +4 -4
  24. package/dist/commands/tasks/plan/create.d.ts +3 -0
  25. package/dist/commands/tasks/plan/create.d.ts.map +1 -0
  26. package/dist/commands/tasks/plan/create.js +37 -0
  27. package/dist/commands/tasks/plan/delete.d.ts +3 -0
  28. package/dist/commands/tasks/plan/delete.d.ts.map +1 -0
  29. package/dist/commands/tasks/plan/delete.js +14 -0
  30. package/dist/commands/tasks/plan/get.d.ts +3 -0
  31. package/dist/commands/tasks/plan/get.d.ts.map +1 -0
  32. package/dist/commands/tasks/plan/get.js +24 -0
  33. package/dist/commands/tasks/plan/index.d.ts +10 -0
  34. package/dist/commands/tasks/plan/index.d.ts.map +1 -0
  35. package/dist/commands/tasks/plan/index.js +17 -0
  36. package/dist/commands/tasks/plan/list.d.ts +3 -0
  37. package/dist/commands/tasks/plan/list.d.ts.map +1 -0
  38. package/dist/commands/tasks/plan/list.js +21 -0
  39. package/dist/commands/tasks/plan/set.d.ts +3 -0
  40. package/dist/commands/tasks/plan/set.d.ts.map +1 -0
  41. package/dist/commands/tasks/plan/set.js +33 -0
  42. package/dist/commands/tasks/split.d.ts.map +1 -1
  43. package/dist/commands/tasks/split.js +65 -60
  44. package/dist/commands/tasks/status.js +2 -2
  45. package/dist/lib/ai-service/ai-operations.d.ts +1 -1
  46. package/dist/lib/ai-service/ai-operations.d.ts.map +1 -1
  47. package/dist/lib/ai-service/base-operations.d.ts +22 -0
  48. package/dist/lib/ai-service/base-operations.d.ts.map +1 -1
  49. package/dist/lib/ai-service/base-operations.js +29 -1
  50. package/dist/lib/ai-service/task-operations.d.ts +1 -1
  51. package/dist/lib/ai-service/task-operations.d.ts.map +1 -1
  52. package/dist/lib/better-t-stack-cli.d.ts +36 -21
  53. package/dist/lib/better-t-stack-cli.d.ts.map +1 -1
  54. package/dist/lib/better-t-stack-cli.js +212 -33
  55. package/dist/lib/bootstrap/cli-bootstrap.d.ts +14 -0
  56. package/dist/lib/bootstrap/cli-bootstrap.d.ts.map +1 -0
  57. package/dist/lib/bootstrap/cli-bootstrap.js +325 -0
  58. package/dist/lib/bootstrap/index.d.ts +4 -0
  59. package/dist/lib/bootstrap/index.d.ts.map +1 -0
  60. package/dist/lib/bootstrap/index.js +19 -0
  61. package/dist/lib/bootstrap/medusa-bootstrap.d.ts +14 -0
  62. package/dist/lib/bootstrap/medusa-bootstrap.d.ts.map +1 -0
  63. package/dist/lib/bootstrap/medusa-bootstrap.js +218 -0
  64. package/dist/lib/bootstrap/opentui-bootstrap.d.ts +11 -0
  65. package/dist/lib/bootstrap/opentui-bootstrap.d.ts.map +1 -0
  66. package/dist/lib/bootstrap/opentui-bootstrap.js +342 -0
  67. package/dist/lib/config.d.ts +14 -0
  68. package/dist/lib/config.d.ts.map +1 -1
  69. package/dist/lib/config.js +18 -0
  70. package/dist/lib/git-utils.d.ts +45 -0
  71. package/dist/lib/git-utils.d.ts.map +1 -0
  72. package/dist/lib/git-utils.js +160 -0
  73. package/dist/lib/task-execution-core.d.ts +7 -0
  74. package/dist/lib/task-execution-core.d.ts.map +1 -0
  75. package/dist/lib/task-execution-core.js +360 -0
  76. package/dist/lib/task-execution.d.ts +4 -0
  77. package/dist/lib/task-execution.d.ts.map +1 -1
  78. package/dist/lib/task-execution.js +31 -149
  79. package/dist/lib/task-loop-execution.d.ts +1 -19
  80. package/dist/lib/task-loop-execution.d.ts.map +1 -1
  81. package/dist/lib/task-loop-execution.js +50 -585
  82. package/dist/lib/task-planning.d.ts +28 -0
  83. package/dist/lib/task-planning.d.ts.map +1 -0
  84. package/dist/lib/task-planning.js +109 -0
  85. package/dist/lib/task-review.d.ts +27 -0
  86. package/dist/lib/task-review.d.ts.map +1 -0
  87. package/dist/lib/task-review.js +106 -0
  88. package/dist/lib/validation.d.ts +20 -3
  89. package/dist/lib/validation.d.ts.map +1 -1
  90. package/dist/lib/validation.js +39 -10
  91. package/dist/services/prd.d.ts.map +1 -1
  92. package/dist/services/prd.js +18 -45
  93. package/dist/services/tasks.d.ts +2 -2
  94. package/dist/services/tasks.d.ts.map +1 -1
  95. package/dist/services/tasks.js +55 -85
  96. package/dist/test/task-loop-git.test.js +6 -6
  97. package/dist/types/cli-options.d.ts +138 -0
  98. package/dist/types/cli-options.d.ts.map +1 -0
  99. package/dist/types/cli-options.js +6 -0
  100. package/dist/types/index.d.ts +74 -1
  101. package/dist/types/index.d.ts.map +1 -1
  102. package/dist/types/results.d.ts +60 -6
  103. package/dist/types/results.d.ts.map +1 -1
  104. package/dist/utils/bulk-operations.d.ts +51 -0
  105. package/dist/utils/bulk-operations.d.ts.map +1 -0
  106. package/dist/utils/bulk-operations.js +68 -0
  107. package/dist/utils/cli-validators.d.ts +54 -0
  108. package/dist/utils/cli-validators.d.ts.map +1 -0
  109. package/dist/utils/cli-validators.js +75 -0
  110. package/dist/utils/command-error-handler.d.ts +32 -0
  111. package/dist/utils/command-error-handler.d.ts.map +1 -0
  112. package/dist/utils/command-error-handler.js +52 -0
  113. package/dist/utils/confirmation.d.ts +19 -0
  114. package/dist/utils/confirmation.d.ts.map +1 -0
  115. package/dist/utils/confirmation.js +39 -0
  116. package/dist/utils/display-helpers.d.ts +81 -0
  117. package/dist/utils/display-helpers.d.ts.map +1 -0
  118. package/dist/utils/display-helpers.js +109 -0
  119. package/dist/utils/error-utils.d.ts +70 -0
  120. package/dist/utils/error-utils.d.ts.map +1 -0
  121. package/dist/utils/error-utils.js +103 -0
  122. package/dist/utils/file-utils.d.ts +49 -0
  123. package/dist/utils/file-utils.d.ts.map +1 -0
  124. package/dist/utils/file-utils.js +77 -0
  125. package/dist/utils/id-generator.d.ts +92 -0
  126. package/dist/utils/id-generator.d.ts.map +1 -0
  127. package/dist/utils/id-generator.js +140 -0
  128. package/dist/utils/model-executor-parser.d.ts +38 -0
  129. package/dist/utils/model-executor-parser.d.ts.map +1 -0
  130. package/dist/utils/model-executor-parser.js +67 -0
  131. package/dist/utils/progress-tracking.d.ts +28 -0
  132. package/dist/utils/progress-tracking.d.ts.map +1 -0
  133. package/dist/utils/progress-tracking.js +43 -0
  134. package/dist/utils/stack-formatter.d.ts +2 -1
  135. package/dist/utils/stack-formatter.d.ts.map +1 -1
  136. package/dist/utils/stack-formatter.js +8 -2
  137. package/dist/utils/storage-utils.d.ts +49 -0
  138. package/dist/utils/storage-utils.d.ts.map +1 -0
  139. package/dist/utils/storage-utils.js +79 -0
  140. package/dist/utils/streaming-utils.d.ts +38 -0
  141. package/dist/utils/streaming-utils.d.ts.map +1 -0
  142. package/dist/utils/streaming-utils.js +56 -0
  143. package/docs/agents/cli.md +58 -149
  144. package/package.json +1 -1
  145. package/dist/commands/tasks/document.d.ts +0 -5
  146. package/dist/commands/tasks/document.d.ts.map +0 -1
  147. package/dist/commands/tasks/document.js +0 -118
  148. package/dist/commands/tasks/plan.d.ts +0 -7
  149. package/dist/commands/tasks/plan.d.ts.map +0 -1
  150. package/dist/commands/tasks/plan.js +0 -131
@@ -7,40 +7,8 @@ exports.executeLoopCommand = void 0;
7
7
  const commander_1 = require("commander");
8
8
  const chalk_1 = __importDefault(require("chalk"));
9
9
  const task_loop_execution_1 = require("../../lib/task-loop-execution");
10
- // Valid executor tools
11
- const VALID_EXECUTORS = [
12
- "opencode",
13
- "claude",
14
- "gemini",
15
- "codex",
16
- ];
17
- /**
18
- * Parse --try-models option into ModelAttemptConfig array
19
- * Supports formats:
20
- * - "model1,model2,model3" - just models (uses default executor)
21
- * - "opencode:gpt-4o,claude:sonnet-4" - executor:model format
22
- * - Mixed: "gpt-4o,claude:sonnet-4,gemini:gemini-2.0"
23
- */
24
- function parseTryModels(value) {
25
- return value.split(",").map((item) => {
26
- const trimmed = item.trim();
27
- // Check if it includes executor specification (executor:model format)
28
- if (trimmed.includes(":")) {
29
- const [executor, model] = trimmed.split(":");
30
- if (!VALID_EXECUTORS.includes(executor)) {
31
- throw new Error(`Invalid executor "${executor}" in --try-models. Must be one of: ${VALID_EXECUTORS.join(", ")}`);
32
- }
33
- return {
34
- executor: executor,
35
- model: model.trim(),
36
- };
37
- }
38
- // Just a model name - use default executor
39
- return {
40
- model: trimmed,
41
- };
42
- });
43
- }
10
+ const model_executor_parser_1 = require("../../utils/model-executor-parser");
11
+ const command_error_handler_1 = require("../../utils/command-error-handler");
44
12
  exports.executeLoopCommand = new commander_1.Command("execute-loop")
45
13
  .description("Execute multiple tasks in a loop with retry logic and verification")
46
14
  .option("--status <status>", "Filter tasks by status (todo/in-progress/completed)")
@@ -52,6 +20,11 @@ exports.executeLoopCommand = new commander_1.Command("execute-loop")
52
20
  .option("--verify <command>", "Verification command to run after each task (can be used multiple times)", (value, previous = []) => {
53
21
  return [...previous, value];
54
22
  })
23
+ .option("--validate <command>", "Alias for --verify (validation command, can be used multiple times)", (value, previous = []) => {
24
+ return [...previous, value];
25
+ })
26
+ .option("--message <message>", "Custom message to send to the tool (overrides task plan)")
27
+ .option("--continue-session", "Continue the last session (for error feedback)", false)
55
28
  .option("--auto-commit", "Automatically commit changes after each task", false)
56
29
  .option("--plan", "Generate an implementation plan before execution", false)
57
30
  .option("--plan-model <model>", "Model/executor to use for planning (e.g., 'opencode:gpt-4o' or 'gpt-4o')")
@@ -59,65 +32,66 @@ exports.executeLoopCommand = new commander_1.Command("execute-loop")
59
32
  .option("--review", "Run AI review after execution", false)
60
33
  .option("--review-model <model>", "Model/executor to use for review (e.g., 'opencode:gpt-4o' or 'gpt-4o')")
61
34
  .option("--dry", "Show what would be executed without running it", false)
62
- .action(async (options) => {
63
- try {
64
- // Validate tool
65
- if (!VALID_EXECUTORS.includes(options.tool)) {
66
- console.error(chalk_1.default.red(`Invalid tool: ${options.tool}. Must be one of: ${VALID_EXECUTORS.join(", ")}`));
67
- process.exit(1);
68
- }
69
- // Parse tryModels if provided
70
- let tryModels;
71
- if (options.tryModels) {
72
- try {
73
- tryModels = parseTryModels(options.tryModels);
74
- console.log(chalk_1.default.cyan(`📊 Progressive model escalation configured with ${tryModels.length} model(s):`));
75
- tryModels.forEach((config, index) => {
76
- const executorInfo = config.executor
77
- ? `${config.executor}:`
78
- : "default:";
79
- const modelInfo = config.model || "default model";
80
- console.log(chalk_1.default.cyan(` ${index + 1}. ${executorInfo}${modelInfo}`));
81
- });
82
- console.log();
83
- }
84
- catch (error) {
85
- console.error(chalk_1.default.red(`Failed to parse --try-models: ${error instanceof Error ? error.message : "Unknown error"}`));
86
- process.exit(1);
87
- }
35
+ .action((0, command_error_handler_1.wrapCommandHandler)("Execute loop", async (options) => {
36
+ // Validate tool
37
+ if (!(0, model_executor_parser_1.validateExecutor)(options.tool)) {
38
+ console.error(chalk_1.default.red(`Invalid tool: ${options.tool}. Must be one of: ${model_executor_parser_1.VALID_EXECUTORS.join(", ")}`));
39
+ process.exit(1);
40
+ }
41
+ // Parse tryModels if provided
42
+ let tryModels;
43
+ if (options.tryModels) {
44
+ try {
45
+ tryModels = (0, model_executor_parser_1.parseTryModels)(options.tryModels);
46
+ console.log(chalk_1.default.cyan(`📊 Progressive model escalation configured with ${tryModels.length} model(s):`));
47
+ tryModels.forEach((config, index) => {
48
+ const executorInfo = config.executor
49
+ ? `${config.executor}:`
50
+ : "default:";
51
+ const modelInfo = config.model || "default model";
52
+ console.log(chalk_1.default.cyan(` ${index + 1}. ${executorInfo}${modelInfo}`));
53
+ });
54
+ console.log();
88
55
  }
89
- // Build options
90
- const executeOptions = {
91
- filters: {
92
- status: options.status,
93
- tag: options.tag,
94
- taskIds: options.ids,
95
- },
96
- tool: options.tool,
97
- config: {
98
- maxRetries: options.maxRetries,
99
- verificationCommands: options.verify || [],
100
- autoCommit: options.autoCommit,
101
- tryModels,
102
- plan: options.plan,
103
- planModel: options.planModel,
104
- reviewPlan: options.reviewPlan,
105
- review: options.review,
106
- reviewModel: options.reviewModel,
107
- },
108
- dry: options.dry,
109
- };
110
- // Execute task loop
111
- const result = await (0, task_loop_execution_1.executeTaskLoop)(executeOptions);
112
- // Exit with error code if any tasks failed
113
- if (result.failedTasks > 0) {
114
- console.error(chalk_1.default.red(`\n❌ ${result.failedTasks} task(s) failed. See logs above for details.`));
56
+ catch (error) {
57
+ console.error(chalk_1.default.red(`Failed to parse --try-models: ${error instanceof Error ? error.message : "Unknown error"}`));
115
58
  process.exit(1);
116
59
  }
117
- console.log(chalk_1.default.green(`\n✅ All ${result.completedTasks} task(s) completed successfully!`));
118
60
  }
119
- catch (error) {
120
- console.error(chalk_1.default.red("Execute loop failed:"), error instanceof Error ? error.message : "Unknown error");
61
+ // Combine both --verify and --validate options
62
+ const verifications = [
63
+ ...(options.verify || []),
64
+ ...(options.validate || []),
65
+ ];
66
+ // Build options
67
+ const executeOptions = {
68
+ filters: {
69
+ status: options.status,
70
+ tag: options.tag,
71
+ taskIds: options.ids,
72
+ },
73
+ tool: options.tool,
74
+ config: {
75
+ maxRetries: options.maxRetries,
76
+ verificationCommands: verifications,
77
+ autoCommit: options.autoCommit,
78
+ tryModels,
79
+ plan: options.plan,
80
+ planModel: options.planModel,
81
+ reviewPlan: options.reviewPlan,
82
+ review: options.review,
83
+ reviewModel: options.reviewModel,
84
+ customMessage: options.message, // NEW: custom message override
85
+ continueSession: options.continueSession, // NEW: session continuation
86
+ },
87
+ dry: options.dry,
88
+ };
89
+ // Execute task loop
90
+ const result = await (0, task_loop_execution_1.executeTaskLoop)(executeOptions);
91
+ // Exit with error code if any tasks failed
92
+ if (result.failedTasks > 0) {
93
+ console.error(chalk_1.default.red(`\n❌ ${result.failedTasks} task(s) failed. See logs above for details.`));
121
94
  process.exit(1);
122
95
  }
123
- });
96
+ console.log(chalk_1.default.green(`\n✅ All ${result.completedTasks} task(s) completed successfully!`));
97
+ }));
@@ -1 +1 @@
1
- {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/commands/tasks/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,cAAc,SA4CvB,CAAC"}
1
+ {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/commands/tasks/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,cAAc,SA6GtB,CAAC"}
@@ -7,6 +7,8 @@ exports.executeCommand = void 0;
7
7
  const commander_1 = require("commander");
8
8
  const chalk_1 = __importDefault(require("chalk"));
9
9
  const task_execution_1 = require("../../lib/task-execution");
10
+ const model_executor_parser_1 = require("../../utils/model-executor-parser");
11
+ const command_error_handler_1 = require("../../utils/command-error-handler");
10
12
  exports.executeCommand = new commander_1.Command("execute")
11
13
  .description("Execute a task using an external coding assistant")
12
14
  .requiredOption("--id <id>", "Task ID to execute")
@@ -15,23 +17,57 @@ exports.executeCommand = new commander_1.Command("execute")
15
17
  .option("-m, --model <model>", "Model to use with the executor")
16
18
  .option("--continue-session", "Continue the last session (for error feedback)", false)
17
19
  .option("--dry", "Show what would be executed without running it")
18
- .option("--validate <command>", "Validation command to run after execution (can be used multiple times)", (value, previous = []) => {
20
+ .option("--validate <command>", "Validation/verification command to run after execution (can be used multiple times)", (value, previous = []) => {
19
21
  return [...previous, value];
20
22
  })
21
- .action(async (options) => {
22
- try {
23
- await (0, task_execution_1.executeTask)({
24
- taskId: options.id,
25
- tool: options.tool,
26
- message: options.message,
27
- model: options.model,
28
- continueSession: options.continueSession,
29
- dry: options.dry,
30
- validate: options.validate || [],
31
- });
32
- }
33
- catch (error) {
34
- console.error(chalk_1.default.red("Execution failed:"), error instanceof Error ? error.message : "Unknown error");
23
+ .option("--verify <command>", "Alias for --validate (verification command)", (value, previous = []) => {
24
+ return [...previous, value];
25
+ })
26
+ .option("--max-retries <number>", "Maximum number of retries (opt-in, enables retry logic)", (value) => parseInt(value, 10))
27
+ .option("--try-models <models>", "Progressive model/executor configs for retries (e.g., 'gpt-4o-mini,claude:sonnet-4')")
28
+ .option("--plan", "Generate an implementation plan before execution", false)
29
+ .option("--plan-model <model>", "Model/executor to use for planning (e.g., 'opencode:gpt-4o' or 'gpt-4o')")
30
+ .option("--review-plan", "Pause for human review of the plan", false)
31
+ .option("--review", "Run AI review after execution", false)
32
+ .option("--review-model <model>", "Model/executor to use for review (e.g., 'opencode:gpt-4o' or 'gpt-4o')")
33
+ .option("--auto-commit", "Automatically commit changes after execution", false)
34
+ .action((0, command_error_handler_1.wrapCommandHandler)("Task execution", async (options) => {
35
+ // Validate executor tool
36
+ if (!(0, model_executor_parser_1.validateExecutor)(options.tool)) {
37
+ console.error(chalk_1.default.red(`Invalid tool: ${options.tool}. Must be one of: ${model_executor_parser_1.VALID_EXECUTORS.join(", ")}`));
35
38
  process.exit(1);
36
39
  }
37
- });
40
+ // Combine both --validate and --verify options
41
+ const validations = [
42
+ ...(options.validate || []),
43
+ ...(options.verify || []),
44
+ ];
45
+ // Parse tryModels if provided
46
+ let tryModels;
47
+ if (options.tryModels) {
48
+ try {
49
+ tryModels = (0, model_executor_parser_1.parseTryModels)(options.tryModels);
50
+ }
51
+ catch (error) {
52
+ console.error(chalk_1.default.red(`Failed to parse --try-models: ${error instanceof Error ? error.message : "Unknown error"}`));
53
+ process.exit(1);
54
+ }
55
+ }
56
+ await (0, task_execution_1.executeTask)({
57
+ taskId: options.id,
58
+ tool: options.tool,
59
+ message: options.message,
60
+ model: options.model,
61
+ continueSession: options.continueSession,
62
+ dry: options.dry,
63
+ validate: validations,
64
+ maxRetries: options.maxRetries,
65
+ tryModels,
66
+ plan: options.plan,
67
+ planModel: options.planModel,
68
+ reviewPlan: options.reviewPlan,
69
+ review: options.review,
70
+ reviewModel: options.reviewModel,
71
+ autoCommit: options.autoCommit,
72
+ });
73
+ }));
@@ -7,8 +7,8 @@ const task_1 = require("../../cli/display/task");
7
7
  const progress_1 = require("../../cli/display/progress");
8
8
  exports.listCommand = new commander_1.Command("list")
9
9
  .description("List all tasks")
10
- .option("--status <status>", "Filter by status (todo/in-progress/completed)")
11
- .option("--tag <tag>", "Filter by tag")
10
+ .option("-s, --status <status>", "Filter by status (todo/in-progress/completed)")
11
+ .option("-t, --tag <tag>", "Filter by tag")
12
12
  .action(async (options) => {
13
13
  try {
14
14
  const tasks = await tasks_1.taskService.listTasks({
@@ -11,10 +11,10 @@ const task_1 = require("../../cli/display/task");
11
11
  const progress_1 = require("../../cli/display/progress");
12
12
  exports.nextCommand = new commander_1.Command("get-next")
13
13
  .description("Get the next task to work on (defaults to hierarchical order)")
14
- .option("--status <status>", "Filter by status (todo/in-progress)")
15
- .option("--tag <tag>", "Filter by tag")
16
- .option("--effort <effort>", "Filter by effort (small/medium/large)")
17
- .option("--priority <priority>", "Sort priority (newest/oldest/effort)", "hierarchical")
14
+ .option("-s, --status <status>", "Filter by status (todo/in-progress)")
15
+ .option("-t, --tag <tag>", "Filter by tag")
16
+ .option("-e, --effort <effort>", "Filter by effort (small/medium/large)")
17
+ .option("-p, --priority <priority>", "Sort priority (newest/oldest/effort)", "hierarchical")
18
18
  .action(async (options) => {
19
19
  try {
20
20
  // Default to todo status if not specified
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const planCommand: Command;
3
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/commands/tasks/plan/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,eAAO,MAAM,WAAW,SAmCnB,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.planCommand = void 0;
7
+ const commander_1 = require("commander");
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const tasks_1 = require("../../../services/tasks");
10
+ const streaming_options_1 = require("../../../utils/streaming-options");
11
+ const plan_1 = require("../../../cli/display/plan");
12
+ const progress_tracking_1 = require("../../../utils/progress-tracking");
13
+ const command_error_handler_1 = require("../../../utils/command-error-handler");
14
+ exports.planCommand = new commander_1.Command("plan")
15
+ .description("Create detailed implementation plan for a task or subtask")
16
+ .requiredOption("--id <id>", "Task or subtask ID to plan")
17
+ .option("--stream", "Show streaming AI output during planning")
18
+ .option("--ai-provider <provider>", "AI provider override")
19
+ .option("--ai-model <model>", "AI model override")
20
+ .option("--ai-key <key>", "AI API key override")
21
+ .option("--ai-provider-url <url>", "AI provider URL override")
22
+ .option("--reasoning <tokens>", "Enable reasoning for OpenRouter models (max reasoning tokens)")
23
+ .action((0, command_error_handler_1.wrapCommandHandler)("Task planning", async (options) => {
24
+ const streamingOptions = (0, streaming_options_1.createStreamingOptions)(options.stream, "Planning");
25
+ const result = await (0, progress_tracking_1.withProgressTracking)(async () => {
26
+ return await tasks_1.taskService.planTask(options.id, {
27
+ aiProvider: options.aiProvider,
28
+ aiModel: options.aiModel,
29
+ aiKey: options.aiKey,
30
+ aiProviderUrl: options.aiProviderUrl,
31
+ aiReasoning: options.reasoning,
32
+ }, streamingOptions);
33
+ });
34
+ // Display the plan
35
+ (0, plan_1.displayPlanCreation)(options.id, result.task.title);
36
+ console.log(chalk_1.default.cyan(result.plan));
37
+ }));
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const deletePlanCommand: Command;
3
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/commands/tasks/plan/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,iBAAiB,SAMzB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deletePlanCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const tasks_1 = require("../../../services/tasks");
6
+ const plan_1 = require("../../../cli/display/plan");
7
+ const command_error_handler_1 = require("../../../utils/command-error-handler");
8
+ exports.deletePlanCommand = new commander_1.Command("delete-plan")
9
+ .description("Delete implementation plan for a task")
10
+ .requiredOption("--id <id>", "Task ID")
11
+ .action((0, command_error_handler_1.wrapCommandHandler)("Delete plan", async (options) => {
12
+ const success = await tasks_1.taskService.deleteTaskPlan(options.id);
13
+ (0, plan_1.displayPlanDeletion)(options.id, success);
14
+ }));
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const getPlanCommand: Command;
3
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/commands/tasks/plan/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,cAAc,SAuBtB,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getPlanCommand = void 0;
7
+ const commander_1 = require("commander");
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const tasks_1 = require("../../../services/tasks");
10
+ const plan_1 = require("../../../cli/display/plan");
11
+ const command_error_handler_1 = require("../../../utils/command-error-handler");
12
+ exports.getPlanCommand = new commander_1.Command("get-plan")
13
+ .description("View existing implementation plan for a task or subtask")
14
+ .requiredOption("--id <id>", "Task or subtask ID")
15
+ .action((0, command_error_handler_1.wrapCommandHandler)("Get plan", async (options) => {
16
+ const plan = await tasks_1.taskService.getTaskPlan(options.id);
17
+ if (!plan) {
18
+ console.log(chalk_1.default.yellow(`⚠️ No plan found for task/subtask ${options.id}`));
19
+ return;
20
+ }
21
+ const task = await tasks_1.taskService.getTask(options.id);
22
+ const taskTitle = task ? task.title : options.id;
23
+ (0, plan_1.displayPlanView)(taskTitle, options.id, plan.plan, plan.createdAt, plan.updatedAt);
24
+ }));
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Plan command submodules
3
+ * Each command is in its own file for better organization
4
+ */
5
+ export { planCommand } from "./create";
6
+ export { getPlanCommand } from "./get";
7
+ export { listPlanCommand } from "./list";
8
+ export { deletePlanCommand } from "./delete";
9
+ export { setPlanCommand } from "./set";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tasks/plan/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * Plan command submodules
4
+ * Each command is in its own file for better organization
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.setPlanCommand = exports.deletePlanCommand = exports.listPlanCommand = exports.getPlanCommand = exports.planCommand = void 0;
8
+ var create_1 = require("./create");
9
+ Object.defineProperty(exports, "planCommand", { enumerable: true, get: function () { return create_1.planCommand; } });
10
+ var get_1 = require("./get");
11
+ Object.defineProperty(exports, "getPlanCommand", { enumerable: true, get: function () { return get_1.getPlanCommand; } });
12
+ var list_1 = require("./list");
13
+ Object.defineProperty(exports, "listPlanCommand", { enumerable: true, get: function () { return list_1.listPlanCommand; } });
14
+ var delete_1 = require("./delete");
15
+ Object.defineProperty(exports, "deletePlanCommand", { enumerable: true, get: function () { return delete_1.deletePlanCommand; } });
16
+ var set_1 = require("./set");
17
+ Object.defineProperty(exports, "setPlanCommand", { enumerable: true, get: function () { return set_1.setPlanCommand; } });
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const listPlanCommand: Command;
3
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/tasks/plan/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,eAAe,SAiBvB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listPlanCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const tasks_1 = require("../../../services/tasks");
6
+ const plan_1 = require("../../../cli/display/plan");
7
+ const command_error_handler_1 = require("../../../utils/command-error-handler");
8
+ exports.listPlanCommand = new commander_1.Command("list-plan")
9
+ .description("List all available implementation plans")
10
+ .action((0, command_error_handler_1.wrapCommandHandler)("List plans", async () => {
11
+ const plans = await tasks_1.taskService.listTaskPlans();
12
+ // Get task titles for each plan
13
+ const plansWithTitles = await Promise.all(plans.map(async (plan) => {
14
+ const task = await tasks_1.taskService.getTask(plan.taskId);
15
+ return {
16
+ ...plan,
17
+ taskTitle: task ? task.title : plan.taskId,
18
+ };
19
+ }));
20
+ (0, plan_1.displayPlanList)(plansWithTitles);
21
+ }));
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const setPlanCommand: Command;
3
+ //# sourceMappingURL=set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../../src/commands/tasks/plan/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,cAAc,SAiCtB,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.setPlanCommand = void 0;
7
+ const commander_1 = require("commander");
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const tasks_1 = require("../../../services/tasks");
10
+ const command_error_handler_1 = require("../../../utils/command-error-handler");
11
+ exports.setPlanCommand = new commander_1.Command("set-plan")
12
+ .description("Set implementation plan for a task")
13
+ .requiredOption("--id <id>", "Task ID")
14
+ .option("--plan <text>", "Plan text (use quotes for multi-line)")
15
+ .option("--plan-file <path>", "Path to file containing the plan")
16
+ .action((0, command_error_handler_1.wrapCommandHandler)("Set plan", async (options) => {
17
+ const task = await tasks_1.taskService.getTask(options.id);
18
+ if (!task) {
19
+ throw new Error(`Task with ID ${options.id} not found`);
20
+ }
21
+ if (!options.plan && !options.planFile) {
22
+ throw new Error("Either --plan or --plan-file must be specified");
23
+ }
24
+ if (options.plan && options.planFile) {
25
+ throw new Error("Cannot specify both --plan and --plan-file");
26
+ }
27
+ const result = await tasks_1.taskService.setTaskPlan(options.id, options.plan || undefined, options.planFile || undefined);
28
+ console.log(chalk_1.default.green(`✓ Plan set for task: ${task.title} (${options.id})`));
29
+ console.log(chalk_1.default.gray(` Plan file: ${result.planFile}`));
30
+ if (options.planFile) {
31
+ console.log(chalk_1.default.gray(` Source file: ${options.planFile}`));
32
+ }
33
+ }));
@@ -1 +1 @@
1
- {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/commands/tasks/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,eAAO,MAAM,YAAY,SAyHrB,CAAC"}
1
+ {"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/commands/tasks/split.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,eAAO,MAAM,YAAY,SAsHpB,CAAC"}