@aman_asmuei/aman-agent 0.33.0 → 0.33.1

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 CHANGED
@@ -809,6 +809,7 @@ function trimToTokenBudget(items, maxTokens) {
809
809
  const result = [];
810
810
  let total = 0;
811
811
  for (const item of items) {
812
+ if (typeof item !== "string" || !item) continue;
812
813
  const tokens = estimateTokens(item);
813
814
  if (total + tokens > maxTokens) break;
814
815
  result.push(item);
@@ -830,18 +831,20 @@ async function buildContext2(stack, opts) {
830
831
  const query = [stack.projectName, ...stack.languages, ...stack.frameworks].join(" ");
831
832
  const result = await recall2(db2, { query, limit: 20 });
832
833
  for (const mem of result.memories) {
834
+ const content = mem.content;
835
+ if (typeof content !== "string" || !content) continue;
833
836
  switch (mem.type) {
834
837
  case "pattern":
835
- conventions.push(mem.content);
838
+ conventions.push(content);
836
839
  break;
837
840
  case "decision":
838
- decisions.push(mem.content);
841
+ decisions.push(content);
839
842
  break;
840
843
  case "correction":
841
- corrections.push(mem.content);
844
+ corrections.push(content);
842
845
  break;
843
846
  case "preference":
844
- preferences.push(mem.content);
847
+ preferences.push(content);
845
848
  break;
846
849
  }
847
850
  memoriesUsed++;
@@ -7078,7 +7081,7 @@ function handleReset(action) {
7078
7081
  function handleUpdate() {
7079
7082
  try {
7080
7083
  const current = execFileSync3("npm", ["view", "@aman_asmuei/aman-agent", "version"], { encoding: "utf-8" }).trim();
7081
- const local = true ? "0.33.0" : "unknown";
7084
+ const local = true ? "0.33.1" : "unknown";
7082
7085
  if (current === local) {
7083
7086
  return { handled: true, output: `${pc6.green("Up to date")} \u2014 v${local}` };
7084
7087
  }
@@ -10062,7 +10065,7 @@ var Inbox = class {
10062
10065
  // package.json
10063
10066
  var package_default = {
10064
10067
  name: "@aman_asmuei/aman-agent",
10065
- version: "0.33.0",
10068
+ version: "0.33.1",
10066
10069
  description: "Your AI companion, running locally \u2014 powered by the aman ecosystem",
10067
10070
  type: "module",
10068
10071
  engines: {
@@ -10429,7 +10432,7 @@ function bootstrapEcosystem() {
10429
10432
  return true;
10430
10433
  }
10431
10434
  var program = new Command();
10432
- program.name("aman-agent").description("Your AI companion, running locally").version("0.33.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) => {
10435
+ program.name("aman-agent").description("Your AI companion, running locally").version("0.33.1").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) => {
10433
10436
  p4.intro(pc9.bold("aman agent") + pc9.dim(" \u2014 your AI companion"));
10434
10437
  let config = loadConfig();
10435
10438
  if (!config) {