@e0ipso/ai-task-manager 1.3.0 → 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/README.md +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -79
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +0 -32
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -53
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +0 -143
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +12 -345
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/templates/ai-task-manager/config/scripts/check-task-dependencies.sh +6 -6
- package/templates/assistant/commands/tasks/execute-task.md +14 -14
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
### 🏗️ **How This Actually Works**
|
|
11
11
|
|
|
12
12
|
This tool creates **custom slash commands** (like `/tasks:create-plan`, `/tasks:generate-tasks`) that integrate directly into:
|
|
13
|
-
- **Claude Code**: Works with your Claude Pro/Max subscription via [claude.ai/code](https://claude.ai/code)
|
|
13
|
+
- **Claude Code**: Works with your Claude Pro/Max subscription via [claude.ai/code](https://claude.ai/code)
|
|
14
14
|
- **Gemini CLI**: Uses your existing Gemini subscription
|
|
15
15
|
- **Open Code**: Leverages your preferred open-source setup
|
|
16
16
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAwChE;;;;;;;;GAQG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CA0EvE;AA0ED;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGtE;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3D,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC,CAmBD"}
|
package/dist/index.js
CHANGED
|
@@ -42,9 +42,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
42
42
|
exports.init = init;
|
|
43
43
|
exports.isInitialized = isInitialized;
|
|
44
44
|
exports.getInitInfo = getInitInfo;
|
|
45
|
-
const
|
|
45
|
+
const fs = __importStar(require("fs-extra"));
|
|
46
|
+
const path = __importStar(require("path"));
|
|
46
47
|
const logger = __importStar(require("./logger"));
|
|
47
48
|
const utils_1 = require("./utils");
|
|
49
|
+
/**
|
|
50
|
+
* Get the absolute path to a template file
|
|
51
|
+
*/
|
|
52
|
+
function getTemplatePath(templateFile) {
|
|
53
|
+
return path.join(__dirname, '..', 'templates', templateFile);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolve path segments relative to a base directory with cross-platform compatibility
|
|
57
|
+
*/
|
|
58
|
+
function resolvePath(baseDir, ...segments) {
|
|
59
|
+
const base = baseDir || '.';
|
|
60
|
+
const validSegments = segments.filter(segment => segment !== null && segment !== undefined && segment !== '');
|
|
61
|
+
return path.resolve(base, ...validSegments);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Check if a file or directory exists
|
|
65
|
+
*/
|
|
66
|
+
async function exists(filepath) {
|
|
67
|
+
try {
|
|
68
|
+
await fs.access(filepath);
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
48
75
|
/**
|
|
49
76
|
* Initialize a new AI Task Manager project
|
|
50
77
|
*
|
|
@@ -58,7 +85,7 @@ async function init(options) {
|
|
|
58
85
|
try {
|
|
59
86
|
// Determine base directory
|
|
60
87
|
const baseDir = options.destinationDirectory || '.';
|
|
61
|
-
const resolvedBaseDir =
|
|
88
|
+
const resolvedBaseDir = resolvePath(baseDir);
|
|
62
89
|
// Log start of initialization
|
|
63
90
|
await logger.info(`Initializing AI Task Manager in: ${resolvedBaseDir}...`);
|
|
64
91
|
// Parse and validate assistants
|
|
@@ -69,7 +96,8 @@ async function init(options) {
|
|
|
69
96
|
await logger.debug('Assistant validation passed');
|
|
70
97
|
// Create .ai/task-manager structure
|
|
71
98
|
await logger.info('📁 Creating .ai/task-manager directory structure...');
|
|
72
|
-
await
|
|
99
|
+
await fs.ensureDir(resolvePath(baseDir, '.ai/task-manager/plans'));
|
|
100
|
+
await fs.ensureDir(resolvePath(baseDir, '.ai/task-manager/config/hooks'));
|
|
73
101
|
// Copy common templates to .ai/task-manager
|
|
74
102
|
await logger.info('📋 Copying common template files...');
|
|
75
103
|
await copyCommonTemplates(baseDir);
|
|
@@ -80,15 +108,16 @@ async function init(options) {
|
|
|
80
108
|
}
|
|
81
109
|
// Show success message with created directories
|
|
82
110
|
await logger.success('🎉 AI Task Manager initialized successfully!');
|
|
83
|
-
await logger.info(` ✓ ${
|
|
84
|
-
await logger.info(` ✓ ${
|
|
111
|
+
await logger.info(` ✓ ${resolvePath(baseDir, '.ai/task-manager/config/TASK_MANAGER.md')}`);
|
|
112
|
+
await logger.info(` ✓ ${resolvePath(baseDir, '.ai/task-manager/config/hooks/POST_PHASE.md')}`);
|
|
113
|
+
await logger.info(` ✓ ${resolvePath(baseDir, '.ai/task-manager/config/hooks/POST_TASK_GENERATION_ALL.md')}`);
|
|
85
114
|
for (const assistant of assistants) {
|
|
86
115
|
const templateFormat = (0, utils_1.getTemplateFormat)(assistant);
|
|
87
116
|
// Open Code uses 'command' (singular) instead of 'commands' (plural)
|
|
88
117
|
const commandsPath = assistant === 'opencode' ? 'command' : 'commands';
|
|
89
|
-
await logger.info(` ✓ ${
|
|
90
|
-
await logger.info(` ✓ ${
|
|
91
|
-
await logger.info(` ✓ ${
|
|
118
|
+
await logger.info(` ✓ ${resolvePath(baseDir, `.${assistant}/${commandsPath}/tasks/create-plan.${templateFormat}`)}`);
|
|
119
|
+
await logger.info(` ✓ ${resolvePath(baseDir, `.${assistant}/${commandsPath}/tasks/execute-blueprint.${templateFormat}`)}`);
|
|
120
|
+
await logger.info(` ✓ ${resolvePath(baseDir, `.${assistant}/${commandsPath}/tasks/generate-tasks.${templateFormat}`)}`);
|
|
92
121
|
}
|
|
93
122
|
// Show suggested workflow help text
|
|
94
123
|
await displayWorkflowHelp();
|
|
@@ -99,31 +128,12 @@ async function init(options) {
|
|
|
99
128
|
};
|
|
100
129
|
}
|
|
101
130
|
catch (error) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (error instanceof Error) {
|
|
105
|
-
errorMessage = error.message;
|
|
106
|
-
errorInstance = error;
|
|
107
|
-
if (error.message.includes('Invalid assistant') ||
|
|
108
|
-
error.message.includes('Assistants parameter')) {
|
|
109
|
-
await logger.error(`Configuration Error: ${error.message}`);
|
|
110
|
-
}
|
|
111
|
-
else if (error instanceof types_1.FileSystemError) {
|
|
112
|
-
await logger.error(`File System Error: ${error.message}`);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
await logger.error(`Initialization failed: ${error.message}`);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
errorMessage = 'Initialization failed with unknown error';
|
|
120
|
-
errorInstance = new Error(String(error));
|
|
121
|
-
await logger.error(errorMessage);
|
|
122
|
-
}
|
|
131
|
+
const errorMessage = error instanceof Error ? error.message : 'Initialization failed with unknown error';
|
|
132
|
+
await logger.error(`Initialization failed: ${errorMessage}`);
|
|
123
133
|
return {
|
|
124
134
|
success: false,
|
|
125
135
|
message: errorMessage,
|
|
126
|
-
error:
|
|
136
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
127
137
|
};
|
|
128
138
|
}
|
|
129
139
|
}
|
|
@@ -131,60 +141,57 @@ async function init(options) {
|
|
|
131
141
|
* Copy common template files to .ai/task-manager directory
|
|
132
142
|
*/
|
|
133
143
|
async function copyCommonTemplates(baseDir) {
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
{
|
|
140
|
-
source: (0, utils_1.getTemplatePath)('ai-task-manager/config/hooks/POST_PHASE.md'),
|
|
141
|
-
dest: (0, utils_1.resolvePath)(baseDir, '.ai/task-manager/POST_PHASE.md'),
|
|
142
|
-
},
|
|
143
|
-
];
|
|
144
|
-
for (const template of templates) {
|
|
145
|
-
// Check if source template exists
|
|
146
|
-
if (!(await (0, utils_1.exists)(template.source))) {
|
|
147
|
-
throw new types_1.FileSystemError(`Template file not found: ${template.source}`, {
|
|
148
|
-
templatePath: template.source,
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
await (0, utils_1.copyTemplate)(template.source, template.dest);
|
|
152
|
-
await logger.debug(`📤 Copied ${template.source} to ${template.dest}`);
|
|
144
|
+
const sourceDir = getTemplatePath('ai-task-manager');
|
|
145
|
+
const destDir = resolvePath(baseDir, '.ai/task-manager');
|
|
146
|
+
// Check if source template directory exists
|
|
147
|
+
if (!(await exists(sourceDir))) {
|
|
148
|
+
throw new Error(`Template directory not found: ${sourceDir}`);
|
|
153
149
|
}
|
|
150
|
+
// Copy entire directory structure exactly as-is
|
|
151
|
+
await fs.copy(sourceDir, destDir);
|
|
152
|
+
await logger.debug(`📤 Copied ${sourceDir} to ${destDir}`);
|
|
154
153
|
}
|
|
155
154
|
/**
|
|
156
155
|
* Create directory structure and copy templates for a specific assistant
|
|
157
156
|
*/
|
|
158
157
|
async function createAssistantStructure(assistant, baseDir) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
const sourceDir = getTemplatePath('assistant');
|
|
159
|
+
const assistantDir = resolvePath(baseDir, `.${assistant}`);
|
|
160
|
+
// Check if source template directory exists
|
|
161
|
+
if (!(await exists(sourceDir))) {
|
|
162
|
+
throw new Error(`Template directory not found: ${sourceDir}`);
|
|
163
|
+
}
|
|
164
|
+
// Copy entire template directory structure
|
|
165
|
+
await fs.copy(sourceDir, assistantDir);
|
|
166
|
+
await logger.debug(`📤 Copied ${sourceDir} to ${assistantDir}`);
|
|
167
|
+
// OpenCode uses 'command' (singular) instead of 'commands' (plural)
|
|
168
|
+
if (assistant === 'opencode') {
|
|
169
|
+
const commandsDir = resolvePath(assistantDir, 'commands');
|
|
170
|
+
const commandDir = resolvePath(assistantDir, 'command');
|
|
171
|
+
if (await exists(commandsDir)) {
|
|
172
|
+
await fs.move(commandsDir, commandDir);
|
|
173
|
+
await logger.debug(`📁 Renamed 'commands' to 'command' for ${assistant}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
165
176
|
// Determine template format based on assistant type
|
|
166
177
|
const templateFormat = (0, utils_1.getTemplateFormat)(assistant);
|
|
167
178
|
await logger.debug(`🎨 Using ${templateFormat} template format for ${assistant} assistant`);
|
|
168
|
-
//
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
// If target format is different from source (md), process files in place
|
|
180
|
+
if (templateFormat !== 'md') {
|
|
181
|
+
const commandsPath = assistant === 'opencode' ? 'command' : 'commands';
|
|
182
|
+
const tasksDir = resolvePath(assistantDir, `${commandsPath}/tasks`);
|
|
183
|
+
const files = await fs.readdir(tasksDir);
|
|
184
|
+
for (const file of files.filter(f => f.endsWith('.md'))) {
|
|
185
|
+
const mdPath = resolvePath(tasksDir, file);
|
|
186
|
+
const newPath = resolvePath(tasksDir, file.replace('.md', `.${templateFormat}`));
|
|
187
|
+
// Read and process the template
|
|
188
|
+
const processedContent = await (0, utils_1.readAndProcessTemplate)(mdPath, templateFormat);
|
|
189
|
+
// Write processed content to new file
|
|
190
|
+
await (0, utils_1.writeProcessedTemplate)(processedContent, newPath);
|
|
191
|
+
// Remove original .md file
|
|
192
|
+
await fs.remove(mdPath);
|
|
193
|
+
await logger.debug(`⚡ Converted ${file} to ${templateFormat} format for ${assistant}`);
|
|
182
194
|
}
|
|
183
|
-
// Read and process the template based on target format
|
|
184
|
-
const processedContent = await (0, utils_1.readAndProcessTemplate)(mdSourcePath, templateFormat);
|
|
185
|
-
// Write the processed content to destination
|
|
186
|
-
await (0, utils_1.writeProcessedTemplate)(processedContent, destPath);
|
|
187
|
-
await logger.debug(`⚡ Processed ${templateName}.md and created ${templateFile} for ${assistant} at ${destPath}`);
|
|
188
195
|
}
|
|
189
196
|
}
|
|
190
197
|
/**
|
|
@@ -192,17 +199,17 @@ async function createAssistantStructure(assistant, baseDir) {
|
|
|
192
199
|
*/
|
|
193
200
|
async function isInitialized(baseDir) {
|
|
194
201
|
const targetDir = baseDir || '.';
|
|
195
|
-
return await
|
|
202
|
+
return await exists(resolvePath(targetDir, '.ai/task-manager'));
|
|
196
203
|
}
|
|
197
204
|
/**
|
|
198
205
|
* Get information about existing initialization
|
|
199
206
|
*/
|
|
200
207
|
async function getInitInfo(baseDir) {
|
|
201
208
|
const targetDir = baseDir || '.';
|
|
202
|
-
const hasAiTaskManager = await
|
|
203
|
-
const hasClaudeConfig = await
|
|
204
|
-
const hasGeminiConfig = await
|
|
205
|
-
const hasOpencodeConfig = await
|
|
209
|
+
const hasAiTaskManager = await exists(resolvePath(targetDir, '.ai/task-manager'));
|
|
210
|
+
const hasClaudeConfig = await exists(resolvePath(targetDir, '.claude/commands/tasks'));
|
|
211
|
+
const hasGeminiConfig = await exists(resolvePath(targetDir, '.gemini/commands/tasks'));
|
|
212
|
+
const hasOpencodeConfig = await exists(resolvePath(targetDir, '.opencode/command/tasks'));
|
|
206
213
|
const assistants = [];
|
|
207
214
|
if (hasClaudeConfig)
|
|
208
215
|
assistants.push('claude');
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDH,oBA0EC;AA6ED,sCAGC;AAKD,kCAyBC;AA3OD,6CAA+B;AAC/B,2CAA6B;AAE7B,iDAAmC;AACnC,mCAMiB;AAEjB;;GAEG;AACH,SAAS,eAAe,CAAC,YAAoB;IAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,OAA2B,EAAE,GAAG,QAAkB;IACrE,MAAM,IAAI,GAAG,OAAO,IAAI,GAAG,CAAC;IAC5B,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CACnC,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,EAAE,CACvE,CAAC;IACF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,aAAa,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,MAAM,CAAC,QAAgB;IACpC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAA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AK,CAAC,4BAA4B,CAAC,IAAI,0BAA0B,CAAC;IAC5F,OAAO,CAAC,GAAG,CAAC,UAAU,UAAU,+BAA+B,CAAC,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,IAAI,aAAa,GAAG,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -183,38 +183,6 @@ export interface ProjectConfig {
|
|
|
183
183
|
*/
|
|
184
184
|
version: string;
|
|
185
185
|
}
|
|
186
|
-
/**
|
|
187
|
-
* Error types for better error handling
|
|
188
|
-
*/
|
|
189
|
-
export declare class TaskManagerError extends Error {
|
|
190
|
-
code: string;
|
|
191
|
-
details?: Record<string, unknown> | undefined;
|
|
192
|
-
constructor(message: string, code: string, details?: Record<string, unknown> | undefined);
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Configuration validation error
|
|
196
|
-
*/
|
|
197
|
-
export declare class ConfigError extends TaskManagerError {
|
|
198
|
-
constructor(message: string, details?: Record<string, unknown>);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Task operation error
|
|
202
|
-
*/
|
|
203
|
-
export declare class TaskError extends TaskManagerError {
|
|
204
|
-
constructor(message: string, details?: Record<string, unknown>);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Assistant integration error
|
|
208
|
-
*/
|
|
209
|
-
export declare class AssistantError extends TaskManagerError {
|
|
210
|
-
constructor(message: string, details?: Record<string, unknown>);
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* File system operation error
|
|
214
|
-
*/
|
|
215
|
-
export declare class FileSystemError extends TaskManagerError {
|
|
216
|
-
constructor(message: string, details?: Record<string, unknown>);
|
|
217
|
-
}
|
|
218
186
|
/**
|
|
219
187
|
* Validation result interface
|
|
220
188
|
*/
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,MAAM,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,WAAW,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAChB;;O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;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf"}
|
package/dist/types.js
CHANGED
|
@@ -6,57 +6,4 @@
|
|
|
6
6
|
* used throughout the AI Task Manager CLI application
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.FileSystemError = exports.AssistantError = exports.TaskError = exports.ConfigError = exports.TaskManagerError = void 0;
|
|
10
|
-
/**
|
|
11
|
-
* Error types for better error handling
|
|
12
|
-
*/
|
|
13
|
-
class TaskManagerError extends Error {
|
|
14
|
-
constructor(message, code, details) {
|
|
15
|
-
super(message);
|
|
16
|
-
this.code = code;
|
|
17
|
-
this.details = details;
|
|
18
|
-
this.name = 'TaskManagerError';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.TaskManagerError = TaskManagerError;
|
|
22
|
-
/**
|
|
23
|
-
* Configuration validation error
|
|
24
|
-
*/
|
|
25
|
-
class ConfigError extends TaskManagerError {
|
|
26
|
-
constructor(message, details) {
|
|
27
|
-
super(message, 'CONFIG_ERROR', details);
|
|
28
|
-
this.name = 'ConfigError';
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.ConfigError = ConfigError;
|
|
32
|
-
/**
|
|
33
|
-
* Task operation error
|
|
34
|
-
*/
|
|
35
|
-
class TaskError extends TaskManagerError {
|
|
36
|
-
constructor(message, details) {
|
|
37
|
-
super(message, 'TASK_ERROR', details);
|
|
38
|
-
this.name = 'TaskError';
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.TaskError = TaskError;
|
|
42
|
-
/**
|
|
43
|
-
* Assistant integration error
|
|
44
|
-
*/
|
|
45
|
-
class AssistantError extends TaskManagerError {
|
|
46
|
-
constructor(message, details) {
|
|
47
|
-
super(message, 'ASSISTANT_ERROR', details);
|
|
48
|
-
this.name = 'AssistantError';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.AssistantError = AssistantError;
|
|
52
|
-
/**
|
|
53
|
-
* File system operation error
|
|
54
|
-
*/
|
|
55
|
-
class FileSystemError extends TaskManagerError {
|
|
56
|
-
constructor(message, details) {
|
|
57
|
-
super(message, 'FILESYSTEM_ERROR', details);
|
|
58
|
-
this.name = 'FileSystemError';
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.FileSystemError = FileSystemError;
|
|
62
9
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
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
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
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,CAyB1D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,CAchE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,cAAc,CAYtE;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG;IACjD,WAAW,EAAE,mBAAmB,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;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
|
|
@@ -228,56 +88,6 @@ 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
|
|
@@ -296,110 +106,6 @@ function getTemplateFormat(assistant) {
|
|
|
296
106
|
throw new Error(`Unknown assistant type: ${assistant}`);
|
|
297
107
|
}
|
|
298
108
|
}
|
|
299
|
-
/**
|
|
300
|
-
* Get the absolute path to a template file
|
|
301
|
-
* @param templateFile - The template filename
|
|
302
|
-
* @returns The absolute path to the template
|
|
303
|
-
*/
|
|
304
|
-
function getTemplatePath(templateFile) {
|
|
305
|
-
return path.join(__dirname, '..', 'templates', templateFile);
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Get list of directories that will be created for given assistants
|
|
309
|
-
* @param assistants - Array of assistants
|
|
310
|
-
* @param baseDir - Base directory to resolve paths against (defaults to current directory)
|
|
311
|
-
* @returns Array of directory paths to create
|
|
312
|
-
*/
|
|
313
|
-
function getCreatedDirectories(assistants, baseDir) {
|
|
314
|
-
const base = baseDir || '.';
|
|
315
|
-
const dirs = [
|
|
316
|
-
resolvePath(base, '.ai/task-manager'),
|
|
317
|
-
resolvePath(base, '.ai/task-manager/plans'),
|
|
318
|
-
];
|
|
319
|
-
for (const assistant of assistants) {
|
|
320
|
-
dirs.push(resolvePath(base, `.${assistant}`));
|
|
321
|
-
dirs.push(resolvePath(base, `.${assistant}/commands`));
|
|
322
|
-
dirs.push(resolvePath(base, `.${assistant}/commands/tasks`));
|
|
323
|
-
}
|
|
324
|
-
return dirs;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Ensure a directory path ends with a path separator
|
|
328
|
-
* @param dirPath - The directory path
|
|
329
|
-
* @returns The directory path with trailing separator
|
|
330
|
-
*/
|
|
331
|
-
function ensureTrailingSlash(dirPath) {
|
|
332
|
-
return dirPath.endsWith(path.sep) ? dirPath : dirPath + path.sep;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Create a safe filename by removing or replacing invalid characters
|
|
336
|
-
* @param filename - The input filename
|
|
337
|
-
* @returns A safe filename for the current platform
|
|
338
|
-
*/
|
|
339
|
-
function sanitizeFilename(filename) {
|
|
340
|
-
// Replace invalid characters with underscores
|
|
341
|
-
return filename
|
|
342
|
-
.replace(/[<>:"/\\|?*]/g, '_')
|
|
343
|
-
.replace(/\s+/g, '_')
|
|
344
|
-
.replace(/_+/g, '_')
|
|
345
|
-
.replace(/^_|_$/g, '');
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* Get the home directory path
|
|
349
|
-
* @returns The user's home directory path
|
|
350
|
-
*/
|
|
351
|
-
function getHomeDirectory() {
|
|
352
|
-
return require('os').homedir();
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Remove a file or directory recursively
|
|
356
|
-
* @param targetPath - The path to remove
|
|
357
|
-
* @throws FileSystemError if removal fails
|
|
358
|
-
*/
|
|
359
|
-
async function remove(targetPath) {
|
|
360
|
-
try {
|
|
361
|
-
await fs.remove(targetPath);
|
|
362
|
-
}
|
|
363
|
-
catch (_error) {
|
|
364
|
-
const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
|
|
365
|
-
throw new types_1.FileSystemError(`Failed to remove: ${targetPath}`, {
|
|
366
|
-
originalError: errorMessage,
|
|
367
|
-
path: targetPath,
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
/**
|
|
372
|
-
* Move a file or directory from source to destination
|
|
373
|
-
* @param src - Source path
|
|
374
|
-
* @param dest - Destination path
|
|
375
|
-
* @throws FileSystemError if move operation fails
|
|
376
|
-
*/
|
|
377
|
-
async function move(src, dest) {
|
|
378
|
-
try {
|
|
379
|
-
await fs.move(src, dest);
|
|
380
|
-
}
|
|
381
|
-
catch (_error) {
|
|
382
|
-
const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
|
|
383
|
-
throw new types_1.FileSystemError(`Failed to move from ${src} to ${dest}`, {
|
|
384
|
-
originalError: errorMessage,
|
|
385
|
-
source: src,
|
|
386
|
-
destination: dest,
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Resolve path segments relative to a base directory with cross-platform compatibility
|
|
392
|
-
* @param baseDir - The base directory (defaults to '.' if not provided, null, or undefined)
|
|
393
|
-
* @param segments - Additional path segments to resolve
|
|
394
|
-
* @returns The resolved absolute path
|
|
395
|
-
*/
|
|
396
|
-
function resolvePath(baseDir, ...segments) {
|
|
397
|
-
// Handle edge cases: null, undefined, or empty strings
|
|
398
|
-
const base = baseDir || '.';
|
|
399
|
-
// Filter out any null, undefined, or empty string segments
|
|
400
|
-
const validSegments = segments.filter(segment => segment !== null && segment !== undefined && segment !== '');
|
|
401
|
-
return path.resolve(base, ...validSegments);
|
|
402
|
-
}
|
|
403
109
|
/**
|
|
404
110
|
* Parse YAML frontmatter from markdown content
|
|
405
111
|
* @param content - The markdown content with frontmatter
|
|
@@ -491,25 +197,15 @@ function convertMdToToml(mdContent) {
|
|
|
491
197
|
* @returns The template content in the requested format
|
|
492
198
|
*/
|
|
493
199
|
async function readAndProcessTemplate(templatePath, targetFormat) {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
return mdContent;
|
|
498
|
-
}
|
|
499
|
-
else if (targetFormat === 'toml') {
|
|
500
|
-
return convertMdToToml(mdContent);
|
|
501
|
-
}
|
|
502
|
-
else {
|
|
503
|
-
throw new Error(`Unsupported template format: ${targetFormat}`);
|
|
504
|
-
}
|
|
200
|
+
const mdContent = await fs.readFile(templatePath, 'utf-8');
|
|
201
|
+
if (targetFormat === 'md') {
|
|
202
|
+
return mdContent;
|
|
505
203
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
targetFormat,
|
|
512
|
-
});
|
|
204
|
+
else if (targetFormat === 'toml') {
|
|
205
|
+
return convertMdToToml(mdContent);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
throw new Error(`Unsupported template format: ${targetFormat}`);
|
|
513
209
|
}
|
|
514
210
|
}
|
|
515
211
|
/**
|
|
@@ -518,38 +214,9 @@ async function readAndProcessTemplate(templatePath, targetFormat) {
|
|
|
518
214
|
* @param destPath - Destination file path
|
|
519
215
|
*/
|
|
520
216
|
async function writeProcessedTemplate(content, destPath) {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
await fs.writeFile(destPath, content, 'utf-8');
|
|
526
|
-
}
|
|
527
|
-
catch (_error) {
|
|
528
|
-
const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
|
|
529
|
-
throw new types_1.FileSystemError(`Failed to write processed template: ${destPath}`, {
|
|
530
|
-
originalError: errorMessage,
|
|
531
|
-
path: destPath,
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Get the names of all markdown template files in a given subdirectory of templates.
|
|
537
|
-
* @param templateSubdir - The subdirectory within templates (e.g., 'commands/tasks')
|
|
538
|
-
* @returns An array of template names (filenames without .md extension)
|
|
539
|
-
* @throws FileSystemError if the directory cannot be read
|
|
540
|
-
*/
|
|
541
|
-
async function getMarkdownTemplateNames(templateSubdir) {
|
|
542
|
-
const fullPath = path.join(__dirname, '..', 'templates', templateSubdir);
|
|
543
|
-
try {
|
|
544
|
-
const files = await fs.readdir(fullPath);
|
|
545
|
-
return files.filter(file => file.endsWith('.md')).map(file => path.basename(file, '.md'));
|
|
546
|
-
}
|
|
547
|
-
catch (_error) {
|
|
548
|
-
const errorMessage = _error instanceof Error ? _error.message : 'Unknown error';
|
|
549
|
-
throw new types_1.FileSystemError(`Failed to read template directory: ${fullPath}`, {
|
|
550
|
-
originalError: errorMessage,
|
|
551
|
-
path: fullPath,
|
|
552
|
-
});
|
|
553
|
-
}
|
|
217
|
+
// Ensure destination directory exists
|
|
218
|
+
await fs.ensureDir(path.dirname(destPath));
|
|
219
|
+
// Write the content
|
|
220
|
+
await fs.writeFile(destPath, content, 'utf-8');
|
|
554
221
|
}
|
|
555
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWH,8BAUC;AAOD,0CAQC;AAOD,gCAQC;AAOD,wBAOC;AASD,oCAeC;AAQD,sCAUC;AAQD,oC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
|
76
|
+
/^dependencies:/ {
|
|
77
77
|
dep_section = 1
|
|
78
78
|
# Check if dependencies are on the same line
|
|
79
79
|
if (match($0, /\[.*\]/)) {
|
|
@@ -118,7 +118,7 @@ echo ""
|
|
|
118
118
|
for DEP_ID in $DEPENDENCIES; do
|
|
119
119
|
# Find dependency task file
|
|
120
120
|
DEP_FILE=""
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
# Try exact match first
|
|
123
123
|
if [ -f "${PLAN_DIR}/tasks/${DEP_ID}--"*.md ]; then
|
|
124
124
|
DEP_FILE=$(ls "${PLAN_DIR}/tasks/${DEP_ID}--"*.md 2>/dev/null | head -1)
|
|
@@ -134,18 +134,18 @@ for DEP_ID in $DEPENDENCIES; do
|
|
|
134
134
|
DEP_FILE=$(ls "${PLAN_DIR}/tasks/0${UNPADDED_DEP}--"*.md 2>/dev/null | head -1)
|
|
135
135
|
fi
|
|
136
136
|
fi
|
|
137
|
-
|
|
137
|
+
|
|
138
138
|
if [ -z "$DEP_FILE" ] || [ ! -f "$DEP_FILE" ]; then
|
|
139
139
|
print_error "Dependency task ${DEP_ID} not found"
|
|
140
140
|
ALL_RESOLVED=false
|
|
141
141
|
UNRESOLVED_DEPS="${UNRESOLVED_DEPS}${DEP_ID} (not found)\n"
|
|
142
142
|
continue
|
|
143
143
|
fi
|
|
144
|
-
|
|
144
|
+
|
|
145
145
|
# Extract status from dependency task
|
|
146
146
|
STATUS=$(awk '
|
|
147
147
|
/^---$/ { if (++delim == 2) exit }
|
|
148
|
-
/^status:/ {
|
|
148
|
+
/^status:/ {
|
|
149
149
|
gsub(/^status:[ \t]*/, "")
|
|
150
150
|
gsub(/^["'\'']/, "")
|
|
151
151
|
gsub(/["'\'']$/, "")
|
|
@@ -153,7 +153,7 @@ for DEP_ID in $DEPENDENCIES; do
|
|
|
153
153
|
exit
|
|
154
154
|
}
|
|
155
155
|
' "$DEP_FILE")
|
|
156
|
-
|
|
156
|
+
|
|
157
157
|
# Check if status is completed
|
|
158
158
|
if [ "$STATUS" = "completed" ]; then
|
|
159
159
|
print_success "Task ${DEP_ID} - Status: completed ✓"
|
|
@@ -16,7 +16,7 @@ You are responsible for executing a single task within a plan while maintaining
|
|
|
16
16
|
|
|
17
17
|
## Input Requirements
|
|
18
18
|
- Plan ID: $1 (required)
|
|
19
|
-
- Task ID: $2 (required)
|
|
19
|
+
- Task ID: $2 (required)
|
|
20
20
|
- Task management directory structure: `@.ai/task-manager/`
|
|
21
21
|
- Dependency checking script: `@templates/ai-task-manager/config/scripts/check-task-dependencies.sh`
|
|
22
22
|
|
|
@@ -87,7 +87,7 @@ Check current task status to ensure it can be executed:
|
|
|
87
87
|
# Extract current status from task frontmatter
|
|
88
88
|
CURRENT_STATUS=$(awk '
|
|
89
89
|
/^---$/ { if (++delim == 2) exit }
|
|
90
|
-
/^status:/ {
|
|
90
|
+
/^status:/ {
|
|
91
91
|
gsub(/^status:[ \t]*/, "")
|
|
92
92
|
gsub(/^["'\'']/, "")
|
|
93
93
|
gsub(/["'\'']$/, "")
|
|
@@ -144,7 +144,7 @@ Read task skills and select appropriate task-specific agent:
|
|
|
144
144
|
# Extract skills from task frontmatter
|
|
145
145
|
TASK_SKILLS=$(awk '
|
|
146
146
|
/^---$/ { if (++delim == 2) exit }
|
|
147
|
-
/^skills:/ {
|
|
147
|
+
/^skills:/ {
|
|
148
148
|
in_skills = 1
|
|
149
149
|
# Check if skills are on the same line
|
|
150
150
|
if (match($0, /\[.*\]/)) {
|
|
@@ -191,7 +191,7 @@ echo "Updating task status to in-progress..."
|
|
|
191
191
|
# Create temporary file with updated status
|
|
192
192
|
TEMP_FILE=$(mktemp)
|
|
193
193
|
awk '
|
|
194
|
-
/^---$/ {
|
|
194
|
+
/^---$/ {
|
|
195
195
|
if (++delim == 1) {
|
|
196
196
|
print
|
|
197
197
|
next
|
|
@@ -201,9 +201,9 @@ awk '
|
|
|
201
201
|
next
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
/^status:/ && delim == 1 {
|
|
204
|
+
/^status:/ && delim == 1 {
|
|
205
205
|
print "status: \"in-progress\""
|
|
206
|
-
next
|
|
206
|
+
next
|
|
207
207
|
}
|
|
208
208
|
{ print }
|
|
209
209
|
' "$TASK_FILE" > "$TEMP_FILE"
|
|
@@ -220,7 +220,7 @@ Deploy the task using the Task tool with full context:
|
|
|
220
220
|
|
|
221
221
|
**Task Deployment**: Use your internal Task tool to execute the task with the following context:
|
|
222
222
|
- Task file path: `$TASK_FILE`
|
|
223
|
-
- Plan directory: `$PLAN_DIR`
|
|
223
|
+
- Plan directory: `$PLAN_DIR`
|
|
224
224
|
- Required skills: `$TASK_SKILLS`
|
|
225
225
|
- Agent selection: Based on skills analysis or general-purpose agent
|
|
226
226
|
|
|
@@ -236,7 +236,7 @@ After task completion, update the status based on execution outcome:
|
|
|
236
236
|
```bash
|
|
237
237
|
TEMP_FILE=$(mktemp)
|
|
238
238
|
awk '
|
|
239
|
-
/^---$/ {
|
|
239
|
+
/^---$/ {
|
|
240
240
|
if (++delim == 1) {
|
|
241
241
|
print
|
|
242
242
|
next
|
|
@@ -246,9 +246,9 @@ awk '
|
|
|
246
246
|
next
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
/^status:/ && delim == 1 {
|
|
249
|
+
/^status:/ && delim == 1 {
|
|
250
250
|
print "status: \"completed\""
|
|
251
|
-
next
|
|
251
|
+
next
|
|
252
252
|
}
|
|
253
253
|
{ print }
|
|
254
254
|
' "$TASK_FILE" > "$TEMP_FILE"
|
|
@@ -270,7 +270,7 @@ echo "Task execution failed - updating status..."
|
|
|
270
270
|
|
|
271
271
|
TEMP_FILE=$(mktemp)
|
|
272
272
|
awk '
|
|
273
|
-
/^---$/ {
|
|
273
|
+
/^---$/ {
|
|
274
274
|
if (++delim == 1) {
|
|
275
275
|
print
|
|
276
276
|
next
|
|
@@ -280,9 +280,9 @@ awk '
|
|
|
280
280
|
next
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
/^status:/ && delim == 1 {
|
|
283
|
+
/^status:/ && delim == 1 {
|
|
284
284
|
print "status: \"failed\""
|
|
285
|
-
next
|
|
285
|
+
next
|
|
286
286
|
}
|
|
287
287
|
{ print }
|
|
288
288
|
' "$TASK_FILE" > "$TEMP_FILE"
|
|
@@ -312,7 +312,7 @@ exit 1
|
|
|
312
312
|
This command integrates with the existing task management system by:
|
|
313
313
|
- Using established plan and task location patterns
|
|
314
314
|
- Leveraging the dependency checking script for validation
|
|
315
|
-
- Following status management conventions
|
|
315
|
+
- Following status management conventions
|
|
316
316
|
- Maintaining compatibility with execute-blueprint workflows
|
|
317
317
|
- Preserving task isolation and dependency order
|
|
318
318
|
|