@vib795/agent-memory 0.7.5 → 0.8.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/HOWTO.md CHANGED
@@ -49,14 +49,14 @@ somebody else does the filing.
49
49
 
50
50
  ## 3. Install it (about 60 seconds)
51
51
 
52
- You will need **Node.js version 22.5 or newer**. To check, open a terminal —
52
+ You will need **Node.js version 22.16 or newer**. To check, open a terminal —
53
53
  on Windows that's **PowerShell**, on a Mac it's **Terminal** — and type:
54
54
 
55
55
  ```bash
56
56
  node --version
57
57
  ```
58
58
 
59
- If that prints something like `v22.5.0` or higher, you are set. If it prints an error or
59
+ If that prints something like `v22.16.0` or higher, you are set. If it prints an error or
60
60
  a smaller number, install Node from [nodejs.org](https://nodejs.org) first.
61
61
 
62
62
  Now run these two lines:
@@ -402,7 +402,7 @@ text, and deleting them is your decision to make, not the uninstaller's.
402
402
  ## Cheat sheet
403
403
 
404
404
  ```bash
405
- node --version # must be 22.5+
405
+ node --version # must be 22.16+
406
406
  npm install -g @vib795/agent-memory # 1. download
407
407
  agent-memory setup # 2. install into your AI tools
408
408
  agent-memory doctor # is everything OK?
package/README.md CHANGED
@@ -21,7 +21,7 @@ npm install -g @vib795/agent-memory
21
21
  agent-memory setup
22
22
  ```
23
23
 
24
- Node >= 22.5, and nothing else.
24
+ Node >= 22.16, and nothing else.
25
25
 
26
26
  In Claude Code you can take the three skills as a plugin instead of letting `setup`
27
27
  link them:
@@ -61,7 +61,7 @@ the write and read paths, the tiered context cost, and the invariants underneath
61
61
  [![test](https://github.com/vib795/agent-memory/actions/workflows/test.yml/badge.svg)](https://github.com/vib795/agent-memory/actions/workflows/test.yml)
62
62
  [![release](https://github.com/vib795/agent-memory/actions/workflows/release.yml/badge.svg)](https://github.com/vib795/agent-memory/actions/workflows/release.yml)
63
63
  [![provenance](https://img.shields.io/badge/provenance-attested-brightgreen)](https://www.npmjs.com/package/@vib795/agent-memory)
64
- [![node](https://img.shields.io/badge/node-%3E%3D22.5-brightgreen)](https://nodejs.org)
64
+ [![node](https://img.shields.io/badge/node-%3E%3D22.16-brightgreen)](https://nodejs.org)
65
65
  [![dependencies](https://img.shields.io/badge/runtime%20dependencies-0-brightgreen)](package.json)
66
66
  [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
67
67
 
@@ -82,11 +82,43 @@ Nothing in the platform closes the gap:
82
82
 
83
83
  ## Zero runtime dependencies
84
84
 
85
- `node:sqlite` has shipped inside Node core since 22.5, so the graph index needs no
85
+ `node:sqlite` is built into Node core — no package, no addon — so the graph index needs no
86
86
  package, no service, and no network. `npm ls -g --depth 0` shows nothing under it.
87
87
  On a locked-down desktop that is the difference between "a Node script" and "a new
88
88
  database", which is the entire argument you will have to make to get this approved.
89
89
 
90
+ **Why that is not just a smaller dependency count.** The usual way to reach SQLite
91
+ from Node is `better-sqlite3`, and it is a *native addon*: npm fetches it, then either
92
+ downloads a per-platform prebuilt `.node` binary or compiles C++ on the machine at
93
+ install time. That adds a package to the allowlist, a compiler or a prebuilt artefact
94
+ to every desktop, and a transitive tree behind both. `node:sqlite` is the same engine,
95
+ already inside the Node binary your organisation approved. Nothing is fetched and
96
+ nothing compiles.
97
+
98
+ So "zero dependencies" here does not mean *vendored*, and it does not mean *only small
99
+ ones*. Every import in `src/` is a Node built-in:
100
+
101
+ ```
102
+ node:child_process node:crypto node:fs node:os
103
+ node:path node:sqlite node:url
104
+ ```
105
+
106
+ `package.json` has no `dependencies` key at all, and no `devDependencies` either. A
107
+ reviewer has nothing to audit but this repository. It is enforced rather than promised
108
+ — `.github/workflows/test.yml` fails the build if a dependency is ever added:
109
+
110
+ ```bash
111
+ n=$(node -p "Object.keys(require('./package.json').dependencies||{}).length")
112
+ test "$n" -eq 0 || { echo "::error::$n runtime dependencies; this package must have none"; exit 1; }
113
+ ```
114
+
115
+ The price of this is the Node floor: **22.16 or newer**, and it took three steps to get
116
+ there. `node:sqlite` first appeared in 22.5 behind `--experimental-sqlite`; it was
117
+ unflagged in 22.13; and the bundled SQLite only gained the **FTS5** extension in 22.16.
118
+ `search` is built on FTS5, so 22.16 is the first version where this package runs rather
119
+ than merely imports. That is the one real cost, and it is why `doctor` reports the Node
120
+ version and `fts5: available` as two separate lines.
121
+
90
122
  - **Markdown is the source of truth.** `index.db` is a disposable cache; delete it
91
123
  and `agent-memory index` rebuilds it byte-identically.
92
124
  - **Nothing leaves the machine.** No daemon, no scheduled task, no telemetry.
@@ -440,7 +472,7 @@ equivalent and is not: npm links the global install to that folder rather than c
440
472
  it, which shows up as an arrow in `npm list -g`:
441
473
 
442
474
  ```
443
- `-- @vib795/agent-memory@0.7.5 -> .\..\..\..\agent-memory
475
+ `-- @vib795/agent-memory@0.8.1 -> .\..\..\..\agent-memory
444
476
  ```
445
477
 
446
478
  Move or delete the clone afterwards and the global install points at nothing — the same
@@ -559,9 +591,9 @@ there — `skills/recall/SKILL.md` and `skills/remember/SKILL.md` are tracked fi
559
591
  their committed descriptions are deliberately generic placeholders. `compact` prints
560
592
  them as skipped, which is the intended outcome, not a failure.
561
593
 
562
- Needs Node 22.5 or newer; `doctor` says so plainly if the version is too old.
594
+ Needs Node 22.16 or newer; `doctor` says so plainly if the version is too old.
563
595
 
564
- Run `npm test` for the suite (111 tests, no dependencies). CI runs it on Linux,
596
+ Run `npm test` for the suite (113 tests, no dependencies). CI runs it on Linux,
565
597
  macOS and Windows across Node 22 and 24, and separately installs the packed tarball
566
598
  and exercises it end to end on all three.
567
599
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vib795/agent-memory",
3
- "version": "0.7.5",
3
+ "version": "0.8.1",
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",
@@ -20,10 +20,10 @@
20
20
  "author": "Utkarsh Singh (https://github.com/vib795)",
21
21
  "type": "module",
22
22
  "bin": {
23
- "agent-memory": "src/cli.js"
23
+ "agent-memory": "src/bin.js"
24
24
  },
25
25
  "engines": {
26
- "node": ">=22.5.0"
26
+ "node": ">=22.16.0"
27
27
  },
28
28
  "scripts": {
29
29
  "test": "node --test",
@@ -131,7 +131,7 @@ Rules that separate a useful recall from a confident wrong one:
131
131
  - **`agent-memory: command not found`.** The package is not installed or not on
132
132
  PATH. This is the expected state when the skill was installed on its own, with
133
133
  `gh skill install`, rather than with the package. Answer from the code, then say
134
- once that the store needs `npm install -g @vib795/agent-memory` (Node >= 22.5).
134
+ once that the store needs `npm install -g @vib795/agent-memory` (Node >= 22.16).
135
135
  Do not run it yourself: installing a global package is the user's decision, and on
136
136
  a managed desktop it is one they may not be free to make.
137
137
  - **Empty store.** Answer from the code, then mention `/remember` once.
@@ -250,7 +250,7 @@ Warnings from `write` are worth surfacing verbatim:
250
250
  once. If it fails again, print the errors and stop; do not guess at the schema.
251
251
  - **`agent-memory: command not found`.** Print the JSON in the chat first, so the
252
252
  work is not lost, then say the store needs `npm install -g @vib795/agent-memory`
253
- (Node >= 22.5). Do not run it yourself. This is the expected state when the skill
253
+ (Node >= 22.16). Do not run it yourself. This is the expected state when the skill
254
254
  was installed on its own with `gh skill install` rather than with the package.
255
255
  - **Nothing durable in the conversation.** Say so in one line. That is a correct
256
256
  outcome, not a failure.
package/src/bin.js ADDED
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * The version gate, ahead of the module graph.
4
+ *
5
+ * `cli.js` statically imports `index-db.js`, which imports `node:sqlite`. ESM imports
6
+ * hoist, so on a Node without that module the entire graph fails to load with
7
+ * `ERR_UNKNOWN_BUILTIN_MODULE` before one line of our code runs — including `doctor`,
8
+ * whose whole job is to say the version is wrong. A user on Node 20 got an internal
9
+ * stack trace instead of a sentence telling them what to do.
10
+ *
11
+ * So the check lives here, in the one file that imports nothing, and `cli.js` is
12
+ * loaded dynamically only once the runtime is known to be capable. This is the same
13
+ * reasoning as `atomic.js` importing nothing from the package: a guard that depends on
14
+ * what it guards is not a guard.
15
+ *
16
+ * MIN_NODE is stated twice, here and in `cli.js`, because this file cannot import from
17
+ * a module that pulls in the database. The test suite asserts the two agree.
18
+ */
19
+ const MIN_NODE = [22, 16];
20
+
21
+ const [major, minor] = process.versions.node.split('.').map(Number);
22
+
23
+ if (major < MIN_NODE[0] || (major === MIN_NODE[0] && minor < MIN_NODE[1])) {
24
+ process.stderr.write(
25
+ `agent-memory needs Node >= ${MIN_NODE.join('.')}; this process is ${process.versions.node}.\n` +
26
+ 'The store is SQLite via node:sqlite, which carries the FTS5 extension only from\n' +
27
+ '22.16 onward, and search is built on FTS5. There is no dependency to install —\n' +
28
+ 'upgrade Node and run the same command again.\n',
29
+ );
30
+ process.exit(1);
31
+ }
32
+
33
+ await import('./cli.js');
package/src/cli.js CHANGED
@@ -30,7 +30,7 @@ import { redactNodeForExport, buildReceipt, renderReceipt } from './pii.js';
30
30
  * run and the first thing that breaks after a reboot.
31
31
  */
32
32
 
33
- const MIN_NODE = [22, 5];
33
+ const MIN_NODE = [22, 16];
34
34
 
35
35
  /**
36
36
  * Where this process is actually running from, and what version it is.
@@ -589,7 +589,7 @@ function cmdDoctor() {
589
589
  checks,
590
590
  text:
591
591
  `FAIL node version: ${process.versions.node}, need >= ${MIN_NODE.join('.')}.\n` +
592
- 'node:sqlite ships in Node core from 22.5 onward; there is no dependency to install.',
592
+ 'node:sqlite carries FTS5 in Node core from 22.16 onward; there is no dependency to install.',
593
593
  };
594
594
  }
595
595