aiwf 0.3.13 → 0.3.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.
- package/package.json +1 -1
- package/src/lib/installer.js +26 -1
- package/src/utils/paths.js +1 -0
package/package.json
CHANGED
package/src/lib/installer.js
CHANGED
|
@@ -190,6 +190,7 @@ async function createDirectoryStructure() {
|
|
|
190
190
|
// Create tool-specific directories
|
|
191
191
|
await fs.mkdir(TOOL_DIRS.CURSOR_RULES, { recursive: true });
|
|
192
192
|
await fs.mkdir(TOOL_DIRS.WINDSURF_RULES, { recursive: true });
|
|
193
|
+
await fs.mkdir(TOOL_DIRS.CLAUDE_AGENTS, { recursive: true });
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
/**
|
|
@@ -285,7 +286,7 @@ async function updateDocumentation(languagePath, spinner, msg, debugLog) {
|
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
/**
|
|
288
|
-
* Update commands
|
|
289
|
+
* Update Claude commands and agents
|
|
289
290
|
* @param {string} languagePath - Language path
|
|
290
291
|
* @param {Object} spinner - Ora spinner instance
|
|
291
292
|
* @param {Object} msg - Localized messages
|
|
@@ -298,7 +299,14 @@ async function updateCommands(languagePath, spinner, msg, debugLog) {
|
|
|
298
299
|
await fs.rm(TOOL_DIRS.CLAUDE_COMMANDS, { recursive: true, force: true });
|
|
299
300
|
}
|
|
300
301
|
|
|
302
|
+
// Delete existing agents folder if it exists
|
|
303
|
+
if (await fs.access(TOOL_DIRS.CLAUDE_AGENTS).then(() => true).catch(() => false)) {
|
|
304
|
+
logWithSpinner(spinner, 'Deleting old agents...', debugLog);
|
|
305
|
+
await fs.rm(TOOL_DIRS.CLAUDE_AGENTS, { recursive: true, force: true });
|
|
306
|
+
}
|
|
307
|
+
|
|
301
308
|
await fs.mkdir(TOOL_DIRS.CLAUDE_COMMANDS, { recursive: true });
|
|
309
|
+
await fs.mkdir(TOOL_DIRS.CLAUDE_AGENTS, { recursive: true });
|
|
302
310
|
|
|
303
311
|
// Download commands
|
|
304
312
|
logWithSpinner(spinner, msg.downloadingCommands, debugLog);
|
|
@@ -314,11 +322,28 @@ async function updateCommands(languagePath, spinner, msg, debugLog) {
|
|
|
314
322
|
} catch (error) {
|
|
315
323
|
logWithSpinner(spinner, msg.commandsNotFound, debugLog);
|
|
316
324
|
}
|
|
325
|
+
|
|
326
|
+
// Download agents
|
|
327
|
+
logWithSpinner(spinner, 'Downloading agents...', debugLog);
|
|
328
|
+
try {
|
|
329
|
+
await downloadDirectory(
|
|
330
|
+
`${GITHUB_CONTENT_PREFIX}/${languagePath}/${TOOL_DIRS.CLAUDE_AGENTS}`,
|
|
331
|
+
TOOL_DIRS.CLAUDE_AGENTS,
|
|
332
|
+
spinner,
|
|
333
|
+
msg,
|
|
334
|
+
languagePath,
|
|
335
|
+
false // agents도 기존 방식 유지 (파일 리스트 사용)
|
|
336
|
+
);
|
|
337
|
+
logWithSpinner(spinner, 'Successfully downloaded agents', debugLog);
|
|
338
|
+
} catch (error) {
|
|
339
|
+
logWithSpinner(spinner, 'Agents not found or failed to download', debugLog);
|
|
340
|
+
}
|
|
317
341
|
}
|
|
318
342
|
|
|
319
343
|
/**
|
|
320
344
|
* Download and process rules
|
|
321
345
|
* @param {Object} spinner - Ora spinner instance
|
|
346
|
+
{{ ... }}
|
|
322
347
|
* @param {Object} msg - Localized messages
|
|
323
348
|
* @param {boolean} debugLog - Debug mode flag
|
|
324
349
|
*/
|
package/src/utils/paths.js
CHANGED
|
@@ -37,6 +37,7 @@ export const AIWF_DIRS = {
|
|
|
37
37
|
// Tool-specific directories
|
|
38
38
|
export const TOOL_DIRS = {
|
|
39
39
|
CLAUDE_COMMANDS: path.join(BASE_DIRS.CLAUDE, 'commands', 'aiwf'),
|
|
40
|
+
CLAUDE_AGENTS: path.join(BASE_DIRS.CLAUDE, 'agents'),
|
|
40
41
|
GEMINI_PROMPTS: path.join(BASE_DIRS.GEMINI, 'prompts', 'aiwf'),
|
|
41
42
|
CURSOR_RULES: path.join(BASE_DIRS.CURSOR, 'rules'),
|
|
42
43
|
WINDSURF_RULES: path.join(BASE_DIRS.WINDSURF, 'rules')
|