the-campfire 0.3.1 → 0.3.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.
- package/README.md +19 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1203,17 +1203,17 @@ It operates as a non-blocking observer: no agent message is ever delayed by it,
|
|
|
1203
1203
|
|
|
1204
1204
|
| Layer | What it does |
|
|
1205
1205
|
|-------|-------------|
|
|
1206
|
-
| **Semantic Memory** | Stores observations, decisions, and patterns from each
|
|
1206
|
+
| **Semantic Memory** | Stores observations, decisions, and patterns from each session in a local LanceDB database, scoped by namespace (global / repo / session / agent). Memories decay over time unless reused, and relevant ones are auto-recalled into a session's next prompt. See [Semantic Memory](#semantic-memory-details) below. |
|
|
1207
1207
|
| **Deliberation Engine** | Proposes structured decisions across sessions (e.g. "which approach should we use?"). Connected viewers and agents can respond; the engine aggregates votes with role-weighted majority and resolves to `approved`, `rejected`, or `synthesized`. |
|
|
1208
1208
|
| **Capability Discovery** | Each session self-reports its strengths, available tools, and context usage. When routing a task, the engine scores all connected sessions and picks the best fit. Confidence probes can be sent to agents in real time to verify self-reported capabilities. |
|
|
1209
1209
|
| **Shared Context Stream** | A live think-aloud stream where agents can inject thoughts and observations. The engine detects semantic links (agrees, disagrees, builds on, contradicts) between fragments and tracks consensus scores across the session group. |
|
|
1210
1210
|
|
|
1211
1211
|
**How it works end-to-end:**
|
|
1212
1212
|
|
|
1213
|
-
1. When an agent produces output, the CI layer
|
|
1214
|
-
2. When a user sends a message, the CI layer
|
|
1213
|
+
1. When an agent produces output, the CI layer extracts observations, decisions, and patterns and stores them as `MemoryFragment` records in the right namespace (with vector embeddings if an embedding provider is configured). Thinking-block content is scrubbed before anything is stored.
|
|
1214
|
+
2. When a user sends a message, the CI layer recalls the most relevant memories from the repo, agent, and global namespaces (under a 250 ms budget so chat is never blocked) and prepends them to the message. The recalled items are shown to the user as a collapsible "recalled context" chip on that message.
|
|
1215
1215
|
3. Browser clients can send `memory_query`, `memory_store`, `deliberation_respond`, `route_task`, and `inject_thought` messages over WebSocket. The server handles them and broadcasts results back to all connected viewers.
|
|
1216
|
-
4.
|
|
1216
|
+
4. Episodic fragments are consolidated into distilled `ConsolidatedKnowledge` — triggered on turn boundaries, idle, session end, or manually — via a JUDGE → DISTILL → CONSOLIDATE pipeline (see below).
|
|
1217
1217
|
|
|
1218
1218
|
**Embedding providers:**
|
|
1219
1219
|
|
|
@@ -1225,16 +1225,25 @@ Vector search requires an embedding provider. Configure one in **Settings**:
|
|
|
1225
1225
|
| `ollama` | `nomic-embed-text` (default) | 768 | Requires local Ollama instance |
|
|
1226
1226
|
| `none` | — | — | Fragments stored without embeddings; metadata-only search |
|
|
1227
1227
|
|
|
1228
|
-
Without an embedding provider, memory still works —
|
|
1228
|
+
Without an embedding provider, memory still works — recall falls back to a recency- and confidence-ranked scan over the relevant namespaces (so recent repo decisions still surface, just without semantic similarity).
|
|
1229
|
+
|
|
1230
|
+
<a id="semantic-memory-details"></a>
|
|
1231
|
+
|
|
1232
|
+
**How Semantic Memory works:**
|
|
1233
|
+
|
|
1234
|
+
- **Namespaces** — every memory lives in a scope: `global` (cross-repo conventions), `repo:<hash>` (one repository), `session:<id>` (one session's episodic notes), and `agent:<backend>` (backend-specific quirks). Recall for a session draws from repo, agent, and global scopes with per-namespace depth limits.
|
|
1235
|
+
- **Decay & reinforcement** — memories lose weight over time on a per-namespace half-life; being recalled reinforces a memory and extends its life (capped, so nothing becomes immortal). Low-weight, consolidated memories are eventually evicted. You can **pin** a memory so it never decays.
|
|
1236
|
+
- **Consolidation (JUDGE → DISTILL → CONSOLIDATE)** — raw fragments are filtered and clustered locally, then distilled into durable knowledge by an LLM (via your configured OpenRouter key). If no key is set, it falls back to a simple concatenation, badged as such in the UI — consolidation is never blocked on configuration.
|
|
1237
|
+
- **UI** — the Memory panel shows per-namespace counts and decayed-weight bars with pin/unpin controls; **Settings → Memory** exposes per-namespace decay half-lives, reinforce multipliers, and recall depths.
|
|
1229
1238
|
|
|
1230
1239
|
**Storage:**
|
|
1231
1240
|
|
|
1232
|
-
All CI data is stored locally under `~/.campfire/memory
|
|
1241
|
+
All CI data is stored locally under `~/.campfire/memory/` — no external service required. Schema is versioned via `meta.json` and migrated automatically from earlier versions.
|
|
1233
1242
|
|
|
1234
1243
|
| Table | Purpose |
|
|
1235
1244
|
|-------|---------|
|
|
1236
|
-
| `
|
|
1237
|
-
| `
|
|
1245
|
+
| `fragments_v2` | Episodic memory fragments (namespace-scoped, with embeddings when available) |
|
|
1246
|
+
| `consolidated_v2` | Distilled knowledge synthesized from fragments |
|
|
1238
1247
|
|
|
1239
1248
|
Capability data is stored as JSON in `~/.campfire/capabilities/` and learning history is appended to `~/.campfire/capability-learning.jsonl`.
|
|
1240
1249
|
|
|
@@ -1260,12 +1269,12 @@ curl -X POST http://localhost:4567/api/sessions/route-task \
|
|
|
1260
1269
|
|
|
1261
1270
|
| Group | Endpoints |
|
|
1262
1271
|
|-------|-----------|
|
|
1263
|
-
| Memory | `GET/POST /sessions/:id/memory`, `GET /sessions/:id/memory/query`, `POST /sessions/:id/memory/consolidate`, `GET /memory/global` |
|
|
1272
|
+
| Memory | `GET/POST /sessions/:id/memory`, `GET /sessions/:id/memory/query`, `GET /sessions/:id/memory/overview`, `POST /sessions/:id/memory/consolidate`, `POST /memory/pin`, `GET /memory/global` |
|
|
1264
1273
|
| Deliberation | `GET /sessions/:id/deliberations`, `GET /sessions/:id/deliberations/:proposalId`, `POST .../respond`, `POST .../resolve` |
|
|
1265
1274
|
| Capabilities | `POST /sessions/route-task`, `GET /capabilities`, `GET /capabilities/history`, `POST /capabilities/feedback` |
|
|
1266
1275
|
| Shared Context | `GET /sessions/:id/context/stream`, `GET /sessions/:id/context/consensus`, `GET /sessions/:id/context/thread/:fragmentId` |
|
|
1267
1276
|
|
|
1268
|
-
Architecture details are documented in [`CLAUDE.md`](CLAUDE.md).
|
|
1277
|
+
Architecture details are documented in [`CLAUDE.md`](CLAUDE.md). The full semantic-memory design (namespaces, decay, retrieval scoring, and the consolidation pipeline) is written up in [`docs/design/semantic-memory-v2.md`](docs/design/semantic-memory-v2.md).
|
|
1269
1278
|
|
|
1270
1279
|
---
|
|
1271
1280
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "the-campfire",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Campfire \u2014 collaborative web platform for AI coding agents. Run Claude Code, Codex, Goose, Aider, and more from one browser UI with real-time collaboration, permission voting, and automation.",
|
|
6
6
|
"license": "MIT",
|