@digitalforgestudios/openclaw-sulcus 3.10.0 → 3.11.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.
- package/index.ts +39 -4
- 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.
|
|
@@ -681,10 +690,11 @@ const toolDefinitions: Record<string, ToolDefinition> = {
|
|
|
681
690
|
try {
|
|
682
691
|
await (sulcusMem as any).request("POST", "/api/v2/siu/signal", {
|
|
683
692
|
memory_id: nodeId,
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
693
|
+
signal_type: "accept",
|
|
694
|
+
corrected_store: true,
|
|
695
|
+
corrected_type: mtype,
|
|
696
|
+
content_snapshot: params.content,
|
|
697
|
+
source: "plugin",
|
|
688
698
|
});
|
|
689
699
|
trainResult = "training signal submitted";
|
|
690
700
|
logger.info(`sulcus: SIU training signal sent for memory ${nodeId} (store, ${mtype})`);
|
|
@@ -849,6 +859,31 @@ const toolDefinitions: Record<string, ToolDefinition> = {
|
|
|
849
859
|
},
|
|
850
860
|
},
|
|
851
861
|
|
|
862
|
+
memory_delete: {
|
|
863
|
+
schema: {
|
|
864
|
+
name: "memory_delete",
|
|
865
|
+
label: "Delete Memory",
|
|
866
|
+
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.",
|
|
867
|
+
parameters: Type.Object({
|
|
868
|
+
id: Type.String({ description: "Memory node ID to delete." }),
|
|
869
|
+
train: Type.Optional(Type.Boolean({ default: true, description: "Train SIVU to reject similar content (default true). Set false to delete without training." })),
|
|
870
|
+
}),
|
|
871
|
+
},
|
|
872
|
+
options: { name: "memory_delete" },
|
|
873
|
+
makeExecute: ({ sulcusMem, backendMode, namespace, nativeLoader, isAvailable }) =>
|
|
874
|
+
async (_id: string, params: any) => {
|
|
875
|
+
if (!isAvailable) {
|
|
876
|
+
throw new Error(`Sulcus unavailable: ${nativeLoader.error || "WASM not loaded"}`);
|
|
877
|
+
}
|
|
878
|
+
const train = params.train !== false; // default true
|
|
879
|
+
const res = await (sulcusMem as SulcusCloudClient).delete_memory(params.id, train);
|
|
880
|
+
return {
|
|
881
|
+
content: [{ type: "text", text: `Deleted memory ${params.id}${train ? " (trained SIVU to reject similar)" : ""}. Backend: ${backendMode}, namespace: ${namespace}` }],
|
|
882
|
+
details: { id: params.id, trained: train, result: res, backend: backendMode, namespace }
|
|
883
|
+
};
|
|
884
|
+
},
|
|
885
|
+
},
|
|
886
|
+
|
|
852
887
|
// ── SIU v2 Tools ───────────────────────────────────────────────────────────
|
|
853
888
|
// These tools call the SIU v2 server endpoints for text classification.
|
|
854
889
|
// 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.
|
|
3
|
+
"version": "3.11.1",
|
|
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",
|