@basicmemory/openclaw-basic-memory 0.1.5 → 0.2.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/context-engine/basic-memory-context-engine.test.ts +398 -0
- package/context-engine/basic-memory-context-engine.ts +330 -0
- package/hooks/capture.ts +18 -6
- package/hooks/recall.ts +28 -12
- package/index.ts +9 -12
- package/package.json +5 -4
- package/scripts/setup-bm.sh +2 -2
- package/skills/manifest.json +5 -0
- package/skills/memory-literary-analysis/SKILL.md +511 -0
- package/skills/memory-metadata-search/SKILL.md +2 -0
- package/tools/build-context.ts +5 -0
- package/tools/delete-note.ts +4 -0
- package/tools/edit-note.ts +5 -0
- package/tools/list-memory-projects.ts +6 -0
- package/tools/list-workspaces.ts +5 -0
- package/tools/memory-provider.ts +23 -0
- package/tools/move-note.ts +5 -0
- package/tools/read-note.ts +5 -0
- package/tools/schema-diff.ts +5 -0
- package/tools/schema-infer.ts +5 -0
- package/tools/schema-validate.ts +6 -0
- package/tools/search-notes.ts +10 -0
- package/tools/write-note.ts +10 -0
- package/types/openclaw.d.ts +0 -24
package/tools/schema-validate.ts
CHANGED
|
@@ -53,6 +53,7 @@ export function registerSchemaValidateTool(
|
|
|
53
53
|
if ("error" in result && typeof resultRecord.error === "string") {
|
|
54
54
|
return {
|
|
55
55
|
content: [{ type: "text" as const, text: resultRecord.error }],
|
|
56
|
+
details: result,
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -91,6 +92,11 @@ export function registerSchemaValidateTool(
|
|
|
91
92
|
text: "Schema validation failed. Check logs for details.",
|
|
92
93
|
},
|
|
93
94
|
],
|
|
95
|
+
details: {
|
|
96
|
+
noteType: params.noteType ?? null,
|
|
97
|
+
identifier: params.identifier ?? null,
|
|
98
|
+
error: "schema_validate_failed",
|
|
99
|
+
},
|
|
94
100
|
}
|
|
95
101
|
}
|
|
96
102
|
},
|
package/tools/search-notes.ts
CHANGED
|
@@ -83,6 +83,10 @@ export function registerSearchTool(
|
|
|
83
83
|
text: "No matching notes found in the knowledge graph.",
|
|
84
84
|
},
|
|
85
85
|
],
|
|
86
|
+
details: {
|
|
87
|
+
count: 0,
|
|
88
|
+
results: [],
|
|
89
|
+
},
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
92
|
|
|
@@ -121,6 +125,12 @@ export function registerSearchTool(
|
|
|
121
125
|
text: "Search failed. Is Basic Memory running? Check logs for details.",
|
|
122
126
|
},
|
|
123
127
|
],
|
|
128
|
+
details: {
|
|
129
|
+
count: 0,
|
|
130
|
+
results: [],
|
|
131
|
+
query: params.query,
|
|
132
|
+
error: "search_notes_failed",
|
|
133
|
+
},
|
|
124
134
|
}
|
|
125
135
|
}
|
|
126
136
|
},
|
package/tools/write-note.ts
CHANGED
|
@@ -83,6 +83,11 @@ export function registerWriteTool(
|
|
|
83
83
|
|
|
84
84
|
return {
|
|
85
85
|
content: [{ type: "text" as const, text: hint }],
|
|
86
|
+
details: {
|
|
87
|
+
title: params.title,
|
|
88
|
+
permalink: err.permalink,
|
|
89
|
+
error: "note_already_exists",
|
|
90
|
+
},
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
93
|
|
|
@@ -94,6 +99,11 @@ export function registerWriteTool(
|
|
|
94
99
|
text: "Failed to write note. Is Basic Memory running? Check logs for details.",
|
|
95
100
|
},
|
|
96
101
|
],
|
|
102
|
+
details: {
|
|
103
|
+
title: params.title,
|
|
104
|
+
folder: params.folder,
|
|
105
|
+
error: "write_note_failed",
|
|
106
|
+
},
|
|
97
107
|
}
|
|
98
108
|
}
|
|
99
109
|
},
|
package/types/openclaw.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare module "openclaw/plugin-sdk" {
|
|
2
|
-
export interface OpenClawPluginApi {
|
|
3
|
-
pluginConfig: unknown
|
|
4
|
-
logger: {
|
|
5
|
-
info: (msg: string) => void
|
|
6
|
-
warn: (msg: string) => void
|
|
7
|
-
error: (msg: string, ...args: unknown[]) => void
|
|
8
|
-
debug: (msg: string) => void
|
|
9
|
-
}
|
|
10
|
-
// biome-ignore lint/suspicious/noExplicitAny: openclaw SDK does not ship types
|
|
11
|
-
registerTool(tool: any, options: any): void
|
|
12
|
-
// biome-ignore lint/suspicious/noExplicitAny: openclaw SDK does not ship types
|
|
13
|
-
registerCommand(command: any): void
|
|
14
|
-
// biome-ignore lint/suspicious/noExplicitAny: openclaw SDK does not ship types
|
|
15
|
-
registerCli(handler: any, options?: any): void
|
|
16
|
-
// biome-ignore lint/suspicious/noExplicitAny: openclaw SDK does not ship types
|
|
17
|
-
registerService(service: any): void
|
|
18
|
-
// biome-ignore lint/suspicious/noExplicitAny: openclaw SDK does not ship types
|
|
19
|
-
on(event: string, handler: (...args: any[]) => any): void
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// biome-ignore lint/suspicious/noExplicitAny: openclaw SDK does not ship types
|
|
23
|
-
export function stringEnum(values: readonly string[]): any
|
|
24
|
-
}
|