@inetafrica/open-claudia 2.6.34 → 2.6.36

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/.env.example CHANGED
@@ -27,6 +27,10 @@ USAGE_ALERT_BASELINE_TURNS=20
27
27
  USAGE_ALERT_MIN_BASELINE_TURNS=6
28
28
  USAGE_ALERT_COOLDOWN_MS=1800000
29
29
  MEMORY_RECALL_MAX_CHARS=9000
30
+ # Default recall engine when a chat hasn't picked one with /engine: classic | discoverer
31
+ RECALL_ENGINE=classic
32
+ # Dream model tier: low (haiku) | medium (sonnet) | high (opus, default). DREAM_MODEL overrides.
33
+ DREAM_TIER=high
30
34
  PROJECT_TRANSCRIPTS=true
31
35
  TRANSCRIPT_MAX_ENTRY_CHARS=12000
32
36
  TRANSCRIPTS_DIR=
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.6.36
4
+ - **Docs: document the dual-engine recall feature.** v2.6.34/v2.6.35 shipped the pluggable recall engine and `/engine` switch but the README and `.env.example` were never updated. This release fills the gap: README gains a "Pluggable recall" Features bullet, the `/engine` command row, a "Recall engines" narrative section, the `recall-stats` / `recall graph` CLI commands, and env-table rows for `RECALL_ENGINE` / `RECALL_GRAPH_DB` / `RECALL_METRICS` / `DREAM_TIER` (plus the corrected `DREAM_MODEL` default). `.env.example` gains `RECALL_ENGINE` and `DREAM_TIER`. Docs-only — no code changes.
5
+
6
+ ## v2.6.35
7
+ - **Fix `/status` silently dying + show the active recall engine.** The status handler referenced an undefined `activeCrons`, throwing a ReferenceError that `router.js` swallows by design — so `/status` did nothing. It now counts this channel's crons via `jobs.listForChannel(...)` and adds a `Recall engine:` line so you can confirm which engine (`classic`/`discoverer`) the chat is on. Note: `/engine` already worked when typed; it just may not appear in Telegram's slash-command autocomplete until the client refreshes the cached `setMyCommands` menu.
8
+
3
9
  ## v2.6.34
4
10
  - **Dual-engine memory recall: typed-edge graph + discoverer (opt-in).** Recall is now pluggable behind a narrow engine interface (`core/recall/`), selected per chat via `/engine` (callback `eng:`). The default stays **classic** (FTS keyword match + relevance judge + headline injection) — unchanged behaviour. The new **discoverer** engine adds a typed-edge graph (`parent`/`governed-by`/`related` edges with weight + last_reinforced in a SQLite store at `recall-graph.db`) and runs: heuristic pre-gate → FTS seed → spreading activation across the graph (1–2 hops, top-k, firing threshold — auto-pulls cross-cutting concerns the query never named) → a haiku "walker" that reads each candidate's Stance/State excerpt and returns the genuinely-relevant set with one-line why-bullets (fail-open to keyword seeds, so it never recalls worse than classic). Edges form structurally from pack `parent` frontmatter and `[[links]]` (a `[[link]]` to a `shared`-tagged pack becomes `governed-by`) and strengthen via **Hebbian co-use** — when the agent actually opens packs together in a turn (📖), their `related` edge is reinforced; weights decay over time. A metrics layer logs every discoverer turn (seeds, activated, kept+why, pre-gate, latency) — view with `open-claudia recall-stats` and `open-claudia recall graph [--sync]`. The nightly dream now runs on a high tier (opus; `DREAM_TIER`/`DREAM_MODEL` override) and tends the graph (structural sync, weight decay, orphan prune). Switch back any time with `/engine classic`.
5
11
 
package/README.md CHANGED
@@ -15,7 +15,8 @@ Send text, voice notes, screenshots, and files from your phone. Your chosen AI a
15
15
  ### Memory & long-term context
16
16
  - **Context packs** — living per-topic documents (one per project, system, or recurring task) holding Stance, Procedure, State, and Journal. Packs matching your message are auto-injected into the agent's context, and a background reviewer updates them after every substantial turn — the assistant keeps its train of thought across sessions and projects
17
17
  - **Entity memory** — short notes on the people, places, projects, orgs, and systems you mention, extracted automatically and injected when they come up again
18
- - **Dream consolidation** — a nightly pass on a stronger model that merges duplicate packs, builds umbrella/parent pack trees, tightens descriptions, dedupes entities, and reports what it tidied with everything backed up first
18
+ - **Pluggable recall** — switch per chat with `/engine`: the stable **classic** keyword engine (default) or the opt-in **discoverer**, which walks a typed-edge graph over the same packs/entities and surfaces hits with one-line why-bullets
19
+ - **Dream consolidation** — a nightly pass on a stronger model that merges duplicate packs, builds umbrella/parent pack trees, tightens descriptions, dedupes entities, tends the recall graph, and reports what it tidied — with everything backed up first
19
20
  - **Personality** — a persona file gives the assistant a consistent voice on top of your soul file, and the dream pass evolves it gently as you work together
