Skip to content

Commit 73650fa

Browse files
phernandezclaude
andcommitted
feat: add anonymous telemetry, default project to workspace root, fix setup script
Analytics: - Add Umami event collector (fire-and-forget, 3s timeout, zero deps) - Track plugin install, startup, and first-use-per-tool-per-session - Opt out via OPENCLAW_BASIC_MEMORY_TELEMETRY=0 or BASIC_MEMORY_NO_PROMOS=1 - 20 new tests covering opt-out, dedup, env overrides, error silence Config: - Default projectPath to "." (workspace root) instead of "memory/" - Plugin sets itself as default BM project on startup (no separate "main") Setup: - Fix typo in setup-bm.sh (basic-memor -> basic-memory) - Remove --with onnxruntime workaround README: - Add telemetry section with clear what/what-not/opt-out disclosure - Add semantic search disable tip - Update projectPath docs and OIDC publishing info Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 810c35f commit 73650fa

File tree

10 files changed

+525
-16
lines changed

10 files changed

+525
-16
lines changed

README.md

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ This installs to the same `skills/` directory the plugin reads from, so updated
137137
}
138138
```
139139

140-
This uses sensible defaults: auto-generated project name, maps Basic Memory to your workspace `memory/` directory, and captures conversations.
140+
This uses sensible defaults: auto-generated project name, maps Basic Memory to your workspace root, sets it as the default BM project, and captures conversations.
141141

142142
### Full configuration
143143
```json5
@@ -147,7 +147,7 @@ This uses sensible defaults: auto-generated project name, maps Basic Memory to y
147147
config: {
148148
project: "my-agent", // BM project name (default: "openclaw-{hostname}")
149149
bmPath: "bm", // Path to BM CLI binary
150-
projectPath: "~/.openclaw/workspace/memory/", // Optional override; supports absolute, ~/..., or workspace-relative paths
150+
projectPath: ".", // Defaults to workspace root; supports absolute, ~/..., or workspace-relative paths
151151
memoryDir: "memory/", // Relative memory dir for task scanning
152152
memoryFile: "MEMORY.md", // Working memory file for grep search
153153
autoCapture: true, // Index conversations automatically
@@ -166,7 +166,7 @@ This uses sensible defaults: auto-generated project name, maps Basic Memory to y
166166
|--------|------|---------|-------------|
167167
| `project` | string | `"openclaw-{hostname}"` | Basic Memory project name |
168168
| `bmPath` | string | `"bm"` | Path to Basic Memory CLI binary |
169-
| `projectPath` | string | `"memory/"` | Directory for BM project data (resolved from workspace unless absolute) |
169+
| `projectPath` | string | `"."` | Directory for BM project data (defaults to workspace root; resolved from workspace unless absolute) |
170170
| `memoryDir` | string | `"memory/"` | Relative path for task scanning |
171171
| `memoryFile` | string | `"MEMORY.md"` | Working memory file (grep-searched) |
172172
| `autoCapture` | boolean | `true` | Auto-index agent conversations |
@@ -179,7 +179,7 @@ Snake_case aliases (`memory_dir`, `memory_file`, `auto_recall`, `recall_prompt`,
179179

180180
Cloud sync is optional — see [BASIC_MEMORY.md](./BASIC_MEMORY.md) for cloud configuration.
181181

182-
On startup, the plugin ensures the configured BM project exists at `projectPath` via MCP `create_memory_project` in idempotent mode.
182+
On startup, the plugin ensures the configured BM project exists at `projectPath` via MCP `create_memory_project` in idempotent mode, and sets it as the default Basic Memory project.
183183

184184
## How It Works
185185

@@ -453,6 +453,17 @@ rm -rf /tmp/jiti/ "$TMPDIR/jiti/"
453453
openclaw gateway stop && openclaw gateway start
454454
```
455455

456+
### Disabling semantic search
457+
If you want to run without vector/embedding dependencies (faster startup, less memory), set the environment variable before launching:
458+
```bash
459+
BASIC_MEMORY_SEMANTIC_SEARCH_ENABLED=false
460+
```
461+
Or in `~/.basic-memory/config.json`:
462+
```json
463+
{ "semantic_search_enabled": false }
464+
```
465+
Search will fall back to full-text search only.
466+
456467
### Search returns no results
457468
1. Check that the MCP session is connected (look for `connected to BM MCP stdio` in logs)
458469
2. Verify files exist in the project directory
@@ -531,9 +542,7 @@ just release patch # or: minor, major, 0.2.0, etc.
531542
4. publish to npm
532543
5. create a GitHub release
533544

534-
Repository secret required:
535-
536-
- `NPM_TOKEN` (npm publish token with package publish permissions)
545+
Publishing uses npm OIDC trusted publishing — no secrets required. The trusted publisher is configured on npmjs.com to accept provenance from this repo's `release.yml` workflow.
537546

538547
### Project Structure
539548
```
@@ -564,6 +573,33 @@ openclaw-basic-memory/
564573
└── recall.ts # Auto-recall (active tasks + recent activity)
565574
```
566575

576+
## Telemetry
577+
578+
This plugin collects anonymous, minimal usage events to understand plugin adoption and tool usage patterns. This helps us prioritize features and improve the product.
579+
580+
**What we collect:**
581+
- Plugin registration and startup events
582+
- First use of each tool per session (deduplicated — not every call)
583+
- Plugin version with each event
584+
585+
**What we do NOT collect:**
586+
- No file contents, note titles, search queries, or conversation text
587+
- No personally identifiable information (PII)
588+
- No IP address tracking or fingerprinting
589+
- No per-command tracking beyond first-use-per-session
590+
591+
Events are sent to our [Umami Cloud](https://umami.is) instance, an open-source, privacy-focused analytics platform. Events are fire-and-forget with a 3-second timeout — analytics never blocks or slows the plugin.
592+
593+
**Opt out** by setting either environment variable:
594+
595+
```bash
596+
# Plugin-specific opt-out
597+
export OPENCLAW_BASIC_MEMORY_TELEMETRY=0
598+
599+
# Or use the shared Basic Memory opt-out (also disables BM CLI telemetry)
600+
export BASIC_MEMORY_NO_PROMOS=1
601+
```
602+
567603
## License
568604

569605
MIT — see LICENSE file.

0 commit comments

Comments
 (0)