corvusmem 0.3.3 → 0.5.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/docs.md CHANGED
@@ -1,108 +1,125 @@
1
- # Corvusmem — Documentation
2
-
3
- > **Your agent, with a memory of its own — and it never leaves your machine.**
4
- >
5
- > For developers who use AI coding agents (Claude Code, Codex) and are tired of them **forgetting everything** between
6
- > sessions, Corvusmem is a **deterministic memory** that lives in a local file you control — no embeddings, no server,
7
- > no API keys. Unlike cloud memories (mem0, Zep), **yours never leaves your machine**.
8
-
9
- This is the narrative documentation (the same as the website `/docs`). For the quick reference of structure and
10
- commands, see the [`README.md`](./README.md).
11
-
12
- ## What it is
13
-
14
- Agents forget everything between sessions. Corvusmem is the memory that **remembers** your people and your projects,
15
- in a single local file you own. It is **deterministic** (same input, same result), **offline** (no network) and
16
- **zero-dependency**. Unlike cloud memories, yours stays yours.
17
-
18
- ## Install
19
-
20
- In Claude Code, from the project root:
21
-
22
- ```
23
- npx corvusmem install --claude # register the hooks in the project's .claude/settings.json
24
- npx corvusmem install --global # for every project (~/.claude/settings.json)
25
- npx corvusmem uninstall # remove Corvusmem's hooks (leaves everything else intact)
26
- npx corvusmem install --dry-run # show what it would do, without writing
27
- ```
28
-
29
- Merge-safe (it never overwrites your hooks or permissions) and idempotent. It creates `.corvusmem/` (project memory)
30
- and, if requested, `~/.config/corvusmem/` (global user memory).
31
-
32
- **Per-project or global only decides *where the hooks turn on*** — in one repo (`--claude`, the config lives in that
33
- repo) or in every project (`--global`, in your home). It does **not** change where memory lives: a project's facts
34
- always land in that repo's `.corvusmem/`, and your personal facts in `~/.config/corvusmem/`. You don't need a
35
- per-project install just to keep memory in the repo — it goes there either way.
36
-
37
- **Codex**: the user installs it from the Codex app (via plugin), not from the CLI. The agent does not install on Codex.
38
-
39
- ## How it works
40
-
41
- 1. **Capture.** A `PostToolUse` hook reads each exchange and extracts facts (decisions, paths, project context).
42
- 2. **Store.** Each fact lands in a lightweight local graph with its name, date and links. The whole Cortex is one file.
43
- 3. **Retrieve.** A query activates the matching node and spreads one hop out (two-hop activation), surfacing related
44
- facts — no semantic search, no embedding model. Instant.
45
-
46
- ## The memory
47
-
48
- Think of it as a notebook your agent keeps for you — but it only writes down what is **stable**: decisions, the
49
- project's stack, who you are, your preferences, your goals. Passing chatter is ignored. When something changes, the new
50
- value **replaces** the old one (the old one is kept, dated, in the history), so your agent never works from something
51
- you already changed. Recall is deterministic: same question, same answer.
52
-
53
- There are two kinds of memory, and they never get mixed up:
54
-
55
- - **Project memory** — about the project (stack, client, decisions, deadlines). Lives in `.corvusmem/` in the project
56
- folder, so the team and Codex share it. "The stack is Next" is true no matter who said it.
57
- - **Your memory** — about you (who you are, how you like to work), carried across every project. Lives on your machine
58
- (`~/.config/corvusmem/`), private to you, never committed. Your agent recalls both at once.
59
-
60
- ## Teams — one project, many people
61
-
62
- When several people work on the same project, the shared memory keeps each person's **personal** facts separate: if Ana
63
- prefers Vim and Bob prefers Emacs, both are kept and neither overwrites the other. Facts that describe the **project
64
- itself** (stack, decisions) stay shared and have no owner. You configure nothing — the author is read from your `git`
65
- email (or your system user), with no network. For a solo developer it's invisible; it just works.
66
-
67
- **To share it with the team**, commit `.corvusmem/` (the shared project memory) and, if you installed per-project,
68
- `.claude/settings.json` so teammates get the hooks the moment they clone. Never commit `~/.config/corvusmem/` — that is
69
- your private, personal memory.
70
-
71
- ## The Cortex
72
-
73
- The Cortex draws everything your agent knows as a **brain of points** — one glow per fact. Each kind of memory settles
74
- in its own zone (decisions, goals, project facts, who you are, what was lived). Search a fact and only its node and
75
- connections light up, like a neuron firing. It is not a picture: it is a readout of the memory the agent actually uses.
76
- Open your own Cortex from any project folder with `npx corvusmem --cortex` (from source: `node cli/memory.mjs
77
- --cortex`). It writes a self-contained HTML file — offline, no network — and prints the path to open in your browser.
78
-
79
- ## Hosts
80
-
81
- The engine detects where it runs and adapts; the memory is the same underneath.
82
-
83
- - **Claude Code** — the hooks register in the project settings; capture after every tool call.
84
- - **Codex** — runs through the plugin path; the same brain, the same local file.
85
- - **Standalone** — a plain CLI for any project: read, write and search the memory directly.
86
-
87
- ## License
88
-
89
- **Free for personal and noncommercial use** under **PolyForm Noncommercial 1.0.0**. Zero telemetry — your memory lives
90
- in local files you own. Using Corvusmem inside a company or a paid product needs a **commercial license**: see
91
- [`COMMERCIAL.md`](./COMMERCIAL.md) (petersonsena24@gmail.com). © 2026 Peterson Sena.
92
-
93
- ## FAQ
94
-
95
- **Does my data ever leave my machine?** No. The memory is a local file you own. No server, no cloud, no API key, no
96
- telemetry. It runs entirely offline.
97
-
98
- **How is this different from mem0 or Zep?** Those store your memory in their cloud behind an API. Corvusmem keeps
99
- everything local and deterministic — same input, same result, no embeddings or vector database.
100
-
101
- **Do I need an embedding model or a vector database?** No. Facts are stored in a lightweight local graph and retrieved
102
- by name, date and relevance with two-hop activation.
103
-
104
- **Which agents does it work with?** Claude Code and Codex today, plus a standalone CLI. The engine detects its host and
105
- adapts; the memory is the same underneath.
106
-
107
- **Is it free?** Free for personal and noncommercial use (PolyForm Noncommercial). Inside a company or a paid product it
108
- needs a commercial license.
1
+ # Corvusmem — Documentation
2
+
3
+ > **Your agent, with a memory of its own — and it never leaves your machine.**
4
+ >
5
+ > For developers who use AI coding agents (Claude Code, Codex) and are tired of them **forgetting everything** between
6
+ > sessions, Corvusmem is a **deterministic memory** that lives in a local file you control — no embeddings, no server,
7
+ > no API keys. Unlike cloud memories (mem0, Zep), **yours never leaves your machine**.
8
+
9
+ This is the narrative documentation (the same as the website `/docs`). For the quick reference of structure and
10
+ commands, see the [`README.md`](./README.md).
11
+
12
+ ## What it is
13
+
14
+ Agents forget everything between sessions. Corvusmem is the memory that **remembers** your people and your projects,
15
+ in a single local file you own. It is **deterministic** (same input, same result), **offline** (no network) and
16
+ **zero-dependency**. Unlike cloud memories, yours stays yours.
17
+
18
+ ## Install
19
+
20
+ Pick one. **As a plugin** if your agent supports plugins (Claude Code, Codex): native, nothing to wire into a project,
21
+ and the memory CLI runs locally (no `npx` cold start). **As an `npx` install** for any other agent, or a quick trial.
22
+
23
+ ### As a plugin — Claude Code (recommended)
24
+
25
+ ```
26
+ /plugin marketplace add petersonsenadevs/corvusmem
27
+ /plugin install corvusmem@corvusmem
28
+ ```
29
+
30
+ Claude loads it the way it loads any plugin: the hooks fire natively, everywhere, and saving/recalling runs as
31
+ `node "$CLAUDE_PLUGIN_ROOT/cli/corvusmem.mjs"` — no `npx`. Update with `/plugin update corvusmem@corvusmem`.
32
+
33
+ ### As a plugin — Codex
34
+
35
+ Add the same marketplace in the Codex app and approve the hooks (stored in `~/.codex/config.toml`). It is the **same**
36
+ plugin: `hooks/hooks.json` uses `${CLAUDE_PLUGIN_ROOT}`, and edits arrive as `apply_patch`, which the hooks understand.
37
+
38
+ ### As an npx install (any agent, or a quick trial)
39
+
40
+ ```
41
+ npx corvusmem install # register the hooks in the project's .claude/settings.json
42
+ npx corvusmem install --global # for every project (~/.claude/settings.json)
43
+ npx corvusmem uninstall # remove Corvusmem's hooks (leaves memory intact)
44
+ npx corvusmem install --dry-run # show what it would do, without writing
45
+ ```
46
+
47
+ Merge-safe (it never overwrites your hooks or permissions) and idempotent. It copies the hooks **and** the memory CLI
48
+ to a durable spot (`.corvusmem/hooks/` + `.corvusmem/cli/`, or `~/.config/corvusmem/` for `--global`), so from then on
49
+ the hooks and the save/recall commands run via `node`, not `npx`. The bare `npx corvusmem --save/--recall` still works
50
+ for an agent with none of this set up (just slower).
51
+
52
+ **Per-project or global only decides *where the hooks turn on*** — in one repo (the config lives in that repo) or in
53
+ every project (`--global`, in your home). It does **not** change where memory lives: a project's facts always land in
54
+ that repo's `.corvusmem/`, and your personal facts in `~/.config/corvusmem/`.
55
+
56
+ ## How it works
57
+
58
+ 1. **Capture.** A `PostToolUse` hook reads each exchange and extracts facts (decisions, paths, project context).
59
+ 2. **Store.** Each fact lands in a lightweight local graph with its name, date and links. The whole Cortex is one file.
60
+ 3. **Retrieve.** A query activates the matching node and spreads one hop out (two-hop activation), surfacing related
61
+ facts — no semantic search, no embedding model. Instant.
62
+
63
+ ## The memory
64
+
65
+ Think of it as a notebook your agent keeps for you — but it only writes down what is **stable**: decisions, the
66
+ project's stack, who you are, your preferences, your goals. Passing chatter is ignored. When something changes, the new
67
+ value **replaces** the old one (the old one is kept, dated, in the history), so your agent never works from something
68
+ you already changed. Recall is deterministic: same question, same answer.
69
+
70
+ There are two kinds of memory, and they never get mixed up:
71
+
72
+ - **Project memory** — about the project (stack, client, decisions, deadlines). Lives in `.corvusmem/` in the project
73
+ folder, so the team and Codex share it. "The stack is Next" is true no matter who said it.
74
+ - **Your memory** — about you (who you are, how you like to work), carried across every project. Lives on your machine
75
+ (`~/.config/corvusmem/`), private to you, never committed. Your agent recalls both at once.
76
+
77
+ ## Teams — one project, many people
78
+
79
+ When several people work on the same project, the shared memory keeps each person's **personal** facts separate: if Ana
80
+ prefers Vim and Bob prefers Emacs, both are kept and neither overwrites the other. Facts that describe the **project
81
+ itself** (stack, decisions) stay shared and have no owner. You configure nothing — the author is read from your `git`
82
+ email (or your system user), with no network. For a solo developer it's invisible; it just works.
83
+
84
+ **To share it with the team**, commit `.corvusmem/` (the shared project memory) and, if you installed per-project,
85
+ `.claude/settings.json` so teammates get the hooks the moment they clone. Never commit `~/.config/corvusmem/` — that is
86
+ your private, personal memory.
87
+
88
+ ## The Cortex
89
+
90
+ The Cortex draws everything your agent knows as a **brain of points** — one glow per fact. Each kind of memory settles
91
+ in its own zone (decisions, goals, project facts, who you are, what was lived). Search a fact and only its node and
92
+ connections light up, like a neuron firing. It is not a picture: it is a readout of the memory the agent actually uses.
93
+ Open your own Cortex from any project folder with `npx corvusmem --cortex` (from source: `node cli/memory.mjs
94
+ --cortex`). It writes a self-contained HTML file — offline, no network — and prints the path to open in your browser.
95
+
96
+ ## Hosts
97
+
98
+ The engine detects where it runs and adapts; the memory is the same underneath.
99
+
100
+ - **Claude Code** — the hooks register in the project settings; capture after every tool call.
101
+ - **Codex** — runs through the plugin path; the same brain, the same local file.
102
+ - **Standalone** — a plain CLI for any project: read, write and search the memory directly.
103
+
104
+ ## License
105
+
106
+ **Free for personal and noncommercial use** under **PolyForm Noncommercial 1.0.0**. Zero telemetry — your memory lives
107
+ in local files you own. Using Corvusmem inside a company or a paid product needs a **commercial license**: see
108
+ [`COMMERCIAL.md`](./COMMERCIAL.md) (petersonsena24@gmail.com). © 2026 Peterson Sena.
109
+
110
+ ## FAQ
111
+
112
+ **Does my data ever leave my machine?** No. The memory is a local file you own. No server, no cloud, no API key, no
113
+ telemetry. It runs entirely offline.
114
+
115
+ **How is this different from mem0 or Zep?** Those store your memory in their cloud behind an API. Corvusmem keeps
116
+ everything local and deterministic — same input, same result, no embeddings or vector database.
117
+
118
+ **Do I need an embedding model or a vector database?** No. Facts are stored in a lightweight local graph and retrieved
119
+ by name, date and relevance with two-hop activation.
120
+
121
+ **Which agents does it work with?** Claude Code and Codex today, plus a standalone CLI. The engine detects its host and
122
+ adapts; the memory is the same underneath.
123
+
124
+ **Is it free?** Free for personal and noncommercial use (PolyForm Noncommercial). Inside a company or a paid product it
125
+ needs a commercial license.
package/install.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ // Corvusmem · author: Peterson Sena (r3v3rs3) · https://github.com/petersonsenadevs/corvusmem
2
3
  // Instalador de Corvusmem (F10-T2). Registra los hooks del núcleo y prepara las carpetas de memoria, sin
