@alisio/plugin-memory 0.1.0-alpha.6 → 0.1.0-alpha.8

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
@@ -1,14 +1,74 @@
1
1
  # @alisio/plugin-memory
2
2
 
3
- Engram-style persistent memory for [Alisio](https://github.com/GustavoGutierrez/alisio), shipped as a
4
- built-in plugin of the `alisio` CLI (disable with `--disable-plugin memory`). It depends only on
5
- `@alisio/sdk` and stores data through the SDK storage port (SQLite + FTS5 trigram, BM25 with recency).
3
+ **Engram-style persistent memory for [Alisio](https://github.com/GustavoGutierrez/alisio).** The
4
+ model saves decisions, bug fixes and discoveries across sessions, and recalls them with context;
5
+ compaction and session end turn meetings into structured, searchable memory.
6
6
 
7
- - Observations with title, type, What/Why/Where/Learned body, project or personal scope and topic-key upserts.
8
- - Tools: `memory_save`, `memory_search`, `memory_get`, `memory_context`, `memory_timeline`, `memory_pin`, `memory_forget`.
9
- - Memory-aware compaction: extracts observations in the same summarizer call, archives the checkpoint
10
- and injects budgeted recall; session summaries on exit; `/memory` command.
7
+ ## What it is
11
8
 
12
- Configuration lives under `builtinPlugins.memory`. Docs: [Memory plugin](https://gustavogutierrez.github.io/alisio/memory).
9
+ Shipped as a built-in plugin of the `alisio` CLI (disable with `--disable-plugin memory` or
10
+ `builtinPlugins.memory.enabled: false`). It depends only on `@alisio/sdk` and stores data through
11
+ the SDK storage port — a local SQLite database with FTS5 trigram indexing, BM25 ranking combined
12
+ with recency; no embeddings and no network. The file lives at `<state home>/memory.sqlite` with
13
+ 0600 permissions.
13
14
 
14
- Maintainer: Gustavo Gutiérrez · License: MIT
15
+ ## Installation
16
+
17
+ Preinstalled in the `alisio` CLI. For an embedded host, register it through `createApplication`'s
18
+ `builtins` list (the CLI wires it for you).
19
+
20
+ ## Tools
21
+
22
+ | Tool | Purpose |
23
+ | --- | --- |
24
+ | `memory_save` | Save or upsert an observation |
25
+ | `memory_search` | Full-text search; AND by default, `match: "any"` and `all_projects` available |
26
+ | `memory_get` | Full observation by ID |
27
+ | `memory_context` | Recent memory context (summaries, prompts, pinned, recent) |
28
+ | `memory_timeline` | Chronological neighbours of a memory within a session |
29
+ | `memory_pin` | Pin (or unpin) a memory so it always appears in memory context |
30
+ | `memory_forget` | Soft delete; `hard: true` removes it permanently |
31
+
32
+ An observation has a title, a type (`decision`, `bugfix`, `discovery`, `pattern`, `architecture`,
33
+ `config`, `preference`, `learning`), a **What / Why / Where / Learned** body, a `project` or
34
+ `personal` scope and an optional `topic_key` for upserts. All memory tools use the `internal`
35
+ effect: they only touch the memory database, never the workspace, so they stay available under
36
+ `--read-only`.
37
+
38
+ ## Behaviour
39
+
40
+ - **Memory-aware compaction** — in the same summarizer call, observations are extracted from the
41
+ discarded span (with upsert/dedup), the checkpoint is archived as the session summary, and
42
+ relevant memories are injected within a token budget.
43
+ - **Session summaries** — on `/clear`, `/exit` or quitting the TUI, writes a structured
44
+ Goal/Instructions/Discoveries/Accomplished/Next Steps/Relevant Files summary (option
45
+ `autoSummary`, on by default).
46
+ - **`/memory` command** — `/memory` (recent), `/memory <query>`, and
47
+ `/memory show|forget|pin|unpin <id>`; a `mem N` counter in the TUI status bar.
48
+
49
+ ## Configuration
50
+
51
+ Under `builtinPlugins.memory`:
52
+
53
+ | Field | Default | Description |
54
+ | --- | --- | --- |
55
+ | `enabled` | `true` | Enable the plugin |
56
+ | `dbPath` | `<state home>/memory.sqlite` | Database path; relative paths resolve from the config file |
57
+ | `injectBudgetTokens` | `1500` | Token budget (100–20000) for injected memory context |
58
+ | `recallLimit` | `8` | Memories recalled after compaction (0–20) |
59
+ | `autoSummary` | `true` | Write a session summary on session end |
60
+ | `defaultScope` | `project` | `project` or `personal` |
61
+
62
+ ## Docs
63
+
64
+ [Memory plugin](https://gustavogutierrez.github.io/alisio/memory) ·
65
+ [Configuration](https://gustavogutierrez.github.io/alisio/configuration).
66
+
67
+ ## Requirements
68
+
69
+ Node.js **>= 22.16** or Bun **>= 1.4.2**.
70
+
71
+ ## License
72
+
73
+ MIT. Maintained by Gustavo Gutiérrez Mercado. Source: <https://github.com/GustavoGutierrez/alisio> ·
74
+ npm: <https://www.npmjs.com/settings/alisio/packages>.
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ function transcript(messages, maxChars = 60_000) {
21
21
  .filter(Boolean)
22
22
  .join("\n")
23
23
  : `TOOL RESULT ${m.callId}: ${m.result.content
24
+ .filter((c) => c.type === "text")
24
25
  .map((c) => c.text)
25
26
  .join("\n")
26
27
  .slice(0, 1_500)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alisio/plugin-memory",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.8",
4
4
  "description": "Engram-style persistent memory for Alisio: SQLite FTS5 observations with topic-key upserts, memory-aware compaction, session summaries and recall tools. Built-in, disableable plugin.",
5
5
  "author": "Gustavo Gutiérrez",
6
6
  "license": "MIT",
@@ -46,10 +46,10 @@
46
46
  "zod": "4.6.5"
47
47
  },
48
48
  "peerDependencies": {
49
- "@alisio/sdk": "^0.1.0-alpha.5"
49
+ "@alisio/sdk": "^0.1.0-alpha.9"
50
50
  },
51
51
  "devDependencies": {
52
- "@alisio/sdk": "0.1.0-alpha.5"
52
+ "@alisio/sdk": "0.1.0-alpha.9"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public",