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
@@ -1,16 +1,50 @@
1
1
  import { Task, TaskAIMetadata, DocumentationDetection } from "./index";
2
- export interface OperationResult<T = any> {
3
- success: boolean;
4
- data?: T;
5
- error?: string;
2
+ /**
3
+ * Generic operation result using discriminated union pattern.
4
+ * Prevents invalid states like { success: true, error: "..." }
5
+ *
6
+ * Note: This type uses discriminated unions for operations that may return
7
+ * either success or failure. Most task operations throw exceptions on error
8
+ * instead of returning error results.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const result: OperationResult<Task> =
13
+ * condition
14
+ * ? { success: true, data: task }
15
+ * : { success: false, error: "Task not found" };
16
+ *
17
+ * if (result.success) {
18
+ * console.log(result.data.title); // ✓ TypeScript knows data exists
19
+ * } else {
20
+ * console.error(result.error); // ✓ TypeScript knows error exists
21
+ * }
22
+ * ```
23
+ */
24
+ export type OperationResult<T = any> = {
25
+ success: true;
26
+ data: T;
6
27
  stats?: Record<string, any>;
7
28
  metadata?: Record<string, any>;
8
- }
29
+ } | {
30
+ success: false;
31
+ error: string;
32
+ stats?: Record<string, any>;
33
+ metadata?: Record<string, any>;
34
+ };
35
+ /**
36
+ * Result of task creation operation.
37
+ * Always returns success; throws exception on error.
38
+ */
9
39
  export interface CreateTaskResult {
10
40
  success: true;
11
41
  task: Task;
12
42
  aiMetadata?: TaskAIMetadata;
13
43
  }
44
+ /**
45
+ * Result of task enhancement operation.
46
+ * Always returns success; throws exception on error.
47
+ */
14
48
  export interface EnhanceTaskResult {
15
49
  success: true;
16
50
  task: Task;
@@ -33,6 +67,10 @@ export interface EnhanceTaskResult {
33
67
  confidence: number;
34
68
  };
35
69
  }
70
+ /**
71
+ * Result of task splitting operation.
72
+ * Always returns success; throws exception on error.
73
+ */
36
74
  export interface SplitTaskResult {
37
75
  success: true;
38
76
  task: Task;
@@ -54,6 +92,10 @@ export interface SplitTaskResult {
54
92
  confidence?: number;
55
93
  };
56
94
  }
95
+ /**
96
+ * Result of task planning operation.
97
+ * Always returns success; throws exception on error.
98
+ */
57
99
  export interface PlanTaskResult {
58
100
  success: true;
59
101
  task: Task;
@@ -73,6 +115,10 @@ export interface PlanTaskResult {
73
115
  aiModel: string;
74
116
  };
75
117
  }
118
+ /**
119
+ * Result of task documentation operation.
120
+ * Always returns success; throws exception on error.
121
+ */
76
122
  export interface DocumentTaskResult {
77
123
  success: true;
78
124
  task: Task;
@@ -82,13 +128,21 @@ export interface DocumentTaskResult {
82
128
  duration: number;
83
129
  };
84
130
  }
131
+ /**
132
+ * Result of task deletion operation.
133
+ * Always returns success; throws exception on error.
134
+ */
85
135
  export interface DeleteTaskResult {
86
136
  success: true;
87
137
  deleted: Task[];
88
138
  orphanedSubtasks: Task[];
89
139
  }
