@aman_asmuei/aman-agent 0.33.3 → 0.33.7

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 CHANGED
@@ -122,6 +122,7 @@ $ aman-agent dev ~/projects/amantrade
122
122
  | Flag | What it does |
123
123
  |:---|:---|
124
124
  | `--smart` | Use your configured LLM to synthesize a smarter CLAUDE.md |
125
+ | `--yolo` | Launch Claude Code with `--dangerously-skip-permissions` (full autonomous mode) |
125
126
  | `--no-launch` | Generate CLAUDE.md only, don't start Claude Code |
126
127
  | `--diff` | Preview what would change without writing |
127
128
  | `--force` | Regenerate even if CLAUDE.md is fresh |
@@ -406,6 +407,15 @@ aman-agent dev --smart
406
407
 
407
408
  The LLM merges related corrections into single convention statements and removes redundancy. Falls back to template mode automatically if the LLM call fails.
408
409
 
410
+ **Yolo mode** — Full autonomous, no permission prompts:
411
+
412
+ ```bash
413
+ aman-agent dev --yolo # skip permissions
414
+ aman-agent dev --yolo --smart # skip permissions + LLM-generated CLAUDE.md
415
+ ```
416
+
417
+ Launches Claude Code with `--dangerously-skip-permissions`. Use when you trust the project and want zero friction.
418
+
409
419
  **Multi-project workflow** — Each terminal is independent:
410
420
 
