@e0ipso/ai-task-manager 1.2.1 → 1.4.0

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/utils.d.ts CHANGED
@@ -5,54 +5,6 @@
5
5
  * path manipulation, and other common tasks used by the CLI
6
6
  */
7
7
  import { Assistant, TemplateFormat } from './types';
8
- /**
9
- * Create a directory recursively if it doesn't exist
10
- * @param dirPath - The directory path to create
11
- * @throws FileSystemError if directory creation fails
12
- */
13
- export declare function ensureDir(dirPath: string): Promise<void>;
14
- /**
15
- * Check if a directory exists
16
- * @param dirPath - The directory path to check
17
- * @returns Promise<boolean> - True if directory exists, false otherwise
18
- */
19
- export declare function directoryExists(dirPath: string): Promise<boolean>;
20
- /**
21
- * Check if a file exists
22
- * @param filePath - The file path to check
23
- * @returns Promise<boolean> - True if file exists, false otherwise
24
- */
25
- export declare function fileExists(filePath: string): Promise<boolean>;
26
- /**
27
- * Check if a file or directory exists (generic)
28
- * @param filepath - The path to check
29
- * @returns Promise<boolean> - True if path exists, false otherwise
30
- */
31
- export declare function exists(filepath: string): Promise<boolean>;
32
- /**
33
- * Copy a file or directory from source to destination
34
- * @param src - Source path (file or directory)
35
- * @param dest - Destination path
36
- * @param options - Copy options
37
- * @throws FileSystemError if copy operation fails
38
- */
39
- export declare function copyTemplate(src: string, dest: string, options?: {
40
- overwrite?: boolean;
41
- }): Promise<void>;
42
- /**
43
- * Write JSON data to a file with proper formatting
44
- * @param filePath - The file path to write to
45
- * @param data - The data to write as JSON
46
- * @throws FileSystemError if write operation fails
47
- */
48
- export declare function writeJsonFile(filePath: string, data: unknown): Promise<void>;
49
- /**
50
- * Read and parse a JSON file
51
- * @param filePath - The file path to read from
52
- * @returns The parsed JSON data
53
- * @throws FileSystemError if read operation fails
54
- */
55
- export declare function readJsonFile<T = unknown>(filePath: string): Promise<T>;
56
8
  /**
57
9
  * Parse comma-separated assistant values into an array
58
10
  * @param value - Comma-separated string of assistant names
@@ -66,100 +18,12 @@ export declare function parseAssistants(value: string): Assistant[];
66
18
  * @throws Error if any assistant is invalid or array is empty
67
19
  */
68
20
  export declare function validateAssistants(assistants: Assistant[]): void;
69
- /**
70
- * Get the absolute path for a given path, resolving it relative to the current working directory
71
- * @param inputPath - The input path (can be relative or absolute)
72
- * @returns The absolute path
73
- */
74
- export declare function getAbsolutePath(inputPath: string): string;
75
- /**
76
- * Get the relative path from one path to another
77
- * @param from - The source path
78
- * @param to - The target path
79
- * @returns The relative path
80
- */
81
- export declare function getRelativePath(from: string, to: string): string;
82
- /**
83
- * Join multiple path segments into a single path
84
- * @param segments - Path segments to join
85
- * @returns The joined path
86
- */
87
- export declare function joinPath(...segments: string[]): string;
88
- /**
89
- * Get the directory name from a file path
90
- * @param filePath - The file path
91
- * @returns The directory name
92
- */
93
- export declare function getDirName(filePath: string): string;
94
- /**
95
- * Get the base name (filename) from a file path
96
- * @param filePath - The file path
97
- * @param ext - Optional extension to remove
98
- * @returns The base name
99
- */
100
- export declare function getBaseName(filePath: string, ext?: string): string;
101
- /**
102
- * Get the file extension from a file path
103
- * @param filePath - The file path
104
- * @returns The file extension (including the dot)
105
- */
106
- export declare function getExtension(filePath: string): string;
107
21
  /**
108
22
  * Get the template format for a specific assistant
109
23
  * @param assistant - The assistant type
110
- * @returns The template format to use ('md' for Claude, 'toml' for Gemini)
24
+ * @returns The template format to use ('md' for Claude/Open Code, 'toml' for Gemini)
111
25
  */
