@dccxx/auggiegw 1.0.24 → 1.0.25
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/cli.js +29 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2377,8 +2377,24 @@ async function getKit(kitId, apiUrl) {
|
|
|
2377
2377
|
}
|
|
2378
2378
|
return data;
|
|
2379
2379
|
}
|
|
2380
|
+
function mapModelName(model) {
|
|
2381
|
+
const lowerModel = model.toLowerCase();
|
|
2382
|
+
if (lowerModel.includes("opus")) {
|
|
2383
|
+
return "opus";
|
|
2384
|
+
}
|
|
2385
|
+
if (lowerModel.includes("sonnet")) {
|
|
2386
|
+
return "sonnet";
|
|
2387
|
+
}
|
|
2388
|
+
if (lowerModel.includes("haiku")) {
|
|
2389
|
+
return "haiku";
|
|
2390
|
+
}
|
|
2391
|
+
return model;
|
|
2392
|
+
}
|
|
2380
2393
|
async function saveSubagentToFile(subagent) {
|
|
2381
|
-
|
|
2394
|
+
let augmentError = null;
|
|
2395
|
+
let claudeError = null;
|
|
2396
|
+
try {
|
|
2397
|
+
const augmentMarkdownContent = `---
|
|
2382
2398
|
name: "${subagent.name}"
|
|
2383
2399
|
description: "${subagent.description}"
|
|
2384
2400
|
model: "${subagent.model}"
|
|
@@ -2386,19 +2402,25 @@ color: "${subagent.color}"
|
|
|
2386
2402
|
---
|
|
2387
2403
|
|
|
2388
2404
|
${subagent.content}`;
|
|
2389
|
-
let augmentError = null;
|
|
2390
|
-
let claudeError = null;
|
|
2391
|
-
try {
|
|
2392
2405
|
await fs.mkdir(AUGMENT_AGENTS_DIR, { recursive: true });
|
|
2393
2406
|
const filePath = path.join(AUGMENT_AGENTS_DIR, `${subagent.name}.md`);
|
|
2394
|
-
await fs.writeFile(filePath,
|
|
2407
|
+
await fs.writeFile(filePath, augmentMarkdownContent, "utf-8");
|
|
2395
2408
|
} catch (error) {
|
|
2396
2409
|
augmentError = new Error(`Failed to save to .augment: ${error}`);
|
|
2397
2410
|
}
|
|
2398
2411
|
try {
|
|
2412
|
+
const mappedModel = mapModelName(subagent.model);
|
|
2413
|
+
const claudeMarkdownContent = `---
|
|
2414
|
+
name: "${subagent.name}"
|
|
2415
|
+
description: "${subagent.description}"
|
|
2416
|
+
model: "${mappedModel}"
|
|
2417
|
+
color: "${subagent.color}"
|
|
2418
|
+
---
|
|
2419
|
+
|
|
2420
|
+
${subagent.content}`;
|
|
2399
2421
|
await fs.mkdir(CLAUDE_AGENTS_DIR, { recursive: true });
|
|
2400
2422
|
const filePath = path.join(CLAUDE_AGENTS_DIR, `${subagent.name}.md`);
|
|
2401
|
-
await fs.writeFile(filePath,
|
|
2423
|
+
await fs.writeFile(filePath, claudeMarkdownContent, "utf-8");
|
|
2402
2424
|
} catch (error) {
|
|
2403
2425
|
claudeError = new Error(`Failed to save to .claude: ${error}`);
|
|
2404
2426
|
}
|
|
@@ -2799,4 +2821,4 @@ program2.command("switch-account").description("Switch to a newer account from t
|
|
|
2799
2821
|
program2.command("kit <kit-id>").description("Fetch and install a kit (prompts and subagents) from the public API").action(handleKit);
|
|
2800
2822
|
program2.parse();
|
|
2801
2823
|
|
|
2802
|
-
//# debugId=
|
|
2824
|
+
//# debugId=061E1F59864147E164756E2164756E21
|