3
4
  // dependencias y sin red. Determinista, merge-safe (no pisa lo que el usuario ya tenga) e idempotente.
4
5
  //
@@ -19,10 +20,13 @@ import fs from 'node:fs';
19
20
  import os from 'node:os';
20
21
  import path from 'node:path';
21
22
  import { fileURLToPath } from 'node:url';
23
+ import { esSenzu } from './src/lib.mjs'; // para el aviso de proyecto con Senzu
22
24
 
23
25
  const AQUI = path.dirname(fileURLToPath(import.meta.url));
24
26
  const SRC = path.join(AQUI, 'src'); // donde viven los hooks del núcleo (ruta absoluta)
25
27
  const CMDS_SRC = path.join(AQUI, 'commands'); // slash-command templates (/corvus-absorb)
28
+ const CLI_SRC = path.join(AQUI, 'cli'); // el CLI de la memoria (corvusmem.mjs + subcomandos): se empaqueta para el guardado RÁPIDO (sin npx)
29
+ const CORTEX_SRC = path.join(AQUI, 'cortex'); // el render del Cortex (cortex.mjs + cortex-text.mjs): se empaqueta para que --cortex funcione en local (sin npx)
26
30
  const args = process.argv.slice(2);
27
31
  const opt = n => { const i = args.indexOf(n); return i >= 0 ? (args[i + 1] && !args[i + 1].startsWith('--') ? args[i + 1] : true) : null; };
