abmind 0.1.4 → 0.1.5-alpha.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 (72) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +90 -61
  3. package/config/.env.memory.example +114 -0
  4. package/dist/cli/abmind-bundle.js +4 -0
  5. package/dist/cli/abmind-bundle.js.map +1 -1
  6. package/dist/cli/abmind-hook-notification.d.ts +6 -0
  7. package/dist/cli/abmind-hook-notification.d.ts.map +1 -0
  8. package/dist/cli/abmind-hook-notification.js +56 -0
  9. package/dist/cli/abmind-hook-notification.js.map +1 -0
  10. package/dist/cli/abmind-hook-postcompact.d.ts +9 -0
  11. package/dist/cli/abmind-hook-postcompact.d.ts.map +1 -0
  12. package/dist/cli/abmind-hook-postcompact.js +64 -0
  13. package/dist/cli/abmind-hook-postcompact.js.map +1 -0
  14. package/dist/cli/abmind-hook-postuserprompt.d.ts +7 -0
  15. package/dist/cli/abmind-hook-postuserprompt.d.ts.map +1 -0
  16. package/dist/cli/abmind-hook-postuserprompt.js +69 -0
  17. package/dist/cli/abmind-hook-postuserprompt.js.map +1 -0
  18. package/dist/cli/abmind-hook-precompact.d.ts +7 -0
  19. package/dist/cli/abmind-hook-precompact.d.ts.map +1 -0
  20. package/dist/cli/abmind-hook-precompact.js +63 -0
  21. package/dist/cli/abmind-hook-precompact.js.map +1 -0
  22. package/dist/cli/abmind-hook-preuserprompt.d.ts +16 -0
  23. package/dist/cli/abmind-hook-preuserprompt.d.ts.map +1 -0
  24. package/dist/cli/abmind-hook-preuserprompt.js +125 -0
  25. package/dist/cli/abmind-hook-preuserprompt.js.map +1 -0
  26. package/dist/cli/abmind-hook-subagentstart.d.ts +6 -0
  27. package/dist/cli/abmind-hook-subagentstart.d.ts.map +1 -0
  28. package/dist/cli/abmind-hook-subagentstart.js +56 -0
  29. package/dist/cli/abmind-hook-subagentstart.js.map +1 -0
  30. package/dist/cli/abmind-hook-subagentstop.d.ts +6 -0
  31. package/dist/cli/abmind-hook-subagentstop.d.ts.map +1 -0
  32. package/dist/cli/abmind-hook-subagentstop.js +58 -0
  33. package/dist/cli/abmind-hook-subagentstop.js.map +1 -0
  34. package/dist/cli/abmind-hook-toolfailure.d.ts +7 -0
  35. package/dist/cli/abmind-hook-toolfailure.d.ts.map +1 -0
  36. package/dist/cli/abmind-hook-toolfailure.js +66 -0
  37. package/dist/cli/abmind-hook-toolfailure.js.map +1 -0
  38. package/dist/cli/abmind-install.js +263 -12
  39. package/dist/cli/abmind-install.js.map +1 -1
  40. package/dist/cli/abmind-restore.d.ts +1 -1
  41. package/dist/cli/abmind-restore.js +14 -36
  42. package/dist/cli/abmind-restore.js.map +1 -1
  43. package/dist/src/crypto.d.ts.map +1 -1
  44. package/dist/src/crypto.js +0 -3
  45. package/dist/src/crypto.js.map +1 -1
  46. package/package.json +6 -3
  47. package/templates/core/SOUL.md +24 -0
  48. package/templates/core/agent_notes.md +7 -0
  49. package/templates/core/core_facts.md +10 -0
  50. package/templates/core/memory-tools.md +43 -0
  51. package/templates/core/user_profile.md +7 -0
  52. package/templates/with-abmind-hooks.json +26 -0
  53. package/dist/cli/abmind-backfill.d.ts +0 -3
  54. package/dist/cli/abmind-backfill.d.ts.map +0 -1
  55. package/dist/cli/abmind-backfill.js +0 -64
  56. package/dist/cli/abmind-backfill.js.map +0 -1
  57. package/dist/cli/abmind-key.d.ts +0 -5
  58. package/dist/cli/abmind-key.d.ts.map +0 -1
  59. package/dist/cli/abmind-key.js +0 -214
  60. package/dist/cli/abmind-key.js.map +0 -1
  61. package/dist/cli/abmind-memory-stats.d.ts +0 -3
  62. package/dist/cli/abmind-memory-stats.d.ts.map +0 -1
  63. package/dist/cli/abmind-memory-stats.js +0 -45
  64. package/dist/cli/abmind-memory-stats.js.map +0 -1
  65. package/dist/cli/abmind-reset.d.ts +0 -11
  66. package/dist/cli/abmind-reset.d.ts.map +0 -1
  67. package/dist/cli/abmind-reset.js +0 -143
  68. package/dist/cli/abmind-reset.js.map +0 -1
  69. package/dist/cli/abmind-status.d.ts +0 -3
  70. package/dist/cli/abmind-status.d.ts.map +0 -1
  71. package/dist/cli/abmind-status.js +0 -45
  72. package/dist/cli/abmind-status.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,53 @@