20
21
  - **Transcript search** — redacted project transcripts indexed in SQLite FTS5; `open-claudia transcript-search` gives the agent ~50ms ranked recall over months of history
21
22
  - **Smart compaction** — long conversations are summarized proactively before they get slow; full briefs are archived to disk so nothing is truly lost (`/compact`, `/compactwindow`)
@@ -177,7 +178,7 @@ When you select a project, the last conversation is automatically resumed. Tap "
177
178
  | `/ask` | Toggle ask mode — read-only Q&A, no edits (Cursor Agent only) |
178
179
  | `/worktree` | Toggle isolated git branch |
179
180
  | `/mode` | Switch between direct and agent bot modes |
180
- | `/status` | Show current session, backend, and settings |
181
+ | `/status` | Show current session, backend, recall engine, and settings |
181
182
  | `/usage` | Token usage and cost for this session |
182
183
  | `/doctor` / `/requirements` | Check Node, CLI binaries/versions/auth, voice stack, and writable paths |
183
184
 
@@ -187,6 +188,7 @@ When you select a project, the last conversation is automatically resumed. Tap "
187
188
  |---------|-------------|
188
189
  | `/learn [<hint>]` | Capture the last piece of work into the matching context pack |
189
190
  | `/skills [show\|remove <name>]` | List, show, or remove legacy learned skills |
191
+ | `/engine [classic\|discoverer]` | Switch the per-chat memory recall engine (default `classic`) |
190
192
  | `/soul` | View/edit assistant identity and personality |
191
193
  | `/dreamsummary [on\|off]` | Toggle the post-dream memory summary in chat |
192
194
 
@@ -262,7 +264,9 @@ Open Claudia layers three memory systems on top of the backend's native sessions
262
264
 
263
265
  **Entity memory** (`~/.open-claudia/entities/<slug>.md`) works the same way for the people, places, projects, orgs, and systems you mention — who they are, current truth, and a dated observation log. Mentioning a name injects its note.
264
266
 
265
- **Dream consolidation** — while the per-turn reviewer takes quick notes, *dream* is the slow overnight pass (default 4am, on a stronger model): it merges packs that drifted into the same topic, builds parent/sub pack trees with umbrella summaries, tightens descriptions and tags so the router matches with less noise, dedupes entities, and cross-links notes. Anything merged away is backed up under `~/.open-claudia/backup/dream-<stamp>/` first, and every dream that changes something reports in chat. Configure with `DREAM_CRON` / `DREAM_MODEL`, disable with `DREAM=off`.
267
+ **Recall engines** — how packs and entities get matched and surfaced is pluggable per chat via `/engine` (or the `RECALL_ENGINE` env default). **classic** (the default) is keyword FTS plus a relevance judge with headline injection — stable and unchanged. **discoverer** (opt-in) adds a typed-edge graph over the same corpus (`parent`/`governed-by`/`related` edges with weights in `recall-graph.db`) and runs: a pre-gate that skips recall on trivial turns → FTS seeding → spreading activation across the graph (1–2 hops auto-pulls cross-cutting concerns the query never named) → a walker that reads each candidate and returns the genuinely-relevant set with one-line why-bullets (fail-open to keyword seeds, so it never recalls worse than classic). Edges form structurally from pack `parent` frontmatter and `[[links]]`, and strengthen via Hebbian co-use when the agent opens packs together (📖); weights decay over time. Inspect with `open-claudia recall-stats` and `open-claudia recall graph [--sync]`. Switch back any time with `/engine classic`.
268
+
269
+ **Dream consolidation** — while the per-turn reviewer takes quick notes, *dream* is the slow overnight pass (default 4am, on a high-tier model — opus by default, set `DREAM_TIER` or `DREAM_MODEL`): it merges packs that drifted into the same topic, builds parent/sub pack trees with umbrella summaries, tightens descriptions and tags so the router matches with less noise, dedupes entities, cross-links notes, and tends the recall graph (structural sync, weight decay, orphan prune). Anything merged away is backed up under `~/.open-claudia/backup/dream-<stamp>/` first, and every dream that changes something reports in chat. Configure with `DREAM_CRON` / `DREAM_MODEL`, disable with `DREAM=off`.
266
270
 
267
271
  **Personality** — your `soul.md` holds identity and hard rules; `~/.open-claudia/persona.md` holds the voice on top — tone, quirks, emoji habits. It feeds into the system prompt and the dream pass may evolve it gently (bounded, backed up, announced). Edit it directly any time.
268
272
 
@@ -272,6 +276,8 @@ Open Claudia layers three memory systems on top of the backend's native sessions
272
276
  open-claudia pack list|show <dir>|match "<text>"|migrate|remove <dir>|reindex
