@edihasaj/recall 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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +409 -0
  3. package/dist/chunk-4CV4JOE5.js +27 -0
  4. package/dist/chunk-4CV4JOE5.js.map +1 -0
  5. package/dist/chunk-A5UIRZU6.js +469 -0
  6. package/dist/chunk-A5UIRZU6.js.map +1 -0
  7. package/dist/chunk-AYHFPCGY.js +964 -0
  8. package/dist/chunk-AYHFPCGY.js.map +1 -0
  9. package/dist/chunk-DNFKAHS6.js +204 -0
  10. package/dist/chunk-DNFKAHS6.js.map +1 -0
  11. package/dist/chunk-GC5XMBG4.js +551 -0
  12. package/dist/chunk-GC5XMBG4.js.map +1 -0
  13. package/dist/chunk-IILLSHLM.js +3021 -0
  14. package/dist/chunk-IILLSHLM.js.map +1 -0
  15. package/dist/chunk-LVQW6WHK.js +146 -0
  16. package/dist/chunk-LVQW6WHK.js.map +1 -0
  17. package/dist/chunk-LZ6PMQRX.js +955 -0
  18. package/dist/chunk-LZ6PMQRX.js.map +1 -0
  19. package/dist/chunk-PC43MBX5.js +2960 -0
  20. package/dist/chunk-PC43MBX5.js.map +1 -0
  21. package/dist/chunk-VEPXEHRZ.js +1763 -0
  22. package/dist/chunk-VEPXEHRZ.js.map +1 -0
  23. package/dist/cleanup-TVOX2S2S.js +28 -0
  24. package/dist/cleanup-TVOX2S2S.js.map +1 -0
  25. package/dist/cli.js +3425 -0
  26. package/dist/cli.js.map +1 -0
  27. package/dist/daemon.js +1298 -0
  28. package/dist/daemon.js.map +1 -0
  29. package/dist/dispatcher-UGMU6THT.js +15 -0
  30. package/dist/dispatcher-UGMU6THT.js.map +1 -0
  31. package/dist/keychain-5QG52ANO.js +22 -0
  32. package/dist/keychain-5QG52ANO.js.map +1 -0
  33. package/dist/mcp.js +21 -0
  34. package/dist/mcp.js.map +1 -0
  35. package/dist/quality-Z7LPMMBC.js +17 -0
  36. package/dist/quality-Z7LPMMBC.js.map +1 -0
  37. package/dist/sync-server.js +225 -0
  38. package/dist/sync-server.js.map +1 -0
  39. package/dist/tasks-UOLSPXJQ.js +61 -0
  40. package/dist/tasks-UOLSPXJQ.js.map +1 -0
  41. package/dist/usage-CY3V72YN.js +101 -0
  42. package/dist/usage-CY3V72YN.js.map +1 -0
  43. package/drizzle/0000_initial_create.sql +240 -0
  44. package/drizzle/0001_rich_liz_osborn.sql +21 -0
  45. package/drizzle/0002_unknown_spot.sql +18 -0
  46. package/drizzle/0003_red_wendigo.sql +19 -0
  47. package/drizzle/0004_early_carlie_cooper.sql +1 -0
  48. package/drizzle/0005_simple_emma_frost.sql +96 -0
  49. package/drizzle/0006_keen_mongoose.sql +2 -0
  50. package/drizzle/0007_flawless_maximus.sql +15 -0
  51. package/drizzle/meta/0000_snapshot.json +1630 -0
  52. package/drizzle/meta/0001_snapshot.json +1773 -0
  53. package/drizzle/meta/0002_snapshot.json +1891 -0
  54. package/drizzle/meta/0003_snapshot.json +2014 -0
  55. package/drizzle/meta/0004_snapshot.json +2022 -0
  56. package/drizzle/meta/0005_snapshot.json +2064 -0
  57. package/drizzle/meta/0006_snapshot.json +2078 -0
  58. package/drizzle/meta/0007_snapshot.json +2183 -0
  59. package/drizzle/meta/_journal.json +62 -0
  60. package/package.json +64 -0
  61. package/scripts/recall-claude +7 -0
  62. package/scripts/recall-codex +7 -0
  63. package/scripts/recall-session +71 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Edi Hasaj
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,409 @@
1
+ # Recall
2
+
3
+ Cross-tool coding memory + instruction compiler.
4
+
5
+ [![CI](https://github.com/edihasaj/recall/actions/workflows/ci.yml/badge.svg)](https://github.com/edihasaj/recall/actions/workflows/ci.yml)
6
+ [![Release](https://github.com/edihasaj/recall/actions/workflows/release.yml/badge.svg)](https://github.com/edihasaj/recall/actions/workflows/release.yml)
7
+ [![Latest release](https://img.shields.io/github/v/release/edihasaj/recall?sort=semver)](https://github.com/edihasaj/recall/releases/latest)
8
+
9
+ Recall is a local repo-memory compiler for coding agents. It learns from corrections, review feedback, repo scans, and session outcomes, then injects compact trusted instructions through CLI, MCP, daemon endpoints, and lifecycle hooks.
10
+
11
+ - Website: <https://recallmemory.dev/>
12
+ - Releases: <https://github.com/edihasaj/recall/releases>
13
+ - Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
14
+
15
+ ## Install
16
+
17
+ ### Homebrew (macOS)
18
+
19
+ ```bash
20
+ brew install --cask edihasaj/tap/recall
21
+ recall setup --yes
22
+ recall doctor
23
+ ```
24
+
25
+ ### npm (macOS, Linux)
26
+
27
+ ```bash
28
+ npm i -g @edihasaj/recall
29
+ recall setup --yes
30
+ recall doctor
31
+ # Optional: run as a background service
32
+ recall daemon install # launchd on macOS, systemd --user on Linux
33
+ ```
34
+
35
+ On Linux, `recall daemon install` writes `~/.config/systemd/user/recall-daemon.service` and enables it. Logs: `journalctl --user -u recall-daemon`.
36
+
37
+ ### GitHub Releases
38
+
39
+ Download `Recall.app.zip` from [the latest release](https://github.com/edihasaj/recall/releases/latest), unzip it, move `Recall.app` into `/Applications`, then run setup:
40
+
41
+ ```bash
42
+ recall setup --yes
43
+ recall doctor
44
+ ```
45
+
46
+ ### Source
47
+
48
+ ```bash
49
+ git clone https://github.com/edihasaj/recall.git
50
+ cd recall
51
+ npm ci
52
+ npm run build
53
+ npm link
54
+ ```
55
+
56
+ ## Build macOS App From Source
57
+
58
+ Build the macOS app bundle:
59
+
60
+ ```bash
61
+ npm run build:app
62
+ ```
63
+
64
+ Install it into `/Applications`:
65
+
66
+ ```bash
67
+ npm run install:app
68
+ ```
69
+
70
+ The app embeds its own Node runtime plus Recall `dist/`, `drizzle/`, and `node_modules/`, then manages the bundled daemon via launchd.
71
+
72
+ Configure local agent runtimes against the installed app. `recall setup --yes` wires MCP and lifecycle hooks for supported detected runtimes so memory injection does not depend on the model choosing to call `query`:
73
+
74
+ ```bash
75
+ recall setup --yes # shared MCP + hooks for detected runtimes
76
+ recall setup --scope project --yes # add project-scoped hooks to the current repo
77
+ recall setup --uninstall-hooks --yes # remove Recall-managed hooks
78
+ ```
79
+
80
+ By default the hooks inject repo memory once at `SessionStart` (minimal format) and stay silent on every subsequent `UserPromptSubmit`. To re-enable per-prompt injection or wire provider credentials so the daemon can run memory maintenance on a schedule, see [docs/configuration.md](docs/configuration.md).
81
+
82
+ Install + setup behavior:
83
+
84
+ - Routine app launch, daemon start, and daemon restart are non-mutating for agent integrations. They do not re-add hooks or repo instruction files after you remove them.
85
+ - Memory "rethinking": when provider credentials are stored, the daemon runs the dispatcher daily (tunable via `RECALL_DISPATCHER_INTERVAL_SECONDS`) to refine/merge/summarize memories. Use `recall maintenance credentials --help` for provider-specific fields. Observability: `recall maintenance usage`, `recall maintenance stats`. Without a key, pending tasks surface via SessionStart for the live agent to claim.
86
+ - `recall doctor` checks install state; `recall doctor --fix` or `recall setup --yes` wires MCP + hooks for supported agent runtimes.
87
+ - Repo-local `.recall/context.md` is an optional export/fallback, not the primary integration.
88
+
89
+ ## First Run
90
+
91
+ Initialize DB:
92
+
93
+ ```bash
94
+ recall init
95
+ ```
96
+
97
+ Scan a real repo:
98
+
99
+ ```bash
100
+ recall scan ~/Projects/some-repo
101
+ recall list
102
+ recall publish ~/Projects/some-repo
103
+ ```
104
+
105
+ If an unseen repo is later queried through the daemon or MCP, Recall now tries a lazy one-time bootstrap by resolving the local clone and scanning just that repo.
106
+ Recall can also publish repo-local context into `.recall/context.md`; treat it as an optional export/fallback, not the primary agent integration.
107
+ Bootstrap now keeps operational commands hot and leaves softer scan facts as candidates or drops them during maintenance cleanup.
108
+
109
+ Inspect quality / health / injection pack:
110
+
111
+ ```bash
112
+ recall quality -r owner/repo
113
+ recall health -r owner/repo
114
+ recall compile -r owner/repo
115
+ recall compile -r owner/repo --query "pytest -q" --include-candidates
116
+ ```
117
+
118
+ Bootstrap local embeddings and the derived sqlite-vec index:
119
+
120
+ ```bash
121
+ recall doctor
122
+ recall embeddings setup
123
+ recall embeddings info
124
+ recall embeddings bootstrap
125
+ recall embeddings verify
126
+ recall embeddings rebuild-index
127
+ recall search -r owner/repo "pnpm"
128
+ ```
129
+
130
+ Optional embedding env vars:
131
+
132
+ ```bash
133
+ RECALL_EMBEDDING_PROVIDER=multilingual-e5
134
+ RECALL_EMBEDDING_DIMS=384
135
+ RECALL_EMBEDDINGS_DISABLED=true
136
+ ```
137
+
138
+ Upgrade note:
139
+
140
+ - First launch after the local-embeddings upgrade resets Recall's local DB.
141
+ - Recall rescans discovered repos and rebuilds embeddings/indexes in the background.
142
+ - Recall.app now surfaces that setup progress while the daemon comes up.
143
+
144
+ Daemon maintenance runs in-process on a timer.
145
+
146
+ Useful env vars:
147
+
148
+ ```bash
149
+ RECALL_MAINTENANCE_INTERVAL_SECONDS=300
150
+ RECALL_ACTIVITY_RETENTION_DAYS=90
151
+ RECALL_FEEDBACK_RETENTION_DAYS=180
152
+ RECALL_SIGNAL_RETENTION_DAYS=180
153
+ RECALL_SQLITE_VACUUM_ENABLED=true
154
+ RECALL_SQLITE_VACUUM_MIN_FREE_PAGES=100
155
+ RECALL_SQLITE_VACUUM_MIN_FREE_RATIO=0.1
156
+ ```
157
+
158
+ Inspect rolled-up session history:
159
+
160
+ ```bash
161
+ recall history list -r owner/repo
162
+ recall history search -r owner/repo "pnpm"
163
+ ```
164
+
165
+ Session history rolls up corrections, review feedback, compile observations,
166
+ and durable user decisions/directions from prompt activity.
167
+ Compiled context includes a small relevant history section so decisions can be
168
+ reused without promoting every prompt into a durable memory.
169
+ History injections are tracked separately from memory injections in
170
+ `recall maintenance quality`.
171
+
172
+ Run retrieval eval fixtures:
173
+
174
+ ```bash
175
+ recall eval retrieval --file docs/retrieval-eval.example.json
176
+ recall eval retrieval --file docs/retrieval-eval.example.json --json
177
+ recall eval retrieval --file docs/retrieval-eval.recall.json
178
+ recall eval retrieval --file docs/retrieval-eval.recall-hybrid.json
179
+ ```
180
+
181
+ ## Teach It
182
+
183
+ Add a correction:
184
+
185
+ ```bash
186
+ recall correct -r owner/repo "don't use npm, use pnpm"
187
+ recall list -r owner/repo
188
+ ```
189
+
190
+ Confirm a memory manually:
191
+
192
+ ```bash
193
+ recall confirm <memory-id>
194
+ ```
195
+
196
+ Report review feedback:
197
+
198
+ ```bash
199
+ recall review -r owner/repo "review said use error boundaries"
200
+ ```
201
+
202
+ ## Quality Model
203
+
204
+ `recall quality` shows:
205
+
206
+ - stage: `cold | growing | mature`
207
+ - quality score
208
+ - repeat sessions needed before promotion
209
+ - compile confidence threshold
210
+ - dedup similarity threshold
211
+
212
+ Behavior:
213
+
214
+ - cold repos learn faster
215
+ - mature repos need more repeat evidence
216
+ - noisy repos inject less aggressively
217
+
218
+ ## Daemon
219
+
220
+ Start HTTP daemon:
221
+
222
+ ```bash
223
+ node dist/daemon.js
224
+ ```
225
+
226
+ Install as a user service (launchd on macOS, `systemd --user` on Linux):
227
+
228
+ ```bash
229
+ recall daemon install
230
+ recall daemon status
231
+ ```
232
+
233
+ Useful service commands:
234
+
235
+ ```bash
236
+ recall daemon start
237
+ recall daemon stop
238
+ recall daemon uninstall
239
+ ```
240
+
241
+ Inspect hook telemetry:
242
+
243
+ ```bash
244
+ recall hook stats
245
+ recall hook stats --agent codex
246
+ recall hook stats --json
247
+ ```
248
+
249
+ Default URL:
250
+
251
+ ```text
252
+ http://localhost:7890
253
+ ```
254
+
255
+ Useful endpoints:
256
+
257
+ ```bash
258
+ curl -s 'http://localhost:7890/quality?repo=owner/repo'
259
+ curl -s -X POST http://localhost:7890/compile \
260
+ -H 'Content-Type: application/json' \
261
+ -d '{"repo":"owner/repo"}'
262
+
263
+ curl -s -X POST http://localhost:7890/correct \
264
+ -H 'Content-Type: application/json' \
265
+ -d '{"repo":"owner/repo","session_id":"s1","text":"don'\''t use npm, use pnpm"}'
266
+ ```
267
+
268
+ Session collector endpoints:
269
+
270
+ ```bash
271
+ curl -s -X POST http://localhost:7890/session/start \
272
+ -H 'Content-Type: application/json' \
273
+ -d '{"session_id":"codex-1","client":"codex","repo_path":"'"$PWD"'"}'
274
+
275
+ curl -s -X POST http://localhost:7890/session/end \
276
+ -H 'Content-Type: application/json' \
277
+ -d '{"session_id":"codex-1","client":"codex","repo_path":"'"$PWD"'","payload":{"exit_code":0}}'
278
+ ```
279
+
280
+ Optional repo-local context artifact:
281
+
282
+ ```bash
283
+ recall publish .
284
+ cat .recall/context.md
285
+ ```
286
+
287
+ ## Claude Code MCP
288
+
289
+ Recall supports both MCP transports:
290
+
291
+ - stdio: Claude Code spawns Recall directly. This is the most portable default.
292
+ - HTTP: Claude Code connects to the daemon at `http://localhost:7890/mcp`.
293
+ This requires the Recall app/daemon to be running.
294
+
295
+ Packaged macOS app, stdio config:
296
+
297
+ ```json
298
+ {
299
+ "mcpServers": {
300
+ "recall": {
301
+ "command": "/Applications/Recall.app/Contents/Resources/Runtime/bin/node",
302
+ "args": ["/Applications/Recall.app/Contents/Resources/Runtime/dist/mcp.js"]
303
+ }
304
+ }
305
+ }
306
+ ```
307
+
308
+ Source checkout, stdio config after `npm run build`:
309
+
310
+ ```json
311
+ {
312
+ "mcpServers": {
313
+ "recall": {
314
+ "command": "node",
315
+ "args": ["/path/to/recall/dist/mcp.js"]
316
+ }
317
+ }
318
+ }
319
+ ```
320
+
321
+ Daemon HTTP config:
322
+
323
+ ```bash
324
+ claude mcp add --transport http -s user recall http://localhost:7890/mcp
325
+ ```
326
+
327
+ Equivalent JSON:
328
+
329
+ ```json
330
+ {
331
+ "mcpServers": {
332
+ "recall": {
333
+ "type": "http",
334
+ "url": "http://localhost:7890/mcp"
335
+ }
336
+ }
337
+ }
338
+ ```
339
+
340
+ The rest of the daemon API remains available on the same port, for example
341
+ `/health`, `/compile`, and `/session/start`.
342
+
343
+ Useful MCP tools:
344
+
345
+ - `query`
346
+ - `report_correction`
347
+ - `capture_correction`
348
+ - `report_review`
349
+ - `signal_outcome`
350
+ - `session_end`
351
+ - `quality`
352
+ - `list`
353
+ - `confirm`
354
+
355
+ ## Session Wrappers
356
+
357
+ Use the thin wrappers in `scripts/` if you want Recall to auto-learn from session starts before retrieval is useful:
358
+
359
+ ```bash
360
+ scripts/recall-codex
361
+ scripts/recall-claude
362
+ ```
363
+
364
+ They:
365
+
366
+ - send `/session/start` with the current git root or `pwd`
367
+ - let the real client run normally
368
+ - send `/session/end` with the final exit code
369
+
370
+ Override targets if needed:
371
+
372
+ ```bash
373
+ RECALL_CODEX_BIN=/path/to/codex scripts/recall-codex
374
+ RECALL_CLAUDE_BIN=/path/to/claude scripts/recall-claude
375
+ RECALL_DAEMON_URL=http://localhost:7890 scripts/recall-codex
376
+ ```
377
+
378
+ ## MCP First
379
+
380
+ Recommended production pattern:
381
+
382
+ - run Recall locally via `/Applications/Recall.app`
383
+ - let agents query/live-report through Recall MCP
384
+ - treat `.recall/context.md` as optional export/fallback, not the primary path
385
+
386
+ ## Fast Test Loop
387
+
388
+ ```bash
389
+ recall init
390
+ recall scan ~/Projects/some-real-repo
391
+ recall quality -r owner/repo
392
+ recall compile -r owner/repo
393
+ recall correct -r owner/repo "don't use npm, use pnpm"
394
+ recall list -r owner/repo
395
+ ```
396
+
397
+ If you want repeated-session promotion testing, use the daemon `/correct` endpoint with different `session_id` values.
398
+
399
+ ## Development
400
+
401
+ ```bash
402
+ npm ci
403
+ npm run docs:check
404
+ npm run typecheck
405
+ npm test
406
+ npm run build
407
+ ```
408
+
409
+ Release and Homebrew publishing notes live in [docs/RELEASING.md](docs/RELEASING.md). The landing page is static HTML/CSS in [docs/](docs/) and deploys with GitHub Pages.
@@ -0,0 +1,27 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __esm = (fn, res) => function __init() {
6
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
7
+ };
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ export {
23
+ __esm,
24
+ __export,
25
+ __toCommonJS
26
+ };
27
+ //# sourceMappingURL=chunk-4CV4JOE5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}