112
26
  export declare function getTemplateFormat(assistant: Assistant): TemplateFormat;
113
- /**
114
- * Get the absolute path to a template file
115
- * @param templateFile - The template filename
116
- * @returns The absolute path to the template
117
- */
118
- export declare function getTemplatePath(templateFile: string): string;
119
- /**
120
- * Get list of directories that will be created for given assistants
121
- * @param assistants - Array of assistants
122
- * @param baseDir - Base directory to resolve paths against (defaults to current directory)
123
- * @returns Array of directory paths to create
124
- */
125
- export declare function getCreatedDirectories(assistants: Assistant[], baseDir?: string): string[];
126
- /**
127
- * Ensure a directory path ends with a path separator
128
- * @param dirPath - The directory path
129
- * @returns The directory path with trailing separator
130
- */
131
- export declare function ensureTrailingSlash(dirPath: string): string;
132
- /**
133
- * Create a safe filename by removing or replacing invalid characters
134
- * @param filename - The input filename
135
- * @returns A safe filename for the current platform
136
- */
137
- export declare function sanitizeFilename(filename: string): string;
138
- /**
139
- * Get the home directory path
140
- * @returns The user's home directory path
141
- */
142
- export declare function getHomeDirectory(): string;
143
- /**
144
- * Remove a file or directory recursively
145
- * @param targetPath - The path to remove
146
- * @throws FileSystemError if removal fails
147
- */
148
- export declare function remove(targetPath: string): Promise<void>;
149
- /**
150
- * Move a file or directory from source to destination
151
- * @param src - Source path
152
- * @param dest - Destination path
153
- * @throws FileSystemError if move operation fails
154
- */
155
- export declare function move(src: string, dest: string): Promise<void>;
156
- /**
157
- * Resolve path segments relative to a base directory with cross-platform compatibility
158
- * @param baseDir - The base directory (defaults to '.' if not provided, null, or undefined)
159
- * @param segments - Additional path segments to resolve
160
- * @returns The resolved absolute path
161
- */
162
- export declare function resolvePath(baseDir: string | undefined, ...segments: string[]): string;
163
27
  /**
164
28
  * Interface for parsed markdown frontmatter
165
29
  */
@@ -200,11 +64,4 @@ export declare function readAndProcessTemplate(templatePath: string, targetForma
200
64
  * @param destPath - Destination file path
201
65
  */
202
66
  export declare function writeProcessedTemplate(content: string, destPath: string): Promise<void>;
203
- /**
204
- * Get the names of all markdown template files in a given subdirectory of templates.
205
- * @param templateSubdir - The subdirectory within templates (e.g., 'commands/tasks')
206
- * @returns An array of template names (filenames without .md extension)
207
- * @throws FileSystemError if the directory cannot be read
208
- */
209
- export declare function getMarkdownTemplateNames(templateSubdir: string): Promise<string[]>;
210
67
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAmB,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAErE;;;;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C;CACd,CAoCA;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOpD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAiCzD;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,cAAc,GAC3B,OAAO,CAAC,MAAM,CAAC,CAUjB;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM7F"}
package/dist/utils.js CHANGED
@@ -39,156 +39,16 @@ var __importStar = (this && this.__importStar) || (function () {
39
39
  };
40
40
  })();
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.ensureDir = ensureDir;
43
- exports.directoryExists = directoryExists;
44
- exports.fileExists = fileExists;
45
- exports.exists = exists;
46
- exports.copyTemplate = copyTemplate;
47
- exports.writeJsonFile = writeJsonFile;
48
- exports.readJsonFile = readJsonFile;
49
42
  exports.parseAssistants = parseAssistants;
50
43
  exports.validateAssistants = validateAssistants;
51
- exports.getAbsolutePath = getAbsolutePath;
52
- exports.getRelativePath = getRelativePath;
53
- exports.joinPath = joinPath;
54
- exports.getDirName = getDirName;
55
- exports.getBaseName = getBaseName;
56
- exports.getExtension = getExtension;
57
44
  exports.getTemplateFormat = getTemplateFormat;