411
421
  ```bash
@@ -1357,7 +1367,7 @@ sequenceDiagram
1357
1367
  | Command | Description |
1358
1368
  |:---|:---|
1359
1369
  | `aman-agent` | Start interactive chat session |
1360
- | `aman-agent dev [path]` | Scan project, generate CLAUDE.md, launch Claude Code `[--smart\|--no-launch\|--force\|--diff]` |
1370
+ | `aman-agent dev [path]` | Scan project, generate CLAUDE.md, launch Claude Code `[--smart\|--yolo\|--no-launch\|--force\|--diff]` |
1361
1371
  | `aman-agent init` | Set up your AI companion with a guided wizard |
1362
1372
  | `aman-agent serve` | Run as a local MCP server for agent delegation `[--name\|--profile]` |
1363
1373
  | `aman-agent setup` | Full reconfiguration wizard |
package/dist/index.js CHANGED
@@ -796,6 +796,7 @@ var init_stack_detector = __esm({
796
796
  });
797
797
 
798
798
  // src/dev/context-builder.ts
799
+ import fs25 from "fs";
799
800
  import path25 from "path";
800
801
  import os22 from "os";
801
802
  import { createDatabase as createDatabase2, recall as recall2 } from "@aman_asmuei/amem-core";
@@ -827,9 +828,10 @@ async function buildContext2(stack, opts) {
827
828
  try {
828
829
  const amemDir = process.env.AMEM_DIR ?? path25.join(os22.homedir(), ".amem");
829
830
  const dbPath = process.env.AMEM_DB ?? path25.join(amemDir, "memory.db");
831
+ if (!process.env.AMEM_DB && !fs25.existsSync(dbPath)) throw new Error("no db");
830
832
  const db2 = createDatabase2(dbPath);
831
833
  const query = [stack.projectName, ...stack.languages, ...stack.frameworks].join(" ");
832
- const result = await recall2(db2, { query, limit: 20 });
834
+ const result = await recall2(db2, { query, limit: 20, compact: false, rerank: false });
833
835
  for (const mem of result.memories) {
834
836
  const content = mem.content;
835
837
  if (typeof content !== "string" || !content) continue;
@@ -959,7 +961,7 @@ var init_context_builder = __esm({
959
961
  });
960
962
 
961
963
  // src/dev/claude-md-writer.ts
962
- import fs25 from "fs";
964
+ import fs26 from "fs";
963
965
  import path26 from "path";
964
966
  function formatStack(stack) {
965
967
  const parts = [];
@@ -1044,10 +1046,10 @@ function parseMarker(content) {
1044
1046
  }
1045
1047
  function checkStaleness(projectPath) {
1046
1048
  const claudeMdPath = path26.join(projectPath, "CLAUDE.md");
1047
- if (!fs25.existsSync(claudeMdPath)) {
1049
+ if (!fs26.existsSync(claudeMdPath)) {
1048
1050
  return { status: "missing" };
1049
1051
  }
1050
- const content = fs25.readFileSync(claudeMdPath, "utf-8");
1052
+ const content = fs26.readFileSync(claudeMdPath, "utf-8");
1051
1053
  const marker = parseMarker(content);
1052
1054
  if (!marker) {
1053
1055
  return { status: "no-marker" };
@@ -1057,16 +1059,16 @@ function checkStaleness(projectPath) {
1057
1059
  function writeClaudeMd(ctx, projectPath) {
1058
1060
  const claudeMdPath = path26.join(projectPath, "CLAUDE.md");
1059
1061
  let backedUp = false;
1060
- if (fs25.existsSync(claudeMdPath)) {
1061
- const content = fs25.readFileSync(claudeMdPath, "utf-8");
1062
+ if (fs26.existsSync(claudeMdPath)) {
1063
+ const content = fs26.readFileSync(claudeMdPath, "utf-8");
1062
1064
  const marker = parseMarker(content);
1063
1065
  if (!marker) {
1064
- fs25.copyFileSync(claudeMdPath, `${claudeMdPath}.bak`);
1066
+ fs26.copyFileSync(claudeMdPath, `${claudeMdPath}.bak`);
1065
1067
  backedUp = true;
1066
1068
  }
1067
1069
  }
1068
1070
  const md = renderToString(ctx);
1069
- fs25.writeFileSync(claudeMdPath, md, "utf-8");
1071
+ fs26.writeFileSync(claudeMdPath, md, "utf-8");
1070
1072
  return { written: true, backedUp, path: claudeMdPath };
1071
1073
  }
1072
1074
  var init_claude_md_writer = __esm({
@@ -1080,18 +1082,18 @@ var dev_command_exports = {};
1080
1082
  __export(dev_command_exports, {
1081
1083
  runDev: () => runDev
1082
1084
  });
1083
- import fs26 from "fs";
1085
+ import fs27 from "fs";
1084
1086
  import path27 from "path";
1085
1087
  function ensureGitignore(projectPath) {
1086
1088
  const gitignorePath = path27.join(projectPath, ".gitignore");
1087
- if (!fs26.existsSync(gitignorePath)) return;
1088
- const content = fs26.readFileSync(gitignorePath, "utf-8");
1089
+ if (!fs27.existsSync(gitignorePath)) return;
1090
+ const content = fs27.readFileSync(gitignorePath, "utf-8");
1089
1091
  if (content.includes("CLAUDE.md")) return;
1090
- fs26.appendFileSync(gitignorePath, "\n# Generated by aman-agent dev\nCLAUDE.md\n");
1092
+ fs27.appendFileSync(gitignorePath, "\n# Generated by aman-agent dev\nCLAUDE.md\n");
1091
1093
  }
1092
1094
  async function runDev(projectPath, flags = {}, precomputedStack) {
1093
1095
  const resolved = path27.resolve(projectPath);
1094
- if (!fs26.existsSync(resolved)) {
1096
+ if (!fs27.existsSync(resolved)) {
1095
1097
  return { success: false, generated: false, error: `Directory not found: ${resolved}` };
1096
1098
  }
1097
1099
  const stack = precomputedStack ?? scanStack(resolved);
@@ -1099,7 +1101,7 @@ async function runDev(projectPath, flags = {}, precomputedStack) {
1099
1101
  const ctx2 = await buildContext2(stack, { smart: flags.smart });
1100
1102
  const newContent = renderToString(ctx2);
1101
1103
  const existingPath = path27.join(resolved, "CLAUDE.md");
1102
- const existing = fs26.existsSync(existingPath) ? fs26.readFileSync(existingPath, "utf-8") : "";
1104
+ const existing = fs27.existsSync(existingPath) ? fs27.readFileSync(existingPath, "utf-8") : "";
1103
1105
  return {
1104
1106
  success: true,
1105
1107
  generated: false,
@@ -7083,7 +7085,7 @@ function handleReset(action) {
7083
7085
  function handleUpdate() {
7084
7086
  try {
7085
7087
  const current = execFileSync3("npm", ["view", "@aman_asmuei/aman-agent", "version"], { encoding: "utf-8" }).trim();
7086
- const local = true ? "0.33.3" : "unknown";
7088
+ const local = true ? "0.33.7" : "unknown";
7087
7089
  if (current === local) {
7088
7090
  return { handled: true, output: `${pc6.green("Up to date")} \u2014 v${local}` };
7089
7091
  }
@@ -9852,7 +9854,7 @@ async function saveConversationToMemory(messages, sessionId) {
9852
9854
  }
9853
9855
 
9854
9856
  // src/index.ts
9855
- import fs27 from "fs";
9857
+ import fs28 from "fs";
9856
9858
  import path28 from "path";
9857
9859
 
9858
9860
  // src/presets.ts
@@ -10067,7 +10069,7 @@ var Inbox = class {
10067
10069
  // package.json
10068
10070
  var package_default = {
10069
10071
  name: "@aman_asmuei/aman-agent",
10070
- version: "0.33.3",
10072
+ version: "0.33.7",
10071
10073
  description: "Your AI companion, running locally \u2014 powered by the aman ecosystem",
10072
10074
  type: "module",
10073
10075
  engines: {
@@ -10361,8 +10363,8 @@ async function runServe(opts) {
10361
10363
  // src/index.ts
10362
10364
  async function autoDetectConfig() {
10363
10365
  const reconfigMarker = path28.join(homeDir(), ".reconfig");
10364
- if (fs27.existsSync(reconfigMarker)) {
10365
- fs27.unlinkSync(reconfigMarker);
10366
+ if (fs28.existsSync(reconfigMarker)) {
10367
+ fs28.unlinkSync(reconfigMarker);
10366
10368
  return null;
10367
10369
  }
10368
10370
  const anthropicKey = process.env.ANTHROPIC_API_KEY;
@@ -10392,9 +10394,9 @@ async function autoDetectConfig() {
10392
10394
  }
10393
10395
  function bootstrapEcosystem() {
10394
10396
  const corePath = path28.join(identityDir(), "core.md");
10395
- if (fs27.existsSync(corePath)) return false;
10396
- fs27.mkdirSync(identityDir(), { recursive: true });
10397
- fs27.writeFileSync(corePath, [
10397
+ if (fs28.existsSync(corePath)) return false;
10398
+ fs28.mkdirSync(identityDir(), { recursive: true });
10399
+ fs28.writeFileSync(corePath, [
10398
10400
  "# Aman",
10399
10401
  "",
10400
10402
  "## Personality",
@@ -10407,9 +10409,9 @@ function bootstrapEcosystem() {
10407
10409
  "_New companion \u2014 no prior sessions._"
10408
10410
  ].join("\n"), "utf-8");
10409
10411
  const rulesPath = path28.join(rulesDir(), "rules.md");
10410
- if (!fs27.existsSync(rulesPath)) {
10411
- fs27.mkdirSync(rulesDir(), { recursive: true });
10412
- fs27.writeFileSync(rulesPath, [
10412
+ if (!fs28.existsSync(rulesPath)) {
10413
+ fs28.mkdirSync(rulesDir(), { recursive: true });
10414
+ fs28.writeFileSync(rulesPath, [
10413
10415
  "# Guardrails",
10414
10416
  "",
10415
10417
  "## safety",
@@ -10422,19 +10424,19 @@ function bootstrapEcosystem() {
10422
10424
  ].join("\n"), "utf-8");
10423
10425
  }
10424
10426
  const flowPath = path28.join(workflowsDir(), "flow.md");
10425
- if (!fs27.existsSync(flowPath)) {
10426
- fs27.mkdirSync(workflowsDir(), { recursive: true });
10427
- fs27.writeFileSync(flowPath, "# Workflows\n\n_No workflows defined yet. Use /workflows add to create one._\n", "utf-8");
10427
+ if (!fs28.existsSync(flowPath)) {
10428
+ fs28.mkdirSync(workflowsDir(), { recursive: true });
10429
+ fs28.writeFileSync(flowPath, "# Workflows\n\n_No workflows defined yet. Use /workflows add to create one._\n", "utf-8");
10428
10430
  }
10429
10431
  const skillPath = path28.join(skillsDir(), "skills.md");
10430
- if (!fs27.existsSync(skillPath)) {
10431
- fs27.mkdirSync(skillsDir(), { recursive: true });
10432
- fs27.writeFileSync(skillPath, "# Skills\n\n_No skills installed yet. Use /skills install to add domain expertise._\n", "utf-8");
10432
+ if (!fs28.existsSync(skillPath)) {
10433
+ fs28.mkdirSync(skillsDir(), { recursive: true });
10434
+ fs28.writeFileSync(skillPath, "# Skills\n\n_No skills installed yet. Use /skills install to add domain expertise._\n", "utf-8");
10433
10435
  }
10434
10436
  return true;
10435
10437
  }
10436
10438
  var program = new Command();
10437
- program.name("aman-agent").description("Your AI companion, running locally").version("0.33.3").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) => {
10439
+ program.name("aman-agent").description("Your AI companion, running locally").version("0.33.7").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) => {
10438
10440
  p4.intro(pc9.bold("aman agent") + pc9.dim(" \u2014 your AI companion"));
10439
10441
  let config = loadConfig();
10440
10442
  if (!config) {
@@ -10789,18 +10791,18 @@ program.command("init").description("Set up your AI companion with a guided wiza
10789
10791
  });
10790
10792
  if (p4.isCancel(preset)) process.exit(0);
10791
10793
  const result = applyPreset(preset, name || "Aman");
10792
- fs27.mkdirSync(identityDir(), { recursive: true });
10793
- fs27.writeFileSync(path28.join(identityDir(), "core.md"), result.coreMd, "utf-8");
10794
+ fs28.mkdirSync(identityDir(), { recursive: true });
10795
+ fs28.writeFileSync(path28.join(identityDir(), "core.md"), result.coreMd, "utf-8");
10794
10796
  p4.log.success(`Identity created \u2014 ${PRESETS[preset].identity.personality.split(".")[0].toLowerCase()}`);
10795
10797
  if (result.rulesMd) {
10796
- fs27.mkdirSync(rulesDir(), { recursive: true });
10797
- fs27.writeFileSync(path28.join(rulesDir(), "rules.md"), result.rulesMd, "utf-8");
10798
+ fs28.mkdirSync(rulesDir(), { recursive: true });
10799
+ fs28.writeFileSync(path28.join(rulesDir(), "rules.md"), result.rulesMd, "utf-8");
10798
10800
  const ruleCount = (result.rulesMd.match(/^- /gm) || []).length;
10799
10801
  p4.log.success(`${ruleCount} rules set`);
10800
10802
  }
10801
10803
  if (result.flowMd) {
10802
- fs27.mkdirSync(workflowsDir(), { recursive: true });
10803
- fs27.writeFileSync(path28.join(workflowsDir(), "flow.md"), result.flowMd, "utf-8");
10804
+ fs28.mkdirSync(workflowsDir(), { recursive: true });
10805
+ fs28.writeFileSync(path28.join(workflowsDir(), "flow.md"), result.flowMd, "utf-8");
10804
10806
  const wfCount = (result.flowMd.match(/^## /gm) || []).length;
10805
10807
  p4.log.success(`${wfCount} workflow${wfCount > 1 ? "s" : ""} added`);
10806
10808
  }
@@ -10829,7 +10831,7 @@ program.command("serve").description("Run aman-agent as a local MCP server other
10829
10831
  process.exit(1);
10830
10832
  }
10831
10833
  });
10832
- program.command("dev [path]").description("Set up project context and start Claude Code").option("--smart", "Use LLM to generate CLAUDE.md").option("--no-launch", "Generate CLAUDE.md only, don't start claude").option("--force", "Regenerate even if CLAUDE.md is fresh").option("--diff", "Show what would change without writing").action(async (projectPath, opts) => {
10834
+ program.command("dev [path]").description("Set up project context and start Claude Code").option("--smart", "Use LLM to generate CLAUDE.md").option("--no-launch", "Generate CLAUDE.md only, don't start claude").option("--force", "Regenerate even if CLAUDE.md is fresh").option("--diff", "Show what would change without writing").option("--yolo", "Launch Claude Code with --dangerously-skip-permissions").action(async (projectPath, opts) => {
10833
10835
  const { runDev: runDev2 } = await Promise.resolve().then(() => (init_dev_command(), dev_command_exports));
10834
10836
  const { scanStack: scanStack2 } = await Promise.resolve().then(() => (init_stack_detector(), stack_detector_exports));
10835
10837
  const targetPath = projectPath ?? process.cwd();
@@ -10884,16 +10886,23 @@ ${result.diff}`);
10884
10886
  console.log(` ${pc9.yellow("Claude Code not found.")} Install: npm install -g @anthropic-ai/claude-code`);