28
32
  const has = n => args.includes(n);
@@ -66,6 +70,27 @@ function copiarHooks(dir) {
66
70
  for (const f of fs.readdirSync(SRC)) if (f.endsWith('.mjs')) { fs.copyFileSync(path.join(SRC, f), path.join(dir, f)); n++; }
67
71
  return n;
68
72
  }
73
+ // Copia el CLI de memoria (corvusmem.mjs + subcomandos) a <baseDir>/cli/, HERMANO de hooks/. Así el agente guarda y
74
+ // recuerda con `node "<baseDir>/cli/corvusmem.mjs" --save …` — rápido y nativo, SIN el arranque en frío de npx. cli/memory.mjs
75
+ // resuelve el motor en ../hooks/facts.mjs (ver su `motor()`). El `npx corvusmem` sigue valiendo como fallback.
76
+ function copiarCli(baseDir) {
77
+ if (DRY) { log(` [dry-run] would copy the memory CLI to ${path.join(baseDir, 'cli')}`); return 0; }
78
+ const dir = path.join(baseDir, 'cli');
79
+ fs.mkdirSync(dir, { recursive: true });
80
+ let n = 0;
81
+ for (const f of fs.readdirSync(CLI_SRC)) if (f.endsWith('.mjs')) { fs.copyFileSync(path.join(CLI_SRC, f), path.join(dir, f)); n++; }
82
+ return n;
83
+ }
84
+ // El render del Cortex a <baseDir>/cortex/ (hermano de cli/): cli/memory.mjs lo carga en ../cortex/cortex.mjs, así
85
+ // `/corvus-cortex` (o --cortex) dibuja el cerebro HTML con node LOCAL, sin npx.
86
+ function copiarCortex(baseDir) {
87
+ if (DRY) { log(` [dry-run] would copy the Cortex to ${path.join(baseDir, 'cortex')}`); return 0; }
88
+ const dir = path.join(baseDir, 'cortex');
89
+ fs.mkdirSync(dir, { recursive: true });
90
+ let n = 0;
91
+ try { for (const f of fs.readdirSync(CORTEX_SRC)) if (f.endsWith('.mjs')) { fs.copyFileSync(path.join(CORTEX_SRC, f), path.join(dir, f)); n++; } } catch { }
92
+ return n;
93
+ }
69
94
 
