@andespindola/brainlink 0.1.0-beta.4 → 0.1.0-beta.41
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/AGENTS.md +5 -5
- package/CHANGELOG.md +45 -2
- package/CONTRIBUTING.md +2 -2
- package/COPYRIGHT.md +5 -0
- package/README.md +216 -20
- package/SECURITY.md +1 -1
- package/dist/application/add-note.js +62 -13
- package/dist/application/analyze-vault.js +95 -8
- package/dist/application/build-context.js +56 -1
- package/dist/application/dedupe-notes.js +226 -0
- package/dist/application/frontend/client-css.js +214 -100
- package/dist/application/frontend/client-html.js +60 -45
- package/dist/application/frontend/client-js.js +818 -94
- package/dist/application/get-graph-layout.js +22 -7
- package/dist/application/get-graph-node.js +12 -0
- package/dist/application/get-graph-summary.js +12 -0
- package/dist/application/get-graph.js +3 -3
- package/dist/application/import-legacy-sqlite.js +296 -0
- package/dist/application/index-vault.js +143 -20
- package/dist/application/list-agents.js +3 -3
- package/dist/application/list-links.js +5 -5
- package/dist/application/migrate-vault.js +91 -0
- package/dist/application/search-graph-node-ids.js +12 -0
- package/dist/application/search-knowledge.js +75 -5
- package/dist/application/server/routes.js +27 -1
- package/dist/benchmarks/large-vault.js +1 -1
- package/dist/cli/commands/agent-commands.js +412 -0
- package/dist/cli/commands/config-commands.js +167 -0
- package/dist/cli/commands/read-commands.js +25 -8
- package/dist/cli/commands/write-commands.js +669 -9
- package/dist/cli/main.js +4 -0
- package/dist/cli/runtime.js +5 -2
- package/dist/domain/context.js +53 -11
- package/dist/domain/embeddings.js +2 -1
- package/dist/domain/graph-layout.js +20 -14
- package/dist/domain/markdown.js +36 -4
- package/dist/domain/middle-out.js +18 -0
- package/dist/infrastructure/config.js +94 -8
- package/dist/infrastructure/file-index.js +358 -0
- package/dist/infrastructure/file-system-vault.js +30 -0
- package/dist/infrastructure/index-state.js +50 -0
- package/dist/infrastructure/paths.js +9 -1
- package/dist/infrastructure/private-pack-codec.js +73 -0
- package/dist/infrastructure/search-packs.js +348 -0
- package/dist/infrastructure/session-state.js +172 -0
- package/dist/mcp/main.js +11 -3
- package/dist/mcp/server.js +27 -2
- package/dist/mcp/startup.js +35 -0
- package/dist/mcp/tools.js +633 -19
- package/docs/AGENT_USAGE.md +144 -16
- package/docs/ARCHITECTURE.md +37 -26
- package/docs/QUICKSTART.md +111 -0
- package/package.json +6 -4
- package/dist/infrastructure/sqlite/document-writer.js +0 -51
- package/dist/infrastructure/sqlite/graph-reader.js +0 -120
- package/dist/infrastructure/sqlite/schema.js +0 -111
- package/dist/infrastructure/sqlite/search-reader.js +0 -156
- package/dist/infrastructure/sqlite/types.js +0 -1
- package/dist/infrastructure/sqlite-index.js +0 -25
package/AGENTS.md
CHANGED
|
@@ -6,19 +6,19 @@ This file tells coding agents and AI assistants how to use this repository.
|
|
|
6
6
|
|
|
7
7
|
Brainlink is a local-first knowledge memory for agents.
|
|
8
8
|
|
|
9
|
-
It reads a Markdown vault, extracts `[[wiki links]]` and `#tags`, builds a local
|
|
9
|
+
It reads a Markdown vault, extracts `[[wiki links]]` and `#tags`, builds a local file index at `.brainlink/index.json`, and returns compact context packages that agents can inject into prompts.
|
|
10
10
|
|
|
11
11
|
## Source Of Truth
|
|
12
12
|
|
|
13
13
|
Markdown files are the source of truth.
|
|
14
14
|
|
|
15
|
-
The
|
|
15
|
+
The JSON index at `.brainlink/index.json` is derived. It can be deleted and rebuilt with:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
npm run dev -- index --vault ./vault
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Do not store permanent knowledge only in
|
|
21
|
+
Do not store permanent knowledge only in index artifacts.
|
|
22
22
|
|
|
23
23
|
By default, the installed Brainlink CLI uses `$HOME/.brainlink/vault` as its vault. Passing `--vault` or setting `vault` in `brainlink.config.json` intentionally selects a custom vault such as `./vault`.
|
|
24
24
|
|
|
@@ -107,10 +107,10 @@ npm run dev -- doctor --vault ./vault
|
|
|
107
107
|
|
|
108
108
|
- Keep domain rules in `src/domain`.
|
|
109
109
|
- Keep use cases in `src/application`.
|
|
110
|
-
- Keep filesystem and
|
|
110
|
+
- Keep filesystem and index details in `src/infrastructure`.
|
|
111
111
|
- Keep CLI concerns in `src/cli`.
|
|
112
112
|
- Prefer pure functions for parsing, ranking, formatting, and transformation.
|
|
113
|
-
- Do not make
|
|
113
|
+
- Do not make index artifacts the canonical storage layer.
|
|
114
114
|
- Do not add comments with emojis.
|
|
115
115
|
- Keep JSON output backwards compatible where possible.
|
|
116
116
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.4
|
|
4
|
+
|
|
5
|
+
- Added bootstrap session-state persistence in `$BRAINLINK_HOME/session-state.json` for vault/agent readiness tracking.
|
|
6
|
+
- Added MCP `brainlink_policy` tool and default bootstrap enforcement for read tools.
|
|
7
|
+
- Added `agent install --self-test` diagnostics and bootstrap readiness details in `agent status`.
|
|
8
|
+
- Added `agent upgrade` for legacy installations to reapply latest MCP/plugin defaults with self-test diagnostics.
|
|
9
|
+
- Added `config doctor --fix` safe autofix mode with dry-run default behavior.
|
|
10
|
+
- Added detailed per-file migration reporting through `migrate-vault --report`.
|
|
11
|
+
- Added `quickstart` command to run plug-and-play vault + bootstrap + agent setup in one flow.
|
|
12
|
+
- Added structured MCP `nextActions` in bootstrap/policy/preflight responses for automatic client continuation.
|
|
13
|
+
- Added default MCP read auto-bootstrap behavior controlled by `brainlink_policy.autoBootstrapOnRead`.
|
|
14
|
+
- Added default MCP startup bootstrap behavior controlled by `brainlink_policy.autoBootstrapOnStartup`.
|
|
15
|
+
- Added CLI MCP policy presets through `blink agent policy --preset fully-auto|strict`.
|
|
16
|
+
- Added write-time non-orphan enforcement by auto-linking notes without wiki edges to agent hub notes.
|
|
17
|
+
- Added MCP `brainlink_policy` presets (`fully-auto`, `strict`) for one-call policy switching.
|
|
18
|
+
- Added MCP write connectivity metadata in `brainlink_add_note`/`brainlink_add_file` responses.
|
|
19
|
+
- Added MCP `brainlink_recommendations` tool for plug-and-play workflow guidance.
|
|
20
|
+
- Improved graph/index robustness by splitting oversized paragraphs into bounded chunks and dropping self-referential links.
|
|
21
|
+
- Added `agentProfiles` configuration support so CLI and MCP can resolve per-agent defaults for mode/limit/tokens.
|
|
22
|
+
- Added short-lived hybrid search cache with automatic invalidation on index changes.
|
|
23
|
+
- Added `stats --extended` observability output with storage, quality and latency probes.
|
|
24
|
+
- Added `docs/QUICKSTART.md` and aligned README/agent docs with the latest CLI/MCP flows.
|
|
25
|
+
- Added middle-out context assembly so chunk selection expands around the strongest note chunk.
|
|
26
|
+
- Added compressed-space pack prefiltering (token bloom index) before `.blpk` decryption and scan.
|
|
27
|
+
- Improved graph UI auto-fit and viewport recovery so loaded nodes are re-centered when zoom/pan drifts to empty canvas.
|
|
28
|
+
- Added cross-platform native desktop GUI auto-open for `blink server` (macOS Swift/WebKit, Windows PowerShell WinForms, Linux Python GTK/WebKit2), with app-window/browser fallback.
|
|
29
|
+
- Changed Linux default UI launch to app-window/browser for lighter startup; Linux native GUI is now opt-in via `BRAINLINK_LINUX_NATIVE_GUI=1`.
|
|
30
|
+
- Added native GUI parent-process monitoring so GUI windows close automatically when `blink server` stops.
|
|
31
|
+
- Improved non-mac browser detection fallback to try installed Edge/Chrome/Firefox/Chromium candidates before system default open.
|
|
32
|
+
- Improved graph filter rendering to keep hub anchor nodes visible (`Memory Hub`/`MOC`/high-degree fallback) for coherent relationship context.
|
|
33
|
+
- Fixed graph modal content loading by correcting agent query parameter composition for `/api/graph-node` and `/api/graph-filter` requests.
|
|
34
|
+
- Improved 50k+ graph rendering performance with viewport-aware spatial node culling, cached render visibility, and node-adjacent edge selection to avoid full graph scans every frame.
|
|
35
|
+
- Added incremental vault indexing with file snapshots to reuse unchanged documents/chunks/embeddings, plus adaptive search-pack rebuild thresholds to avoid full re-compression on small edits.
|
|
36
|
+
|
|
37
|
+
## 0.1.0-beta.3
|
|
38
|
+
|
|
39
|
+
- Added CLI configuration commands for effective vault management, including `config where`, `config get`, `config doctor` and `config set-vault`.
|
|
40
|
+
- Added explicit `migrate-vault` command with `--dry-run` preview and conflict-preserving copy behavior.
|
|
41
|
+
- Added one-command agent setup through `agent install` plus `agent status` diagnostics.
|
|
42
|
+
- Added MCP `brainlink_bootstrap` default entrypoint guidance for plug-and-play agent memory flows.
|
|
43
|
+
- Added migration coverage for S3 bucket vault targets.
|
|
44
|
+
- Updated architecture and agent-usage documentation to reflect current CLI/MCP behavior and configuration precedence.
|
|
45
|
+
|
|
3
46
|
## 0.1.0-beta.2
|
|
4
47
|
|
|
5
48
|
- Added MCP installation guidance for direct server configuration and local client stores.
|
|
@@ -17,8 +60,8 @@
|
|
|
17
60
|
## 0.1.0-alpha.0
|
|
18
61
|
|
|
19
62
|
- Added local-first Markdown vault indexing.
|
|
20
|
-
- Added
|
|
21
|
-
- Added
|
|
63
|
+
- Added local full-text indexing, local semantic retrieval, wiki links, backlinks and graph retrieval.
|
|
64
|
+
- Added semantic candidate bucket indexing to narrow vector candidates for larger vaults.
|
|
22
65
|
- Optimized title/link resolution with precomputed agent-scoped title maps.
|
|
23
66
|
- Added CLI, JSON output, HTTP API and graph UI.
|
|
24
67
|
- Added vault diagnostics: stats, broken links, orphans, validation and doctor.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -22,7 +22,7 @@ npm run pack:smoke
|
|
|
22
22
|
## Design Rules
|
|
23
23
|
|
|
24
24
|
- Markdown files are the source of truth.
|
|
25
|
-
-
|
|
25
|
+
- Local index artifacts are derived and must remain rebuildable.
|
|
26
26
|
- Domain parsing, graph analysis and layout should stay pure and testable.
|
|
27
|
-
- CLI, HTTP, filesystem and
|
|
27
|
+
- CLI, HTTP, filesystem and index code are adapters around application use cases.
|
|
28
28
|
- MCP integration should live outside this package by wrapping the CLI with `--json`.
|
package/COPYRIGHT.md
ADDED
package/README.md
CHANGED
|
@@ -52,11 +52,14 @@ LLMs do not have infinite context. Brainlink gives agents an external memory lay
|
|
|
52
52
|
1. Durable knowledge is written as Markdown.
|
|
53
53
|
2. Notes are connected with `[[wiki links]]`.
|
|
54
54
|
3. Concepts are classified with `#tags`.
|
|
55
|
-
4. Brainlink builds a local
|
|
55
|
+
4. Brainlink builds a local JSON index (`.brainlink/index.json`) and private encrypted search packs.
|
|
56
56
|
5. Agents query the index before responding.
|
|
57
57
|
6. Brainlink returns compact, source-backed context.
|
|
58
58
|
|
|
59
|
-
Markdown is the source of truth. `.brainlink/
|
|
59
|
+
Markdown is the source of truth. `.brainlink/index.json` is a rebuildable index artifact.
|
|
60
|
+
After each index run, Brainlink also writes private encrypted search packs at `.brainlink/search-packs/*.blpk` to preserve fast retrieval and portable recovery.
|
|
61
|
+
Pack decryption uses a Brainlink key from `$BRAINLINK_HOME/keys` or from `BRAINLINK_SEARCH_PACK_KEY` when explicitly configured.
|
|
62
|
+
Legacy `.jsonl.gz` packs are upgraded to `.blpk` automatically on first search/context access.
|
|
60
63
|
|
|
61
64
|
## Features
|
|
62
65
|
|
|
@@ -64,8 +67,12 @@ Markdown is the source of truth. `.brainlink/brainlink.db` is only a rebuildable
|
|
|
64
67
|
- Obsidian-compatible `[[wiki links]]` and `#tags`.
|
|
65
68
|
- Weighted graph edges so agents can rank relationship importance and priority.
|
|
66
69
|
- Backlinks, broken-link reports, orphan detection and validation.
|
|
67
|
-
- Full-text, semantic and hybrid retrieval
|
|
68
|
-
-
|
|
70
|
+
- Full-text, semantic and hybrid retrieval on a local file index.
|
|
71
|
+
- Middle-out context assembly around the strongest chunk per document.
|
|
72
|
+
- In-process index and context caching with automatic invalidation on index updates.
|
|
73
|
+
- Compressed-space prefiltering for `.blpk` packs before decryption and scan.
|
|
74
|
+
- Incremental indexing that reprocesses only changed markdown files and reuses existing chunks/embeddings for unchanged notes.
|
|
75
|
+
- Adaptive compressed-pack rebuild policy to keep indexing fast during small edit batches.
|
|
69
76
|
- Agent namespaces under `agents/<agent-id>/`.
|
|
70
77
|
- S3-compatible bucket vaults through `s3://bucket/prefix` URIs.
|
|
71
78
|
- CLI with machine-readable `--json` output.
|
|
@@ -73,6 +80,7 @@ Markdown is the source of truth. `.brainlink/brainlink.db` is only a rebuildable
|
|
|
73
80
|
- Built-in MCP stdio server for agent tool integration.
|
|
74
81
|
- Local HTTP API.
|
|
75
82
|
- Realtime graph UI with agent selector and colored knowledge groups.
|
|
83
|
+
- Graph renderer optimized for large datasets with viewport-driven node culling and edge lookup by visible nodes.
|
|
76
84
|
|
|
77
85
|
## Install
|
|
78
86
|
|
|
@@ -106,6 +114,8 @@ npx @andespindola/brainlink@latest --help
|
|
|
106
114
|
|
|
107
115
|
This section is written for agents. If you are an AI agent operating in a user workspace, use this workflow to install and use Brainlink without requiring the user to run commands manually.
|
|
108
116
|
|
|
117
|
+
For a condensed setup path, see [docs/QUICKSTART.md](./docs/QUICKSTART.md).
|
|
118
|
+
|
|
109
119
|
### 1. Check Whether Brainlink Is Installed
|
|
110
120
|
|
|
111
121
|
```bash
|
|
@@ -280,7 +290,7 @@ export BRAINLINK_S3_FORCE_PATH_STYLE=1
|
|
|
280
290
|
|
|
281
291
|
Bucket vaults mirror Markdown into a local cache under
|
|
282
292
|
`$BRAINLINK_HOME/bucket-cache`. The bucket remains canonical; the local
|
|
283
|
-
`.brainlink/
|
|
293
|
+
`.brainlink/index.json` stays a disposable index artifact. Run `index` after remote
|
|
284
294
|
bucket changes before relying on `search`, `context`, graph or validation
|
|
285
295
|
commands. Watch mode is only supported for local filesystem vaults.
|
|
286
296
|
|
|
@@ -296,7 +306,7 @@ vault/
|
|
|
296
306
|
research-agent/
|
|
297
307
|
source-review-policy.md
|
|
298
308
|
.brainlink/
|
|
299
|
-
|
|
309
|
+
index.json
|
|
300
310
|
```
|
|
301
311
|
|
|
302
312
|
Permanent data:
|
|
@@ -306,7 +316,7 @@ Permanent data:
|
|
|
306
316
|
|
|
307
317
|
Rebuildable data:
|
|
308
318
|
|
|
309
|
-
- `.brainlink/
|
|
319
|
+
- `.brainlink/index.json`
|
|
310
320
|
- full-text records
|
|
311
321
|
- local embedding vectors
|
|
312
322
|
- local embedding buckets
|
|
@@ -380,6 +390,35 @@ Example MCP client configuration:
|
|
|
380
390
|
}
|
|
381
391
|
```
|
|
382
392
|
|
|
393
|
+
### One-Command Agent Setup
|
|
394
|
+
|
|
395
|
+
If your agent runtime is Codex-compatible, run:
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
blink agent install --self-test
|
|
399
|
+
blink agent upgrade
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
This configures `~/.codex/config.toml` with Brainlink MCP (`brainlink-mcp`) so Brainlink is available by default in agent sessions.
|
|
403
|
+
|
|
404
|
+
If you are inside this repository and want plugin gallery setup too:
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
blink agent install --plugin-path ./plugins/brainlink
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
To verify:
|
|
411
|
+
|
|
412
|
+
```bash
|
|
413
|
+
blink agent status
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
For fully automated first run (vault index + health + bootstrap readiness + agent integration):
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
blink quickstart --query "what should I know before this task?" --json
|
|
420
|
+
```
|
|
421
|
+
|
|
383
422
|
For a locked-down setup, allowlist the vaults that MCP clients may access:
|
|
384
423
|
|
|
385
424
|
```json
|
|
@@ -475,8 +514,13 @@ Restart the client after changing marketplace or MCP configuration so it reloads
|
|
|
475
514
|
|
|
476
515
|
Available tools:
|
|
477
516
|
|
|
517
|
+
- `brainlink_bootstrap`: plug-and-play entrypoint that runs index + health checks and can return context in one call.
|
|
518
|
+
- `brainlink_policy`: read or update bootstrap/context-first policy, including presets (`preset: "fully-auto" | "strict"`).
|
|
519
|
+
- `brainlink_recommendations`: return an automatic action plan so agents can run Brainlink in the recommended order.
|
|
478
520
|
- `brainlink_context`: read indexed context for a task or question.
|
|
479
521
|
- `brainlink_search`: search indexed notes.
|
|
522
|
+
- `brainlink_dedupe`: detect duplicate candidates using exact hash + semantic similarity scores.
|
|
523
|
+
- `brainlink_resolve_duplicate`: resolve duplicate pairs (`merge`, `link`, `ignore`) with connectivity-safe fallback edges.
|
|
480
524
|
- `brainlink_add_note`: write durable Markdown memory and reindex.
|
|
481
525
|
- `brainlink_add_file`: ingest a local file as a note and reindex.
|
|
482
526
|
- `brainlink_index`: rebuild the vault index.
|
|
@@ -487,7 +531,15 @@ Available tools:
|
|
|
487
531
|
- `brainlink_broken_links`: list unresolved wiki links.
|
|
488
532
|
- `brainlink_orphans`: list disconnected notes.
|
|
489
533
|
|
|
490
|
-
|
|
534
|
+
For the most automatic workflow, start MCP sessions with `brainlink_bootstrap` (optionally with `query`) and then continue with `brainlink_context`/`brainlink_add_note`.
|
|
535
|
+
By default, Brainlink enforces context-first for MCP reads (`enforceContextFirst=true`): non-context read tools return preflight until `brainlink_context` is called for the vault/agent session.
|
|
536
|
+
By default, MCP startup already runs bootstrap on the configured default vault/agent (`autoBootstrapOnStartup=true`), so sessions begin warm.
|
|
537
|
+
By default, Brainlink enforces bootstrap and auto-runs it for read tools when session state is missing or stale (`autoBootstrapOnRead=true`).
|
|
538
|
+
If you disable `autoBootstrapOnRead` through `brainlink_policy`, read tools return a preflight instruction with suggested `brainlink_bootstrap` arguments.
|
|
539
|
+
`brainlink_bootstrap`, `brainlink_policy` and preflight responses include structured `nextActions` so MCP clients can continue automatically without custom parsing.
|
|
540
|
+
For one-call planning, use `brainlink_recommendations` to get the recommended tool sequence for the current vault/agent/query.
|
|
541
|
+
|
|
542
|
+
The same linking rule applies through MCP: `brainlink_context` is read-only, and real graph links require Markdown notes with explicit `[[wiki links]]`. `brainlink_add_note` and `brainlink_add_file` reindex by default and include index + `writeConnectivity` metadata. Brainlink guarantees at least one edge per new note by auto-linking when needed.
|
|
491
543
|
|
|
492
544
|
Agents can raise the importance of a relationship by putting priority markers on the same line as a wiki link:
|
|
493
545
|
|
|
@@ -507,16 +559,32 @@ blink server --host 127.0.0.1 --port 4321 --watch
|
|
|
507
559
|
```
|
|
508
560
|
|
|
509
561
|
By default, the server uses `$HOME/.brainlink/vault`. Pass `--vault ./vault` only when you want to inspect a custom vault.
|
|
562
|
+
By default, `blink server` tries to open the graph in a native desktop GUI window:
|
|
563
|
+
- macOS: Swift + WebKit
|
|
564
|
+
- Windows: PowerShell WinForms WebBrowser
|
|
565
|
+
- Linux: optional Python GTK + WebKit2 (requires `python3` + `gi` + `WebKit2`)
|
|
566
|
+
|
|
567
|
+
On Linux, native GUI is disabled by default for better startup performance. Enable it with `BRAINLINK_LINUX_NATIVE_GUI=1`.
|
|
568
|
+
If native GUI launch is unavailable on your system, it falls back to dedicated app-window mode and then to the default browser.
|
|
569
|
+
Use `--no-open` to keep it headless.
|
|
570
|
+
When native GUI is used, the GUI window automatically closes when the `blink server` process stops.
|
|
510
571
|
|
|
511
572
|
The graph UI shows:
|
|
512
573
|
|
|
513
574
|
- notes as nodes
|
|
514
575
|
- `[[wiki links]]` as weighted edges
|
|
515
|
-
-
|
|
516
|
-
- full Markdown content for the selected note
|
|
576
|
+
- details opened on node click (tags, outgoing links, backlinks, full Markdown content)
|
|
517
577
|
- neutral graph nodes with segment/group metadata
|
|
518
|
-
- agent selector for isolated views
|
|
578
|
+
- agent selector (id-only labels) for isolated views
|
|
579
|
+
- graph filter matches title, path, tags and note content
|
|
580
|
+
- graph filter keeps hub context nodes visible (`Memory Hub`/`MOC`/high-degree fallback) to preserve relationship readability
|
|
519
581
|
- realtime refresh while `--watch` is enabled
|
|
582
|
+
- graph controls for zoom in, zoom out, fit visible nodes and reset-to-fit-all
|
|
583
|
+
- wheel zoom (including `cmd+scroll` and `ctrl+scroll`) anchored to cursor position for faster navigation in large graphs
|
|
584
|
+
- keyboard shortcuts: `+` zoom in, `-` zoom out, `0` reset fit
|
|
585
|
+
- double-click on canvas zooms in at cursor position
|
|
586
|
+
- floating graph totals (notes, links, tags) below the Brainlink title
|
|
587
|
+
- large-graph rendering safeguards (edge draw caps, lower redraw rate, zoom-aware interaction)
|
|
520
588
|
|
|
521
589
|
The server indexes before starting by default. Use `--no-index` to skip that step:
|
|
522
590
|
|
|
@@ -535,6 +603,7 @@ Routes:
|
|
|
535
603
|
- `GET /api/agents`
|
|
536
604
|
- `GET /api/graph`
|
|
537
605
|
- `GET /api/graph-layout`
|
|
606
|
+
- `GET /api/graph-node?id=<node-id>`
|
|
538
607
|
- `GET /api/search?q=<query>&limit=10&mode=hybrid`
|
|
539
608
|
- `GET /api/context?q=<query>&limit=12&tokens=2000&mode=hybrid`
|
|
540
609
|
- `GET /api/links`
|
|
@@ -556,14 +625,89 @@ Read routes accept `agent=<agent-id>`:
|
|
|
556
625
|
|
|
557
626
|
Every command works with either `brainlink` or `blink`.
|
|
558
627
|
|
|
628
|
+
### `agent`
|
|
629
|
+
|
|
630
|
+
```bash
|
|
631
|
+
blink agent install
|
|
632
|
+
blink agent install --self-test
|
|
633
|
+
blink agent upgrade
|
|
634
|
+
blink agent policy --preset fully-auto
|
|
635
|
+
blink agent policy --preset strict
|
|
636
|
+
blink agent policy --enforce-context-first false
|
|
637
|
+
blink agent install --plugin-path ./plugins/brainlink
|
|
638
|
+
blink agent install --mcp-only --allowed-vaults "/absolute/vault,/absolute/team-vault"
|
|
639
|
+
blink agent status
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
Installs/checks agent integration. `install` writes Brainlink MCP config into `~/.codex/config.toml`.
|
|
643
|
+
When plugin files are available, it also links Brainlink plugin files into `~/plugins/brainlink` and updates `~/.agents/plugins/marketplace.json`.
|
|
644
|
+
With `--self-test`, install also validates MCP block presence, command wiring and local plugin registration signals.
|
|
645
|
+
Use `agent upgrade` on legacy installations to reapply current defaults and run the same self-test diagnostics.
|
|
646
|
+
Use `agent policy --preset fully-auto` for plug-and-play defaults, or `agent policy --preset strict` to require explicit bootstrap calls.
|
|
647
|
+
Both presets keep `enforceContextFirst=true` so Brainlink stays the primary context source for MCP sessions.
|
|
648
|
+
|
|
649
|
+
### `quickstart`
|
|
650
|
+
|
|
651
|
+
```bash
|
|
652
|
+
blink quickstart --json
|
|
653
|
+
blink quickstart --vault ./team-vault --agent coding-agent --query "architecture decisions" --json
|
|
654
|
+
blink quickstart --vault ./team-vault --mcp-only --json
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
Runs index + doctor + stats + validation, refreshes bootstrap session readiness, optionally returns context for a query, and (by default) upgrades local agent integration for plug-and-play MCP usage.
|
|
658
|
+
When `--mode`, `--limit` or `--tokens` are omitted, quickstart uses agent profile defaults when available.
|
|
659
|
+
|
|
660
|
+
### `config`
|
|
661
|
+
|
|
662
|
+
```bash
|
|
663
|
+
blink config where
|
|
664
|
+
blink config get vault
|
|
665
|
+
blink config doctor
|
|
666
|
+
blink config doctor --fix
|
|
667
|
+
blink config set-vault /absolute/path/to/existing-vault
|
|
668
|
+
blink config set-vault /absolute/path/to/existing-vault --migrate-from ~/.brainlink/vault
|
|
669
|
+
blink config set-vault "s3://my-memory-bucket/brainlink" --global
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
`config set-vault` writes configuration through CLI (no manual file edits required).
|
|
673
|
+
By default it writes local config (`./brainlink.config.json`), appends the vault to `allowedVaults`, and migrates Markdown memory from the current configured vault when the target is empty.
|
|
674
|
+
Use `--global` to write to `$BRAINLINK_HOME/brainlink.config.json`, `--no-migrate` to skip migration, and `--no-index` to skip post-migration indexing.
|
|
675
|
+
`config doctor` is dry-run by default; use `--fix` to apply safe config normalization and allowlist fixes.
|
|
676
|
+
|
|
677
|
+
### `migrate-vault`
|
|
678
|
+
|
|
679
|
+
```bash
|
|
680
|
+
blink migrate-vault --from ~/.brainlink/vault --to ./team-vault --dry-run
|
|
681
|
+
blink migrate-vault --from ~/.brainlink/vault --to ./team-vault
|
|
682
|
+
blink migrate-vault --from ~/.brainlink/vault --to "s3://my-memory-bucket/brainlink"
|
|
683
|
+
blink migrate-vault --from ~/.brainlink/vault --to ./team-vault --report ./migration-report.json
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
Runs explicit markdown migration between vaults while preserving conflicts as `.conflict-<timestamp>` files.
|
|
687
|
+
Use `--dry-run` to preview `copied`, `conflicted` and `unchanged` counts before writing.
|
|
688
|
+
|
|
689
|
+
### `db-import`
|
|
690
|
+
|
|
691
|
+
```bash
|
|
692
|
+
blink db-import --vault ./team-vault
|
|
693
|
+
blink db-import --vault ./team-vault --db ./legacy/brainlink.db
|
|
694
|
+
blink db-import --vault ./team-vault --db ./legacy/brainlink.db --table legacy_notes --dry-run
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
Imports durable memory from a legacy SQLite database into Markdown notes (`agents/<agent-id>/*.md`) and reindexes by default.
|
|
698
|
+
When `--db` is omitted, Brainlink auto-detects common legacy paths such as `<vault>/.brainlink/brainlink.db`.
|
|
699
|
+
Use `--agent <id>` to force all imported rows into one namespace, `--limit` for incremental imports, `--dry-run` to preview without writing files, and `--no-index` to defer reindexing.
|
|
700
|
+
|
|
559
701
|
### `init`
|
|
560
702
|
|
|
561
703
|
```bash
|
|
562
704
|
blink init
|
|
563
705
|
blink init ./vault
|
|
706
|
+
blink init ./team-vault --migrate-from ~/.brainlink/vault
|
|
564
707
|
```
|
|
565
708
|
|
|
566
709
|
Initializes vault metadata. Without an argument, Brainlink initializes the default vault at `$HOME/.brainlink/vault`.
|
|
710
|
+
When initializing an empty custom vault, existing Markdown content from the default vault is copied into it and reindexed so context is not left behind. Use `--no-migrate-existing` to start with an empty custom vault, or `--migrate-from <vault>` to copy from a specific source. Existing target files are never overwritten; conflicting source files are preserved with a `.conflict-<timestamp>` suffix.
|
|
567
711
|
|
|
568
712
|
### `add`
|
|
569
713
|
|
|
@@ -577,6 +721,29 @@ blink add "Note Title" --vault ./vault --content-file ./notes.md --no-auto-index
|
|
|
577
721
|
`--content` and `--content-file` are mutually exclusive. Add `--no-auto-index` when you want to defer reindexing.
|
|
578
722
|
|
|
579
723
|
Creates a Markdown note under `agents/<agent-id>/`. Common secret patterns are blocked by default; use `--allow-sensitive` only for an intentionally protected vault.
|
|
724
|
+
To avoid disconnected memory, Brainlink auto-adds a fallback wiki edge when a note is written without links, creating agent hub notes when needed.
|
|
725
|
+
`add` also returns `possibleDuplicates` (exact hash + semantic candidates) so agents can resolve duplicate memory right after writes.
|
|
726
|
+
|
|
727
|
+
### `dedupe`
|
|
728
|
+
|
|
729
|
+
```bash
|
|
730
|
+
blink dedupe --vault ./vault --json
|
|
731
|
+
blink dedupe --vault ./vault --agent coding-agent --limit 20 --min-score 0.92 --json
|
|
732
|
+
blink dedupe --vault ./vault --no-semantic --json
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
Detects `possibleDuplicate` pairs using exact content hashes and optional semantic similarity.
|
|
736
|
+
|
|
737
|
+
### `dedupe-resolve`
|
|
738
|
+
|
|
739
|
+
```bash
|
|
740
|
+
blink dedupe-resolve --vault ./vault --left agents/shared/a.md --right agents/shared/b.md --action merge --json
|
|
741
|
+
blink dedupe-resolve --vault ./vault --left agents/shared/a.md --right agents/shared/b.md --action link --json
|
|
742
|
+
blink dedupe-resolve --vault ./vault --left agents/shared/a.md --right agents/shared/b.md --action ignore --json
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
Resolves a duplicate pair with `merge`, `link` or `ignore`.
|
|
746
|
+
When action is not `merge`, Brainlink still creates a low-priority related edge (`#related-to`) so notes remain connected.
|
|
580
747
|
|
|
581
748
|
### `index`
|
|
582
749
|
|
|
@@ -605,13 +772,17 @@ blink search "query" --vault ./vault --mode semantic --json
|
|
|
605
772
|
```
|
|
606
773
|
|
|
607
774
|
Runs retrieval over indexed chunks.
|
|
775
|
+
If `--mode` or `--limit` is omitted, Brainlink resolves values from the current agent profile before falling back to global defaults.
|
|
608
776
|
|
|
609
777
|
Modes:
|
|
610
778
|
|
|
611
|
-
- `hybrid`: default; combines
|
|
612
|
-
- `fts`: exact lexical retrieval
|
|
779
|
+
- `hybrid`: default; combines lexical matching with local embedding similarity.
|
|
780
|
+
- `fts`: exact lexical retrieval from the file index.
|
|
613
781
|
- `semantic`: local deterministic embedding similarity only.
|
|
614
782
|
|
|
783
|
+
Hybrid results are cached in-memory for a short TTL and invalidated automatically when the local index file changes.
|
|
784
|
+
Context selection uses a middle-out strategy: it starts from the strongest chunk in a note and expands to neighboring chunks while respecting token budget.
|
|
785
|
+
|
|
615
786
|
### `context`
|
|
616
787
|
|
|
617
788
|
```bash
|
|
@@ -621,6 +792,7 @@ blink context "question" --vault ./vault --agent coding-agent --mode hybrid --js
|
|
|
621
792
|
```
|
|
622
793
|
|
|
623
794
|
Builds a compact context package for an agent.
|
|
795
|
+
Repeated calls with the same vault, agent, query, mode and token/limit settings are served from a short in-memory cache while the index is unchanged.
|
|
624
796
|
|
|
625
797
|
### `links`
|
|
626
798
|
|
|
@@ -654,9 +826,11 @@ Prints indexed graph data. Edges include `weight` and `priority` so agents can c
|
|
|
654
826
|
```bash
|
|
655
827
|
blink stats --vault ./vault
|
|
656
828
|
blink stats --vault ./vault --agent coding-agent --json
|
|
829
|
+
blink stats --vault ./vault --agent coding-agent --extended --json
|
|
657
830
|
```
|
|
658
831
|
|
|
659
832
|
Prints vault metrics.
|
|
833
|
+
Use `--extended` to include storage footprint, link quality ratios and observability probes (`index`, `search`, `context` latencies).
|
|
660
834
|
|
|
661
835
|
### `broken-links`
|
|
662
836
|
|
|
@@ -688,7 +862,7 @@ Validates graph health. The command exits non-zero when required checks fail.
|
|
|
688
862
|
blink doctor --vault ./vault
|
|
689
863
|
```
|
|
690
864
|
|
|
691
|
-
Runs environment and vault checks.
|
|
865
|
+
Runs environment and vault checks. When vault has zero markdown and zero indexed documents, `doctor` prints recommended next steps (add note, inspect config source, migrate memory).
|
|
692
866
|
|
|
693
867
|
### `watch`
|
|
694
868
|
|
|
@@ -703,9 +877,14 @@ Watches Markdown files and rebuilds the index when notes change.
|
|
|
703
877
|
```bash
|
|
704
878
|
blink server --watch
|
|
705
879
|
blink server --vault ./vault --watch
|
|
880
|
+
blink server --vault ./vault --watch --no-open
|
|
706
881
|
```
|
|
707
882
|
|
|
708
883
|
Starts the local read-only graph UI and HTTP API.
|
|
884
|
+
By default, it tries to open a native desktop GUI window for the graph URL.
|
|
885
|
+
On Linux, native GUI is disabled by default; enable it with `BRAINLINK_LINUX_NATIVE_GUI=1`.
|
|
886
|
+
If native GUI launch is unavailable, it falls back to dedicated app-window mode and then browser open.
|
|
887
|
+
Use `--no-open` to skip that behavior.
|
|
709
888
|
|
|
710
889
|
The HTTP server only binds to loopback hosts such as `127.0.0.1`, `localhost` or `::1`.
|
|
711
890
|
|
|
@@ -725,7 +904,13 @@ npm run --silent dev -- context "question" --vault ./vault --json
|
|
|
725
904
|
|
|
726
905
|
## Configuration
|
|
727
906
|
|
|
728
|
-
Brainlink
|
|
907
|
+
Brainlink merges configuration in this order:
|
|
908
|
+
|
|
909
|
+
1. Global: `$BRAINLINK_HOME/brainlink.config.json` (or `$HOME/.brainlink/brainlink.config.json` by default)
|
|
910
|
+
2. Local: `brainlink.config.json` in the current working directory
|
|
911
|
+
3. Local legacy compatibility: `.brainlink.json` in the current working directory
|
|
912
|
+
|
|
913
|
+
If no `vault` is configured and no `--vault` flag is passed, Brainlink uses `$HOME/.brainlink/vault`.
|
|
729
914
|
|
|
730
915
|
```json
|
|
731
916
|
{
|
|
@@ -739,11 +924,22 @@ Brainlink reads `brainlink.config.json` or `.brainlink.json` from the current wo
|
|
|
739
924
|
"defaultContextTokens": 2000,
|
|
740
925
|
"embeddingProvider": "local",
|
|
741
926
|
"defaultSearchMode": "hybrid",
|
|
742
|
-
"chunkSize": 1200
|
|
927
|
+
"chunkSize": 1200,
|
|
928
|
+
"agentProfiles": {
|
|
929
|
+
"coding-agent": {
|
|
930
|
+
"defaultSearchMode": "semantic",
|
|
931
|
+
"defaultSearchLimit": 8,
|
|
932
|
+
"defaultContextTokens": 2400
|
|
933
|
+
},
|
|
934
|
+
"*": {
|
|
935
|
+
"defaultSearchMode": "hybrid"
|
|
936
|
+
}
|
|
937
|
+
}
|
|
743
938
|
}
|
|
744
939
|
```
|
|
745
940
|
|
|
746
941
|
`defaultAgent` is optional. When set, CLI and MCP calls that omit `--agent`/`agent` use this value automatically. If not set, behavior remains as before.
|
|
942
|
+
`agentProfiles` is optional. When present, CLI and MCP resolve `mode`, `limit` and `tokens` per agent automatically, then fallback to global defaults.
|
|
747
943
|
|
|
748
944
|
`autoIndexOnWrite` is optional and defaults to `true`. Set it to `false` to defer indexing after writes.
|
|
749
945
|
|
|
@@ -840,7 +1036,7 @@ src/
|
|
|
840
1036
|
application/ use cases
|
|
841
1037
|
cli/ command-line adapter
|
|
842
1038
|
domain/ pure knowledge rules
|
|
843
|
-
infrastructure/ filesystem and
|
|
1039
|
+
infrastructure/ filesystem and index adapters
|
|
844
1040
|
```
|
|
845
1041
|
|
|
846
1042
|
Detailed notes:
|
|
@@ -852,7 +1048,6 @@ Detailed notes:
|
|
|
852
1048
|
## Current Limits
|
|
853
1049
|
|
|
854
1050
|
- Semantic search uses deterministic local embeddings, not a remote model provider.
|
|
855
|
-
- Semantic search uses SQLite embedding buckets to narrow candidates before cosine scoring.
|
|
856
1051
|
- `embeddingProvider` currently supports `local` and `none`.
|
|
857
1052
|
- Link resolution is title-based inside each agent namespace, with `shared` as fallback.
|
|
858
1053
|
- HTTP API is local and unauthenticated.
|
|
@@ -863,7 +1058,7 @@ Detailed notes:
|
|
|
863
1058
|
The `0.1.0-beta` line is intended to stabilize the local-first memory loop:
|
|
864
1059
|
|
|
865
1060
|
- Markdown as durable memory.
|
|
866
|
-
-
|
|
1061
|
+
- Rebuildable file index plus local embeddings and encrypted pack exports.
|
|
867
1062
|
- CLI as the primary agent interface.
|
|
868
1063
|
- HTTP graph API and frontend as inspection tools.
|
|
869
1064
|
- Agent namespaces to avoid context mixing.
|
|
@@ -879,7 +1074,7 @@ Brainlink is local-first by default.
|
|
|
879
1074
|
- Brainlink HTTP is localhost-only and refuses non-loopback hosts.
|
|
880
1075
|
- Brainlink blocks common secret patterns by default when adding notes. Use `--allow-sensitive` only for intentional, protected vaults.
|
|
881
1076
|
- Do not store secrets, credentials, API keys or regulated personal data unless the vault is protected by your own storage controls.
|
|
882
|
-
- Treat `.brainlink/
|
|
1077
|
+
- Treat `.brainlink/index.json` and `.brainlink/search-packs/` as disposable derived artifacts.
|
|
883
1078
|
|
|
884
1079
|
See [SECURITY.md](SECURITY.md).
|
|
885
1080
|
|
|
@@ -890,6 +1085,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
890
1085
|
## License
|
|
891
1086
|
|
|
892
1087
|
MIT. See [LICENSE](LICENSE).
|
|
1088
|
+
Copyright (c) 2026 Substructa. See [COPYRIGHT.md](COPYRIGHT.md).
|
|
893
1089
|
|
|
894
1090
|
### Memory Optimization Loop (1-7)
|
|
895
1091
|
|
package/SECURITY.md
CHANGED
|
@@ -7,7 +7,7 @@ Brainlink is local-first.
|
|
|
7
7
|
- The HTTP server binds to `127.0.0.1` by default.
|
|
8
8
|
- The HTTP server always refuses non-loopback hosts.
|
|
9
9
|
- The HTTP server is read-only and does not expose note creation, indexing or update routes.
|
|
10
|
-
-
|
|
10
|
+
- Local index artifacts (`.brainlink/index.json` and `.brainlink/search-packs/`) are derived data.
|
|
11
11
|
- Markdown files are user-owned source data.
|
|
12
12
|
- Brainlink-created Markdown files use `0600` permissions.
|
|
13
13
|
- Brainlink-created directories and `.brainlink` use `0700` permissions.
|
|
@@ -1,30 +1,79 @@
|
|
|
1
|
+
import { access } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
1
3
|
import { writeMarkdownFile } from '../infrastructure/file-system-vault.js';
|
|
2
4
|
import { sanitizeAgentId, sharedAgentId } from '../domain/agents.js';
|
|
5
|
+
import { extractWikiLinks } from '../domain/markdown.js';
|
|
3
6
|
import { validateNoteInput } from '../domain/note-safety.js';
|
|
7
|
+
import { ensureVault } from '../infrastructure/file-system-vault.js';
|
|
4
8
|
const slugify = (title) => title
|
|
5
9
|
.normalize('NFKD')
|
|
6
10
|
.replace(/[\u0300-\u036f]/g, '')
|
|
7
11
|
.toLowerCase()
|
|
8
12
|
.replace(/[^a-z0-9]+/g, '-')
|
|
9
13
|
.replace(/^-+|-+$/g, '');
|
|
10
|
-
|
|
14
|
+
const systemHubTitle = 'Memory Hub';
|
|
15
|
+
const systemRootTitle = 'Knowledge Root';
|
|
16
|
+
const normalizeTitle = (title) => title.trim().replace(/\.md$/i, '').toLowerCase();
|
|
17
|
+
const noteFilename = (agentId, title) => `agents/${agentId}/${slugify(title) || 'untitled'}.md`;
|
|
18
|
+
const buildNote = (title, content, agentId) => [
|
|
19
|
+
`---`,
|
|
20
|
+
`title: "${title.replaceAll('"', '\\"')}"`,
|
|
21
|
+
`agent: "${agentId}"`,
|
|
22
|
+
`---`,
|
|
23
|
+
'',
|
|
24
|
+
`# ${title}`,
|
|
25
|
+
'',
|
|
26
|
+
content.trim(),
|
|
27
|
+
''
|
|
28
|
+
].join('\n');
|
|
29
|
+
const ensureSystemNote = async (vaultPath, absoluteVaultPath, agentId, title, content) => {
|
|
30
|
+
const filename = noteFilename(agentId, title);
|
|
31
|
+
const absolutePath = join(absoluteVaultPath, filename);
|
|
32
|
+
try {
|
|
33
|
+
await access(absolutePath);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
catch { }
|
|
37
|
+
await writeMarkdownFile(vaultPath, filename, buildNote(title, content, agentId));
|
|
38
|
+
};
|
|
39
|
+
const ensureNonOrphanContent = async (vaultPath, absoluteVaultPath, title, content, agentId) => {
|
|
40
|
+
const links = extractWikiLinks(content).filter((link) => normalizeTitle(link) !== normalizeTitle(title));
|
|
41
|
+
if (links.length > 0) {
|
|
42
|
+
return {
|
|
43
|
+
content: content.trim(),
|
|
44
|
+
autoLinked: false,
|
|
45
|
+
linkTarget: null
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const fallbackTitle = normalizeTitle(title) === normalizeTitle(systemHubTitle) ? systemRootTitle : systemHubTitle;
|
|
49
|
+
if (fallbackTitle === systemRootTitle) {
|
|
50
|
+
await ensureSystemNote(vaultPath, absoluteVaultPath, agentId, systemRootTitle, `Entry point for agent memory. [[${systemHubTitle}]] #memory #root`);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
await ensureSystemNote(vaultPath, absoluteVaultPath, agentId, systemHubTitle, 'Central memory index for this agent namespace. #memory #hub');
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
content: `${content.trim()}\n\nRelated: [[${fallbackTitle}]]`,
|
|
57
|
+
autoLinked: true,
|
|
58
|
+
linkTarget: fallbackTitle
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export const addNoteWithMetadata = async (vaultPath, title, content, agentId = sharedAgentId, options = {}) => {
|
|
11
62
|
validateNoteInput({
|
|
12
63
|
title,
|
|
13
64
|
content,
|
|
14
65
|
allowSensitive: options.allowSensitive
|
|
15
66
|
});
|
|
16
67
|
const sanitizedAgentId = sanitizeAgentId(agentId);
|
|
68
|
+
const absoluteVaultPath = await ensureVault(vaultPath);
|
|
17
69
|
const filename = `agents/${sanitizedAgentId}/${slugify(title) || 'untitled'}.md`;
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
content.trim(),
|
|
27
|
-
''
|
|
28
|
-
].join('\n');
|
|
29
|
-
return writeMarkdownFile(vaultPath, filename, note);
|
|
70
|
+
const linkedContent = await ensureNonOrphanContent(vaultPath, absoluteVaultPath, title, content, sanitizedAgentId);
|
|
71
|
+
const note = buildNote(title, linkedContent.content, sanitizedAgentId);
|
|
72
|
+
const path = await writeMarkdownFile(vaultPath, filename, note);
|
|
73
|
+
return {
|
|
74
|
+
path,
|
|
75
|
+
autoLinked: linkedContent.autoLinked,
|
|
76
|
+
linkTarget: linkedContent.linkTarget
|
|
77
|
+
};
|
|
30
78
|
};
|
|
79
|
+
export const addNote = async (vaultPath, title, content, agentId = sharedAgentId, options = {}) => (await addNoteWithMetadata(vaultPath, title, content, agentId, options)).path;
|