@digitalforgestudios/openclaw-sulcus 7.2.0 → 7.2.1

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 (4) hide show
  1. package/README.md +137 -56
  2. package/index.js +2 -2
  3. package/index.ts +2 -2
  4. package/package.json +2 -2
package/README.md CHANGED
@@ -1,106 +1,187 @@
1
1
  # openclaw-sulcus
2
2
 
3
- Thermodynamic memory + Apache AGE knowledge graph for [OpenClaw](https://openclaw.ai) agents.
3
+ Thermodynamic memory for [OpenClaw](https://openclaw.ai) agents. Every memory is scored, classified, graph-linked, and subject to decay — your agent remembers what matters and forgets what doesn't.
4
4
 
5
- Sulcus is not a simple memory store. It's a cognitive memory system: every memory is scored, classified, graph-linked, and subject to decay. The SIU v2 pipeline processes every store automatically. A sleep-cycle curator keeps things clean. Reactive triggers fire on memory events.
5
+ ## What Makes Sulcus Different
6
6
 
7
- ## What Sulcus Does
7
+ **Context Engine** Sulcus doesn't just store memories, it manages your agent's entire context window. The v7.2.0 Context Engine owns compaction, prevents overflow, and builds context constructively from memory rather than patching transcripts.
8
8
 
9
- - **Apache AGE knowledge graph** temporal graph over all memories; entities, relationships, and provenance tracked automatically
10
- - **SIU v2 pipeline** — SIVU (utility scoring) → SICU (type classification) → SILU (entity extraction) → AGE graph update → trigger evaluation, fires on every `memory_store`
11
- - **Interaction-based decay** — 3 modes: Time-only, Interaction-only, Hybrid (default). Memories decay based on access patterns, not just wall-clock time. High-utility memories resist decay.
12
- - **Curator (sleep cycle)** — background process that reclassifies, consolidates, summarizes, and re-vectorizes memories. Keeps the graph clean without manual intervention.
13
- - **Relevance-weighted recall** — `score = similarity × 0.7 + heat × 0.3`. Frequently-accessed memories surface faster.
14
- - **Confidence levels + conflict detection** — memories carry a confidence level (`observed`, `inferred`, `asserted`); the system detects contradictory nodes automatically (v2.3.0+).
15
- - **Reactive triggers** — rules that fire on `on_store`, `on_recall`, `on_boost`, `on_decay` events. Actions: notify, boost, pin, tag, deprecate, webhook, chain.
16
- - **Cross-agent sync** — optional cloud sync via `serverUrl`/`apiKey`. Local-first by default.
9
+ **Reactive Triggers** Rules that fire on memory events (`on_store`, `on_recall`, `on_boost`, `on_decay`). Actions include notify, boost, pin, tag, deprecate, webhook, and chain. Your agent can react to its own memory changes.
10
+
11
+ **Thermodynamic Decay** — Memories have heat. Frequently accessed memories stay hot; ignored ones cool and eventually fall out of context. Three modes: time-only, interaction-only, or hybrid (default).
17
12
 
18
13
  ## Install
19
14
 
20
15
  ```bash
21
- openclaw plugin install @digitalforgestudios/openclaw-sulcus
16
+ openclaw skill install @digitalforgestudios/openclaw-sulcus
22
17
  ```
23
18
 
24
- ## Configure
19
+ ## Quick Start
25
20
 
26
- Add to `~/.openclaw/openclaw.json`:
21
+ Add to your OpenClaw config (`openclaw.json`):
27
22
 
28
23
  ```json
29
- "openclaw-sulcus": {
30
- "enabled": true,
31
- "config": {
32
- "apiKey": "sk-YOUR_KEY_HERE",
33
- "agentId": "my-agent",
34
- "namespace": "my-agent"
24
+ {
25
+ "plugins": {
26
+ "slots": {
27
+ "memory": "openclaw-sulcus"
28
+ },
29
+ "entries": {
30
+ "openclaw-sulcus": {
31
+ "enabled": true,
32
+ "config": {
33
+ "serverUrl": "https://api.sulcus.ca",
34
+ "apiKey": "sk-YOUR_KEY_HERE",
35
+ "agentId": "my-agent",
36
+ "namespace": "my-agent",
37
+ "autoRecall": true,
38
+ "autoCapture": true
39
+ }
40
+ }
41
+ }
35
42
  }
36
43
  }
37
44
  ```
38
45
 
39
46
  Restart: `openclaw gateway restart`
40
47
 
41
- **No API key?** Plugin starts in local-only mode (no cloud sync). Get a key at [sulcus.ca](https://sulcus.ca) → Dashboard → API Keys.
48
+ **No API key?** The plugin works in local-only mode without cloud sync. Get a key at [sulcus.ca](https://sulcus.ca) → Dashboard → API Keys.
49
+
50
+ ## Features
51
+
52
+ ### Context Engine (v7.0+)
53
+
54
+ The Context Engine registers as an OpenClaw context provider with `ownsCompaction: true`, giving Sulcus full control over how your agent's context window is managed.
55
+
56
+ - **Constructive assembly** — Builds context as a constructed view, not a patched log. Recent turns render at full fidelity; older turns use SILU-generated pointer summaries.
57
+ - **Overflow prevention** — Emergency brake at 90% budget, cumulative pressure tracking, adaptive compaction intervals based on growth rate.
58
+ - **Working memory cache** — Per-session cache of tool results with automatic Sulcus ingestion. Large results are stored in memory and replaced with pointers.
59
+ - **Session knowledge extraction** — Automatically identifies and captures decisions, file paths, commands, and intents from the conversation.
60
+ - **26 configurable thresholds** — Every ratio, char limit, and interval is tunable. No hardcoded magic numbers.
61
+
62
+ ### SIU v2 Pipeline
63
+
64
+ Every `memory_store` fires the full pipeline automatically:
65
+
66
+ 1. **SIVU** — Utility scoring. Quality gate that accepts or rejects content. ONNX inference, <1ms.
67
+ 2. **SICU** — Type classification. Auto-classifies into memory types. ONNX inference, <1ms.
68
+ 3. **SILU** — Entity extraction + graph relationships. LLM-powered, async.
69
+ 4. **AGE graph** — Apache AGE knowledge graph updated with entities and edges.
70
+ 5. **Triggers** — Reactive trigger rules evaluated against the event.
71
+
72
+ ### Multi-Signal Recall
73
+
74
+ Recall combines multiple signals for relevance ranking:
75
+
76
+ - Semantic similarity (vector search)
77
+ - Full-text search with phrase proximity
78
+ - Thermodynamic heat (access-based decay)
79
+ - Knowledge graph neighbors (entity context)
80
+ - Temporal recency with type-aware half-lives
81
+ - Proper noun and keyword overlap boosts
82
+ - Confidence weighting and conflict detection
83
+
84
+ ### SIRU — Adaptive Scoring
85
+
86
+ The Sulcus Intelligent Recall Unit learns your agent's recall patterns. After 20+ sessions, SIRU training optimizes scoring weights per namespace. Falls back to heuristic defaults until trained.
87
+
88
+ ### Reactive Triggers
89
+
90
+ Rules that fire on memory events:
91
+
92
+ - **Events:** `on_store`, `on_recall`, `on_boost`, `on_decay`
93
+ - **Actions:** notify, boost, pin, tag, deprecate, webhook, chain
94
+ - **SITU training:** Feedback loop improves trigger accuracy over time
95
+
96
+ ### Local-First Architecture (v7.2.0+)
97
+
98
+ - **SulcusLocalClient** — HTTP client for a localhost sidecar with health tracking
99
+ - **RetryQueue** — Bounded in-memory retry buffer for failed remote writes
100
+ - **Dual-write** — Local-first on store, fire-and-forget sync to cloud
101
+ - **Local-first recall** — Sidecar is the fast path, cloud is the fallback
42
102
 
43
103
  ## Tools
44
104
 
45
105
  | Tool | Description |
46
106
  |---|---|
47
- | `memory_store` | Store a memory. SIU pipeline fires automatically: scored, classified, graph-linked. |
48
- | `memory_recall` | Semantic search with relevance weighting (similarity × 0.7 + heat × 0.3). |
49
- | `memory_status` | Backend status, namespace info, hot nodes, decay mode, curator state. |
50
- | `memory_delete` | Delete a memory by ID. Optionally trains SIVU to reject similar content. |
107
+ | `memory_store` | Store a memory. SIU pipeline fires automatically. |
108
+ | `memory_recall` | Multi-signal semantic search with relevance scoring. |
109
+ | `memory_status` | Backend status, namespace info, hot nodes, decay mode. |
110
+ | `memory_delete` | Delete a memory by ID. Optionally trains SIVU rejection. |
51
111
  | `consolidate` | Merge and prune cold memories below a heat threshold. |
52
- | `export_markdown` | Export all memories in current namespace as a Markdown document. |
53
- | `import_markdown` | Import memories from a Markdown document into current namespace. |
54
- | `evaluate_triggers` | Evaluate reactive triggers against an event and context object. |
55
- | `trigger_feedback` | Submit feedback to improve trigger accuracy and SITU scoring. |
112
+ | `export_markdown` | Export all memories as Markdown. |
113
+ | `import_markdown` | Import memories from Markdown. |
114
+ | `evaluate_triggers` | Evaluate reactive triggers against an event. |
115
+ | `trigger_feedback` | Submit feedback to improve trigger accuracy. |
56
116
 
57
- ## Memory Types & Decay
58
-
59
- Choose the right type — decay rates differ significantly:
117
+ ## Memory Types
60
118
 
61
119
  | Type | Decay Rate | Use For |
62
120
  |---|---|---|
63
121
  | `episodic` | Fast | Events, sessions, one-off observations |
64
122
  | `semantic` | Slow | Concepts, relationships, domain knowledge |
65
- | `preference` | Slower | User preferences, opinions, style |
123
+ | `preference` | Slower | User preferences, opinions, style choices |
66
124
  | `fact` | Slow | Stable factual knowledge |
67
125
  | `procedural` | Slowest | How-tos, processes, workflows |
68
126
 
69
- ## Configuration Reference
127
+ ## Configuration
70
128
 
71
129
  | Option | Default | Description |
72
130
  |---|---|---|
73
131
  | `serverUrl` | — | Sulcus cloud URL (e.g. `https://api.sulcus.ca`) |
74
- | `apiKey` | — | Sulcus API key (`sk-...`) |
75
- | `agentId` | — | Agent identifier for namespacing |
76
- | `namespace` | same as `agentId` | Memory namespace |
77
- | `autoRecall` | `false` | Inject relevant memories into context before each turn |
78
- | `autoCapture` | `false` | Auto-store important info from conversations |
79
- | `maxRecallResults` | `5` | Max memories injected on auto-recall |
132
+ | `apiKey` | — | Sulcus API key |
133
+ | `agentId` | — | Agent identifier |
134
+ | `namespace` | `agentId` | Memory namespace |
135
+ | `autoRecall` | `false` | Inject relevant memories before each turn |
136
+ | `autoCapture` | `false` | Auto-store important conversation content |
137
+ | `maxRecallResults` | `5` | Max memories injected per turn |
80
138
  | `minRecallScore` | `0.3` | Min relevance score for auto-recall (0–1) |
81
- | `boostOnRecall` | `true` | Boost heat when a memory is recalled (spaced repetition) |
82
- | `captureOnCompaction` | `true` | Preserve memories before context compaction |
139
+ | `boostOnRecall` | `true` | Heat boost on recall (spaced repetition) |
140
+ | `captureOnCompaction` | `true` | Preserve memories before compaction |
83
141
  | `captureOnReset` | `true` | Capture session summary on `/reset` |
84
- | `trackSessions` | `false` | Record session start/end as episodic memories |
85
- | `captureFromAssistant` | `false` | Also capture from assistant messages |
86
- | `captureToolResults` | `false` | Capture significant tool results |
87
- | `captureLlmInsights` | `false` | Capture assistant decisions/preferences |
88
- | `maxCapturePerTurn` | `3` | Max auto-captures per agent turn |
142
+ | `captureFromAssistant` | `false` | Capture from assistant messages |
143
+ | `maxCapturePerTurn` | `3` | Max auto-captures per turn |
144
+ | `tokenBudget` | `10000` | Token budget for context injection |
145
+ | `maxRecallChars` | `2000` | Max chars per recalled memory |
146
+
147
+ ### Context Engine Config
148
+
149
+ ```json
150
+ {
151
+ "contextEngine": {
152
+ "compactMode": "smart",
153
+ "thresholds": {
154
+ "compactionTriggerRatio": 0.75,
155
+ "trimTriggerRatio": 0.65,
156
+ "largeResultChars": 3000,
157
+ "emergencyBrakeRatio": 0.90,
158
+ "emergencyHeadChars": 250,
159
+ "emergencyTailChars": 250,
160
+ "cumulativePressureChars": 50000,
161
+ "highGrowthTokensPerTurn": 10000
162
+ }
163
+ }
164
+ }
165
+ ```
89
166
 
90
167
  ## Hooks
91
168
 
92
- | Hook | Default | Description |
93
- |---|---|---|
94
- | `before_prompt_build` | ON | Inject memory awareness context |
95
- | `before_agent_start` | ON | Auto-recall relevant memories |
96
- | `agent_end` | ON | Post-turn processing (capture, triggers) |
169
+ | Hook | Description |
170
+ |---|---|
171
+ | `before_prompt_build` | Injects memory awareness + hot context |
172
+ | `before_agent_start` | Auto-recall relevant memories for the turn |
173
+ | `agent_end` | Post-turn capture, triggers, knowledge extraction |
174
+ | `build_context` | Context Engine assembly (when ownsCompaction enabled) |
175
+ | `on_compaction` | Memory preservation before context compaction |
176
+ | `on_reset` | Session summary capture |
97
177
 
98
178
  ## Links
99
179
 
100
- - [sulcus.ca](https://sulcus.ca) — sign up, dashboard, docs
101
- - [npm](https://www.npmjs.com/package/@digitalforgestudios/openclaw-sulcus) — `@digitalforgestudios/openclaw-sulcus`
102
- - [GitHub](https://github.com/digitalforgeca/sulcus) — source, issues
180
+ - **Website:** [sulcus.ca](https://sulcus.ca)
181
+ - **npm:** [@digitalforgestudios/openclaw-sulcus](https://www.npmjs.com/package/@digitalforgestudios/openclaw-sulcus)
182
+ - **GitHub:** [digitalforgeca/sulcus](https://github.com/digitalforgeca/sulcus)
183
+ - **OpenClaw:** [openclaw.ai](https://openclaw.ai)
103
184
 
104
185
  ## License
105
186
 
106
- MIT — [Digital Forge Studios Inc.](https://sulcus.ca)
187
+ MIT — [Digital Forge Studios Inc.](https://dforge.ca)
package/index.js CHANGED
@@ -9599,7 +9599,7 @@ ${res.items.length} shown${res.total ? ` of ${res.total}` : ""}`);
9599
9599
  const assemblyMode = pluginConfig?.contextEngine?.assemblyMode ?? "passthrough";
9600
9600
  const compactMode = pluginConfig?.contextEngine?.compactMode ?? "smart";
9601
9601
  if (contextEngineEnabled && typeof api.registerContextEngine === "function") {
9602
- const ceVersion = "7.2.0";
9602
+ const ceVersion = "7.2.1";
9603
9603
  const ceThresholds = pluginConfig?.contextEngine?.thresholds ?? {};
9604
9604
  api.registerContextEngine("openclaw-sulcus", async () => {
9605
9605
  let delegateCompaction;
@@ -9623,7 +9623,7 @@ ${res.items.length} shown${res.total ? ` of ${res.total}` : ""}`);
9623
9623
  return engine;
9624
9624
  });
9625
9625
  contextEngineActive = true;
9626
- logger.info(`sulcus: context engine registered (v7.2.0, ownsCompaction: true, assembly: ${assemblyMode})`);
9626
+ logger.info(`sulcus: context engine registered (v7.2.1, ownsCompaction: true, assembly: ${assemblyMode})`);
9627
9627
  } else if (contextEngineEnabled) {
9628
9628
  logger.warn("sulcus: contextEngine.enabled=true but api.registerContextEngine not available \u2014 skipping");
9629
9629
  } else {
package/index.ts CHANGED
@@ -7114,7 +7114,7 @@ ${finalContent}`;
7114
7114
  const assemblyMode = (pluginConfig?.contextEngine as any)?.assemblyMode ?? "passthrough";
7115
7115
  const compactMode = (pluginConfig?.contextEngine as any)?.compactMode ?? "smart";
7116
7116
  if (contextEngineEnabled && typeof (api as any).registerContextEngine === "function") {
7117
- const ceVersion = "7.2.0";
7117
+ const ceVersion = "7.2.1";
7118
7118
  const ceThresholds = (pluginConfig?.contextEngine as any)?.thresholds ?? {};
7119
7119
  (api as any).registerContextEngine("openclaw-sulcus", async () => {
7120
7120
  // Lazy-load delegate at factory time
@@ -7140,7 +7140,7 @@ ${finalContent}`;
7140
7140
  return engine;
7141
7141
  });
7142
7142
  contextEngineActive = true;
7143
- logger.info(`sulcus: context engine registered (v7.2.0, ownsCompaction: true, assembly: ${assemblyMode})`);
7143
+ logger.info(`sulcus: context engine registered (v7.2.1, ownsCompaction: true, assembly: ${assemblyMode})`);
7144
7144
  } else if (contextEngineEnabled) {
7145
7145
  logger.warn("sulcus: contextEngine.enabled=true but api.registerContextEngine not available — skipping");
7146
7146
  } else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digitalforgestudios/openclaw-sulcus",
3
- "version": "7.2.0",
4
- "description": "Sulcus — thermodynamic memory + Apache AGE knowledge graph for OpenClaw agents. v6.0: Multi-signal recall (semantic + hot-context + entity-graph + profile), configurable guardrails (outputGuard + toolGuard), token budget enforcement, context rebuild post-compaction, sulcus.toml config layer, SIRU training data logging, session-scoped memory, batch heat-boost. SIU v2 pipeline (SIVU/SICU/SILU/SITU/SIRU). Interaction-based decay. Curator sleep-cycle. Cross-agent sync.",
3
+ "version": "7.2.1",
4
+ "description": "Thermodynamic memory for OpenClaw agents. Context Engine with constructive assembly and overflow prevention. SIU v2 pipeline (SIVU/SICU/SILU), Apache AGE knowledge graph, reactive triggers, multi-signal recall, interaction-based decay, local-first architecture with cloud sync.",
5
5
  "keywords": [
6
6
  "openclaw",
7
7
  "openclaw-plugin",