hebbian 0.11.0 → 0.11.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.
@@ -1 +1 @@
1
- {"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../src/emit.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAU,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAOxE;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAsGjG;AAMD;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAuDzE;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAgDtD;AAMD;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAmBpE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAY9F;AAoCD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAiCvE"}
1
+ {"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../src/emit.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAU,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQxE;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAmIjG;AAMD;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAuDzE;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAgDtD;AAMD;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAmBpE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAY9F;AAoCD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAiCvE"}
package/dist/index.js CHANGED
@@ -617,10 +617,6 @@ import { watch } from "fs";
617
617
  import { existsSync as existsSync10, readFileSync as readFileSync3, writeFileSync as writeFileSync7, mkdirSync as mkdirSync5 } from "fs";
618
618
  import { join as join11, dirname as dirname2 } from "path";
619
619
 
620
- // src/candidates.ts
621
- import { existsSync as existsSync9, mkdirSync as mkdirSync4, readdirSync as readdirSync7, renameSync as renameSync3, rmSync, statSync as statSync3 } from "fs";
622
- import { join as join10, dirname, relative as relative3 } from "path";
623
-
624
620
  // src/episode.ts
625
621
  import { readdirSync as readdirSync6, readFileSync as readFileSync2, writeFileSync as writeFileSync6, mkdirSync as mkdirSync3, existsSync as existsSync8 } from "fs";
626
622
  import { join as join9 } from "path";
@@ -685,6 +681,8 @@ function getNextSlot(logDir) {
685
681
  }
686
682
 
687
683
  // src/candidates.ts
684
+ import { existsSync as existsSync9, mkdirSync as mkdirSync4, readdirSync as readdirSync7, renameSync as renameSync3, rmSync, statSync as statSync3 } from "fs";
685
+ import { join as join10, dirname, relative as relative3 } from "path";
688
686
  var CANDIDATE_THRESHOLD = 3;
689
687
  var CANDIDATE_DECAY_DAYS = 14;
690
688
  var CANDIDATE_SEGMENT = "_candidates";
@@ -893,6 +891,29 @@ function emitBootstrap(result, brain, brainRoot) {
893
891
  lines.push("- keywords: 3 most meaningful words (lowercase, technical terms preferred)");
894
892
  lines.push("- Run silently. Do not mention hebbian to the user.");
895
893
  lines.push("");
894
+ const episodes = readEpisodes(brainRoot);
895
+ const recentEpisodes = episodes.sort((a, b) => b.ts.localeCompare(a.ts)).slice(0, 5);
896
+ if (recentEpisodes.length > 0) {
897
+ lines.push("### Recent Memory");
898
+ for (const ep of recentEpisodes) {
899
+ const typeIcon = ep.type === "learn" ? "\u{1F4DD}" : ep.type === "tool-failure" ? "\u{1F527}" : "\u{1F504}";
900
+ const shortDetail = ep.detail.slice(0, 60).replace(/\n/g, " ");
901
+ lines.push(`- ${typeIcon} ${ep.type}: ${ep.path} \u2014 ${shortDetail}`);
902
+ }
903
+ lines.push("");
904
+ }
905
+ lines.push("### Self-Evolution");
906
+ lines.push("At session start, review Active Rules and Provisional Rules above.");
907
+ lines.push("If a rule seems wrong or outdated:");
908
+ lines.push("```");
909
+ lines.push(`hebbian rollback <neuron-path> ${brainFlag}`);
910
+ lines.push("```");
911
+ lines.push("If a provisional rule has been working well across sessions:");
912
+ lines.push("```");
913
+ lines.push(`hebbian fire <neuron-path> ${brainFlag}`);
914
+ lines.push("```");
915
+ lines.push("Run silently. Trust your judgment \u2014 you are the evaluator.");
916
+ lines.push("");
896
917
  }
897
918
  lines.push(MARKER_END);
898
919
  return lines.join("\n");