linksee-memory 0.0.7 → 0.0.9

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/README.md CHANGED
@@ -191,6 +191,95 @@ Aggregated MCP-usage data helps the [KanseiLink](https://kansei-link.com) projec
191
191
 
192
192
  The full payload schema and validation logic is open-source — read `src/lib/telemetry.ts` if you want to verify exactly what leaves your machine.
193
193
 
194
+ ## Pricing
195
+
196
+ **Free forever.**
197
+
198
+ linksee-memory is local-first and runs entirely on your machine. There is no hosted component you need to pay for. The SQLite DB lives in your home directory; backup = file copy.
199
+
200
+ No account, no credit card, no API key. Just install and use.
201
+
202
+ ## Troubleshooting
203
+
204
+ <details>
205
+ <summary><b>The skill isn't firing — Claude Code doesn't call <code>recall</code> when I ask about past work.</b></summary>
206
+
207
+ 1. Verify the skill was installed:
208
+ ```bash
209
+ ls ~/.claude/skills/linksee-memory/SKILL.md
210
+ ```
211
+ If absent, run `npx -y linksee-memory-install-skill`.
212
+ 2. Restart Claude Code. Skills are indexed on session start.
213
+ 3. Check that the MCP is registered under the name `linksee` (the skill expects `mcp__linksee__*` tool names):
214
+ ```bash
215
+ claude mcp list | grep linksee
216
+ ```
217
+ If it's registered as something else, either re-register or edit `~/.claude/skills/linksee-memory/SKILL.md` to match.
218
+ </details>
219
+
220
+ <details>
221
+ <summary><b>Stop hook isn't recording my sessions.</b></summary>
222
+
223
+ 1. Check the hook log: `cat ~/.linksee-memory/hook.log`
224
+ 2. Run a manual test:
225
+ ```bash
226
+ echo '{"session_id":"test","transcript_path":"/path/to/some.jsonl"}' | npx linksee-memory-sync
227
+ ```
228
+ 3. Make sure the `Stop` hook in `~/.claude/settings.json` points to `npx -y linksee-memory-sync` (not the old `-import`).
229
+ </details>
230
+
231
+ <details>
232
+ <summary><b>Upgrading from v0.0.5 or earlier — my recalls are mostly tagged "Card_Navi" or my project-dir name.</b></summary>
233
+
234
+ v0.0.6+ fixed the entity detection bug that collapsed all memories into the session's starting cwd. To re-index existing history with correct project attribution, run:
235
+
236
+ ```bash
237
+ npx linksee-memory-import --all
238
+ ```
239
+
240
+ The importer is idempotent (wipes existing session data before re-inserting). Typical runtime: a few minutes for hundreds of sessions. Expect a dramatic improvement in `recall` precision afterward.
241
+ </details>
242
+
243
+ <details>
244
+ <summary><b><code>recall</code> returns too much — the context window fills up fast.</b></summary>
245
+
246
+ Reduce `max_tokens`:
247
+ ```
248
+ recall({ query: "...", max_tokens: 800 }) // default is 2000
249
+ ```
250
+ Or narrow with `entity_name` and `layer`:
251
+ ```
252
+ recall({ query: "...", entity_name: "my-project", layer: "caveat" })
253
+ ```
254
+ </details>
255
+
256
+ <details>
257
+ <summary><b>How do I reset / delete all memory?</b></summary>
258
+
259
+ ```bash
260
+ rm -rf ~/.linksee-memory # nuke everything; next run creates a fresh DB
261
+ ```
262
+
263
+ Or delete individual memories via the `forget` tool with a specific `memory_id`.
264
+ </details>
265
+
266
+ <details>
267
+ <summary><b>DB is getting large (>100 MB). How do I trim it?</b></summary>
268
+
269
+ Run consolidate — it clusters old cold memories into compressed learning-layer summaries:
270
+ ```
271
+ consolidate({ scope: "all", min_age_days: 7 })
272
+ ```
273
+ Caveat and active-goal layers are always preserved. Consider scheduling a weekly run via cron / Task Scheduler.
274
+ </details>
275
+
276
+ ## Support
277
+
278
+ - **Issues & bug reports**: [github.com/michielinksee/linksee-memory/issues](https://github.com/michielinksee/linksee-memory/issues)
279
+ - **Feature requests**: open an issue with the `enhancement` label
280
+ - **Security concerns**: see [SECURITY.md](./SECURITY.md) if present, or file a private advisory on GitHub
281
+ - **Company**: Synapse Arrows PTE. LTD. (Singapore)
282
+
194
283
  ## License
195
284
 
196
285
  MIT — Synapse Arrows PTE. LTD.
@@ -31,9 +31,29 @@ const FAILURE_PATTERNS = [
31
31
  /失敗|バグ|エラー|直して|修正|戻して/,
32
32
  /error|bug|fail|broken|revert|rollback/i,
33
33
  ];
34
+ // Caveats must be EXPLICIT warnings/prohibitions the user wants preserved.
35
+ // Previous bare patterns (/注意/ /やらない/ /避けて/) caught descriptive usage
36
+ // like「一般ユーザーはやらない」「Anthropicがやらない範囲」and turned
37
+ // opinions into protected caveats. Tightened to imperative/prohibitive forms
38
+ // only. Loses some recall, but precision matters more for the "never forget"
39
+ // layer.
40
+ // Imperative negations: `[ぁ-ん一-龯]ないで` reads as "don't do X" only when
41
+ // what follows is NOT part of a polite negation (「ないです」 = "it is not"),
42
+ // a probability form (「ないでしょう」), a request (「ないでほしい」), or a
43
+ // continuation (「ないでいる」). The negative lookahead `(?![すしいほ])`
44
+ // catches all four cases in one filter (す: です, し: しょう, い: いる/いない,
45
+ // ほ: ほしい). 「ないでください」 still passes because "く" is not excluded.
34
46
  const CAVEAT_PATTERNS = [
35
- /注意|気をつけ|避けて|やらない|禁止/,
36
- /do not|never|avoid|watch out/i,
47
+ // `ダメだ(?!った|ろうと|と思)` excludes 過去形 (ダメだった = "it failed") and
48
+ // speculation (ダメだろうと) which are descriptive, not prescriptive.
49
+ // `ないで` only counts as imperative when it ends the clause. We accept:
50
+ // sentence terminators 。!!、 / particles ね・よ / whitespace / ください
51
+ // Anything else (e.g. も = concessive「〜ないでも」, 止まる・いる・ほしい etc.)
52
+ // is treated as descriptive and excluded.
53
+ /気をつけて|注意して|[!!]注意[!!]|避けて(?!いる|いない)|[ぁ-ん一-龯]ないで(?=[。!!、\s]|ください|ね[^い]|よ[^う]|$)|やめて(?!おく|ほし)|禁止|ダメだ(?!った|ろうと|と思)|危険[だです]/,
54
+ // English: require a concrete action after avoid/don't/never — a bare
55
+ // "Avoiding rebuild of unchanged files" in a Vercel log is not a caveat.
56
+ /\b(?:don'?t|do\s+not)\s+(?:do|use|run|call|forget|try|send|share|commit|push|paste|edit)\b|\bnever\s+(?:do|use|call|share|commit|paste|run|push|edit)\b|\bavoid\s+(?:using|running|calling|committing|pushing|sharing|pasting|editing|creating|modifying)\b|\bwatch\s+out\b/i,
37
57
  ];
38
58
  function matchesAny(text, patterns) {
39
59
  return patterns.some((p) => p.test(text));
@@ -118,6 +118,17 @@ export function isPastedExternalContent(text) {
118
118
  // Service status pages / logs
119
119
  if (/^(Service offline|Failed|Success|Deployment|Build|Logs?|Error:)/.test(t.slice(0, 80)))
120
120
  return true;
121
+ // CI/CD and cloud build logs are almost always pasted and contain substrings
122
+ // (Avoiding / Running / never / error) that false-trigger the caveat patterns.
123
+ // Detect by timestamp-prefixed first line (e.g. "17:40:13.469 Running build")
124
+ // or by dense occurrence of ISO-time prefixes.
125
+ if (/^\d{1,2}:\d{2}:\d{2}[.:]\d{2,3}\s/.test(t))
126
+ return true;
127
+ if ((t.match(/\d{1,2}:\d{2}:\d{2}[.:]\d{2,3}/g) || []).length >= 3)
128
+ return true;
129
+ // Deployment-success notice from Vercel / Netlify / etc. (pasted by user)
130
+ if (/^成功しました/.test(t) && /デプロイ|deploy/i.test(t.slice(0, 200)))
131
+ return true;
121
132
  // Extractor-internal duplicate (was generating same caveat per session)
122
133
  if (t === 'Review errors before repeating this workflow.')
123
134
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linksee-memory",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "mcpName": "io.github.michielinksee/linksee-memory",
5
5
  "description": "Local-first agent memory MCP — cross-agent brain with 6-layer structured memory + token-saving file diff cache",
6
6
  "type": "module",