@andespindola/brainlink 0.1.0-beta.1 → 0.1.0-beta.100
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 +8 -5
- package/CHANGELOG.md +72 -2
- package/CONTRIBUTING.md +2 -2
- package/COPYRIGHT.md +5 -0
- package/README.md +374 -24
- 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 +230 -99
- package/dist/application/frontend/client-html.js +62 -44
- package/dist/application/frontend/client-js.js +3331 -163
- package/dist/application/frontend/client-worker-js.js +66 -0
- 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 +252 -19
- 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/offline-pack-backup.js +44 -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 +102 -1
- package/dist/application/start-server.js +75 -4
- package/dist/application/watch-vault.js +23 -2
- package/dist/benchmarks/large-vault.js +1 -1
- package/dist/cli/commands/agent-commands.js +419 -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 +989 -10
- 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 +67 -16
- package/dist/domain/markdown.js +36 -4
- package/dist/domain/middle-out.js +18 -0
- package/dist/infrastructure/config.js +132 -8
- package/dist/infrastructure/file-index.js +358 -0
- package/dist/infrastructure/file-system-vault.js +30 -0
- package/dist/infrastructure/index-state.js +56 -0
- package/dist/infrastructure/paths.js +9 -1
- package/dist/infrastructure/private-pack-codec.js +134 -0
- package/dist/infrastructure/search-packs.js +452 -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 +180 -16
- package/docs/ARCHITECTURE.md +37 -26
- package/docs/QUICKSTART.md +111 -0
- package/docs/RELEASE.md +3 -3
- 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
|
|
|
@@ -83,6 +83,9 @@ Use watch mode while editing notes:
|
|
|
83
83
|
```bash
|
|
84
84
|
npm run dev -- server --vault ./vault --watch
|
|
85
85
|
npm run dev -- watch --vault ./vault
|
|
86
|
+
npm run dev -- bench --vault ./vault
|
|
87
|
+
npm run dev -- bench --vault ./vault --watch
|
|
88
|
+
npm run dev -- pack-backup --vault ./vault
|
|
86
89
|
```
|
|
87
90
|
|
|
88
91
|
Start MCP over stdio:
|
|
@@ -107,10 +110,10 @@ npm run dev -- doctor --vault ./vault
|
|
|
107
110
|
|
|
108
111
|
- Keep domain rules in `src/domain`.
|
|
109
112
|
- Keep use cases in `src/application`.
|
|
110
|
-
- Keep filesystem and
|
|
113
|
+
- Keep filesystem and index details in `src/infrastructure`.
|
|
111
114
|
- Keep CLI concerns in `src/cli`.
|
|
112
115
|
- Prefer pure functions for parsing, ranking, formatting, and transformation.
|
|
113
|
-
- Do not make
|
|
116
|
+
- Do not make index artifacts the canonical storage layer.
|
|
114
117
|
- Do not add comments with emojis.
|
|
115
118
|
- Keep JSON output backwards compatible where possible.
|
|
116
119
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,80 @@
|
|
|
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
|
+
- Reduced large-graph HTTP payload size with compact `/api/graph-layout` encoding for high-node vaults and capped transmitted edges to improve UI load responsiveness.
|
|
37
|
+
- Added aggressive graph LOD clustering when zoomed out, dynamic per-zoom edge render budgets, and a dedicated frontend worker for off-main-thread graph filter matching.
|
|
38
|
+
- Improved Linux browser fallback launch stability by auto-applying Chromium compatibility flags (`--ozone-platform=x11`, `--disable-gpu`, `--disable-features=Vulkan,VaapiVideoDecoder`, `--disable-background-networking`) for app-window/browser modes.
|
|
39
|
+
- Improved massive-graph UI responsiveness with stricter render budgets, adaptive heavy-graph frame throttling, reduced interaction hit-test frequency, and URL-first agent selection on initial graph load.
|
|
40
|
+
- Improved 50k+ graph LOD behavior so zoomed-out views render lightweight cluster overviews and progressively reveal nodes/edges only as zoom increases.
|
|
41
|
+
- Added `blink bench` with realtime index phase telemetry and per-run compressed-pack analysis (input/output bytes, ratio, saved space, rebuild reason and duration), including continuous watch mode.
|
|
42
|
+
- Added tunable single-stage search-pack compression settings (`searchPack.rowChunkSize`, `searchPack.compressionLevel`, `searchPack.useDictionary`).
|
|
43
|
+
- Added benchmark guardrails for compression savings and latency regression (`searchPack.guardrailMinSavingsPercent`, `searchPack.guardrailMaxLatencyRegressionPercent`), reported in `blink bench`.
|
|
44
|
+
- Added `blink pack-backup` for offline second-stage compression backups of encrypted `.blpk` packs, outside the online query path.
|
|
45
|
+
- Hardened Linux browser launch flags for Ubuntu 26 Chromium/Wayland compatibility (`--disable-vulkan`, `--use-gl=swiftshader`, `--ozone-platform-hint=x11`).
|
|
46
|
+
- Improved pack resilience by auto-repairing missing search-pack manifests from existing `.blpk` files, avoiding unnecessary full repacks on small incremental updates.
|
|
47
|
+
- Updated Linux graph auto-open behavior to prioritize the system default browser (`xdg-open`) before explicit browser fallbacks.
|
|
48
|
+
- Removed implicit Chromium dependency in Linux auto-open flow; app-window launch is now opt-in (`BRAINLINK_LINUX_APP_WINDOW=1`).
|
|
49
|
+
|
|
50
|
+
## 0.1.0-beta.3
|
|
51
|
+
|
|
52
|
+
- Added CLI configuration commands for effective vault management, including `config where`, `config get`, `config doctor` and `config set-vault`.
|
|
53
|
+
- Added explicit `migrate-vault` command with `--dry-run` preview and conflict-preserving copy behavior.
|
|
54
|
+
- Added one-command agent setup through `agent install` plus `agent status` diagnostics.
|
|
55
|
+
- Added MCP `brainlink_bootstrap` default entrypoint guidance for plug-and-play agent memory flows.
|
|
56
|
+
- Added migration coverage for S3 bucket vault targets.
|
|
57
|
+
- Updated architecture and agent-usage documentation to reflect current CLI/MCP behavior and configuration precedence.
|
|
58
|
+
|
|
59
|
+
## 0.1.0-beta.2
|
|
60
|
+
|
|
61
|
+
- Added MCP installation guidance for direct server configuration and local client stores.
|
|
62
|
+
- Documented MCP vault allowlisting with `BRAINLINK_ALLOWED_VAULTS`.
|
|
63
|
+
- Aligned the documented MCP tool list with the current server tools.
|
|
64
|
+
- Updated release documentation for the beta package line.
|
|
65
|
+
|
|
66
|
+
## 0.1.0-beta.0
|
|
67
|
+
|
|
68
|
+
- Promoted the package to the beta prerelease channel.
|
|
69
|
+
- Added built-in MCP stdio server distribution through `brainlink-mcp`.
|
|
70
|
+
- Added agent namespaces, auto-indexing on writes and file ingestion flows.
|
|
71
|
+
- Added S3-compatible bucket vault support and weighted graph relationships.
|
|
72
|
+
|
|
3
73
|
## 0.1.0-alpha.0
|
|
4
74
|
|
|
5
75
|
- Added local-first Markdown vault indexing.
|
|
6
|
-
- Added
|
|
7
|
-
- Added
|
|
76
|
+
- Added local full-text indexing, local semantic retrieval, wiki links, backlinks and graph retrieval.
|
|
77
|
+
- Added semantic candidate bucket indexing to narrow vector candidates for larger vaults.
|
|
8
78
|
- Optimized title/link resolution with precomputed agent-scoped title maps.
|
|
9
79
|
- Added CLI, JSON output, HTTP API and graph UI.
|
|
10
80
|
- 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`.
|