corvusmem 0.5.1 → 0.5.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ Format based on [Keep a Changelog](https://keepachangelog.com/); versions follow
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.5.2] — 2026-11-08
9
+ ### Added
10
+ - **`/corvus-install` — bake Corvusmem into a project, as a command.** A new slash command (bundled in the plugin and
11
+ in `.claude/commands/`) installs the hooks into the **current** project so it carries its own memory. Commit
12
+ `.corvusmem/` and `.claude/settings.json` and a teammate who receives the project gets Corvus firing in Claude Code
13
+ or Codex **with nothing to install**. `install.mjs` now ships inside the plugin and runs from it (the core is resolved
14
+ from `hooks/` when there is no `src/`), so the command works natively — `npx corvusmem install` stays as the fallback.
15
+
8
16
  ## [0.5.1] — 2026-11-08
9
17
  ### Changed
10
18
  - **The Cortex gets a header with the crow.** The full Cortex (`/corvus-cortex`) now shows the Corvusmem crow in its
package/README.md CHANGED
@@ -80,15 +80,16 @@ manifest). The bare `npx corvusmem --save/--recall` still works for an agent wit
80
80
  project (`--global`, in your home). It does **not** change where memory lives: project facts always land in that repo's
81
81
  `.corvusmem/`, your personal facts in `~/.config/corvusmem/`.
82
82
 
83
- **Sharing with a team**: commit `.corvusmem/` (the shared project memory) and, for a per-project install,
84
- `.claude/settings.json` so teammates get the hooks the moment they clone. Never commit `~/.config/corvusmem/` — that is
85
- your private memory.
83
+ **Sharing with a team**: run **`/corvus-install`** (or `npx corvusmem install`) to bake the hooks into the current
84
+ project, then commit `.corvusmem/` (the shared project memory) and `.claude/settings.json` — teammates get Corvus firing
85
+ the moment they clone, with nothing to install. Never commit `~/.config/corvusmem/` — that is your private memory.
86
86
 
87
87
  ## Usage
88
88
  Once installed, the agent captures and recalls memory on its own — you don't do a thing. Two slash commands come with
89
89
  it (native — no `npx`):
90
90
  - **`/corvus-cortex`** — open the Cortex: your whole memory as a local HTML "brain" (offline).
91
91
  - **`/corvus-absorb`** — pull the knowledge already in the repo (CLAUDE.md, docs…) into memory, once.
92
+ - **`/corvus-install`** — bake Corvus into the current project (per-project), so you can commit it and share it.
92
93
 
93
94
  To look at or steer memory from the **terminal** (handy for any agent, or no agent at all):
94
95
  ```
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Bake Corvusmem's hooks into the CURRENT project (not global), so the project carries its own memory and a teammate who receives it gets Corvus working with nothing to install. A local command, not an npx call.
3
+ ---
4
+
5
+ Install **Corvusmem into this project** (per-project, not global). This writes the hooks and the memory CLI into the project's own `.corvusmem/` and wires `.claude/settings.json` with a portable `${CLAUDE_PROJECT_DIR}` path — so if the user **commits `.corvusmem/` and `.claude/settings.json`**, anyone who clones or receives the project has Corvus firing in Claude Code or Codex **without installing anything** (no plugin, no global setup).
6
+
7
+ Run it with the **fastest local path available** — do not default to `npx` (that is only the fallback for an agent with nothing installed). Use the first of these that applies:
8
+
9
+ - **Installed as a plugin** (the `CLAUDE_PLUGIN_ROOT` env var is set): `node "$CLAUDE_PLUGIN_ROOT/cli/corvusmem.mjs" install`
10
+ - **Nothing installed** (fallback only): `npx corvusmem install`
11
+
12
+ It is merge-safe (never overwrites the user's own hooks or permissions) and idempotent. Do **not** pass `--global` here — that would turn the hooks on for every project instead of baking them into this one. After it runs:
13
+
14
+ - Tell the user it installed into **this project only**, and that to share it they should commit `.corvusmem/` and `.claude/settings.json`.
15
+ - Note that `.corvusmem/cortex/` is generated (it ignores itself), and `.corvusmem/memory/` holds the project's facts — commit it to share the memory, or leave it out to keep each person's separate. Their personal memory lives in `~/.config/corvusmem/` and is never shared.
16
+
17
+ Pick the user's language for anything you say. Never invent what the command did — report what it actually printed.
package/install.mjs CHANGED
@@ -19,11 +19,13 @@
19
19
  import fs from 'node:fs';
20
20
  import os from 'node:os';
21
21
  import path from 'node:path';
22
- import { fileURLToPath } from 'node:url';
23
- import { esSenzu } from './src/lib.mjs'; // para el aviso de proyecto con Senzu
22
+ import { fileURLToPath, pathToFileURL } from 'node:url';
24
23
 
25
24
  const AQUI = path.dirname(fileURLToPath(import.meta.url));
26
- const SRC = path.join(AQUI, 'src'); // donde viven los hooks del núcleo (ruta absoluta)
25
+ // El núcleo vive en src/ (repo) o en hooks/ (cuando install.mjs viaja DENTRO del plugin): así `/corvus-install`
26
+ // puede instalar en un proyecto desde el plugin, sin npx.
27
+ const SRC = fs.existsSync(path.join(AQUI, 'src')) ? path.join(AQUI, 'src') : path.join(AQUI, 'hooks');
28
+ const { esSenzu } = await import(pathToFileURL(path.join(SRC, 'lib.mjs')).href); // para el aviso de proyecto con Senzu
27
29
  const CMDS_SRC = path.join(AQUI, 'commands'); // slash-command templates (/corvus-absorb)
28
30
  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
31
  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)
@@ -141,6 +143,9 @@ function empaquetarPlugin(destino) {
141
143
  const ncli = copiarCli(dir);
142
144
  // 2c) el render del Cortex en <plugin>/cortex/: para que /corvus-cortex dibuje el cerebro en local, sin npx
143
145
  const ncx = copiarCortex(dir);
146
+ // 2d) el propio install.mjs en la raíz del plugin: para que /corvus-install instale en un proyecto desde el plugin
147
+ // (sin npx). Corre con el núcleo del propio plugin (hooks/) gracias a la resolución src/ || hooks/ de arriba.
148
+ fs.copyFileSync(path.join(AQUI, 'install.mjs'), path.join(dir, 'install.mjs'));
144
149
  // 3) slash commands (/corvus-absorb) in the plugin's commands/ dir
145
150
  let nc = 0;
146
151
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corvusmem",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
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": {