@basicmemory/openclaw-basic-memory 0.24.0 → 1.0.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 (87) hide show
  1. package/README.md +24 -12
  2. package/bm-client.ts +302 -112
  3. package/commands/cli.ts +5 -6
  4. package/commands/slash.ts +4 -4
  5. package/context-engine/basic-memory-context-engine.ts +74 -9
  6. package/context-engine/types.ts +21 -0
  7. package/dist/bm-client.d.ts +61 -12
  8. package/dist/bm-client.js +250 -101
  9. package/dist/commands/cli.d.ts +1 -1
  10. package/dist/commands/cli.js +5 -5
  11. package/dist/commands/slash.d.ts +1 -1
  12. package/dist/commands/slash.js +4 -3
  13. package/dist/context-engine/basic-memory-context-engine.d.ts +20 -1
  14. package/dist/context-engine/basic-memory-context-engine.js +50 -2
  15. package/dist/context-engine/types.d.ts +9 -0
  16. package/dist/context-engine/types.js +1 -0
  17. package/dist/index.d.ts +10 -4
  18. package/dist/index.js +79 -69
  19. package/dist/memory/basic-memory-capability.d.ts +19 -0
  20. package/dist/memory/basic-memory-capability.js +190 -0
  21. package/dist/tools/build-context.d.ts +1 -1
  22. package/dist/tools/build-context.js +12 -4
  23. package/dist/tools/delete-note.d.ts +1 -1
  24. package/dist/tools/delete-note.js +2 -1
  25. package/dist/tools/edit-note.d.ts +1 -1
  26. package/dist/tools/edit-note.js +22 -12
  27. package/dist/tools/list-memory-projects.d.ts +1 -1
  28. package/dist/tools/list-memory-projects.js +2 -1
  29. package/dist/tools/list-workspaces.d.ts +1 -1
  30. package/dist/tools/list-workspaces.js +4 -4
  31. package/dist/tools/move-note.d.ts +1 -1
  32. package/dist/tools/move-note.js +2 -1
  33. package/dist/tools/read-note.d.ts +1 -1
  34. package/dist/tools/read-note.js +2 -1
  35. package/dist/tools/schema-diff.d.ts +1 -1
  36. package/dist/tools/schema-diff.js +2 -1
  37. package/dist/tools/schema-infer.d.ts +1 -1
  38. package/dist/tools/schema-infer.js +2 -1
  39. package/dist/tools/schema-validate.d.ts +1 -1
  40. package/dist/tools/schema-validate.js +2 -1
  41. package/dist/tools/search-notes.d.ts +1 -1
  42. package/dist/tools/search-notes.js +13 -6
  43. package/dist/tools/write-note.d.ts +1 -1
  44. package/dist/tools/write-note.js +11 -12
  45. package/index.ts +93 -84
  46. package/memory/basic-memory-capability.ts +253 -0
  47. package/openclaw.plugin.json +0 -2
  48. package/package.json +6 -5
  49. package/skills/manifest.json +5 -0
  50. package/skills/memory-agents/SKILL.md +23 -10
  51. package/skills/memory-capture/SKILL.md +29 -18
  52. package/skills/memory-comark/SKILL.md +17 -6
  53. package/skills/memory-continue/SKILL.md +47 -27
  54. package/skills/memory-curate/SKILL.md +40 -24
  55. package/skills/memory-defrag/SKILL.md +18 -7
  56. package/skills/memory-doctor/SKILL.md +93 -0
  57. package/skills/memory-ingest/SKILL.md +33 -17
  58. package/skills/memory-lifecycle/SKILL.md +35 -22
  59. package/skills/memory-literary-analysis/SKILL.md +112 -75
  60. package/skills/memory-metadata-search/SKILL.md +39 -28
  61. package/skills/memory-notes/SKILL.md +75 -50
  62. package/skills/memory-okf/SKILL.md +27 -15
  63. package/skills/memory-onboarding/SKILL.md +20 -9
  64. package/skills/memory-onboarding/references/assistant-setup.md +1 -1
  65. package/skills/memory-onboarding/references/conventions.md +4 -4
  66. package/skills/memory-onboarding/references/domain-playbooks.md +1 -1
  67. package/skills/memory-onboarding/references/schema-guide.md +9 -8
  68. package/skills/memory-quest/SKILL.md +18 -7
  69. package/skills/memory-reflect/SKILL.md +25 -13
  70. package/skills/memory-research/SKILL.md +28 -13
  71. package/skills/memory-schema/SKILL.md +36 -24
  72. package/skills/memory-tasks/SKILL.md +34 -22
  73. package/tools/build-context.ts +14 -5
  74. package/tools/delete-note.ts +2 -2
  75. package/tools/edit-note.ts +27 -14
  76. package/tools/list-memory-projects.ts +6 -2
  77. package/tools/list-workspaces.ts +8 -5
  78. package/tools/move-note.ts +2 -2
  79. package/tools/read-note.ts +2 -2
  80. package/tools/schema-diff.ts +2 -2
  81. package/tools/schema-infer.ts +2 -2
  82. package/tools/schema-validate.ts +2 -2
  83. package/tools/search-notes.ts +18 -7
  84. package/tools/write-note.ts +12 -12
  85. package/dist/tools/memory-provider.d.ts +0 -15
  86. package/dist/tools/memory-provider.js +0 -275
  87. package/tools/memory-provider.ts +0 -336