58
- exports.getTemplatePath = getTemplatePath;
59
- exports.getCreatedDirectories = getCreatedDirectories;
60
- exports.ensureTrailingSlash = ensureTrailingSlash;
61
- exports.sanitizeFilename = sanitizeFilename;
62
- exports.getHomeDirectory = getHomeDirectory;
63
- exports.remove = remove;
64
- exports.move = move;
65
- exports.resolvePath = resolvePath;
66
45
  exports.parseFrontmatter = parseFrontmatter;
67
46
  exports.escapeTomlString = escapeTomlString;
68
47
  exports.convertMdToToml = convertMdToToml;
69
48
  exports.readAndProcessTemplate = readAndProcessTemplate;
70
49
  exports.writeProcessedTemplate = writeProcessedTemplate;
71
- exports.getMarkdownTemplateNames = getMarkdownTemplateNames;
72
50
  const fs = __importStar(require("fs-extra"));
73
51
  const path = __importStar(require("path"));
74
- const types_1 = require("./types");
75
- /**
76
- * Create a directory recursively if it doesn't exist
77
- * @param dirPath - The directory path to create
78
- * @throws FileSystemError if directory creation fails
79
- */
80
- async function ensureDir(dirPath) {
81
- try {
82
- await fs.ensureDir(dirPath);
83
- }
84
- catch (_error) {
85
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
86
- throw new types_1.FileSystemError(`Failed to create directory: ${dirPath}`, {
87
- originalError: errorMessage,
88
- path: dirPath,
89
- });
90
- }
91
- }
92
- /**
93
- * Check if a directory exists
94
- * @param dirPath - The directory path to check
95
- * @returns Promise<boolean> - True if directory exists, false otherwise
96
- */
97
- async function directoryExists(dirPath) {
98
- try {
99
- const stats = await fs.stat(dirPath);
100
- return stats.isDirectory();
101
- }
102
- catch (_error) {
103
- // If file doesn't exist or any other error, return false
104
- return false;
105
- }
106
- }
107
- /**
108
- * Check if a file exists
109
- * @param filePath - The file path to check
110
- * @returns Promise<boolean> - True if file exists, false otherwise
111
- */
112
- async function fileExists(filePath) {
113
- try {
114
- const stats = await fs.stat(filePath);
115
- return stats.isFile();
116
- }
117
- catch (_error) {
118
- // If file doesn't exist or any other error, return false
119
- return false;
120
- }
121
- }
122
- /**
123
- * Check if a file or directory exists (generic)
124
- * @param filepath - The path to check
125
- * @returns Promise<boolean> - True if path exists, false otherwise
126
- */
127
- async function exists(filepath) {
128
- try {
129
- await fs.access(filepath);
130
- return true;
131
- }
132
- catch {
133
- return false;
134
- }
135
- }
136
- /**
137
- * Copy a file or directory from source to destination
138
- * @param src - Source path (file or directory)
139
- * @param dest - Destination path
140
- * @param options - Copy options
141
- * @throws FileSystemError if copy operation fails
142
- */
143
- async function copyTemplate(src, dest, options = { overwrite: true }) {
144
- try {
145
- await fs.copy(src, dest, options);
146
- }
147
- catch (_error) {
148
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
149
- throw new types_1.FileSystemError(`Failed to copy from ${src} to ${dest}`, {
150
- originalError: errorMessage,
151
- source: src,
152
- destination: dest,
153
- });
154
- }
155
- }
156
- /**
157
- * Write JSON data to a file with proper formatting
158
- * @param filePath - The file path to write to
159
- * @param data - The data to write as JSON
160
- * @throws FileSystemError if write operation fails
161
- */
162
- async function writeJsonFile(filePath, data) {
163
- try {
164
- await fs.writeJson(filePath, data, { spaces: 2 });
165
- }
166
- catch (_error) {
167
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
168
- throw new types_1.FileSystemError(`Failed to write JSON file: ${filePath}`, {
169
- originalError: errorMessage,
170
- path: filePath,
171
- });
172
- }
173
- }
174
- /**
175
- * Read and parse a JSON file
176
- * @param filePath - The file path to read from
177
- * @returns The parsed JSON data
178
- * @throws FileSystemError if read operation fails
179
- */
180
- async function readJsonFile(filePath) {
181
- try {
182
- return await fs.readJson(filePath);
183
- }
184
- catch (_error) {
185
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
186
- throw new types_1.FileSystemError(`Failed to read JSON file: ${filePath}`, {
187
- originalError: errorMessage,
188
- path: filePath,
189
- });
190
- }
191
- }
192
52
  /**
193
53
  * Parse comma-separated assistant values into an array
194
54
  * @param value - Comma-separated string of assistant names
@@ -196,7 +56,7 @@ async function readJsonFile(filePath) {
196
56
  * @throws Error if invalid assistant names are provided
197
57
  */