2
2
 
3
3
  All notable changes to abmind. Follows [Keep a Changelog](https://keepachangelog.com/).
4
4
 
5
+ ## [0.1.5] — 2026-06-01
6
+
7
+ ### Added
8
+ - **abmind install** — full onboard: native deps, ollama check, encryption passphrase, memory DB init, user_profile.md seeding, install log
9
+ - **Agent name** — install asks agent name, writes to SOUL.md template (`<agentName>` placeholder)
10
+ - **`--agent-name`** flag for non-interactive installs
11
+ - **`rebuildFtsIndexes()`** on MemoryBackend interface
12
+ - **Block system/agent** from storing memories + 24h TTL cleanup (#701)
13
+
14
+ ### Changed
15
+ - SOUL template: "I am <agentName>, an autonomous agent. abtars is my runtime — it gives me voice and hands."
16
+ - `seedCoreFiles` reads from `templates/core/SOUL.md` (was `core/SOUL.md`)
17
+ - Sleep budget raised to 18 + reset llmCalls on resume (#684)
18
+
19
+ ### Fixed
20
+ - `abmind bundle --help` exits with usage instead of running bundle
21
+ - Scope sleep message query to primary user_id (#696)
22
+ - Lazy-load better-sqlite3 — no top-level require (#713)
23
+
24
+ ## [0.1.4] — 2026-05-31
25
+
26
+ ### Added
27
+ - **Backup** — `abmind backup --database` flag + auto key-file fallback (#707)
28
+ - **FTS self-heal** — `rebuildFtsIndexes()` exposed on MemoryBackend interface (#706)
29
+ - **Session context** — `skipDailies` + `maxAgeMs` options (#658)
30
+ - **SESSION_HISTORY_CAP** — cap history budget at 25000 chars (#656)
31
+ - **buildStatusBlock** — compact system status for session-start (#646)
32
+ - **Curation counter** — skip candidates after 3 failures with same model (#639)
33
+ - **Wiki** — 13 pages (recall, classification, configuration, backup, troubleshooting + rewrites)
34
+
35
+ ### Changed
36
+ - Sleep pipeline: merge core-promotion into retro-derive (two-stage knowledge funnel, #630)
37
+ - Consolidation writes to `weekly/` not `daily/` (#640)
38
+ - Exclude non-numbered files from sleep step loader (#637)
39
+ - [RECENT] shows newest messages, not oldest (#654)
40
+ - README rewrite: selling points, badges, agglutinating language examples
41
+
42
+ ### Fixed
43
+ - `[NO-REPLY]` renamed to `[NO_REPLY]` (underscore) matching bridge filter
44
+
45
+ ## [0.1.3] — 2026-05-20
46
+
47
+ ### Added
48
+ - Dreaming pipeline — multi-step sleep with per-step retry
49
+ - CI/CD — GitHub Actions build + test
50
+ - Community templates — SOUL.md, user_profile.md, agent_notes.md
51
+
5
52
  ## [0.1.2] — 2026-05-07
6
53
 
7
54
  ### Added
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # abmind
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/abmind)](https://www.npmjs.com/package/abmind) [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE) [![Node](https://img.shields.io/badge/node-22%2B-green)]()
4
+
3
5
  Persistent memory system for AI agents — store, recall, consolidate, and forget.
4
6
 
5
- SQLite-backed, 4-layer recall (FTS5 + trigram + embeddings + consolidated summaries), overnight sleep maintenance, injection detection, context orchestration, and a classification system inspired by NATO Admiralty Codes.
7
+ **Built for multilingual agents that run 24/7 — not a vector DB wrapper.** SQLite-backed, 4-layer recall (FTS5 + trigram + embeddings + consolidated summaries), overnight sleep maintenance, injection detection, context orchestration, and a classification system inspired by NATO Admiralty Codes.
6
8
 
7
- **Version:** 0.1.2 | **Docs:** [aksika.github.io/abmind](https://aksika.github.io/abmind/) | **License:** Apache 2.0
9
+ **Version:** 0.1.4 | **Docs:** [Wiki](https://github.com/aksika/abmind/tree/dev/docs/wiki) | **License:** Apache 2.0
8
10
 
9
11
  ## Install
10
12
 
@@ -13,38 +15,7 @@ npm install abmind
13
15
  abmind install
14
16
  ```
15
17
 
16
- Requires Node 22+. Full guide: [Installation](https://aksika.github.io/abmind/)
17
-
18
- ## Library Usage
19
-
20
- ```ts
21
- import { MemoryManager, loadMemoryConfig, recallSearch, buildWakeUp } from "abmind";
22
-
23
- // Initialize
24
- const config = loadMemoryConfig(); // reads ABMIND_HOME, defaults to ~/.abmind
25
- const memory = new MemoryManager(config);
26
-
27
- // Store a message
28
- memory.recordMessage({
29
- role: "user",
30
- content: "I prefer dark mode and hate notifications",
31
- timestamp: Date.now(),
32
- userId: "alice",
33
- sessionId: "alice:telegram",
34
- });
35
-
36
- // Recall relevant memories
37
- const results = await recallSearch(memory.getRecallDeps(), {
38
- translated: ["dark mode", "preferences"],
39
- userId: "alice",
40
- limit: 5,
41
- });
42
- console.log(results.memories); // ranked by relevance across all 4 layers
43
-
44
- // Build wake-up context for a new session
45
- const wakeUp = buildWakeUp(memory, "alice");
46
- // → structured context: recent topics, key facts, emotional state, pending items
47
- ```
18
+ Requires Node 22+. Full guide: [Installation](https://github.com/aksika/abmind/blob/dev/docs/wiki/install.md)
48
19
 
49
20
  ## Architecture
50
21
 
@@ -77,38 +48,75 @@ const wakeUp = buildWakeUp(memory, "alice");
77
48
 
78
49
  ## Features
79
50
 
80
- ### Memory Storage
81
- - **Typed memories** — fact, preference, decision, experience, skill, relationship, goal
82
- - **Bilingual**stores original language + English translation side by side
83
- - **Emotion tagging** — -5 to +5 per memory, emotion arcs tracked over time
51
+ ### Agglutinating Language Support
52
+
53
+ Most memory systems tokenize on word boundaries catastrophic for Japanese, Turkish, Hungarian, and other languages where a single word carries dense meaning. Japanese has no spaces ("食べさせられなかった" = "was not able to be made to eat"), Turkish compounds freely ("yapabildiklerimizdenmişsinizcesine" = "as if you were among those we could do"), Hungarian packs sentences into one word ("megcsináltattam" = "I had it done by someone"). abmind uses **trigram fuzzy search** alongside FTS5, so recall works regardless of morphology, word boundaries, or compounding. Store in any language, recall in any language.
54
+
55
+ ### Credential Vault
56
+
57
+ When your agent receives a secret (API key, token, password):
58
+ 1. Encrypts it at rest (AES-256-GCM) as a SECRET memory (class 3)
59
+ 2. Immediately redacts the raw credential from conversation history
60
+ 3. Only the owner can retrieve it (classification-gated recall)
61
+ 4. Backups and exports never contain raw credentials
62
+
63
+ Your agent remembers secrets without leaking them.
64
+
65
+ ### Multi-Resolution Context
66
+
67
+ Context assembly at three zoom levels — 3× more coverage in the same token budget:
68
+ - **Recent** — full verbatim conversation (last N turns)
69
+ - **Session** — compressed per-turn atoms (ABM-L format, 3× token reduction)
70
+ - **Long-term** — thematic summaries + recalled memories from weeks/months ago
71
+
72
+ The agent remembers last week's decisions AND this morning's details.
73
+
74
+ ### Sleep Maintenance (Dreamy)
75
+
76
+ Nightly background process that curates memory like human sleep:
77
+ - Extracts facts, decisions, preferences from the day's conversations
78
+ - Consolidates daily → weekly → quarterly summaries
79
+ - Detects contradictions ("you said X last week but Y today")
80
+ - Prunes stale memories (Memory Darwinism — unused memories fade)
81
+ - Promotes frequently-recalled memories, demotes stale ones
82
+ - 10-14 LLM calls per cycle, fully autonomous
83
+
84
+ ### Recall (4 layers, ranked)
84
85
 
85
- ### Recall (4 layers)
86
86
  - **FTS5** — full-text search on English and original content
87
- - **Trigram** — fuzzy matching for typos, partial words, transliteration
87
+ - **Trigram** — fuzzy matching for typos, partial words, agglutinating morphology
88
88
  - **Embeddings** — semantic similarity via Ollama or any OpenAI-compatible endpoint
89
89
  - **Consolidated summaries** — weekly/quarterly rollups searchable as memories
90
90
 
91
- ### Classification (CIA-AAA / Admiralty Codes)
92
- - **Classification** — 0 (public) → 1 (internal) → 2 (confidential) → 3 (secret)
93
- - **Trust / Integrity / Credibility** — per-memory quality scores
94
- - **Access control** — recall filters by user clearance level automatically
91
+ Results ranked by relevance across all layers. No single layer is a bottleneck.
95
92
 
96
- ### ABM-L (Agent Bridge Memory Language)
97
- - Slot-based compression format for context-window efficiency
98
- - 3× token reduction vs raw prose, preserving semantic atoms
99
- - Render-only — stored data stays as clean prose, ABM-L is ephemeral
93
+ ### Classification (NATO Admiralty Codes)
100
94
 
101
- ### Darwinism (Sleep Maintenance)
102
- - **Promote** — frequently recalled memories gain confidence
103
- - **Demote** — stale, contradicted, or low-quality memories decay
104
- - **Merge** — duplicate/overlapping memories consolidated
105
- - **Forget** — memories below threshold eventually pruned
95
+ - **Classification** — 0 (public) → 1 (internal) → 2 (confidential) → 3 (secret/encrypted)
96
+ - **Trust / Integrity / Credibility** — per-memory quality scores
97
+ - **Access control** — recall filters by user clearance level automatically
98
+ - **Multi-user isolation** — each user's memories scoped, no cross-user leakage
106
99
 
107
100
  ### Injection Detection
101
+
108
102
  - 14 detection categories (prompt injection, jailbreak, role hijack, etc.)
109
103
  - Blocks malicious input before it enters the memory store
110
104
  - Configurable sensitivity per category
111
105
 
106
+ ### Works Everywhere
107
+
108
+ Not locked to one CLI or framework:
109
+
110
+ | Path | Use for |
111
+ |---|---|
112
+ | **abTARS** | In-process memory for the autonomous bridge |
113
+ | **Hermes Agent** | Plugin-compatible memory backend |
114
+ | **OpenClaw** | Native memory slot replacement |
115
+ | **Library** (`import { MemoryManager } from "abmind"`) | Any Node.js agent |
116
+ | **MCP server** (`abmind mcp`) | Editors + hosts with MCP support |
117
+ | **CLI** (`abmind store/recall/...`) | Shell scripts, automation |
118
+ | **Agent hooks** | Kiro CLI, Claude Code, Gemini CLI, Codex |
119
+
112
120
  ## CLI
113
121
 
114
122
  ```bash
@@ -153,15 +161,36 @@ Add to your host's MCP config:
153
161
 
154
162
  Works with kiro-cli, Claude Code, Codex CLI, Gemini CLI, Cursor, OpenCode, and any MCP-compatible host.
155
163
 
156
- ## Integration Paths
164
+ ## Library Usage
165
+
166
+ ```ts
167
+ import { MemoryManager, loadMemoryConfig, recallSearch, buildWakeUp } from "abmind";
157
168
 
158
- | Path | Use for |
159
- |---|---|
160
- | **Library** (`import { MemoryManager } from "abmind"`) | Node apps embedding memory directly |
161
- | **MCP server** (`abmind mcp`) | Editors + hosts with MCP support |
162
- | **CLI** (`abmind store/recall/...`) | Shell scripts, automation |
163
- | **OpenClaw plugin** | Native OpenClaw memory slot replacement |
164
- | **abtars** | In-process memory for the bridge runtime |
169
+ // Initialize
170
+ const config = loadMemoryConfig(); // reads ABMIND_HOME, defaults to ~/.abmind
171
+ const memory = new MemoryManager(config);
172
+
173
+ // Store a message
174
+ memory.recordMessage({
175
+ role: "user",
176
+ content: "I prefer dark mode and hate notifications",
177
+ timestamp: Date.now(),
178
+ userId: "alice",
179
+ sessionId: "alice:telegram",
180
+ });
181
+
182
+ // Recall relevant memories
183
+ const results = await recallSearch(memory.getRecallDeps(), {
184
+ translated: ["dark mode", "preferences"],
185
+ userId: "alice",
186
+ limit: 5,
187
+ });
188
+ console.log(results.memories); // ranked by relevance across all 4 layers
189
+
190
+ // Build wake-up context for a new session
191
+ const wakeUp = buildWakeUp(memory, "alice");
192
+ // → structured context: recent topics, key facts, emotional state, pending items
193
+ ```
165
194
 
166
195
  ## Data Location
167
196
 
@@ -0,0 +1,114 @@
1
+ # abmind memory configuration
2
+ # Copied to ~/.abmind/config/.env.memory by `abmind install`.
3
+ #
4
+ # Lines starting with `#VAR=value` show the DEFAULT — uncomment to override.
5
+ # Lines with `VAR=` (no leading #) are REQUIRED — fill in.
6
+
7
+ # === OPTIONAL — commented lines show defaults ===
8
+
9
+ # Enable memory subsystem (default: true)
10
+ #MEMORY_ENABLED=true
11
+
12
+ # Memory data directory (default: ~/.abmind/memory)
13
+ #MEMORY_DIR=~/.abmind/memory
14
+
15
+ # Search strategy: hybrid | embedding | signature (default: hybrid)
16
+ #MEMORY_SEARCH_MODE=hybrid
17
+
18
+ # Max messages retained per chat (default: 1000)
19
+ #MEMORY_MAX_MESSAGES_PER_CHAT=1000
20
+
21
+ # Disk budget for memory data in MB (default: 500)
22
+ #MEMORY_DISK_BUDGET_MB=500
23
+
24
+ # Max SQLite DB size in MB (default: 200)
25
+ #MEMORY_MAX_DB_SIZE_MB=200
26
+
27
+ # TTL for original-language messages in days (default: 90)
28
+ #MEMORY_ORIGINAL_TTL_DAYS=90
29
+
30
+ # TTL for English-translated messages in days (default: 365)
31
+ #MEMORY_ENGLISH_TTL_DAYS=365
32
+
33
+ # Enable memory aging (decay of old messages) (default: true)
34
+ #MEMORY_AGING_ENABLED=true
35
+
36
+ # Signature bits for fingerprinting (default: 256)
37
+ #SIGNATURE_BITS=256
38
+
39
+ # === EMBEDDING (optional — ollama or OpenAI-compatible) ===
40
+
41
+ # Enable semantic embedding search (default: true)
42
+ #EMBEDDING_ENABLED=true
43
+
44
+ # Embedding provider. "ollama" (default) or "openai" (covers OpenAI, Voyage,
45
+ # Together, any OpenAI-compatible endpoint via URL swap).
46
+ #EMBEDDING_PROVIDER=ollama
47
+
48
+ # Embedding model name (default: nomic-embed-text for ollama; text-embedding-3-small for openai)
49
+ #EMBEDDING_MODEL=nomic-embed-text
50
+
51
+ # Provider endpoint. Ollama: http://localhost:11434. OpenAI: https://api.openai.com/v1
52
+ #EMBEDDING_URL=http://localhost:11434
53
+
54
+ # API key — required for openai provider, ignored for ollama. Masked in all logs/status.
55
+ #EMBEDDING_API_KEY=
56
+
57
+ # Vector dimensions. Ollama nomic-embed-text=768, OpenAI text-embedding-3-small=1536.
58
+ # Switching providers with a different value requires `abmind embed --reset` — the
59
+ # memory system refuses to start on dimension mismatch (#173).
60
+ #EMBEDDING_DIMENSIONS=768
61
+
62
+ # Minimum similarity score to count as a match (default: 0.5)
63
+ #EMBEDDING_SIMILARITY_THRESHOLD=0.5
64
+
65
+ # === ABM-L RENDERING (memory-renderer.ts, #236) ===
66
+
67
+ # ABM-L codec version for memory + context rendering (default: plain)
68
+ # plain: full English with prefix, universal compatibility
69
+ # v0: legacy positional format
70
+ # v1: slot-based structured format (for experienced users)
71
+ #ABML_VERSION=plain
72
+
73
+ # Minimum chars before ABM-L compression kicks in for v0 (default: 100)
74
+ #ABML_MIN_CHARS=100
75
+
76
+ # === THREE-TIER CONTEXT ASSEMBLY (#348) ===
77
+
78
+ # Enable three-tier context assembly (default: true)
79
+ # When false, falls back to legacy binary (raw messages + summary head).
80
+ # The heuristic classifier still runs at write time regardless.
81
+ #CONTEXT_TIER_ENABLED=true
82
+
83
+ # Tail boundary — last N turns kept verbatim (default: 20)
84
+ #CONTEXT_TIER_TAIL=20
85
+
86
+ # Middle boundary — next M turns rendered via ABM-L from hints (default: 50)
87
+ #CONTEXT_TIER_MIDDLE=50
88
+
89
+ # Enable LLM refinement for middle-tier rendering (default: false)
90
+ # When true, the main chat model refines heuristic output asynchronously.
91
+ # Heuristic always remains the fallback. Costs ~$0.02-0.05/chat/day at cheap model.
92
+ #COMPACTION_LLM_ENABLED=false
93
+
94
+ # === SESSION-START CONTEXT (#615) ===
95
+
96
+ # Percentage of maxContext budget for session-start history (default: 3)
97
+ #SESSION_HISTORY_PCT=3
98
+
99
+ # Minimum messages always included regardless of budget (default: 8)
100
+ #SESSION_HISTORY_MIN_MSGS=8
101
+
102
+ # Max chars for session-start context (default: 25000)
103
+ #SESSION_HISTORY_CAP=25000
104
+
105
+ # === SLEEP / DREAMY ===
106
+
107
+ # Sleep quality tier: basic | budget | normal | ultimate (default: normal)
108
+ #SLEEP_QUALITY=normal
109
+
110
+ # Day of week for weekly curation steps (default: sunday)
111
+ #SLEEP_CURATION_DAY=sunday
112
+
113
+ # Max LLM calls per sleep cycle, hard safety cap (default: 15, max: 50)
114
+ #SLEEP_MAX_LLM_CALLS=15
@@ -3,6 +3,10 @@
3
3
  * abmind bundle — Print session bundle (SOUL + profile + notes + memory-tools) to stdout.
4
4
  * For kiro-cli, claude_code, or any host that needs the bundle via execute_bash.
5
5
  */
6
+ if (process.argv.includes("--help") || process.argv.includes("-h")) {
7
+ console.log("Usage: abmind bundle\n\nPrint session bundle (SOUL + profile + notes + memory-tools) to stdout.");
8
+ process.exit(0);
9
+ }
6
10
  import { loadMemoryConfig } from "../src/memory-config.js";
7
11
  import { MemoryManager } from "../src/memory-manager.js";
8
12
  const config = loadMemoryConfig();
@@ -1 +1 @@
1
- {"version":3,"file":"abmind-bundle.js","sourceRoot":"","sources":["../../cli/abmind-bundle.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,gBAAg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ACrC,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC;AACrC,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC9F,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;IACvB,OAAO,CAAC,KAAK,CAAC,wCAAwC,EAAE,MAAM,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC;IACrF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * abmind hook Notification — log as session breadcrumb for retrospective.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=abmind-hook-notification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abmind-hook-notification.d.ts","sourceRoot":"","sources":["../../cli/abmind-hook-notification.ts"],"names":[],"mappings":";AACA;;GAEG"}
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * abmind hook Notification — log as session breadcrumb for retrospective.
4
+ */
5
+ import { runCliRaw } from "../src/cli-runner-raw.js";
6
+ import { loadMemoryConfig } from "../src/memory-config.js";
7
+ import { MemoryManager } from "../src/memory-manager.js";
8
+ import { SleepDataAccess } from "../src/sleep-data-access.js";
9
+ import { hooksDisabled, logHookError, readStdinJson, ensureHooksDir } from "../src/hook-helpers.js";
10
+ await runCliRaw(import.meta.url, {
11
+ name: "abmind-hook-notification",
12
+ help: "Notification hook — log as session breadcrumb.",
13
+ flags: [],
14
+ handler: async () => {
15
+ ensureHooksDir();
16
+ if (hooksDisabled()) {
17
+ process.exit(0);
18
+ }
19
+ try {
20
+ const payload = await readStdinJson();
21
+ const message = payload?.message?.trim();
22
+ if (!message) {
23
+ process.exit(0);
24
+ }
25
+ const memory = new MemoryManager(loadMemoryConfig());
26
+ await memory.initialize({ skipEmbeddingCheck: true });
27
+ try {
28
+ const db = memory.getDatabase();
29
+ if (!db) {
30
+ process.exit(0);
31
+ }
32
+ const sleepData = new SleepDataAccess(db);
33
+ let userId;
34
+ try {
35
+ userId = sleepData.getPrimaryUserId();
36
+ }
37
+ catch {
38
+ process.exit(0);
39
+ }
40
+ memory.recordMessage({
41
+ userId, sessionId: "_S_breadcrumb", role: "assistant",
42
+ content: `[NOTIFICATION] ${message.slice(0, 200)}`,
43
+ timestamp: Date.now(),
44
+ });
45
+ }
46
+ finally {
47
+ memory.close();
48
+ }
49
+ }
50
+ catch (err) {
51
+ logHookError("notification", err);
52
+ }
53
+ process.exit(0);
54
+ },
55
+ });
56
+ //# sourceMappingURL=abmind-hook-notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abmind-hook-notification.js","sourceRoot":"","sources":["../../cli/abmind-hook-notification.ts"],"names":[],"mappings":";AACA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAOpG,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;IAC/B,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,gDAAgD;IACtD,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,cAAc,EAAE,CAAC;QACjB,IAAI,aAAa,EAAE,EAAE,CAAC;YAAC,OAAO,CAAC,I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E,GAAG,CAAC,CAAC;QAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * abmind hook PostCompact — inject fresh recall after context compaction.
4
+ * Re-grounds the agent with relevant memories after context was trimmed.
5
+ * NOTE: Claude Code does not officially support this event yet.
6
+ * When it does, this hook activates automatically.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=abmind-hook-postcompact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abmind-hook-postcompact.d.ts","sourceRoot":"","sources":["../../cli/abmind-hook-postcompact.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * abmind hook PostCompact — inject fresh recall after context compaction.
4
+ * Re-grounds the agent with relevant memories after context was trimmed.
5
+ * NOTE: Claude Code does not officially support this event yet.
6
+ * When it does, this hook activates automatically.
7
+ */
8
+ import { runCliRaw } from "../src/cli-runner-raw.js";
9
+ import { loadMemoryConfig } from "../src/memory-config.js";
10
+ import { MemoryManager } from "../src/memory-manager.js";
11
+ import { SleepDataAccess } from "../src/sleep-data-access.js";
12
+ import { hooksDisabled, logHookError, readStdinJson, ensureHooksDir } from "../src/hook-helpers.js";
13
+ import { extractEnglishTokens } from "../src/query-tokenizer.js";
14
+ await runCliRaw(import.meta.url, {
15
+ name: "abmind-hook-postcompact",
16
+ help: "PostCompact hook — inject fresh recall after context compaction.",
17
+ flags: [],
18
+ handler: async () => {
19
+ ensureHooksDir();
20
+ if (hooksDisabled()) {
21
+ process.exit(0);
22
+ }
23
+ try {
24
+ const payload = await readStdinJson();
25
+ const summary = payload?.summary?.trim();
26
+ if (!summary) {
27
+ process.exit(0);
28
+ }
29
+ const memory = new MemoryManager(loadMemoryConfig());
30
+ await memory.initialize({ skipEmbeddingCheck: true });
31
+ try {
32
+ const db = memory.getDatabase();
33
+ if (!db) {
34
+ process.exit(0);
35
+ }
36
+ const sleepData = new SleepDataAccess(db);
37
+ let userId;
38
+ try {
39
+ userId = sleepData.getPrimaryUserId();
40
+ }
41
+ catch {
42
+ process.exit(0);
43
+ }
44
+ const tokens = extractEnglishTokens(summary);
45
+ if (tokens.length === 0) {
46
+ process.exit(0);
47
+ }
48
+ const results = await memory.search(tokens.join(" "), { userId, limit: 5 });
49
+ if (results.length > 0) {
50
+ const output = results.map((r) => `- ${r.content_en}`).join("\n");
51
+ process.stdout.write(output.slice(0, 2000));
52
+ }
53
+ }
54
+ finally {
55
+ memory.close();
56
+ }
57
+ }
58
+ catch (err) {
59
+ logHookError("postcompact", err);
60
+ }
61
+ process.exit(0);
62
+ },
63
+ });
64
+ //# sourceMappingURL=abmind-hook-postcompact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abmind-hook-postcompact.js","sourceRoot":"","sources":["../../cli/abmind-hook-postcompact.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAOjE,MAAM,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;IAC/B,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,kEAAkE;IACxE,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,KAAK,IAAI,EAAE;QAClB,cAAc,EAAE,CAAC;QACjB,IAAI,aAAa,EAAE,EAAE,CAAC;YAAC,OAAO,CAAC,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CAAC;oBACvB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACvE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;gBAC9C,CAAC;YACH,CAAC;oBAAS,CAAC;gBAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAAC,CAAC;QAC/B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YAAC,YAAY,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;QAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * abmind hook PostUserPrompt — real-time extraction after high-signal exchanges.
4
+ * Hybrid: heuristic gate + only extracts when triggered.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=abmind-hook-postuserprompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abmind-hook-postuserprompt.d.ts","sourceRoot":"","sources":["../../cli/abmind-hook-postuserprompt.ts"],"names":[],"mappings":";AACA;;;GAGG"}
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * abmind hook PostUserPrompt — real-time extraction after high-signal exchanges.
4
+ * Hybrid: heuristic gate + only extracts when triggered.
5
+ */
6
+ import { runCliRaw } from "../src/cli-runner-raw.js";
7
+ import { loadMemoryConfig } from "../src/memory-config.js";
8
+ import { MemoryManager } from "../src/memory-manager.js";
9
+ import { SleepDataAccess } from "../src/sleep-data-access.js";
10
+ import { hooksDisabled, logHookError, readStdinJson, ensureHooksDir } from "../src/hook-helpers.js";
11
+ const SIGNAL_PATTERNS = [
12
+ /\b(remember|don't forget|note that|my .+ is|I prefer|I decided|I always|I never)\b/i,
13
+ /\b(password|secret|key|token|credential)\b/i,
14
+ /\b(important|critical|rule|always do|never do)\b/i,
15
+ ];
16
+ await runCliRaw(import.meta.url, {
17
+ name: "abmind-hook-postuserprompt",
18
+ help: "PostUserPrompt hook — real-time extraction on high-signal exchanges.",
19
+ flags: [],
20
+ handler: async () => {
21
+ ensureHooksDir();
22
+ if (hooksDisabled()) {
23
+ process.exit(0);
24
+ }
25
+ try {
26
+ const payload = await readStdinJson();
27
+ const userMsg = payload?.user_message ?? "";
28
+ const assistantMsg = payload?.assistant_message ?? "";
29
+ const combined = userMsg + " " + assistantMsg;
30
+ // Heuristic gate — only extract if high-signal
31
+ const triggered = SIGNAL_PATTERNS.some(p => p.test(combined));
32
+ if (!triggered) {
33
+ process.exit(0);
34
+ }
35
+ const memory = new MemoryManager(loadMemoryConfig());
36
+ await memory.initialize({ skipEmbeddingCheck: true });
37
+ try {
38
+ const db = memory.getDatabase();
39
+ if (!db) {
40
+ process.exit(0);
41
+ }
42
+ const sleepData = new SleepDataAccess(db);
43
+ let userId;
44
+ try {
45
+ userId = sleepData.getPrimaryUserId();
46
+ }
47
+ catch {
48
+ process.exit(0);
49
+ }
50
+ // Record both messages for Dreamy extraction
51
+ const now = Date.now();
52
+ if (userMsg.length > 10) {
53
+ memory.recordMessage({ userId, sessionId: "_A_realtime", role: "user", content: userMsg, timestamp: now - 1000 });
54
+ }
55
+ if (assistantMsg.length > 10) {
56
+ memory.recordMessage({ userId, sessionId: "_A_realtime", role: "assistant", content: assistantMsg, timestamp: now });
57
+ }
58
+ }
59
+ finally {
60
+ memory.close();
61
+ }
62
+ }
63
+ catch (err) {
64
+ logHookError("postuserprompt", err);
65
+ }
66
+ process.exit(0);
67
+ },
68
+ });
69
+ //# sourceMappingURL=abmind-hook-postuserprompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abmind-hook-postuserprompt.js","sourceRoot":"","sources":["../../cli/abmind-hook-postuserprompt.ts"],"names":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C;QAAC,CAAC;QACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * abmind hook PreCompact — extract memories before context compaction.
4
+ * Reads transcript from stdin, runs extraction so memories aren't lost.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=abmind-hook-precompact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abmind-hook-precompact.d.ts","sourceRoot":"","sources":["../../cli/abmind-hook-precompact.ts"],"names":[],"mappings":";AACA;;;GAGG"}