@digitalforgestudios/openclaw-sulcus 0.1.2 → 0.1.3

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 +9 -4
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -82,14 +82,17 @@ class SulcusClient {
82
82
  return res.json();
83
83
  }
84
84
 
85
- async store(label: string, memoryType = "episodic", namespace?: string): Promise<SulcusNode> {
86
- const body: Record<string, string> = {
85
+ async store(label: string, memoryType = "episodic", namespace?: string, isPinned?: boolean): Promise<SulcusNode> {
86
+ const body: Record<string, unknown> = {
87
87
  label,
88
88
  memory_type: memoryType,
89
89
  };
90
90
  if (namespace ?? this.config.namespace) {
91
91
  body.namespace = namespace ?? this.config.namespace!;
92
92
  }
93
+ if (isPinned) {
94
+ body.is_pinned = true;
95
+ }
93
96
 
94
97
  const res = await fetch(`${this.baseUrl}/api/v1/agent/nodes`, {
95
98
  method: "POST",
@@ -379,18 +382,20 @@ const sulcusMemoryPlugin = {
379
382
  }),
380
383
  ),
381
384
  namespace: Type.Optional(Type.String({ description: "Namespace (default: agent namespace)" })),
385
+ isPinned: Type.Optional(Type.Boolean({ description: "Pin memory to freeze heat at current value, preventing ALL decay. Pinned memories never lose heat." })),
382
386
  }),
383
387
  async execute(_toolCallId, params) {
384
- const { text, memoryType, namespace } = params as {
388
+ const { text, memoryType, namespace, isPinned } = params as {
385
389
  text: string;
386
390
  memoryType?: string;
387
391
  namespace?: string;
392
+ isPinned?: boolean;
388
393
  };
389
394
 
390
395
  const type = memoryType ?? detectMemoryType(text);
391
396
 
392
397
  try {
393
- const node = await client.store(text, type, namespace);
398
+ const node = await client.store(text, type, namespace, isPinned);
394
399
  return {
395
400
  content: [
396
401
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalforgestudios/openclaw-sulcus",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Sulcus thermodynamic memory backend plugin for OpenClaw. Heat-based decay, cross-agent sync, programmable triggers, auto-recall, and auto-capture.",
5
5
  "keywords": [
6
6
  "openclaw",