@digitalforgestudios/openclaw-sulcus 0.1.0 → 0.1.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 (2) hide show
  1. package/index.ts +39 -1
  2. package/package.json +13 -3
package/index.ts CHANGED
@@ -204,7 +204,9 @@ const sulcusMemoryPlugin = {
204
204
  serverUrl: (rawCfg as any).serverUrl ?? "https://api.sulcus.ca",
205
205
  apiKey: (rawCfg as any).apiKey ?? "",
206
206
  agentId: (rawCfg as any).agentId,
207
- namespace: (rawCfg as any).namespace ?? (rawCfg as any).agentId,
207
+ namespace: ((rawCfg as any).namespace && (rawCfg as any).namespace !== "default")
208
+ ? (rawCfg as any).namespace
209
+ : ((rawCfg as any).agentId ?? "default"),
208
210
  autoRecall: (rawCfg as any).autoRecall ?? true,
209
211
  autoCapture: (rawCfg as any).autoCapture ?? true,
210
212
  maxRecallResults: (rawCfg as any).maxRecallResults ?? 5,
@@ -446,6 +448,42 @@ const sulcusMemoryPlugin = {
446
448
  { name: "memory_forget" },
447
449
  );
448
450
 
451
+ // ========================================================================
452
+ // Lifecycle — System prompt preamble (LLM awareness)
453
+ // ========================================================================
454
+
455
+ const sulcusPreamble = [
456
+ "## Persistent Memory (Sulcus)",
457
+ "You have persistent memory powered by Sulcus. Your memories survive across sessions and conversations.",
458
+ "",
459
+ "**How it works:**",
460
+ "- Memories are automatically recalled and injected into your context when relevant.",
461
+ "- Each memory has a **heat** score (0.0–1.0) — hotter memories are more recent/important, cold ones fade over time.",
462
+ "- Memory types: episodic (events), semantic (facts), preference (opinions), procedural (how-tos), fact (data points).",
463
+ "",
464
+ "**Your memory tools:**",
465
+ "- `memory_search` — find memories by semantic query. Use before answering about past work, decisions, or preferences.",
466
+ "- `memory_store` — save important information. Use for preferences, key decisions, facts worth remembering, lessons learned.",
467
+ "- `memory_get` — retrieve a specific memory by ID.",
468
+ "- `memory_forget` — delete a memory that's outdated or wrong.",
469
+ "",
470
+ "**When to store memories:**",
471
+ "- User states a preference, opinion, or personal fact",
472
+ "- An important decision is made",
473
+ "- You learn something that should survive this session",
474
+ "- A correction is given (store the correct version, forget the wrong one)",
475
+ "",
476
+ "**When to search memories:**",
477
+ "- Before answering questions about prior work, people, or decisions",
478
+ "- When context seems incomplete — there may be relevant history",
479
+ "- When the user references something from a previous conversation",
480
+ ].join("\n");
481
+
482
+ // Inject preamble into system prompt via before_prompt_build hook
483
+ api.on("before_prompt_build", () => {
484
+ return { appendSystemContext: sulcusPreamble };
485
+ });
486
+
449
487
  // ========================================================================
450
488
  // Lifecycle — Auto-recall
451
489
  // ========================================================================
package/package.json CHANGED
@@ -1,8 +1,16 @@
1
1
  {
2
2
  "name": "@digitalforgestudios/openclaw-sulcus",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Sulcus thermodynamic memory backend plugin for OpenClaw. Heat-based decay, cross-agent sync, programmable triggers, auto-recall, and auto-capture.",
5
- "keywords": ["openclaw", "plugin", "memory", "sulcus", "thermodynamic", "ai-agent", "long-term-memory"],
5
+ "keywords": [
6
+ "openclaw",
7
+ "plugin",
8
+ "memory",
9
+ "sulcus",
10
+ "thermodynamic",
11
+ "ai-agent",
12
+ "long-term-memory"
13
+ ],
6
14
  "author": "Digital Forge <daedalus@tc-o.co>",
7
15
  "license": "MIT",
8
16
  "repository": {
@@ -12,7 +20,9 @@
12
20
  },
13
21
  "homepage": "https://sulcus.ca/docs#openclaw",
14
22
  "openclaw": {
15
- "extensions": ["./index.ts"]
23
+ "extensions": [
24
+ "./index.ts"
25
+ ]
16
26
  },
17
27
  "files": [
18
28
  "index.ts",