140
+ /**
141
+ * Result of PRD parsing operation.
142
+ * Always returns success; throws exception on error.
143
+ */
90
144
  export interface PRDParseResult {
91
- success: boolean;
145
+ success: true;
92
146
  prd: {
93
147
  overview: string;
94
148
  objectives: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../src/types/results.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEvE,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,GAAG;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;I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E,WAAW,GAAG,QAAQ,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,GAAG,CAAC;KACf,EAAE,CAAC;CACL"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Configuration for bulk operation execution
3
+ */
4
+ export interface BulkOperationConfig<T = void> {
5
+ /** Name of the operation (e.g., "Enhancing", "Splitting") */
6
+ operationName: string;
7
+ /** Emoji to display before operation name (optional) */
8
+ operationEmoji?: string;
9
+ /** Custom success message function (optional) */
10
+ successMessage?: (taskId: string, result: T) => string;
11
+ /** Custom error message function (optional) */
12
+ errorMessage?: (taskId: string, error: Error) => string;
13
+ /** Optional filters for task selection */
14
+ filters?: {
15
+ status?: string;
16
+ tag?: string;
17
+ };
18
+ }
19
+ /**
20
+ * Result of a bulk operation execution
21
+ */
22
+ export interface BulkOperationResult {
23
+ /** Task IDs that succeeded */
24
+ succeeded: string[];
25
+ /** Tasks that failed with their errors */
26
+ failed: Array<{
27
+ id: string;
28
+ error: Error;
29
+ }>;
30
+ }
31
+ /**
32
+ * Execute an operation on multiple tasks with consistent error handling and progress reporting
33
+ *
34
+ * @param operation - The async function to execute for each task
35
+ * @param config - Configuration for the bulk operation
36
+ * @returns Result containing succeeded and failed task IDs
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * const result = await executeBulkOperation(
41
+ * (taskId) => taskService.enhanceTask(taskId),
42
+ * {
43
+ * operationName: "Enhancing",
44
+ * operationEmoji: "🤖",
45
+ * filters: { status: "todo", tag: "bug" },
46
+ * }
47
+ * );
48
+ * ```
49
+ */
50
+ export declare function executeBulkOperation<T>(operation: (taskId: string) => Promise<T>, config: BulkOperationConfig<T>): Promise<BulkOperationResult>;
51
+ //# sourceMappingURL=bulk-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk-operations.d.ts","sourceRoot":"","sources":["../../src/utils/bulk-operations.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,IAAI;IAC3C,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IAEtB,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,iDAAiD;IACjD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC;IAEvD,+CAA+C;IAC/C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;IAExD,0CAA0C;IAC1C,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB,0CAA0C;IAC1C,MAAM,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,EACzC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CA4D9B"}
@@ -0,0 +1,68 @@
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.executeBulkOperation = executeBulkOperation;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const tasks_1 = require("../services/tasks");
9
+ /**
10
+ * Execute an operation on multiple tasks with consistent error handling and progress reporting
11
+ *
12
+ * @param operation - The async function to execute for each task
13
+ * @param config - Configuration for the bulk operation
14
+ * @returns Result containing succeeded and failed task IDs
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * const result = await executeBulkOperation(
19
+ * (taskId) => taskService.enhanceTask(taskId),
20
+ * {
21
+ * operationName: "Enhancing",
22
+ * operationEmoji: "🤖",
23
+ * filters: { status: "todo", tag: "bug" },
24
+ * }
25
+ * );
26
+ * ```
27
+ */
28
+ async function executeBulkOperation(operation, config) {
29
+ // Fetch tasks with optional filters
30
+ const tasks = await tasks_1.taskService.listTasks(config.filters || {});
31
+ if (tasks.length === 0) {
32
+ console.log(chalk_1.default.yellow(`No tasks found to ${config.operationName.toLowerCase()}`));
33
+ return { succeeded: [], failed: [] };
34
+ }
35
+ const emoji = config.operationEmoji || "🔄";
36
+ console.log(chalk_1.default.blue(`${emoji} ${config.operationName} ${tasks.length} tasks...`));
37
+ const succeeded = [];
38
+ const failed = [];
39
+ // Process each task
40
+ for (let i = 0; i < tasks.length; i++) {
41
+ const task = tasks[i];
42
+ console.log(chalk_1.default.cyan(`\n[${i + 1}/${tasks.length}] ${config.operationName} ${task.title}`));
43
+ try {
44
+ const result = await operation(task.id);
45
+ succeeded.push(task.id);
46
+ const msg = config.successMessage
47
+ ? config.successMessage(task.id, result)
48
+ : `✓ ${config.operationName} task ${task.id}`;
49
+ console.log(chalk_1.default.green(msg));
50
+ }
51
+ catch (error) {
52
+ const err = error instanceof Error ? error : new Error(String(error));
53
+ failed.push({ id: task.id, error: err });
54
+ const msg = config.errorMessage
55
+ ? config.errorMessage(task.id, err)
56
+ : `❌ Failed to ${config.operationName.toLowerCase()} ${task.id}: ${err.message}`;
57
+ console.log(chalk_1.default.red(msg));
58
+ }
59
+ }
60
+ // Print summary
61
+ console.log(chalk_1.default.blue(`\n${"=".repeat(60)}`));
62
+ console.log(chalk_1.default.green(`✓ ${succeeded.length} tasks succeeded`));
63
+ if (failed.length > 0) {
64
+ console.log(chalk_1.default.red(`❌ ${failed.length} tasks failed`));
65
+ }
66
+ console.log(chalk_1.default.blue(`${"=".repeat(60)}\n`));
67
+ return { succeeded, failed };
68
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Validate that exactly one of two mutually exclusive options is provided
3
+ *
4
+ * @param options - The command options object
5
+ * @param field1 - First field name in options
6
+ * @param field2 - Second field name in options
7
+ * @param field1Label - Display label for first field (defaults to field1)
8
+ * @param field2Label - Display label for second field (defaults to field2)
9
+ * @throws Error if neither or both fields are provided
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * validateMutuallyExclusive(options, "taskId", "all", "task-id", "all");
14
+ * ```
15
+ */
16
+ export declare function validateMutuallyExclusive(options: any, field1: string, field2: string, field1Label?: string, field2Label?: string): void;
17
+ /**
18
+ * Field specification for validateOneRequired
19
+ */
20
+ export interface FieldSpec {
21
+ name: string;
22
+ label: string;
23
+ }
24
+ /**
25
+ * Validate that exactly one of multiple mutually exclusive options is provided
26
+ *
27
+ * @param options - The command options object
28
+ * @param fields - Array of field specifications
29
+ * @throws Error if none or multiple fields are provided
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * validateOneRequired(options,
34
+ * { name: "taskId", label: "task-id" },
35
+ * { name: "all", label: "all" },
36
+ * { name: "status", label: "status" }
37
+ * );
38
+ * ```
39
+ */
40
+ export declare function validateOneRequired(options: any, ...fields: FieldSpec[]): void;
41
+ /**
42
+ * Parse a comma-separated string option into an array of trimmed non-empty strings
43
+ *
44
+ * @param value - Comma-separated string value
45
+ * @returns Array of trimmed non-empty strings
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * const ids = parseCsvOption("1, 2, 3"); // ["1", "2", "3"]
50
+ * const tags = parseCsvOption("bug,feature, "); // ["bug", "feature"]
51
+ * ```
52
+ */
53
+ export declare function parseCsvOption(value: string): string[];
54
+ //# sourceMappingURL=cli-validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-validators.d.ts","sourceRoot":"","sources":["../../src/utils/cli-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,MAAe,EAC5B,WAAW,GAAE,MAAe,GAC3B,IAAI,CAcN;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,EACZ,GAAG,MAAM,EAAE,SAAS,EAAE,GACrB,IAAI,CAWN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAKtD"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateMutuallyExclusive = validateMutuallyExclusive;
4
+ exports.validateOneRequired = validateOneRequired;
5
+ exports.parseCsvOption = parseCsvOption;
6
+ /**
7
+ * Validate that exactly one of two mutually exclusive options is provided
8
+ *
9
+ * @param options - The command options object
10
+ * @param field1 - First field name in options
11
+ * @param field2 - Second field name in options
12
+ * @param field1Label - Display label for first field (defaults to field1)
13
+ * @param field2Label - Display label for second field (defaults to field2)
14
+ * @throws Error if neither or both fields are provided
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * validateMutuallyExclusive(options, "taskId", "all", "task-id", "all");
19
+ * ```
20
+ */
21
+ function validateMutuallyExclusive(options, field1, field2, field1Label = field1, field2Label = field2) {
22
+ const has1 = Boolean(options[field1]);
23
+ const has2 = Boolean(options[field2]);
24
+ if (!has1 && !has2) {
25
+ throw new Error(`Either --${field1Label} or --${field2Label} must be specified`);
26
+ }
27
+ if (has1 && has2) {
28
+ throw new Error(`Cannot specify both --${field1Label} and --${field2Label}`);
29
+ }
30
+ }
31
+ /**
32
+ * Validate that exactly one of multiple mutually exclusive options is provided
33
+ *
34
+ * @param options - The command options object
35
+ * @param fields - Array of field specifications
36
+ * @throws Error if none or multiple fields are provided
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * validateOneRequired(options,
41
+ * { name: "taskId", label: "task-id" },
42
+ * { name: "all", label: "all" },
43
+ * { name: "status", label: "status" }
44
+ * );
45
+ * ```
46
+ */
47
+ function validateOneRequired(options, ...fields) {
48
+ const provided = fields.filter((f) => Boolean(options[f.name]));
49
+ if (provided.length === 0) {
50
+ const labels = fields.map((f) => `--${f.label}`).join(", ");
51
+ throw new Error(`One of ${labels} must be specified`);
52
+ }
53
+ if (provided.length > 1) {
54
+ const labels = provided.map((f) => `--${f.label}`).join(", ");
55
+ throw new Error(`Cannot specify multiple options: ${labels}`);
56
+ }
57
+ }
58
+ /**
59
+ * Parse a comma-separated string option into an array of trimmed non-empty strings
60
+ *
61
+ * @param value - Comma-separated string value
62
+ * @returns Array of trimmed non-empty strings
63
+ *
64
+ * @example
65
+ * ```typescript
66
+ * const ids = parseCsvOption("1, 2, 3"); // ["1", "2", "3"]
67
+ * const tags = parseCsvOption("bug,feature, "); // ["bug", "feature"]
68
+ * ```
69
+ */
70
+ function parseCsvOption(value) {
71
+ return value
72
+ .split(",")
73
+ .map((x) => x.trim())
74
+ .filter(Boolean);
75
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Handle command errors with consistent formatting and exit behavior
3
+ *
4
+ * @param operationName - Name of the operation that failed (e.g., "Task enhancement", "Task execution")
5
+ * @param error - The error that occurred
6
+ * @returns Never returns (exits process with code 1)
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * catch (error) {
11
+ * handleCommandError("Task enhancement", error);
12
+ * }
13
+ * ```
14
+ */
15
+ export declare function handleCommandError(operationName: string, error: unknown): never;
16
+ /**
17
+ * Wrap a command handler function with automatic error handling
18
+ *
19
+ * @param operationName - Name of the operation for error messages
20
+ * @param handler - The async command handler function
21
+ * @returns Wrapped handler function with error handling
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * .action(wrapCommandHandler("Task enhancement", async (options) => {
26
+ * // command logic that might throw
27
+ * await taskService.enhanceTask(options.taskId);
28
+ * }))
29
+ * ```
30
+ */
31
+ export declare function wrapCommandHandler<T extends any[]>(operationName: string, handler: (...args: T) => Promise<void>): (...args: T) => Promise<void>;
32
+ //# sourceMappingURL=command-error-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-error-handler.d.ts","sourceRoot":"","sources":["../../src/utils/command-error-handler.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,OAAO,GACb,KAAK,CAIP;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,GAAG,EAAE,EAChD,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GACrC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAQ/B"}
@@ -0,0 +1,52 @@
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.handleCommandError = handleCommandError;
7
+ exports.wrapCommandHandler = wrapCommandHandler;
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ /**
10
+ * Handle command errors with consistent formatting and exit behavior
11
+ *
12
+ * @param operationName - Name of the operation that failed (e.g., "Task enhancement", "Task execution")
13
+ * @param error - The error that occurred
14
+ * @returns Never returns (exits process with code 1)
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * catch (error) {
19
+ * handleCommandError("Task enhancement", error);
20
+ * }
21
+ * ```
22
+ */
23
+ function handleCommandError(operationName, error) {
24
+ const message = error instanceof Error ? error.message : "Unknown error";
25
+ console.error(chalk_1.default.red(`${operationName} failed:`), message);
26
+ process.exit(1);
27
+ }
28
+ /**
29
+ * Wrap a command handler function with automatic error handling
30
+ *
31
+ * @param operationName - Name of the operation for error messages
32
+ * @param handler - The async command handler function
33
+ * @returns Wrapped handler function with error handling
34
+ *
35
+ * @example
36
+ * ```typescript
37
+ * .action(wrapCommandHandler("Task enhancement", async (options) => {
38
+ * // command logic that might throw
39
+ * await taskService.enhanceTask(options.taskId);
40
+ * }))
41
+ * ```
42
+ */
43
+ function wrapCommandHandler(operationName, handler) {
44
+ return async (...args) => {
45
+ try {
46
+ await handler(...args);
47
+ }
48
+ catch (error) {
49
+ handleCommandError(operationName, error);
50
+ }
51
+ };
52
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Ask for user confirmation before performing a bulk operation
3
+ *
4
+ * @param operationName - Name of the operation (e.g., "enhance", "split")
5
+ * @param taskCount - Number of tasks that will be affected
6
+ * @param force - If true, skip confirmation and return true
7
+ * @returns Promise resolving to true if confirmed, false otherwise
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const confirmed = await confirmBulkOperation("enhance", 10, options.force);
12
+ * if (!confirmed) {
13
+ * console.log(chalk.yellow("Operation cancelled"));
14
+ * return;
15
+ * }
16
+ * ```
17
+ */
18
+ export declare function confirmBulkOperation(operationName: string, taskCount: number, force?: boolean): Promise<boolean>;
19
+ //# sourceMappingURL=confirmation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../../src/utils/confirmation.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,OAAe,GACrB,OAAO,CAAC,OAAO,CAAC,CAmBlB"}
@@ -0,0 +1,39 @@
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.confirmBulkOperation = confirmBulkOperation;
7
+ const inquirer_1 = __importDefault(require("inquirer"));
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ /**
10
+ * Ask for user confirmation before performing a bulk operation
11
+ *
12
+ * @param operationName - Name of the operation (e.g., "enhance", "split")
13
+ * @param taskCount - Number of tasks that will be affected
14
+ * @param force - If true, skip confirmation and return true
15
+ * @returns Promise resolving to true if confirmed, false otherwise
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * const confirmed = await confirmBulkOperation("enhance", 10, options.force);
20
+ * if (!confirmed) {
21
+ * console.log(chalk.yellow("Operation cancelled"));
22
+ * return;
23
+ * }
24
+ * ```
25
+ */
26
+ async function confirmBulkOperation(operationName, taskCount, force = false) {
27
+ if (force)
28
+ return true;
29
+ console.log(chalk_1.default.yellow(`\n⚠️ This will ${operationName.toLowerCase()} ${taskCount} task(s).`));
30
+ const { confirmed } = await inquirer_1.default.prompt([
31
+ {
32
+ type: "confirm",
33
+ name: "confirmed",
34
+ message: `Are you sure you want to proceed?`,
35
+ default: false,
36
+ },
37
+ ]);
38
+ return confirmed;
39
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Display the start of an operation
3
+ *
4
+ * @param operation - Name of the operation (e.g., "Enhancing", "Splitting")
5
+ * @param target - Target of the operation (e.g., task title, file name)
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * displayOperationStart("Enhancing", "task-123");
10
+ * // Output: 🚀 Enhancing task-123...
11
+ * ```
12
+ */
13
+ export declare function displayOperationStart(operation: string, target: string): void;
14
+ /**
15
+ * Display successful completion of an operation
16
+ *
17
+ * @param operation - Name of the operation
18
+ * @param details - Optional details to append
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * displayOperationSuccess("Enhancement", "with Context7");
23
+ * // Output: ✅ Enhancement completed successfully: with Context7
24
+ * ```
25
+ */
26
+ export declare function displayOperationSuccess(operation: string, details?: string): void;
27
+ /**
28
+ * Display an operation error
29
+ *
30
+ * @param operation - Name of the operation
31
+ * @param error - The error that occurred
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * displayOperationError("Enhancement", new Error("API failed"));
36
+ * // Output: ❌ Enhancement failed: API failed
37
+ * ```
38
+ */
39
+ export declare function displayOperationError(operation: string, error: Error): void;
40
+ /**
41
+ * Display progress in a bulk operation
42
+ *
43
+ * @param current - Current item number (1-indexed)
44
+ * @param total - Total number of items
45
+ * @param operation - Operation being performed
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * displayBulkProgress(3, 10, "Enhancing task ABC");
50
+ * // Output: [3/10] Enhancing task ABC...
51
+ * ```
52
+ */
53
+ export declare function displayBulkProgress(current: number, total: number, operation: string): void;
54
+ /**
55
+ * Display a separator line
56
+ *
57
+ * @param length - Length of the separator (default: 60)
58
+ *
59
+ * @example
60
+ * ```typescript
61
+ * displaySeparator();
62
+ * // Output: ============================================================
63
+ * ```
64
+ */
65
+ export declare function displaySeparator(length?: number): void;
66
+ /**
67
+ * Display a section header
68
+ *
69
+ * @param title - Section title
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * displaySectionHeader("Execution Summary");
74
+ * // Output:
75
+ * // ============================================================
76
+ * // 📊 Execution Summary
77
+ * // ============================================================
78
+ * ```
79
+ */
80
+ export declare function displaySectionHeader(title: string): void;
81
+ //# sourceMappingURL=display-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/display-helpers.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAE7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,IAAI,CAKN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAE3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,IAAI,CAEN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,MAAW,GAAG,IAAI,CAE1D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAIxD"}