70
95
  // Slash commands (e.g. /corvus-absorb) go to .claude/commands/ — per project, or the HOME with --global.
71
96
  function instalarComandos(quitar) {
@@ -112,6 +137,10 @@ function empaquetarPlugin(destino) {
112
137
  // 2) los .mjs del nucleo (hooks + dependencias de mismo directorio: autocontenido, cero imports externos)
113
138
  let n = 0;
114
139
  for (const f of fs.readdirSync(SRC)) if (f.endsWith('.mjs')) { fs.copyFileSync(path.join(SRC, f), path.join(hooksDir, f)); n++; }
140
+ // 2b) el CLI de memoria en <plugin>/cli/ (hermano de hooks/): para que el agente guarde/recuerde con node, sin npx
141
+ const ncli = copiarCli(dir);
142
+ // 2c) el render del Cortex en <plugin>/cortex/: para que /corvus-cortex dibuje el cerebro en local, sin npx
143
+ const ncx = copiarCortex(dir);
115
144
  // 3) slash commands (/corvus-absorb) in the plugin's commands/ dir
116
145
  let nc = 0;
117
146
  try {
@@ -119,10 +148,33 @@ function empaquetarPlugin(destino) {
119
148
  if (cmds.length) { fs.mkdirSync(path.join(dir, 'commands'), { recursive: true }); for (const f of cmds) { fs.copyFileSync(path.join(CMDS_SRC, f), path.join(dir, 'commands', f)); nc++; } }
120
149
  } catch { /* no commands/ */ }
121
150
  // 4) plugin.json
122
- const plugin = { name: 'corvusmem', description: pkg.description || 'Memoria determinista, offline y sin dependencias para agentes de IA.', version: pkg.version || '0.0.0', author: { name: 'Peterson Sena' }, license: 'SEE LICENSE IN LICENSE' };
151
+ const plugin = { name: 'corvusmem', description: pkg.description || 'Memoria determinista, offline y sin dependencias para agentes de IA.', version: pkg.version || '0.0.0', author: { name: 'Peterson Sena' }, homepage: pkg.homepage || 'https://corvusmem.vercel.app', repository: (pkg.repository && pkg.repository.url) || 'https://github.com/petersonsenadevs/corvusmem', license: 'SEE LICENSE IN LICENSE' };
123
152
  fs.writeFileSync(path.join(dir, '.claude-plugin', 'plugin.json'), JSON.stringify(plugin, null, 2) + '\n');
124
- log(` [plugin] ${dir}: .claude-plugin/plugin.json + hooks/hooks.json + ${n} .mjs${nc ? ` + ${nc} command(s)` : ''}`);
125
- log(' Publish it to a Codex marketplace (like Senzu\'s); install it and approve the hooks in the app.');
153
+ log(` [plugin] ${dir}: .claude-plugin/plugin.json + hooks/hooks.json + ${n} .mjs + ${ncli} cli + ${ncx} cortex${nc ? ` + ${nc} command(s)` : ''}`);
154
+ }
155
+
156
+ // Genera, DENTRO del repo, el plugin committeable `plugins/corvusmem/` y el `.claude-plugin/marketplace.json` de la
157
+ // raíz: el propio repo ES el marketplace de Claude Code (igual que Senzu). Tras esto:
158
+ // Claude Code: /plugin marketplace add petersonsenadevs/corvusmem · /plugin install corvusmem@corvusmem
159
+ // Codex: consume el MISMO plugin (hooks.json con ${CLAUDE_PLUGIN_ROOT}); se aprueban los hooks en la app.
160
+ // Se vuelve a ejecutar en cada release (lo hace el flujo de versión) para que el plugin lleve la versión y los hooks al día.
161
+ function generarMarketplace() {
162
+ let pkg = {}; try { pkg = JSON.parse(fs.readFileSync(path.join(AQUI, 'package.json'), 'utf8')); } catch { }
163
+ const pluginDir = path.join(AQUI, 'plugins', 'corvusmem');
164
+ if (!DRY) fs.rmSync(pluginDir, { recursive: true, force: true }); // regenerar limpio
165
+ empaquetarPlugin(pluginDir);
166
+ const desc = pkg.description || 'Memoria determinista, offline y sin dependencias para agentes de IA (Claude Code, Codex).';
167
+ const mkt = {
168
+ name: 'corvusmem',
169
+ owner: { name: 'Peterson Sena' },
170
+ metadata: { version: pkg.version || '0.0.0', description: 'Marketplace de Corvusmem: memoria determinista, offline y sin dependencias para agentes de IA.' },
171
+ plugins: [{
172
+ name: 'corvusmem', source: './plugins/corvusmem', description: desc, version: pkg.version || '0.0.0',
173
+ category: 'development', keywords: ['memory', 'memoria', 'hooks', 'offline', 'deterministic', 'facts', 'recall', 'claude', 'codex'],
174
+ }],
175
+ };
176
+ if (!DRY) { fs.mkdirSync(path.join(AQUI, '.claude-plugin'), { recursive: true }); fs.writeFileSync(path.join(AQUI, '.claude-plugin', 'marketplace.json'), JSON.stringify(mkt, null, 2) + '\n'); }
177
+ log(` [marketplace] .claude-plugin/marketplace.json -> plugins/corvusmem (v${pkg.version || '0.0.0'})`);
126
178
  }
127
179
 
128
180
  // Construye los grupos de hooks de un evento en el formato de settings.json de Claude.
@@ -177,16 +229,27 @@ function run() {
177
229
  return;
178
230
  }
179
231
 
232
+ // Modo marketplace: genera plugins/corvusmem/ + .claude-plugin/marketplace.json EN EL REPO (el repo es el marketplace).
233
+ if (has('--marketplace')) {
234
+ log(`Corvusmem · generate marketplace + committed plugin${DRY ? ' (dry-run)' : ''}`);
235
+ generarMarketplace();
236
+ log('Done.');
237
+ return;
238
+ }
239
+
180
240
  const quitar = has('--uninstall');
181
241
  log(`Corvusmem · ${quitar ? 'uninstall' : 'install'}${GLOBAL ? ' (global)' : ''}${DRY ? ' (dry-run)' : ''}`);
182
242
 
183
243
  // 0) Copias DURABLES de los hooks (o quitarlas). La MEMORIA (.corvusmem/memoria, ~/.config/corvusmem) no se toca.
244
+ const cliBase = path.dirname(hooksDir); // .corvusmem/ (proyecto) o ~/.config/corvusmem/ (global); el cli va junto a hooks
184
245
  if (quitar) {
185
- if (!DRY) { try { fs.rmSync(hooksDir, { recursive: true, force: true }); } catch {} }
246
+ if (!DRY) { try { fs.rmSync(hooksDir, { recursive: true, force: true }); } catch {} try { fs.rmSync(path.join(cliBase, 'cli'), { recursive: true, force: true }); } catch {} try { fs.rmSync(path.join(cliBase, 'cortex'), { recursive: true, force: true }); } catch {} }
186
247
  log(` [hooks] removed ${hooksDir}`);
187
248
  } else {
188
249
  const n = copiarHooks(hooksDir);
189
- log(` [hooks] ${n} core file(s) copied to ${hooksDir.replace(/\\/g, '/')}`);
250
+ const ncli = copiarCli(cliBase);
251
+ const ncx = copiarCortex(cliBase);
252
+ log(` [hooks] ${n} core + ${ncli} CLI + ${ncx} Cortex file(s) copied to ${cliBase.replace(/\\/g, '/')} (fast save & cortex, no npx)`);
190
253
  }
191
254
 
192
255
  // 1) Claude: hooks en settings.json (proyecto o HOME)
@@ -212,6 +275,15 @@ function run() {
212
275
  log(' [memory] .corvusmem/ (project) and ~/.config/corvusmem/ (global) ready');
213
276
  }
214
277
 
278
+ // Heads-up: in a project that already uses Senzu, Corvus becomes the MEMORY owner — it adopts the facts Senzu had
279
+ // in senzu/memoria/ into its own .corvusmem/memory/, and Senzu (updated to its latest) defers its memory hooks to
280
+ // Corvus. Senzu keeps everything else (method, plan, devlog, guards). Update the global Senzu plugin so it defers.
281
+ if (!quitar && !GLOBAL && esSenzu(PROYECTO)) {
282
+ log(' [senzu] This project also uses Senzu. Corvus now OWNS the memory here: it adopts the facts from');
283
+ log(' senzu/memoria/ into .corvusmem/memory/ and Senzu defers its memory hooks to Corvus.');
284
+ log(' Update the Senzu plugin to its latest so it steps back from memory (it keeps method/devlog/guards).');
285
+ }
286
+
215
287
  log('Done.' + (quitar ? '' : ' Codex: per-event hooks go through the plugin; in Claude they are already active.'));
216
288
  }
217
289
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corvusmem",
3
- "version": "0.3.3",
3
+ "version": "0.5.1",
4
4
  "description": "Deterministic, offline, zero-dependency memory for AI coding agents (Claude Code, Codex) and a standalone CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  "local-first",
39
39
  "no-embeddings"
40
40
  ],