273
277
  open-claudia entity list|show <slug>|match "<text>"|note <name> "<text>"|remove <slug>|reindex
274
278
  open-claudia dream [--dry-run] # run the consolidation pass now
279
+ open-claudia recall-stats # discoverer-engine metrics summary
280
+ open-claudia recall graph [--sync] # recall-graph node/edge stats; --sync rebuilds structural edges
275
281
  open-claudia transcript-search "<query>" # alias: ts; --all for every project
276
282
  open-claudia transcript-window "<pattern>" # alias: tw; hits with surrounding turns
277
283
  ```
@@ -427,6 +433,8 @@ All stored in `~/.open-claudia/`:
427
433
  | `USAGE_ALERT_RATE_MULTIPLIER` | No | Alert when the latest context-token rate exceeds the recent baseline by this multiple (default `1.75`, `off` disables) |
428
434
  | `USAGE_ALERT_BASELINE_TURNS` / `USAGE_ALERT_MIN_BASELINE_TURNS` / `USAGE_ALERT_COOLDOWN_MS` | No | Tune token-rate baseline size, minimum sample size, and alert cooldown |
429
435
  | `MEMORY_RECALL_MAX_CHARS` | No | Hard cap for auto-injected pack/entity memory per turn (default `9000`, `off` disables auto recall injection) |
436
+ | `RECALL_ENGINE` | No | Default recall engine when a chat hasn't set one via `/engine` (`classic` or `discoverer`, default `classic`) |
437
+ | `RECALL_GRAPH_DB` / `RECALL_METRICS` | No | Override the discoverer graph DB path; `off` on metrics disables per-turn recall logging |
430
438
  | `PROJECT_TRANSCRIPTS` | No | Enable redacted project transcripts (default `true`) |
431
439
  | `TRANSCRIPT_MAX_ENTRY_CHARS` | No | Max chars per transcript entry (default `12000`) |
432
440
  | `TRANSCRIPTS_DIR` / `PACKS_DIR` / `ENTITIES_DIR` | No | Override storage directories |
@@ -435,7 +443,8 @@ All stored in `~/.open-claudia/`:
435
443
  | `PACK_MATCH_THRESHOLD` / `ENTITY_MATCH_THRESHOLD` | No | Router match score thresholds (default `2`) |
436
444
  | `DREAM` | No | `off` disables the nightly memory consolidation pass (default on) |
437
445
  | `DREAM_CRON` | No | Schedule for the dream pass (default `0 4 * * *`) |
438
- | `DREAM_MODEL` | No | Model for the dream pass (default `sonnet`) |
446
+ | `DREAM_MODEL` | No | Explicit model override for the dream pass (otherwise picked from `DREAM_TIER`) |
447
+ | `DREAM_TIER` | No | Model tier for the dream pass: `low` (haiku) / `medium` (sonnet) / `high` (opus, default) |
439
448
  | `PERSONA_FILE` | No | Override the persona file location |
440
449
  | `WEB_UI` / `WEB_PORT` / `WEB_PASSWORD` | No | Web UI toggle, port, and password |
441
450
  | `WHISPER_CLI` / `WHISPER_MODEL` | No | whisper.cpp binary and model for voice notes |
package/core/handlers.js CHANGED
@@ -964,12 +964,15 @@ register({
964
964
  if (!state.currentSession) return send("No session.", { keyboard: { inline_keyboard: [[{ text: "Pick", callback_data: "show:projects" }]] } });
965
965
  const { settings } = state;
966
966
  const backendLabel = settings.backend === "cursor" ? "Cursor Agent" : settings.backend === "codex" ? "Codex" : "Claude Code";
967
+ const cronCount = jobs.listForChannel(env.adapter.id, env.channelId).filter((j) => j.kind === "cron").length;
968
+ const activeEngine = settings.recallEngine || "classic (default)";
967
969
  send([
968
970
  `Project: ${state.currentSession.name}`,
969
971
  `Backend: ${backendLabel}`,
970
972
  `Model: ${settings.model || "default"} | Effort: ${settings.effort || "default"}`,
973
+ `Recall engine: ${activeEngine}`,
971
974
  `Auto-compact: ${formatCompactWindow(state)}`,
972
- `Vault: ${vault.isUnlocked() ? "unlocked" : "locked"} | Crons: ${activeCrons.size}`,
975
+ `Vault: ${vault.isUnlocked() ? "unlocked" : "locked"} | Crons: ${cronCount}`,
973
976
  state.runningProcess ? "Working..." : "Ready.",
974
977
  ].join("\n"));
975
978
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inetafrica/open-claudia",
3
- "version": "2.6.34",
3
+ "version": "2.6.36",
4
4
  "description": "Your always-on AI coding assistant — Claude Code, Cursor Agent, and OpenAI Codex via Telegram or Kazee Chat",
5
5
  "main": "bot.js",
6
6
  "bin": {