memorix 0.9.28 → 0.9.29

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/index.js CHANGED
@@ -40651,7 +40651,9 @@ function generateGeminiConfig() {
40651
40651
  };
40652
40652
  }
40653
40653
  return {
40654
+ tools: { enableHooks: true },
40654
40655
  hooks: {
40656
+ enabled: true,
40655
40657
  SessionStart: [entry("memorix-session-start", "Load memorix context at session start")],
40656
40658
  AfterTool: [entry("memorix-after-tool", "Record tool usage in memorix")],
40657
40659
  AfterAgent: [entry("memorix-after-agent", "Record agent response in memorix")],
@@ -40878,6 +40880,10 @@ async function installHooks(agent, projectRoot, global = false) {
40878
40880
  const existingHooks = existing.hooks && typeof existing.hooks === "object" ? existing.hooks : {};
40879
40881
  merged.hooks = { ...existingHooks, ...gen.hooks };
40880
40882
  }
40883
+ if (gen.tools && typeof gen.tools === "object") {
40884
+ const existingTools = existing.tools && typeof existing.tools === "object" ? existing.tools : {};
40885
+ merged.tools = { ...existingTools, ...gen.tools };
40886
+ }
40881
40887
  await fs5.writeFile(configPath, JSON.stringify(merged, null, 2), "utf-8");
40882
40888
  }
40883
40889
  const events = [];
@@ -40930,7 +40936,7 @@ async function installAgentRules(agent, projectRoot) {
40930
40936
  rulesPath = path7.join(projectRoot, ".kiro", "steering", "memorix.md");
40931
40937
  break;
40932
40938
  case "antigravity":
40933
- rulesPath = path7.join(projectRoot, ".gemini", "rules", "memorix.md");
40939
+ rulesPath = path7.join(projectRoot, "GEMINI.md");
40934
40940
  break;
40935
40941
  default:
40936
40942
  rulesPath = path7.join(projectRoot, ".agent", "rules", "memorix.md");
@@ -40938,7 +40944,7 @@ async function installAgentRules(agent, projectRoot) {
40938
40944
  }
40939
40945
  try {
40940
40946
  await fs5.mkdir(path7.dirname(rulesPath), { recursive: true });
40941
- if (agent === "codex") {
40947
+ if (agent === "codex" || agent === "antigravity") {
40942
40948
  try {
40943
40949
  const existing = await fs5.readFile(rulesPath, "utf-8");
40944
40950
  if (existing.includes("Memorix")) {
@@ -40976,58 +40982,42 @@ alwaysApply: true
40976
40982
  }
40977
40983
  return `${frontmatter}# Memorix \u2014 Automatic Memory Rules
40978
40984
 
40979
- You have access to Memorix memory tools. Follow these rules to maintain persistent context across sessions.
40985
+ You have access to Memorix memory tools. You MUST follow these rules to maintain persistent context across sessions.
40986
+ These rules are NOT optional \u2014 they are critical for cross-session memory continuity.
40980
40987
 
40981
- ## Session Start \u2014 Load Context
40988
+ ## RULE 1: Session Start \u2014 Load Context (MUST)
40982
40989
 
40983
- At the **beginning of every conversation**, before responding to the user:
40990
+ At the **beginning of every conversation**, BEFORE responding to the user:
40984
40991
 
40985
40992
  1. Call \`memorix_search\` with a query related to the user's first message or the current project
40986
40993
  2. If results are found, use \`memorix_detail\` to fetch the most relevant ones
40987
- 3. Reference relevant memories naturally in your response \u2014 the user should feel you "remember" them
40988
-
40989
- This ensures you already know the project context without the user re-explaining.
40990
-
40991
- ## During Session \u2014 Capture Important Context
40994
+ 3. Reference relevant memories naturally in your response
40992
40995
 
40993
- **Proactively** call \`memorix_store\` whenever any of the following happen:
40996
+ > **CRITICAL**: Do NOT skip this step. The user expects you to "remember" previous sessions.
40994
40997
 
40995
- ### Architecture & Decisions
40996
- - Technology choice, framework selection, or design pattern adopted
40997
- - Trade-off discussion with a clear conclusion
40998
- - API design, database schema, or project structure decisions
40998
+ ## RULE 2: After Every Action \u2014 Check & Record (MUST)
40999
40999
 
41000
- ### Bug Fixes & Problem Solving
41001
- - A bug is identified and resolved \u2014 store root cause + fix
41002
- - Workaround applied for a known issue
41003
- - Performance issue diagnosed and optimized
41000
+ After EVERY tool call that modifies state (file create/edit, shell command, config change), run this checklist:
41004
41001
 
41005
- ### Gotchas & Pitfalls
41006
- - Something unexpected or tricky is discovered
41007
- - A common mistake is identified and corrected
41008
- - Platform-specific behavior that caused issues
41002
+ **Ask yourself: "Would a different AI agent need to know about this?"**
41003
+ - If YES \u2192 call \`memorix_store\` IMMEDIATELY, BEFORE replying to the user
41004
+ - If NO \u2192 skip (e.g., simple file reads, ls/dir, greetings)
41009
41005
 
41010
- ### Configuration & Environment
41011
- - Environment variables, port numbers, paths changed
41012
- - Docker, nginx, Caddy, or reverse proxy config modified
41013
- - Package dependencies added, removed, or version-pinned
41006
+ ### What MUST be recorded:
41007
+ - \u2705 File created or significantly modified \u2192 type: \`what-changed\`
41008
+ - \u2705 Bug identified and fixed \u2192 type: \`problem-solution\`
41009
+ - \u2705 Architecture or design decision made \u2192 type: \`decision\`
41010
+ - \u2705 Unexpected behavior or gotcha discovered \u2192 type: \`gotcha\`
41011
+ - \u2705 Configuration changed (env vars, ports, deps) \u2192 type: \`what-changed\`
41012
+ - \u2705 Feature completed or milestone reached \u2192 type: \`what-changed\`
41013
+ - \u2705 Trade-off discussed with conclusion \u2192 type: \`trade-off\`
41014
41014
 
41015
- ### Deployment & Operations
41016
- - Server deployment steps (Docker, VPS, cloud)
41017
- - DNS, SSL/TLS certificate, domain configuration
41018
- - CI/CD pipeline setup or changes
41019
- - Database migration or data transfer procedures
41020
- - Server topology (ports, services, reverse proxy chain)
41021
- - SSH keys, access credentials setup (store pattern, NOT secrets)
41015
+ ### What should NOT be recorded:
41016
+ - \u274C Simple file reads without findings
41017
+ - \u274C Greetings, acknowledgments
41018
+ - \u274C Trivial commands (ls, pwd, git status with no issues)
41022
41019
 
41023
- ### Project Milestones
41024
- - Feature completed or shipped
41025
- - Version released or published to npm/PyPI/etc.
41026
- - Repository made public, README updated, PR submitted
41027
-
41028
- Use appropriate types: \`decision\`, \`problem-solution\`, \`gotcha\`, \`what-changed\`, \`discovery\`, \`how-it-works\`.
41029
-
41030
- ## Session End \u2014 Store Summary
41020
+ ## RULE 3: Session End \u2014 Store Summary (MUST)
41031
41021
 
41032
41022
  When the conversation is ending or the user says goodbye:
41033
41023
 
@@ -41041,13 +41031,12 @@ This creates a "handoff note" for the next session (or for another AI agent).
41041
41031
 
41042
41032
  ## Guidelines
41043
41033
 
41044
- - **Don't store trivial information** (greetings, acknowledgments, simple file reads, ls/dir output)
41045
- - **Do store anything you'd want to know if you lost all context**
41046
- - **Do store anything a different AI agent would need to continue this work**
41047
41034
  - **Use concise titles** (~5-10 words) and structured facts
41048
41035
  - **Include file paths** in filesModified when relevant
41049
41036
  - **Include related concepts** for better searchability
41050
41037
  - **Prefer storing too much over too little** \u2014 the retention system will auto-decay stale memories
41038
+
41039
+ Use types: \`decision\`, \`problem-solution\`, \`gotcha\`, \`what-changed\`, \`discovery\`, \`how-it-works\`, \`trade-off\`.
41051
41040
  `;
41052
41041
  }
41053
41042
  async function uninstallHooks(agent, projectRoot, global = false) {