@aman_asmuei/aman-agent 0.21.1 → 0.23.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/index.js +181 -236
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -3293,6 +3293,17 @@ function progressBar(pct) {
|
|
|
3293
3293
|
}
|
|
3294
3294
|
|
|
3295
3295
|
// src/commands.ts
|
|
3296
|
+
import {
|
|
3297
|
+
getIdentity as acoreGetIdentity,
|
|
3298
|
+
updateSection as acoreUpdateSection
|
|
3299
|
+
} from "@aman_asmuei/acore-core";
|
|
3300
|
+
import {
|
|
3301
|
+
listRuleCategories as arulesListCategories,
|
|
3302
|
+
addRule as arulesAddRule,
|
|
3303
|
+
removeRule as arulesRemoveRule,
|
|
3304
|
+
toggleRuleAt as arulesToggleRule
|
|
3305
|
+
} from "@aman_asmuei/arules-core";
|
|
3306
|
+
var AGENT_SCOPE = process.env.AMAN_AGENT_SCOPE ?? "dev:agent";
|
|
3296
3307
|
function readEcosystemFile(filePath, label) {
|
|
3297
3308
|
if (!fs12.existsSync(filePath)) {
|
|
3298
3309
|
return pc5.dim(`No ${label} file found at ${filePath}`);
|
|
@@ -3318,17 +3329,26 @@ async function mcpWrite(ctx, layer, tool, args) {
|
|
|
3318
3329
|
}
|
|
3319
3330
|
return pc5.green(result);
|
|
3320
3331
|
}
|
|
3321
|
-
async function handleIdentityCommand(action, args,
|
|
3322
|
-
const home2 = os11.homedir();
|
|
3332
|
+
async function handleIdentityCommand(action, args, _ctx) {
|
|
3323
3333
|
if (!action) {
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3334
|
+
const identity = await acoreGetIdentity(AGENT_SCOPE);
|
|
3335
|
+
if (!identity) {
|
|
3336
|
+
return {
|
|
3337
|
+
handled: true,
|
|
3338
|
+
output: pc5.dim(
|
|
3339
|
+
`No identity configured for ${AGENT_SCOPE}. Run: npx @aman_asmuei/acore`
|
|
3340
|
+
)
|
|
3341
|
+
};
|
|
3342
|
+
}
|
|
3343
|
+
return { handled: true, output: identity.content.trim() };
|
|
3326
3344
|
}
|
|
3327
3345
|
if (action === "update") {
|
|
3328
3346
|
if (args.length === 0) {
|
|
3329
3347
|
return {
|
|
3330
3348
|
handled: true,
|
|
3331
|
-
output: pc5.yellow(
|
|
3349
|
+
output: pc5.yellow(
|
|
3350
|
+
"Usage: /identity update <section>\nTip: describe changes in natural language and the AI will update via acore-core."
|
|
3351
|
+
)
|
|
3332
3352
|
};
|
|
3333
3353
|
}
|
|
3334
3354
|
const section = args[0];
|
|
@@ -3336,60 +3356,161 @@ async function handleIdentityCommand(action, args, ctx) {
|
|
|
3336
3356
|
if (!content) {
|
|
3337
3357
|
return {
|
|
3338
3358
|
handled: true,
|
|
3339
|
-
output: pc5.yellow(
|
|
3359
|
+
output: pc5.yellow(
|
|
3360
|
+
"Usage: /identity update <section> <new content...>\nExample: /identity update Personality Warm, curious, and direct."
|
|
3361
|
+
)
|
|
3362
|
+
};
|
|
3363
|
+
}
|
|
3364
|
+
try {
|
|
3365
|
+
await acoreUpdateSection(section, content, AGENT_SCOPE);
|
|
3366
|
+
return { handled: true, output: pc5.green(`Updated section: ${section}`) };
|
|
3367
|
+
} catch (err) {
|
|
3368
|
+
return {
|
|
3369
|
+
handled: true,
|
|
3370
|
+
output: pc5.red(
|
|
3371
|
+
`Failed to update ${section}: ${err instanceof Error ? err.message : String(err)}`
|
|
3372
|
+
)
|
|
3340
3373
|
};
|
|
3341
3374
|
}
|
|
3342
|
-
const output = await mcpWrite(ctx, "identity", "identity_update_section", { section, content });
|
|
3343
|
-
return { handled: true, output };
|
|
3344
3375
|
}
|
|
3345
3376
|
if (action === "help") {
|
|
3346
|
-
return {
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3377
|
+
return {
|
|
3378
|
+
handled: true,
|
|
3379
|
+
output: [
|
|
3380
|
+
pc5.bold("Identity commands:"),
|
|
3381
|
+
` ${pc5.cyan("/identity")} View current identity`,
|
|
3382
|
+
` ${pc5.cyan("/identity update")} <section> Update a section`
|
|
3383
|
+
].join("\n")
|
|
3384
|
+
};
|
|
3351
3385
|
}
|
|
3352
|
-
return {
|
|
3386
|
+
return {
|
|
3387
|
+
handled: true,
|
|
3388
|
+
output: pc5.yellow(
|
|
3389
|
+
`Unknown action: /identity ${action}. Try /identity --help`
|
|
3390
|
+
)
|
|
3391
|
+
};
|
|
3353
3392
|
}
|
|
3354
|
-
async function handleRulesCommand(action, args,
|
|
3355
|
-
const home2 = os11.homedir();
|
|
3393
|
+
async function handleRulesCommand(action, args, _ctx) {
|
|
3356
3394
|
if (!action) {
|
|
3357
|
-
const
|
|
3358
|
-
|
|
3395
|
+
const cats = await arulesListCategories(AGENT_SCOPE);
|
|
3396
|
+
if (cats.length === 0) {
|
|
3397
|
+
return {
|
|
3398
|
+
handled: true,
|
|
3399
|
+
output: pc5.dim(
|
|
3400
|
+
`No rules configured for ${AGENT_SCOPE}. Run: npx @aman_asmuei/arules`
|
|
3401
|
+
)
|
|
3402
|
+
};
|
|
3403
|
+
}
|
|
3404
|
+
const lines = [];
|
|
3405
|
+
for (const cat of cats) {
|
|
3406
|
+
lines.push(pc5.bold(`## ${cat.name}`));
|
|
3407
|
+
for (const rule of cat.rules) {
|
|
3408
|
+
lines.push(` - ${rule}`);
|
|
3409
|
+
}
|
|
3410
|
+
lines.push("");
|
|
3411
|
+
}
|
|
3412
|
+
return { handled: true, output: lines.join("\n").trim() };
|
|
3359
3413
|
}
|
|
3360
3414
|
if (action === "add") {
|
|
3361
3415
|
if (args.length < 2) {
|
|
3362
|
-
return {
|
|
3416
|
+
return {
|
|
3417
|
+
handled: true,
|
|
3418
|
+
output: pc5.yellow("Usage: /rules add <category> <rule text...>")
|
|
3419
|
+
};
|
|
3363
3420
|
}
|
|
3364
3421
|
const category = args[0];
|
|
3365
3422
|
const rule = args.slice(1).join(" ");
|
|
3366
|
-
|
|
3367
|
-
|
|
3423
|
+
try {
|
|
3424
|
+
await arulesAddRule(category, rule, AGENT_SCOPE);
|
|
3425
|
+
return {
|
|
3426
|
+
handled: true,
|
|
3427
|
+
output: pc5.green(`Added rule to "${category}": ${rule}`)
|
|
3428
|
+
};
|
|
3429
|
+
} catch (err) {
|
|
3430
|
+
return {
|
|
3431
|
+
handled: true,
|
|
3432
|
+
output: pc5.red(
|
|
3433
|
+
`Failed: ${err instanceof Error ? err.message : String(err)}`
|
|
3434
|
+
)
|
|
3435
|
+
};
|
|
3436
|
+
}
|
|
3368
3437
|
}
|
|
3369
3438
|
if (action === "remove") {
|
|
3370
3439
|
if (args.length < 2) {
|
|
3371
|
-
return {
|
|
3440
|
+
return {
|
|
3441
|
+
handled: true,
|
|
3442
|
+
output: pc5.yellow("Usage: /rules remove <category> <index>")
|
|
3443
|
+
};
|
|
3444
|
+
}
|
|
3445
|
+
const category = args[0];
|
|
3446
|
+
const idx = parseInt(args[1], 10);
|
|
3447
|
+
if (isNaN(idx) || idx < 1) {
|
|
3448
|
+
return {
|
|
3449
|
+
handled: true,
|
|
3450
|
+
output: pc5.yellow("Index must be a positive integer.")
|
|
3451
|
+
};
|
|
3452
|
+
}
|
|
3453
|
+
try {
|
|
3454
|
+
await arulesRemoveRule(category, idx, AGENT_SCOPE);
|
|
3455
|
+
return {
|
|
3456
|
+
handled: true,
|
|
3457
|
+
output: pc5.green(`Removed rule ${idx} from "${category}"`)
|
|
3458
|
+
};
|
|
3459
|
+
} catch (err) {
|
|
3460
|
+
return {
|
|
3461
|
+
handled: true,
|
|
3462
|
+
output: pc5.red(
|
|
3463
|
+
`Failed: ${err instanceof Error ? err.message : String(err)}`
|
|
3464
|
+
)
|
|
3465
|
+
};
|
|
3372
3466
|
}
|
|
3373
|
-
const output = await mcpWrite(ctx, "rules", "rules_remove", { category: args[0], index: parseInt(args[1], 10) });
|
|
3374
|
-
return { handled: true, output };
|
|
3375
3467
|
}
|
|
3376
3468
|
if (action === "toggle") {
|
|
3377
3469
|
if (args.length < 2) {
|
|
3378
|
-
return {
|
|
3470
|
+
return {
|
|
3471
|
+
handled: true,
|
|
3472
|
+
output: pc5.yellow("Usage: /rules toggle <category> <index>")
|
|
3473
|
+
};
|
|
3474
|
+
}
|
|
3475
|
+
const category = args[0];
|
|
3476
|
+
const idx = parseInt(args[1], 10);
|
|
3477
|
+
if (isNaN(idx) || idx < 1) {
|
|
3478
|
+
return {
|
|
3479
|
+
handled: true,
|
|
3480
|
+
output: pc5.yellow("Index must be a positive integer.")
|
|
3481
|
+
};
|
|
3482
|
+
}
|
|
3483
|
+
try {
|
|
3484
|
+
await arulesToggleRule(category, idx, AGENT_SCOPE);
|
|
3485
|
+
return {
|
|
3486
|
+
handled: true,
|
|
3487
|
+
output: pc5.green(`Toggled rule ${idx} in "${category}"`)
|
|
3488
|
+
};
|
|
3489
|
+
} catch (err) {
|
|
3490
|
+
return {
|
|
3491
|
+
handled: true,
|
|
3492
|
+
output: pc5.red(
|
|
3493
|
+
`Failed: ${err instanceof Error ? err.message : String(err)}`
|
|
3494
|
+
)
|
|
3495
|
+
};
|
|
3379
3496
|
}
|
|
3380
|
-
const output = await mcpWrite(ctx, "rules", "rules_toggle", { category: args[0], index: parseInt(args[1], 10) });
|
|
3381
|
-
return { handled: true, output };
|
|
3382
3497
|
}
|
|
3383
3498
|
if (action === "help") {
|
|
3384
|
-
return {
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3499
|
+
return {
|
|
3500
|
+
handled: true,
|
|
3501
|
+
output: [
|
|
3502
|
+
pc5.bold("Rules commands:"),
|
|
3503
|
+
` ${pc5.cyan("/rules")} View current rules`,
|
|
3504
|
+
` ${pc5.cyan("/rules add")} <category> <text> Add a rule`,
|
|
3505
|
+
` ${pc5.cyan("/rules remove")} <category> <idx> Remove a rule`,
|
|
3506
|
+
` ${pc5.cyan("/rules toggle")} <category> <idx> Toggle a rule`
|
|
3507
|
+
].join("\n")
|
|
3508
|
+
};
|
|
3391
3509
|
}
|
|
3392
|
-
return {
|
|
3510
|
+
return {
|
|
3511
|
+
handled: true,
|
|
3512
|
+
output: pc5.yellow(`Unknown action: /rules ${action}. Try /rules --help`)
|
|
3513
|
+
};
|
|
3393
3514
|
}
|
|
3394
3515
|
async function handleWorkflowsCommand(action, args, ctx) {
|
|
3395
3516
|
const home2 = os11.homedir();
|
|
@@ -3421,205 +3542,29 @@ async function handleWorkflowsCommand(action, args, ctx) {
|
|
|
3421
3542
|
}
|
|
3422
3543
|
return { handled: true, output: pc5.yellow(`Unknown action: /workflows ${action}. Try /workflows --help`) };
|
|
3423
3544
|
}
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
{
|
|
3438
|
-
{
|
|
3439
|
-
{
|
|
3440
|
-
{
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
return JSON.parse(fs12.readFileSync(filePath, "utf-8"));
|
|
3448
|
-
} catch {
|
|
3449
|
-
return [];
|
|
3450
|
-
}
|
|
3451
|
-
}
|
|
3452
|
-
function saveAkitInstalled(tools) {
|
|
3453
|
-
const dir = path12.join(os11.homedir(), ".akit");
|
|
3454
|
-
fs12.mkdirSync(dir, { recursive: true });
|
|
3455
|
-
fs12.writeFileSync(path12.join(dir, "installed.json"), JSON.stringify(tools, null, 2) + "\n", "utf-8");
|
|
3456
|
-
}
|
|
3457
|
-
function addToAmanAgentConfig(name, mcpConfig) {
|
|
3458
|
-
const configPath = path12.join(os11.homedir(), ".aman-agent", "config.json");
|
|
3459
|
-
if (!fs12.existsSync(configPath)) return;
|
|
3460
|
-
try {
|
|
3461
|
-
const config = JSON.parse(fs12.readFileSync(configPath, "utf-8"));
|
|
3462
|
-
if (!config.mcpServers) config.mcpServers = {};
|
|
3463
|
-
config.mcpServers[name] = mcpConfig;
|
|
3464
|
-
fs12.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
3465
|
-
} catch {
|
|
3466
|
-
}
|
|
3467
|
-
}
|
|
3468
|
-
function removeFromAmanAgentConfig(name) {
|
|
3469
|
-
const configPath = path12.join(os11.homedir(), ".aman-agent", "config.json");
|
|
3470
|
-
if (!fs12.existsSync(configPath)) return;
|
|
3471
|
-
try {
|
|
3472
|
-
const config = JSON.parse(fs12.readFileSync(configPath, "utf-8"));
|
|
3473
|
-
if (config.mcpServers) {
|
|
3474
|
-
delete config.mcpServers[name];
|
|
3475
|
-
fs12.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
3476
|
-
}
|
|
3477
|
-
} catch {
|
|
3478
|
-
}
|
|
3479
|
-
}
|
|
3480
|
-
function handleAkitCommand(action, args) {
|
|
3481
|
-
const installed = loadAkitInstalled();
|
|
3482
|
-
const installedNames = new Set(installed.map((t) => t.name));
|
|
3483
|
-
if (action === "add") {
|
|
3484
|
-
const available2 = AKIT_REGISTRY.filter((t) => !installedNames.has(t.name));
|
|
3485
|
-
if (args.length < 1) {
|
|
3486
|
-
if (available2.length === 0) {
|
|
3487
|
-
return { handled: true, output: pc5.green("All tools are installed!") };
|
|
3488
|
-
}
|
|
3489
|
-
const lines3 = [pc5.bold("Select a tool to install:"), ""];
|
|
3490
|
-
available2.forEach((tool2, i) => {
|
|
3491
|
-
const num2 = pc5.cyan(String(i + 1).padStart(2));
|
|
3492
|
-
lines3.push(` ${num2} ${tool2.name.padEnd(16)} ${pc5.dim(tool2.description)}`);
|
|
3493
|
-
});
|
|
3494
|
-
lines3.push("");
|
|
3495
|
-
lines3.push(` Type: ${pc5.cyan("/akit add <number>")} or ${pc5.cyan("/akit add <name>")}`);
|
|
3496
|
-
lines3.push(` Custom: ${pc5.cyan("/akit add custom <name> <command> <args...>")}`);
|
|
3497
|
-
return { handled: true, output: lines3.join("\n") };
|
|
3498
|
-
}
|
|
3499
|
-
if (args[0].toLowerCase() === "custom") {
|
|
3500
|
-
if (args.length < 3) {
|
|
3501
|
-
return { handled: true, output: pc5.yellow("Usage: /akit add custom <name> <command> <args...>\nExample: /akit add custom my-tool npx -y @org/my-mcp-server") };
|
|
3502
|
-
}
|
|
3503
|
-
const customName = args[1];
|
|
3504
|
-
const customCommand = args[2];
|
|
3505
|
-
const customArgs = args.slice(3);
|
|
3506
|
-
if (installedNames.has(customName)) {
|
|
3507
|
-
return { handled: true, output: pc5.yellow(`${customName} is already installed.`) };
|
|
3508
|
-
}
|
|
3509
|
-
installed.push({
|
|
3510
|
-
name: customName,
|
|
3511
|
-
installedAt: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
3512
|
-
mcpConfigured: true
|
|
3513
|
-
});
|
|
3514
|
-
saveAkitInstalled(installed);
|
|
3515
|
-
addToAmanAgentConfig(customName, { command: customCommand, args: customArgs });
|
|
3516
|
-
return {
|
|
3517
|
-
handled: true,
|
|
3518
|
-
output: [
|
|
3519
|
-
pc5.green(`\u2713 Added ${pc5.bold(customName)}`) + pc5.dim(` (custom MCP: ${customCommand} ${customArgs.join(" ")})`),
|
|
3520
|
-
pc5.dim(" Restart aman-agent to load the new tool.")
|
|
3521
|
-
].join("\n")
|
|
3522
|
-
};
|
|
3523
|
-
}
|
|
3524
|
-
const input = args[0].toLowerCase();
|
|
3525
|
-
let tool;
|
|
3526
|
-
const num = parseInt(input, 10);
|
|
3527
|
-
if (!isNaN(num) && num >= 1 && num <= available2.length) {
|
|
3528
|
-
tool = available2[num - 1];
|
|
3529
|
-
} else {
|
|
3530
|
-
tool = AKIT_REGISTRY.find((t) => t.name === input);
|
|
3531
|
-
}
|
|
3532
|
-
if (!tool) {
|
|
3533
|
-
return {
|
|
3534
|
-
handled: true,
|
|
3535
|
-
output: [
|
|
3536
|
-
pc5.red(`Tool "${input}" not found.`),
|
|
3537
|
-
`Type ${pc5.cyan("/akit add")} to see available tools.`
|
|
3538
|
-
].join("\n")
|
|
3539
|
-
};
|
|
3540
|
-
}
|
|
3541
|
-
if (installedNames.has(tool.name)) {
|
|
3542
|
-
return { handled: true, output: pc5.yellow(`${tool.name} is already installed.`) };
|
|
3543
|
-
}
|
|
3544
|
-
installed.push({
|
|
3545
|
-
name: tool.name,
|
|
3546
|
-
installedAt: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
3547
|
-
mcpConfigured: tool.mcp !== null
|
|
3548
|
-
});
|
|
3549
|
-
saveAkitInstalled(installed);
|
|
3550
|
-
if (tool.mcp) {
|
|
3551
|
-
addToAmanAgentConfig(tool.name, {
|
|
3552
|
-
command: tool.mcp.command,
|
|
3553
|
-
args: tool.mcp.args
|
|
3554
|
-
});
|
|
3555
|
-
}
|
|
3556
|
-
const lines2 = [
|
|
3557
|
-
pc5.green(`\u2713 Added ${pc5.bold(tool.name)}`) + (tool.mcp ? pc5.dim(` (MCP: ${tool.mcp.package})`) : "")
|
|
3558
|
-
];
|
|
3559
|
-
if (tool.envHint) {
|
|
3560
|
-
lines2.push(pc5.yellow(` \u26A0 ${tool.envHint}`));
|
|
3561
|
-
}
|
|
3562
|
-
if (tool.mcp) {
|
|
3563
|
-
lines2.push(pc5.dim(" Restart aman-agent to load the new tool."));
|
|
3564
|
-
}
|
|
3565
|
-
return { handled: true, output: lines2.join("\n") };
|
|
3566
|
-
}
|
|
3567
|
-
if (action === "remove") {
|
|
3568
|
-
if (args.length < 1) {
|
|
3569
|
-
return { handled: true, output: pc5.yellow("Usage: /akit remove <tool>") };
|
|
3570
|
-
}
|
|
3571
|
-
const toolName = args[0].toLowerCase();
|
|
3572
|
-
if (!installedNames.has(toolName)) {
|
|
3573
|
-
return { handled: true, output: pc5.red(`${toolName} is not installed.`) };
|
|
3574
|
-
}
|
|
3575
|
-
const updated = installed.filter((t) => t.name !== toolName);
|
|
3576
|
-
saveAkitInstalled(updated);
|
|
3577
|
-
removeFromAmanAgentConfig(toolName);
|
|
3578
|
-
return {
|
|
3579
|
-
handled: true,
|
|
3580
|
-
output: pc5.green(`\u2713 Removed ${pc5.bold(toolName)}`) + pc5.dim(" (restart aman-agent to apply)")
|
|
3581
|
-
};
|
|
3582
|
-
}
|
|
3583
|
-
if (action === "help") {
|
|
3584
|
-
return {
|
|
3585
|
-
handled: true,
|
|
3586
|
-
output: [
|
|
3587
|
-
pc5.bold("akit \u2014 Tool Management"),
|
|
3588
|
-
"",
|
|
3589
|
-
` ${pc5.cyan("/akit")} List installed & available tools`,
|
|
3590
|
-
` ${pc5.cyan("/akit add <tool>")} Install a tool`,
|
|
3591
|
-
` ${pc5.cyan("/akit remove <tool>")} Uninstall a tool`
|
|
3592
|
-
].join("\n")
|
|
3593
|
-
};
|
|
3594
|
-
}
|
|
3595
|
-
const available = AKIT_REGISTRY.filter((t) => !installedNames.has(t.name));
|
|
3596
|
-
const lines = [pc5.bold("akit \u2014 AI Tool Manager"), ""];
|
|
3597
|
-
if (installed.length > 0) {
|
|
3598
|
-
lines.push(` ${pc5.bold(`Installed (${installed.length})`)}`);
|
|
3599
|
-
for (const tool of installed) {
|
|
3600
|
-
const mcp = tool.mcpConfigured ? pc5.green("MCP") : pc5.dim("manual");
|
|
3601
|
-
lines.push(` ${pc5.green("\u25CF")} ${pc5.bold(tool.name.padEnd(16))} ${mcp} ${pc5.dim(tool.installedAt)}`);
|
|
3602
|
-
}
|
|
3603
|
-
lines.push("");
|
|
3604
|
-
}
|
|
3605
|
-
if (available.length > 0) {
|
|
3606
|
-
lines.push(` ${pc5.bold(`Available (${available.length})`)}`);
|
|
3607
|
-
const byCategory = /* @__PURE__ */ new Map();
|
|
3608
|
-
for (const tool of available) {
|
|
3609
|
-
if (!byCategory.has(tool.category)) byCategory.set(tool.category, []);
|
|
3610
|
-
byCategory.get(tool.category).push(tool);
|
|
3611
|
-
}
|
|
3612
|
-
for (const [category, tools] of byCategory) {
|
|
3613
|
-
lines.push(` ${pc5.dim(category)}`);
|
|
3614
|
-
for (const tool of tools) {
|
|
3615
|
-
lines.push(` ${pc5.dim("\u25CB")} ${tool.name.padEnd(16)} ${pc5.dim(tool.description)}`);
|
|
3616
|
-
}
|
|
3617
|
-
}
|
|
3618
|
-
lines.push("");
|
|
3619
|
-
}
|
|
3620
|
-
lines.push(` ${pc5.cyan("/akit add <tool>")} Install a tool`);
|
|
3621
|
-
lines.push(` ${pc5.cyan("/akit remove <tool>")} Uninstall a tool`);
|
|
3622
|
-
return { handled: true, output: lines.join("\n") };
|
|
3545
|
+
function handleAkitCommand(_action, _args) {
|
|
3546
|
+
return {
|
|
3547
|
+
handled: true,
|
|
3548
|
+
output: [
|
|
3549
|
+
pc5.bold("akit \u2014 Tool Management"),
|
|
3550
|
+
"",
|
|
3551
|
+
pc5.dim(
|
|
3552
|
+
"Tool management is now handled by the standalone akit CLI rather than"
|
|
3553
|
+
),
|
|
3554
|
+
pc5.dim(
|
|
3555
|
+
"duplicated inside aman-agent. The akit slash command is informational only."
|
|
3556
|
+
),
|
|
3557
|
+
"",
|
|
3558
|
+
` ${pc5.cyan("npx @aman_asmuei/akit list")} List installed tools`,
|
|
3559
|
+
` ${pc5.cyan("npx @aman_asmuei/akit search <query>")} Search the tool registry`,
|
|
3560
|
+
` ${pc5.cyan("npx @aman_asmuei/akit add <tool>")} Install a tool`,
|
|
3561
|
+
` ${pc5.cyan("npx @aman_asmuei/akit remove <tool>")} Uninstall a tool`,
|
|
3562
|
+
"",
|
|
3563
|
+
pc5.dim(
|
|
3564
|
+
"Restart aman-agent after installing/removing tools to pick up changes."
|
|
3565
|
+
)
|
|
3566
|
+
].join("\n")
|
|
3567
|
+
};
|
|
3623
3568
|
}
|
|
3624
3569
|
async function handleSkillsCommand(action, args, ctx) {
|
|
3625
3570
|
const home2 = os11.homedir();
|
|
@@ -4023,7 +3968,7 @@ function handleReset(action) {
|
|
|
4023
3968
|
function handleUpdate() {
|
|
4024
3969
|
try {
|
|
4025
3970
|
const current = execFileSync3("npm", ["view", "@aman_asmuei/aman-agent", "version"], { encoding: "utf-8" }).trim();
|
|
4026
|
-
const local = true ? "0.
|
|
3971
|
+
const local = true ? "0.23.0" : "unknown";
|
|
4027
3972
|
if (current === local) {
|
|
4028
3973
|
return { handled: true, output: `${pc5.green("Up to date")} \u2014 v${local}` };
|
|
4029
3974
|
}
|
|
@@ -6478,7 +6423,7 @@ function bootstrapEcosystem() {
|
|
|
6478
6423
|
return true;
|
|
6479
6424
|
}
|
|
6480
6425
|
var program = new Command();
|
|
6481
|
-
program.name("aman-agent").description("Your AI companion, running locally").version("0.
|
|
6426
|
+
program.name("aman-agent").description("Your AI companion, running locally").version("0.23.0").option("--model <model>", "Override LLM model").option("--budget <tokens>", "Token budget for system prompt (default: 8000)", parseInt).option("--profile <name>", "Use a specific agent profile (e.g., coder, writer, researcher)").action(async (options) => {
|
|
6482
6427
|
p3.intro(pc8.bold("aman agent") + pc8.dim(" \u2014 your AI companion"));
|
|
6483
6428
|
let config = loadConfig();
|
|
6484
6429
|
if (!config) {
|