@vib795/agent-memory 0.1.5 → 0.1.7

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.
Files changed (3) hide show
  1. package/HOWTO.md +5 -2
  2. package/README.md +81 -3
  3. package/package.json +1 -1
package/HOWTO.md CHANGED
@@ -70,11 +70,14 @@ agent-memory setup
70
70
  you have. Modern npm refuses to let a package run its own setup automatically — a
71
71
  sensible security default — so the second line is you giving permission, by hand.
72
72
 
73
- > No access to the npm registry at work? This works too, and needs nothing but GitHub:
73
+ > No access to the npm registry at work? Clone it instead. This needs nothing but
74
+ > GitHub, and it is what to use if your company proxy blocks or quarantines npm:
74
75
  > ```bash
75
- > npm install -g https://github.com/vib795/agent-memory.git
76
+ > git clone https://github.com/vib795/agent-memory.git
77
+ > npm install -g ./agent-memory
76
78
  > agent-memory setup
77
79
  > ```
80
+ > Clone first — installing from the git URL directly does not work. See the README.
78
81
 
79
82
  ### What just happened
80
83
 
package/README.md CHANGED
@@ -102,6 +102,77 @@ agent-memory doctor preflight and health report
102
102
 
103
103
  Every command takes `--json`. Every cap lives in `config.json` and is tunable.
104
104
 
105
+ ### Where they run
106
+
107
+ **Anywhere. There is one store per machine, not one per repository.** Everything
108
+ lives under `~/.agents/memory`, nothing is written into the projects you point it
109
+ at, and there is no per-repo setup step. `cd` between projects freely: the store
110
+ does not move, split, or reset.
111
+
112
+ One exception, and it is this repository rather than yours: if you installed from a
113
+ clone, `npm install -g .` symlinks rather than copies, so `compact` regenerating the
114
+ skill descriptions lands in your working tree and `skills/recall/SKILL.md` shows as
115
+ modified. That is generated state, and [From a clone](#from-a-clone) says so. No
116
+ project repository is ever written to.
117
+
118
+ What the working directory changes is *scope*, never location.
119
+
120
+ | Command | Reads | What the current repo changes |
121
+ |---|---|---|
122
+ | `init` | whole store | nothing |
123
+ | `index` | whole store | nothing |
124
+ | `compact` | whole store | nothing |
125
+ | `doctor` | whole store | nothing |
126
+ | `search` | whole store | nothing — full text hits every note in every repo |
127
+ | `get` | whole store | the staleness line only; the note is found by id either way |
128
+ | `tree` | whole store | **filters it** — defaults to the current repo |
129
+ | `write` | whole store | **is stamped into the note** — see below |
130
+
131
+ The current repo is `git rev-parse --show-toplevel` reduced to its directory name.
132
+ Outside a git repository it is `null` and every command still works: `tree` comes
133
+ back unscoped, and a new note carries no repo and no capture SHA, so it gets no
134
+ staleness signal for the rest of its life.
135
+
136
+ `write` is the one worth understanding, because it is the one that fixes facts in
137
+ place. Run from `~/work/orders-api` it stamps `repos: [orders-api]`, records that
138
+ repo's HEAD as `captured_sha`, and adds your `git config user.email` to the
139
+ redactor's keep list so your own address survives while every other one is removed.
140
+ Run the same JSON from your home directory and you get a note with no repo and no
141
+ staleness anchor. **Capture from inside the repository the knowledge is about** —
142
+ that is the whole reason `/remember` is worth invoking where you are working.
143
+
144
+ Two flags that do not mean what they look like:
145
+
146
+ - `agent-memory tree --repo`, with no value, means *all repos*. A bare `--repo`
147
+ clears the default scope rather than confirming it; `--repo <name>` points it at
148
+ a different repo.
149
+ - `--all` is unrelated to scope. It prints every node instead of truncating to the
150
+ `treeLines` cap, which is what the `run agent-memory tree --all` hint at the
151
+ bottom of a truncated tree is telling you.
152
+
153
+ One sharp edge: repo identity is the **directory name**, not the remote URL. Two
154
+ clones both sitting in a directory called `utils` are one repo as far as the store
155
+ is concerned. If you work across orgs, clone into distinct directory names.
156
+
157
+ ### How often they run
158
+
159
+ Only `init` is a once-per-machine command, and `agent-memory setup` already ran it.
160
+
161
+ | Command | When |
162
+ |---|---|
163
+ | `init` | once, via `setup`. Again only to register extra skill paths |
164
+ | `write` | every capture |
165
+ | `tree`, `get`, `search` | every lookup |
166
+ | `index` | repair only — `write` reindexes on every call. Run it after hand-editing or deleting notes, or after deleting `index.db` |
167
+ | `compact` | occasionally. Nothing schedules it: no daemon, no cron, no hook |
168
+ | `doctor` | after install, after an upgrade, and whenever something looks wrong |
169
+
170
+ **You will not type most of these.** `/remember` and `/handoff` call `write`;
171
+ `/recall` calls `tree`, `get` and `search`. They are documented so you can see what
172
+ the skills are doing and drive it by hand when you want to, but the daily loop is
173
+ two slash commands in a chat box. The ones a person actually types are `setup`,
174
+ `doctor`, and `compact` now and then.
175
+
105
176
  ## Install
106
177
 
107
178
  Two commands, and the second one is not optional:
@@ -111,13 +182,20 @@ npm install -g @vib795/agent-memory
111
182
  agent-memory setup
112
183
  ```
113
184
 
114
- Straight from git works too, and needs no registry access:
185
+ No registry access? Clone it and install the directory. This needs nothing but
186
+ GitHub, and it is the path to use behind a proxy that blocks or quarantines npm:
115
187
 
116
188
  ```bash
117
- npm install -g https://github.com/vib795/agent-memory.git
189
+ git clone https://github.com/vib795/agent-memory.git
190
+ npm install -g ./agent-memory
118
191
  agent-memory setup
119
192
  ```
120
193
 
194
+ **Do not install from the git URL directly.** `npm install -g <git-url>` fails for
195
+ this package: npm links the package into `~/.npm/_cacache/tmp/git-clone*`, a
196
+ directory it then cleans, and `postinstall` dies with `Cannot find module` before it
197
+ can run. Cloning first avoids npm's git handling entirely. Verified on npm 11.18.
198
+
121
199
  Every release is mirrored to **GitHub Packages**. Treat that as redundancy rather
122
200
  than a second front door: GitHub Packages requires authentication even for public
123
201
  packages, so installing from it costs you a token that npmjs does not ask for.
@@ -224,7 +302,7 @@ is generated state, and the committed value is only a placeholder.
224
302
  Needs Node 22.5 or newer; `doctor` says so plainly if the version is too old, and
225
303
  `postinstall` refuses rather than failing your install.
226
304
 
227
- Run `npm test` for the suite (71 tests, no dependencies). CI runs it on Linux,
305
+ Run `npm test` for the suite (74 tests, no dependencies). CI runs it on Linux,
228
306
  macOS and Windows across Node 22 and 24, and separately installs the packed tarball
229
307
  and exercises it end to end on all three.
230
308
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vib795/agent-memory",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Durable cross-repo knowledge graph for GitHub Copilot and Claude Code. Markdown source of truth, disposable SQLite index, zero runtime dependencies.",
5
5
  "keywords": [
6
6
  "github-copilot",