198
58
  function parseAssistants(value) {
199
- const validAssistants = ['claude', 'gemini'];
59
+ const validAssistants = ['claude', 'gemini', 'opencode'];
200
60
  if (!value.trim()) {
201
61
  throw new Error('Assistants parameter cannot be empty');
202
62
  }
@@ -218,7 +78,7 @@ function parseAssistants(value) {
218
78
  * @throws Error if any assistant is invalid or array is empty
219
79
  */
220
80
  function validateAssistants(assistants) {
221
- const validAssistants = ['claude', 'gemini'];
81
+ const validAssistants = ['claude', 'gemini', 'opencode'];
222
82
  if (assistants.length === 0) {
223
83
  throw new Error('At least one assistant must be specified');
224
84
  }
@@ -228,60 +88,10 @@ function validateAssistants(assistants) {
228
88
  }
229
89
  }
230
90
  }
231
- /**
232
- * Get the absolute path for a given path, resolving it relative to the current working directory
233
- * @param inputPath - The input path (can be relative or absolute)
234
- * @returns The absolute path
235
- */
236
- function getAbsolutePath(inputPath) {
237
- return path.isAbsolute(inputPath) ? inputPath : path.resolve(process.cwd(), inputPath);
238
- }
239
- /**
240
- * Get the relative path from one path to another
241
- * @param from - The source path
242
- * @param to - The target path
243
- * @returns The relative path
244
- */
245
- function getRelativePath(from, to) {
246
- return path.relative(from, to);
247
- }
248
- /**
249
- * Join multiple path segments into a single path
250
- * @param segments - Path segments to join
251
- * @returns The joined path
252
- */
253
- function joinPath(...segments) {
254
- return path.join(...segments);
255
- }
256
- /**
257
- * Get the directory name from a file path
258
- * @param filePath - The file path
259
- * @returns The directory name
260
- */
261
- function getDirName(filePath) {
262
- return path.dirname(filePath);
263
- }
264
- /**
265
- * Get the base name (filename) from a file path
266
- * @param filePath - The file path
267
- * @param ext - Optional extension to remove
268
- * @returns The base name
269
- */
270
- function getBaseName(filePath, ext) {
271
- return path.basename(filePath, ext);
272
- }
273
- /**
274
- * Get the file extension from a file path
275
- * @param filePath - The file path
276
- * @returns The file extension (including the dot)
277
- */
278
- function getExtension(filePath) {
279
- return path.extname(filePath);
280
- }
281
91
  /**
282
92
  * Get the template format for a specific assistant
283
93
  * @param assistant - The assistant type
284
- * @returns The template format to use ('md' for Claude, 'toml' for Gemini)
94
+ * @returns The template format to use ('md' for Claude/Open Code, 'toml' for Gemini)
285
95
  */
286
96
  function getTemplateFormat(assistant) {
287
97
  switch (assistant) {
@@ -289,115 +99,13 @@ function getTemplateFormat(assistant) {
289
99
  return 'md';
290
100
  case 'gemini':
291
101
  return 'toml';
102
+ case 'opencode':
103
+ return 'md';
292
104
  default:
293
105
  // This should never happen due to type safety, but adding for completeness
294
106
  throw new Error(`Unknown assistant type: ${assistant}`);
295
107
  }
296
108
  }
297
- /**
298
- * Get the absolute path to a template file
299
- * @param templateFile - The template filename
300
- * @returns The absolute path to the template
301
- */
302
- function getTemplatePath(templateFile) {
303
- return path.join(__dirname, '..', 'templates', templateFile);
304
- }
305
- /**
306
- * Get list of directories that will be created for given assistants
307
- * @param assistants - Array of assistants
308
- * @param baseDir - Base directory to resolve paths against (defaults to current directory)
309
- * @returns Array of directory paths to create
310
- */
311
- function getCreatedDirectories(assistants, baseDir) {
312
- const base = baseDir || '.';
313
- const dirs = [
314
- resolvePath(base, '.ai/task-manager'),
315
- resolvePath(base, '.ai/task-manager/plans'),
316
- ];
317
- for (const assistant of assistants) {
318
- dirs.push(resolvePath(base, `.${assistant}`));
319
- dirs.push(resolvePath(base, `.${assistant}/commands`));
320
- dirs.push(resolvePath(base, `.${assistant}/commands/tasks`));
321
- }
322
- return dirs;
323
- }
324
- /**
325
- * Ensure a directory path ends with a path separator
326
- * @param dirPath - The directory path
327
- * @returns The directory path with trailing separator
328
- */
329
- function ensureTrailingSlash(dirPath) {
330
- return dirPath.endsWith(path.sep) ? dirPath : dirPath + path.sep;
331
- }
332
- /**
333
- * Create a safe filename by removing or replacing invalid characters
334
- * @param filename - The input filename
335
- * @returns A safe filename for the current platform
336
- */
337
- function sanitizeFilename(filename) {
338
- // Replace invalid characters with underscores
339
- return filename
340
- .replace(/[<>:"/\\|?*]/g, '_')
341
- .replace(/\s+/g, '_')
342
- .replace(/_+/g, '_')
343
- .replace(/^_|_$/g, '');
344
- }
345
- /**
346
- * Get the home directory path
347
- * @returns The user's home directory path
348
- */
349
- function getHomeDirectory() {
350
- return require('os').homedir();
351
- }
352
- /**
353
- * Remove a file or directory recursively
354
- * @param targetPath - The path to remove
355
- * @throws FileSystemError if removal fails
356
- */
357
- async function remove(targetPath) {
358
- try {
359
- await fs.remove(targetPath);
360
- }
361
- catch (_error) {
362
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
363
- throw new types_1.FileSystemError(`Failed to remove: ${targetPath}`, {
364
- originalError: errorMessage,
365
- path: targetPath,
366
- });
367
- }
368
- }
369
- /**
370
- * Move a file or directory from source to destination
371
- * @param src - Source path
372
- * @param dest - Destination path
373
- * @throws FileSystemError if move operation fails
374
- */
375
- async function move(src, dest) {
376
- try {
377
- await fs.move(src, dest);
378
- }
379
- catch (_error) {
380
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
381
- throw new types_1.FileSystemError(`Failed to move from ${src} to ${dest}`, {
382
- originalError: errorMessage,
383
- source: src,
384
- destination: dest,
385
- });
386
- }
387
- }
388
- /**
389
- * Resolve path segments relative to a base directory with cross-platform compatibility
390
- * @param baseDir - The base directory (defaults to '.' if not provided, null, or undefined)
391
- * @param segments - Additional path segments to resolve
392
- * @returns The resolved absolute path
393
- */
394
- function resolvePath(baseDir, ...segments) {
395
- // Handle edge cases: null, undefined, or empty strings
396
- const base = baseDir || '.';
397
- // Filter out any null, undefined, or empty string segments
398
- const validSegments = segments.filter(segment => segment !== null && segment !== undefined && segment !== '');
399
- return path.resolve(base, ...validSegments);
400
- }
401
109
  /**
402
110
  * Parse YAML frontmatter from markdown content
403
111
  * @param content - The markdown content with frontmatter
@@ -489,25 +197,15 @@ function convertMdToToml(mdContent) {
489
197
  * @returns The template content in the requested format
490
198
  */
491
199
  async function readAndProcessTemplate(templatePath, targetFormat) {
492
- try {
493
- const mdContent = await fs.readFile(templatePath, 'utf-8');
494
- if (targetFormat === 'md') {
495
- return mdContent;
496
- }
497
- else if (targetFormat === 'toml') {
498
- return convertMdToToml(mdContent);
499
- }
500
- else {
501
- throw new Error(`Unsupported template format: ${targetFormat}`);
502
- }
200
+ const mdContent = await fs.readFile(templatePath, 'utf-8');
201
+ if (targetFormat === 'md') {
202
+ return mdContent;
203
+ }
204
+ else if (targetFormat === 'toml') {
205
+ return convertMdToToml(mdContent);
503
206
  }
504
- catch (_error) {
505
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
506
- throw new types_1.FileSystemError(`Failed to read and process template: ${templatePath}`, {
507
- originalError: errorMessage,
508
- path: templatePath,
509
- targetFormat,
510
- });
207
+ else {
208
+ throw new Error(`Unsupported template format: ${targetFormat}`);
511
209
  }
512
210
  }
513
211
  /**
@@ -516,38 +214,9 @@ async function readAndProcessTemplate(templatePath, targetFormat) {
516
214
  * @param destPath - Destination file path
517
215
  */
518
216
  async function writeProcessedTemplate(content, destPath) {
519
- try {
520
- // Ensure destination directory exists
521
- await fs.ensureDir(path.dirname(destPath));
522
- // Write the content
523
- await fs.writeFile(destPath, content, 'utf-8');
524
- }
525
- catch (_error) {
526
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
527
- throw new types_1.FileSystemError(`Failed to write processed template: ${destPath}`, {
528
- originalError: errorMessage,
529
- path: destPath,
530
- });
531
- }
532
- }
533
- /**
534
- * Get the names of all markdown template files in a given subdirectory of templates.
535
- * @param templateSubdir - The subdirectory within templates (e.g., 'commands/tasks')
536
- * @returns An array of template names (filenames without .md extension)
537
- * @throws FileSystemError if the directory cannot be read
538
- */
539
- async function getMarkdownTemplateNames(templateSubdir) {
540
- const fullPath = path.join(__dirname, '..', 'templates', templateSubdir);
541
- try {
542
- const files = await fs.readdir(fullPath);
543
- return files.filter(file => file.endsWith('.md')).map(file => path.basename(file, '.md'));
544
- }
545
- catch (_error) {
546
- const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
547
- throw new types_1.FileSystemError(`Failed to read template directory: ${fullPath}`, {
548
- originalError: errorMessage,
549
- path: fullPath,
550
- });
551
- }
217
+ // Ensure destination directory exists
218
+ await fs.ensureDir(path.dirname(destPath));
219
+ // Write the content
220
+ await fs.writeFile(destPath, content, 'utf-8');
552
221
  }
553
222
  //# sourceMappingURL=utils.js.map
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;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C,kBAAkB,EAAE,UAAU,CAAC,CAAC;YAC3C,WAAW,IAAI,oBAAoB,gBAAgB,CAAC,aAAa,CAAC,KAAK,CAAC;QAC1E,CAAC;aAAM,CAAC;YACN,WAAW,IAAI,GAAG,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;QACnE,CAAC;IACH,CAAC;IAED,8CAA8C;IAC9C,WAAW,IAAI,cAAc,CAAC;IAC9B,WAAW,IAAI,gBAAgB,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC;IAEtE,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAC1C,YAAoB,EACpB,YAA4B;IAE5B,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAE3D,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,OAAO,SAAS,CAAC;IACnB,CAAC;SAAM,IAAI,YAAY,KAAK,MAAM,EAAE,CAAC;QACnC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,gCAAgC,YAAY,EAAE,CAAC,CAAC;IAClE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,sBAAsB,CAAC,OAAe,EAAE,QAAgB;IAC5E,sCAAsC;IACtC,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE3C,oBAAoB;IACpB,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e0ipso/ai-task-manager",
3
- "version": "1.2.1",
3
+ "version": "1.4.0",
4
4
  "description": "Task management for AI coding assistants",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  # Task Manager General Information
2
2
 
3
3
  This document contains important information that is common to all the /task:*
4
- commands for Claude Code.
4
+ commands for AI assistants.
5
5
 
6
6
  ## Types of Documents
7
7