@digitalforgestudios/openclaw-sulcus 3.10.0 → 3.11.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 +34 -0
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -322,6 +322,15 @@ class SulcusCloudClient {
322
322
  return this.request("POST", "/api/v1/agent/consolidate", body);
323
323
  }
324
324
 
325
+ /**
326
+ * delete_memory — maps to DELETE /agent/nodes/:id?train=true|false
327
+ * If train=true, snapshots content before deletion and records a 'reject' training signal for SIVU.
328
+ */
329
+ async delete_memory(id: string, train?: boolean): Promise<any> {
330
+ const trainParam = train ? "true" : "false";
331
+ return this.request("DELETE", `/api/v1/agent/nodes/${encodeURIComponent(id)}?train=${trainParam}`);
332
+ }
333
+
325
334
  /**
326
335
  * export_markdown — maps to GET /agent/export?format=markdown
327
336
  * Returns raw markdown string.
@@ -849,6 +858,31 @@ const toolDefinitions: Record<string, ToolDefinition> = {
849
858
  },
850
859
  },
851
860
 
861
+ memory_delete: {
862
+ schema: {
863
+ name: "memory_delete",
864
+ label: "Delete Memory",
865
+ description: "Delete a memory node by ID. With train=true (default), the deleted content trains SIVU to reject similar content in the future. Use this to clean up junk, duplicates, or noise memories.",
866
+ parameters: Type.Object({
867
+ id: Type.String({ description: "Memory node ID to delete." }),
868
+ train: Type.Optional(Type.Boolean({ default: true, description: "Train SIVU to reject similar content (default true). Set false to delete without training." })),
869
+ }),
870
+ },
871
+ options: { name: "memory_delete" },
872
+ makeExecute: ({ sulcusMem, backendMode, namespace, nativeLoader, isAvailable }) =>
873
+ async (_id: string, params: any) => {
874
+ if (!isAvailable) {
875
+ throw new Error(`Sulcus unavailable: ${nativeLoader.error || "WASM not loaded"}`);
876
+ }
877
+ const train = params.train !== false; // default true
878
+ const res = await (sulcusMem as SulcusCloudClient).delete_memory(params.id, train);
879
+ return {
880
+ content: [{ type: "text", text: `Deleted memory ${params.id}${train ? " (trained SIVU to reject similar)" : ""}. Backend: ${backendMode}, namespace: ${namespace}` }],
881
+ details: { id: params.id, trained: train, result: res, backend: backendMode, namespace }
882
+ };
883
+ },
884
+ },
885
+
852
886
  // ── SIU v2 Tools ───────────────────────────────────────────────────────────
853
887
  // These tools call the SIU v2 server endpoints for text classification.
854
888
  // Requires cloud backend (serverUrl + apiKey). Uses /api/v2/siu/* endpoints.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalforgestudios/openclaw-sulcus",
3
- "version": "3.10.0",
3
+ "version": "3.11.0",
4
4
  "description": "Sulcus — reactive, thermodynamic memory plugin for OpenClaw. Opt-in persistent memory with heat-based decay, semantic search, and cross-agent sync. Auto-recall and auto-capture disabled by default.",
5
5
  "keywords": [
6
6
  "openclaw",