@@ -7,6 +7,17 @@ description: "Turn meeting transcripts, conversation logs, or pasted documents i
7
7
 
8
8
  Turn raw, unstructured input into structured Basic Memory entities. Meeting transcripts, conversation logs, pasted documents, email threads — anything with information worth preserving gets parsed, cross-referenced against existing knowledge, and written as proper notes.
9
9
 
10
+ ## Project scope
11
+
12
+ If the project is unknown, discover it with `bm_project(command="list")`.
13
+ Pass a nonempty `project` on every note, folder, context and schema call, even
14
+ with one project or a qualified `memory://` URL. Use the chosen project's name,
15
+ `workspace/project`, or external ID; `<project>` below is a placeholder for it.
16
+ Recent activity also requires `project`. Search accepts `project` for one
17
+ project, `projects` for selected projects, or `all_projects=True` explicitly.
18
+ Discovery and bundled manuals need no project. Keep the same scope when following
19
+ returned paths, paginating, or recovering from a refusal.
20
+
10
21
  ## When to Use
11
22
 
12
23
  - User pastes a meeting transcript or conversation log
@@ -70,16 +81,16 @@ For each extracted entity, search Basic Memory with multiple query variations:
70
81
 
71
82
  ```python
72
83
  # Person — try full name, last name
73
- search_notes(query="Sarah Chen")
74
- search_notes(query="Chen")
84
+ bm_search(query="Sarah Chen", project="<project>")
85
+ bm_search(query="Chen", project="<project>")
75
86
 
76
87
  # Organization — try full name, abbreviation, acronym
77
- search_notes(query="National Renewable Energy Laboratory")
78
- search_notes(query="NREL")
88
+ bm_search(query="National Renewable Energy Laboratory", project="<project>")
89
+ bm_search(query="NREL", project="<project>")
79
90
 
80
91
  # Topic — try the full term and keywords
81
- search_notes(query="edge computing")
82
- search_notes(query="edge inference")
92
+ bm_search(query="edge computing", project="<project>")
93
+ bm_search(query="edge inference", project="<project>")
83
94
  ```
84
95
 
85
96
  Classify each entity as:
@@ -124,7 +135,7 @@ Create the primary note for the ingested content. This is the "record of what ha
124
135
  ### Meeting / Conversation Note
125
136
 
126
137
  ```python
127
- write_note(
138
+ bm_write(
128
139
  title="NovaTech Meeting - Jordan Rivera - Feb 22, 2026",
129
140
  directory="meetings/2026",
130
141
  note_type="meeting",
@@ -150,14 +161,15 @@ Brief one-sentence summary of what this meeting was about.
150
161
  - with [[NovaTech]]
151
162
  - discussed [[Federated Learning]]
152
163
  - follow_up [[Send NovaTech Technical Spec]]
153
- """
164
+ """,
165
+ project="<project>",
154
166
  )
155
167
  ```