41
- "author": "Peterson Sena",
41
+ "author": "Peterson Sena aka r3v3rs3 (https://dev.to/r3v3rs3)",
42
42
  "license": "SEE LICENSE IN LICENSE",
43
43
  "homepage": "https://corvusmem.vercel.app",
44
44
  "repository": {
@@ -1,3 +1,4 @@
1
+ // Corvusmem · author: Peterson Sena (r3v3rs3) · https://github.com/petersonsenadevs/corvusmem
1
2
  // Hook de la memoria de hechos que OBLIGA a revisarla (plan de Corvusmem, F3), en cualquier idioma: no busca
2
3
  // frases (eso depende del idioma); comprueba si el agente revisó la memoria. Quien entiende si el usuario dijo algo
3
4
  // estable es el agente.
package/src/facts.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ // Corvusmem · author: Peterson Sena (r3v3rs3) · https://github.com/petersonsenadevs/corvusmem
1
2
  // Motor de HECHOS de Corvusmem: memoria determinista en CUALQUIER idioma, sin red ni modelos (devlog 098).
2
3
  // Dimensiones con sustitución, validez en el tiempo, deduplicación, cupos por familia y motivo de cada resultado,
3
4
  // sin Postgres, Redis ni embeddings.
@@ -17,8 +18,8 @@ import crypto from 'node:crypto';
17
18
  import os from 'node:os';
18
19
  import { spawnSync } from 'node:child_process';
19
20
  import { fileURLToPath } from 'node:url';
20
- import { ruta, rutaMemoriaUsuario, rutaEstado, localeUI, nombresMemoria, migrarMemoriaCorvus } from './lib.mjs';
21
- export { rutaNativa, localeUI, carpetaBase } from './lib.mjs'; // memory.mjs: --path (C:\, C:/, /c/ de Git Bash → el mismo almacén), idioma de UI y carpeta base (senzu/ vs .corvusmem/)
21
+ import { ruta, rutaMemoriaUsuario, rutaEstado, localeUI, nombresMemoria, migrarMemoriaCorvus, adoptarMemoriaSenzu } from './lib.mjs';
22
+ export { rutaNativa, localeUI, carpetaBase, esSenzu, adoptarMemoriaSenzu } from './lib.mjs'; // memory.mjs: --path (C:\, C:/, /c/ de Git Bash → el mismo almacén), idioma de UI, carpeta base y adopción de la memoria de Senzu
22
23
 
23
24
  export const FAMILIAS_VARIOS = /^(objetivo|pendiente|nota|hecho|enlace|aprendizaje)(\.|$)/;
24
25
  // Multiusuario (F14): familias PERSONALES (de la persona, no del proyecto). En memoria de proyecto COMPARTIDA, su
@@ -41,8 +42,9 @@ function autorActual(root, env = process.env) {
41
42
  }
42
43
  export function rutaHechos(root, alcance = 'proyecto') {
43
44
  if (alcance === 'usuario') return path.join(path.dirname(rutaMemoriaUsuario()), 'hechos.jsonl'); // compartida con Senzu: nombre en español
45
+ adoptarMemoriaSenzu(root); // proyecto que ya usaba Senzu: hereda senzu/memoria/hechos.jsonl una vez (copia)
44
46
  migrarMemoriaCorvus(root); // instalaciones viejas: .corvusmem/memoria/hechos.jsonl -> .corvusmem/memory/facts.jsonl (idempotente)
45
- return path.join(ruta(root, 'memoria'), nombresMemoria(root).facts); // standalone: memory/facts.jsonl · acoplado/legacy: memoria/hechos.jsonl
47
+ return path.join(ruta(root, 'memoria'), nombresMemoria(root).facts); // SIEMPRE .corvusmem/memory/facts.jsonl; Corvus es el dueño, Senzu le cede la memoria
46
48
  }
47
49
 
48
50
  // ---------------------------------------------------------------- texto: normalizar y partir en palabras
@@ -1,3 +1,4 @@
1
+ // Corvusmem · author: Peterson Sena (r3v3rs3) · https://github.com/petersonsenadevs/corvusmem
1
2
  // Hook PreToolUse (Edit|Write|MultiEdit; en Codex, apply_patch traducido por lib.mjs): memoria POR ARCHIVO.
2
3
  // La primera vez que la sesión va a tocar un archivo, le pasa al agente lo que la memoria y el devlog dicen de
3
4
  // ese archivo (por su ruta o su nombre): decisiones vigentes, lo que no funcionó, por qué se hizo así.