@digitalforgestudios/openclaw-sulcus 1.0.2 → 1.1.0

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 +7 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -97,6 +97,10 @@ class SulcusClient {
97
97
  body: JSON.stringify(body),
98
98
  });
99
99
 
100
+ if (res.status === 409) {
101
+ // Duplicate memory — silently skip, not an error
102
+ return { id: "", label, memory_type: memoryType, namespace: namespace ?? this.config.namespace ?? "default" } as SulcusNode;
103
+ }
100
104
  if (!res.ok) {
101
105
  const errText = await res.text().catch(() => "");
102
106
  throw new Error(`Sulcus store failed: ${res.status} ${errText}`);
@@ -529,7 +533,7 @@ const sulcusMemoryPlugin = {
529
533
  // ========================================================================
530
534
 
531
535
  if (config.autoRecall) {
532
- api.on("before_agent_start", async (event) => {
536
+ api.on("before_model_resolve", async (event) => {
533
537
  if (!event.prompt || event.prompt.length < 5) return;
534
538
 
535
539
  try {
@@ -539,7 +543,8 @@ const sulcusMemoryPlugin = {
539
543
  const memoryLines = results.map((node, i) => {
540
544
  const label = node.pointer_summary ?? node.label ?? "";
541
545
  const heat = node.current_heat ?? node.heat ?? 0;
542
- return `${i + 1}. [${node.memory_type}] (heat: ${heat.toFixed(2)}) ${escapeForPrompt(label.slice(0, 400))}`;
546
+ const id = node.id ?? "";
547
+ return `${i + 1}. [${node.memory_type}] (heat: ${heat.toFixed(2)}) [id: ${id}] ${escapeForPrompt(label.slice(0, 400))}`;
543
548
  });
544
549
 
545
550
  api.logger.info?.(`openclaw-sulcus: injecting ${results.length} memories into context`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalforgestudios/openclaw-sulcus",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Sulcus memory plugin for OpenClaw — thermodynamic memory with heat-based decay, reactive triggers, and cross-agent sync.",
5
5
  "keywords": [
6
6
  "openclaw",