156
168
 
157
169
  ### Document / Article Note
158
170
 
159
171
  ```python
160
- write_note(
172
+ bm_write(
161
173
  title="Edge Computing Architecture Whitepaper",
162
174
  directory="references",
163
175
  note_type="reference",
@@ -177,7 +189,8 @@ write_note(
177
189
  ## Relations
178
190
  - relates_to [[Edge Computing]]
179
191
  - relates_to [[Model Optimization]]
180
- """
192
+ """,
193
+ project="<project>",
181
194
  )
182
195
  ```
183
196
 
@@ -204,13 +217,13 @@ Invent categories as needed — these are suggestions, not a fixed list.
204
217
 
205
218
  For each entity the user approved, create a structured note. Match the entity type to an appropriate template.
206
219
 
207
- If `write_note` reports similar existing notes, treat that as a match Step 3 missed: merge into
220
+ If `bm_write` reports similar existing notes, treat that as a match Step 3 missed: merge into
208
221
  the existing note and delete the new one, or link the two.
209
222
 
210
223
  ### Person
211
224
 
212
225
  ```python
213
- write_note(
226
+ bm_write(
214
227
  title="Jordan Rivera",
215
228
  directory="people",
216
229
  note_type="person",
@@ -232,14 +245,15 @@ VP of Engineering at NovaTech. Met during integration partnership discussion.
232
245
  ## Relations
233
246
  - works_at [[NovaTech]]
234
247
  - discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
235
- """
248
+ """,
249
+ project="<project>",
236
250
  )
237
251
  ```
238
252
 
239
253
  ### Organization
240
254
 
241
255
  ```python
242
- write_note(
256
+ bm_write(
243
257
  title="NovaTech",
244
258
  directory="organizations",
245
259
  note_type="organization",
@@ -262,14 +276,15 @@ SaaS platform company. Series B stage.
262
276
  ## Relations
263
277
  - employs [[Jordan Rivera]]
264
278
  - discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
265
- """
279
+ """,
280
+ project="<project>",
266
281
  )
267
282
  ```
268
283
 
269
284
  ### Concept / Topic
270
285
 
271
286
  ```python
272
- write_note(
287
+ bm_write(
273
288
  title="Federated Learning",
274
289
  directory="concepts",
275
290
  note_type="concept",
@@ -286,7 +301,8 @@ write_note(
286
301
 
287
302
  ## Relations
288
303
  - discussed_in [[NovaTech Meeting - Jordan Rivera - Feb 22, 2026]]
289
- """
304
+ """,
305
+ project="<project>",
290
306
  )
291
307
  ```
292
308
 
@@ -7,6 +7,17 @@ description: "Manage note status transitions in Basic Memory: archive completed
7
7
 
8
8
  Manage how entities move through status stages in Basic Memory. The core principle: **archive, never delete.** Completed work is valuable context — move it out of the active view, but keep it in the knowledge graph.
9
9
 
10
+ ## Project scope
11
+
12
+ If the project is unknown, discover it with `bm_project(command="list")`.
13
+ Pass a nonempty `project` on every note, folder, context and schema call, even
14
+ with one project or a qualified `memory://` URL. Use the chosen project's name,
15
+ `workspace/project`, or external ID; `<project>` below is a placeholder for it.
16
+ Recent activity also requires `project`. Search accepts `project` for one
17
+ project, `projects` for selected projects, or `all_projects=True` explicitly.
18
+ Discovery and bundled manuals need no project. Keep the same scope when following
19
+ returned paths, paginating, or recovering from a refusal.
20
+
10
21
  ## When to Use
11
22
 
12
23
  - User says something is "done", "finished", "completed", "submitted", "missed", or "cancelled"
@@ -20,10 +31,10 @@ Deleting a note removes it from the knowledge graph — its observations and rel
20
31
 
21
32
  ```
22
33
  # Good — entity stays in the knowledge graph
23
- move_note → active/ to archive/
34
+ bm_move → active/ to archive/
24
35
 
25
36
  # Bad — knowledge is lost
26
- delete_note
37
+ bm_delete
27
38
  ```