10885
10887
  process.exit(1);
10886
10888
  }
10887
- console.log(` ${pc9.cyan("Launching Claude Code...")}
10889
+ const claudeArgs = [];
10890
+ if (opts.yolo) {
10891
+ claudeArgs.push("--dangerously-skip-permissions");
10892
+ console.log(` ${pc9.cyan("Launching Claude Code")} ${pc9.yellow("(--dangerously-skip-permissions)")}...
10893
+ `);
10894
+ } else {
10895
+ console.log(` ${pc9.cyan("Launching Claude Code...")}
10888
10896
  `);
10889
- execFileSync4("claude", [], { cwd: targetPath, stdio: "inherit" });
10897
+ }
10898
+ execFileSync4("claude", claudeArgs, { cwd: targetPath, stdio: "inherit" });
10890
10899
  }
10891
10900
  });
10892
10901
  program.command("setup").description("Run the full configuration wizard (provider, identity, presets)").action(async () => {
10893
10902
  p4.intro(pc9.bold("aman agent setup") + pc9.dim(" \u2014 full configuration wizard"));
10894
10903
  const reconfigPath = path28.join(homeDir(), ".reconfig");
10895
- fs27.mkdirSync(homeDir(), { recursive: true });
10896
- fs27.writeFileSync(reconfigPath, "", "utf-8");
10904
+ fs28.mkdirSync(homeDir(), { recursive: true });
10905
+ fs28.writeFileSync(reconfigPath, "", "utf-8");
10897
10906
  p4.log.info("Configuration reset. Restart aman-agent to complete setup.");
10898
10907
  });
10899
10908
  program.command("update").description("Update aman-agent to the latest version").action(async () => {
@@ -10928,7 +10937,7 @@ program.command("update").description("Update aman-agent to the latest version")
10928
10937
  program.command("uninstall").description("Remove aman-agent and all its data").action(async () => {
10929
10938
  const home2 = homeDir();
10930
10939
  if (!process.stdin.isTTY) {
10931
- fs27.rmSync(home2, { recursive: true, force: true });
10940
+ fs28.rmSync(home2, { recursive: true, force: true });
10932
10941
  console.log("\u2713 Removed " + home2);
10933
10942
  return;
10934
10943
  }
@@ -10939,7 +10948,7 @@ program.command("uninstall").description("Remove aman-agent and all its data").a
10939
10948
  console.log("Cancelled.");
10940
10949
  return;
10941
10950
  }
10942
- fs27.rmSync(home2, { recursive: true, force: true });
10951
+ fs28.rmSync(home2, { recursive: true, force: true });
10943
10952
  console.log("\u2713 Removed " + home2);
10944
10953
  console.log("");
10945
10954
  console.log("To complete uninstall, remove the PATH line from your shell config:");