28
39
 
29
40
  The only exception: notes created by mistake (typos, true duplicates) can be deleted.
@@ -77,8 +88,8 @@ When the user mentions completion or status change, extract the intent:
77
88
  Search Basic Memory with multiple variations to locate the entity:
78
89
 
79
90
  ```python
80
- search_notes(query="quarterly report")
81
- search_notes(query="Q1 report")
91
+ bm_search(query="quarterly report", project="<project>")
92
+ bm_search(query="Q1 report", project="<project>")
82
93
  ```
83
94
 
84
95
  If multiple matches come back, present options and ask which one.
@@ -87,12 +98,13 @@ If no match is found, ask for clarification — don't guess.
87
98
 
88
99
  ### 2. Move the File
89
100
 
90
- Use `move_note` to relocate the entity to the appropriate status folder:
101
+ Use `bm_move` to relocate the entity to the appropriate status folder:
91
102
 
92
103
  ```python
93
- move_note(
104
+ bm_move(
94
105
  identifier="tasks/active/quarterly-report",
95
- destination_path="tasks/completed/quarterly-report.md"
106
+ destination="tasks/completed/quarterly-report.md",
107
+ project="<project>",
96
108
  )
97
109
  ```
98
110
 
@@ -101,15 +113,15 @@ By default the permalink stays the same after a move, so links keep resolving. P
101
113
  ### 3. Update Frontmatter
102
114
 
103
115
  After moving, merge the new status (and completion date, if the type tracks one) into
104
- frontmatter with the `metadata` parameter. An `append` with empty `content` changes only
105
- the frontmatter:
116
+ frontmatter with `command="set_metadata"` and the `metadata` parameter; this leaves
117
+ the body unchanged:
106
118
 
107
119
  ```python
108
- edit_note(
109
- identifier="quarterly-report",
110
- operation="append",
111
- content="",
112
- metadata={"status": "completed", "completed": "2026-02-22"}
120
+ bm_edit(
121
+ identifier="tasks/completed/quarterly-report.md",
122
+ command="set_metadata",
123
+ metadata={"status": "completed", "completed": "2026-02-22"},
124
+ project="<project>",
113
125
  )
114
126
  ```
115
127
 
@@ -149,16 +161,17 @@ status is unchanged. Only the user can unlock it, by editing the file.
149
161
  If something was archived by mistake, move it back:
150
162
 
151
163
  ```python
152
- move_note(
164
+ bm_move(
153
165
  identifier="tasks/completed/quarterly-report",
154
- destination_path="tasks/active/quarterly-report.md"
166
+ destination="tasks/active/quarterly-report.md",
167
+ project="<project>",
155
168
  )
156
169
 
157
- edit_note(
158
- identifier="quarterly-report",
159
- operation="append",
160
- content="",
161
- metadata={"status": "active"}
170
+ bm_edit(
171
+ identifier="tasks/active/quarterly-report.md",
172
+ command="set_metadata",
173
+ metadata={"status": "active"},
174
+ project="<project>",
162
175
  )
163
176
  ```
164
177
 
@@ -176,7 +189,7 @@ Some status changes don't require a folder move — "paused" or "blocked" items
176
189
 
177
190
  - **Archive, never delete.** The knowledge graph benefits from historical context.
178
191
  - **Move first, then update frontmatter.** This order ensures the file is in the right place even if the edit step fails.
179
- - **Permalinks survive moves by default.** Links to the entity keep working after a `move_note` unless the project enables `update_permalinks_on_move`.
192
+ - **Permalinks survive moves by default.** Links to the entity keep working after a `bm_move` unless the project enables `update_permalinks_on_move`.
180
193
  - **Be concise in confirmations.** The user knows their system — just report what changed.
181
194
  - **Ask when ambiguous.** If multiple entities match or the target folder isn't clear, ask rather than guess.
182
195
  - **Batch operations are fine.** If the user says "archive all completed tasks", find them all, confirm the list, then move them in sequence.