@legioncodeinc/nectar 0.0.1 → 0.1.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.
- package/LICENSE.md +662 -662
- package/README.md +307 -307
- package/dist/brooding/describe.js +13 -13
- package/dist/cli.js +26 -26
- package/dist/service/templates.js +80 -80
- package/dist/telemetry/checkin.js +6 -6
- package/dist/telemetry/db.js +21 -21
- package/dist/telemetry/metrics.js +8 -8
- package/dist/telemetry-usage/posthog-key.js +4 -22
- package/package.json +48 -44
- package/dist/embeddings/cohere-portkey.d.ts +0 -67
- package/dist/embeddings/cohere-portkey.d.ts.map +0 -1
- package/dist/embeddings/cohere-portkey.js +0 -171
- package/dist/embeddings/cohere-portkey.js.map +0 -1
- package/dist/hivedoctor-registry.d.ts +0 -111
- package/dist/hivedoctor-registry.d.ts.map +0 -1
- package/dist/hivedoctor-registry.js +0 -143
- package/dist/hivedoctor-registry.js.map +0 -1
- package/dist/source-graph/deeplake-credentials.d.ts +0 -57
- package/dist/source-graph/deeplake-credentials.d.ts.map +0 -1
- package/dist/source-graph/deeplake-credentials.js +0 -109
- package/dist/source-graph/deeplake-credentials.js.map +0 -1
- package/dist/source-graph/deeplake-heal.d.ts +0 -53
- package/dist/source-graph/deeplake-heal.d.ts.map +0 -1
- package/dist/source-graph/deeplake-heal.js +0 -41
- package/dist/source-graph/deeplake-heal.js.map +0 -1
- package/dist/source-graph/deeplake-store.d.ts +0 -151
- package/dist/source-graph/deeplake-store.d.ts.map +0 -1
- package/dist/source-graph/deeplake-store.js +0 -389
- package/dist/source-graph/deeplake-store.js.map +0 -1
- package/dist/source-graph/deeplake-transport.d.ts +0 -74
- package/dist/source-graph/deeplake-transport.d.ts.map +0 -1
- package/dist/source-graph/deeplake-transport.js +0 -107
- package/dist/source-graph/deeplake-transport.js.map +0 -1
- package/dist/source-graph/hash.d.ts +0 -3
- package/dist/source-graph/hash.d.ts.map +0 -1
- package/dist/source-graph/hash.js +0 -12
- package/dist/source-graph/hash.js.map +0 -1
- package/dist/source-graph/memory-store.d.ts +0 -32
- package/dist/source-graph/memory-store.d.ts.map +0 -1
- package/dist/source-graph/memory-store.js +0 -81
- package/dist/source-graph/memory-store.js.map +0 -1
- package/dist/source-graph/model.d.ts +0 -102
- package/dist/source-graph/model.d.ts.map +0 -1
- package/dist/source-graph/model.js +0 -36
- package/dist/source-graph/model.js.map +0 -1
- package/dist/source-graph/paths.d.ts +0 -7
- package/dist/source-graph/paths.d.ts.map +0 -1
- package/dist/source-graph/paths.js +0 -26
- package/dist/source-graph/paths.js.map +0 -1
- package/dist/source-graph/schema.d.ts +0 -44
- package/dist/source-graph/schema.d.ts.map +0 -1
- package/dist/source-graph/schema.js +0 -123
- package/dist/source-graph/schema.js.map +0 -1
- package/dist/source-graph/sql-guards.d.ts +0 -99
- package/dist/source-graph/sql-guards.d.ts.map +0 -1
- package/dist/source-graph/sql-guards.js +0 -129
- package/dist/source-graph/sql-guards.js.map +0 -1
- package/dist/source-graph/store.d.ts +0 -101
- package/dist/source-graph/store.d.ts.map +0 -1
- package/dist/source-graph/store.js +0 -2
- package/dist/source-graph/store.js.map +0 -1
- package/dist/source-graph/ulid.d.ts +0 -9
- package/dist/source-graph/ulid.d.ts.map +0 -1
- package/dist/source-graph/ulid.js +0 -61
- package/dist/source-graph/ulid.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,307 +1,307 @@
|
|
|
1
|
-
<!-- ─────────────────────────────── HERO ─────────────────────────────── -->
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<picture>
|
|
5
|
-
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/nectar-wordmark-on-dark.svg">
|
|
6
|
-
<img src="assets/brand/nectar-wordmark-black.svg" alt="Nectar" height="84">
|
|
7
|
-
</picture>
|
|
8
|
-
</p>
|
|
9
|
-
|
|
10
|
-
<h1 align="center">Nectar</h1>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<strong>Every file in your repo gets a stable identity and a meaning your agents can recall.</strong>
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
<p align="center">
|
|
17
|
-
<a href="https://www.npmjs.com/package/@legioncodeinc/nectar"><img src="https://img.shields.io/npm/v/@legioncodeinc/nectar?style=flat-square&color=FFD048&label=version" alt="npm version"></a>
|
|
18
|
-
<img src="https://img.shields.io/badge/harnesses-6-FFD048?style=flat-square" alt="6 harnesses">
|
|
19
|
-
<img src="https://img.shields.io/badge/OS-windows%20%7C%20macos%20%7C%20linux-6E6A62?style=flat-square" alt="Windows, macOS, Linux">
|
|
20
|
-
</p>
|
|
21
|
-
|
|
22
|
-
<p align="center">
|
|
23
|
-
<a href="https://linktr.ee/marioaldayuz"><img src="https://img.shields.io/badge/designed%20by-Mario%20Aldayuz-8B7CF0?style=flat-square" alt="Designed by Mario Aldayuz"></a>
|
|
24
|
-
<a href="https://www.legioncodeinc.com"><img src="https://img.shields.io/badge/built%20by-Legion%20Code%20Inc.-111111?style=flat-square" alt="Built by Legion Code Inc."></a>
|
|
25
|
-
<a href="https://deeplake.ai"><img src="https://img.shields.io/badge/powered%20by-Deeplake-ff5a1f?style=flat-square" alt="Powered by Deeplake"></a>
|
|
26
|
-
</p>
|
|
27
|
-
|
|
28
|
-
<p align="center">
|
|
29
|
-
<a href="https://github.com/legioncodeinc/nectar"><img src="https://img.shields.io/github/stars/legioncodeinc/nectar?style=flat-square&color=FFD048" alt="GitHub stars"></a>
|
|
30
|
-
<a href="https://discord.gg/GX95YTQypQ"><img src="https://img.shields.io/badge/discord-find%20us-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord"></a>
|
|
31
|
-
</p>
|
|
32
|
-
|
|
33
|
-
<!-- ────────────────────────────── PARTNERS ────────────────────────────── -->
|
|
34
|
-
|
|
35
|
-
<p align="center">
|
|
36
|
-
<a href="https://github.com/legioncodeinc">
|
|
37
|
-
<picture>
|
|
38
|
-
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/legion-logo-dark.svg">
|
|
39
|
-
<img src="assets/brand/legion-logo-light.svg" alt="Legion Code" height="34">
|
|
40
|
-
</picture>
|
|
41
|
-
</a>
|
|
42
|
-
|
|
43
|
-
<a href="https://github.com/activeloopai">
|
|
44
|
-
<picture>
|
|
45
|
-
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/activeloop-full-mark-logo-on-dark.svg">
|
|
46
|
-
<img src="assets/brand/activeloop-full-mark-logo.svg" alt="Activeloop" height="26">
|
|
47
|
-
</picture>
|
|
48
|
-
</a>
|
|
49
|
-
</p>
|
|
50
|
-
|
|
51
|
-
<p align="center"><em>A <a href="https://github.com/legioncodeinc">Legion Code Inc.</a> × <a href="https://github.com/activeloopai">Activeloop</a> collaboration.</em></p>
|
|
52
|
-
|
|
53
|
-
<img src="assets/brand/divider-major.svg" width="100%" height="6">
|
|
54
|
-
|
|
55
|
-
Files get renamed and agents lose the thread. You refactor, a file moves three directories over, and every memory keyed to its old path is dead weight. Grep finds strings, not meaning, so *"where is the login logic"* comes back empty when the file is called `session-refresh.ts`. **Nectar fixes that.** The daemon mints every file a stable 26-character identity (a *nectar*) plus an LLM-minted description of what the file is for, then tracks that identity through renames, moves, edits, and copy-paste. Ask *"what is this file and why does it exist"* and get an answer. Ask *"everything associated with logins"* and get files scattered across directories that are not named `login-*`. Recall that keys off paths breaks on every refactor; recall that keys off identity does not break at all.
|
|
56
|
-
|
|
57
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
58
|
-
|
|
59
|
-
> **New here?** One command and you're on a dashboard. [Jump to Install](#-install-one-command). · **Want the docs?** Everything lives at **[theapiary.sh](https://theapiary.sh)**.
|
|
60
|
-
|
|
61
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
62
|
-
|
|
63
|
-
<table>
|
|
64
|
-
<tr>
|
|
65
|
-
<td width="50%" valign="top">
|
|
66
|
-
|
|
67
|
-
#### 🛹 For AI Augmented Devs
|
|
68
|
-
Your agents finally know what every file *means*, not just what it's named. Rename it, move it, gut it and rewrite half of it: the identity and the description follow the file, so recall keeps working after every refactor instead of quietly going stale.
|
|
69
|
-
|
|
70
|
-
</td>
|
|
71
|
-
<td width="50%" valign="top">
|
|
72
|
-
|
|
73
|
-
#### 🏢 For Enterprise Teams
|
|
74
|
-
Provenance-tracked file identity across repos and teams. Every file's history chain is append-only and auditable: when it was minted, where it moved, what it was forked from, and who described it. A fresh clone inherits the whole thing from a committed projection.
|
|
75
|
-
|
|
76
|
-
</td>
|
|
77
|
-
</tr>
|
|
78
|
-
</table>
|
|
79
|
-
|
|
80
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
81
|
-
|
|
82
|
-
## ✨ What makes Nectar different
|
|
83
|
-
|
|
84
|
-
- **Identity never lives in your source.** No serial numbers in comments, no sidecar files bolted next to your code. [ADR-0001](library/knowledge/private/architecture/ADR-0001-minted-nectar-over-source-embedded-serial.md) kills that idea for four concrete reasons; read it before arguing about serials-in-source.
|
|
85
|
-
- **Daemon-minted ULIDs.** A nectar is a 26-character ULID minted once by the daemon and persisted in Deeplake. It is not derived from content, so edits don't churn it. It is not derived from path, so moves don't kill it.
|
|
86
|
-
- **The re-association ladder.** Five steps, first match wins: path/mtime/size fast path, path match with changed content, exact content-hash match for clean moves, TLSH fuzzy match for move-and-edit, mint fresh. Low-confidence fuzzy matches go to human review, never auto-claimed, because a mis-association corrupts the history chain.
|
|
87
|
-
- **Copy-paste as provenance, not ambiguity.** Copy a file and the copy gets a fresh nectar with a `derived_from_nectar` edge back to the original. The fork relationship survives forever, even after the copy diverges.
|
|
88
|
-
- **A committed lockfile, not a sidecar.** `.honeycomb/nectars.json` is a regenerable projection of Deeplake state. A fresh clone re-derives identity from it with zero LLM calls and zero network.
|
|
89
|
-
- **Hybrid recall you can run today.** `nectar search` runs a per-arm guarded lexical + vector query over described files, fused by Reciprocal Rank Fusion. Folding those hits into Honeycomb's cross-memory recall as a 4th arm alongside sessions, memories, and skills is future work (PRD-013, out of repo).
|
|
90
|
-
|
|
91
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
92
|
-
|
|
93
|
-
## 🍯 Features
|
|
94
|
-
|
|
95
|
-
- 🪪 **Stable file identity.** 26-char ULID per file, minted by the daemon, never reused, never deleted by the ladder. *(registration protocol shipped, PRD-006)*
|
|
96
|
-
- 🪜 **5-step re-association ladder.** Survives renames, moves, offline edits, and cold catch-up after your laptop was closed. TLSH fuzzy matching with a confidence-scored review surface. *(mechanics implemented and tested; durable-store wiring lands with daemon integration)*
|
|
97
|
-
- 🧬 **Copy-paste provenance.** `derived_from_nectar` + `fork_content_hash` record every fork as a first-class edge.
|
|
98
|
-
- 🗄️ **Two Deeplake tables.** `hive_graph` (one row per logical file) + append-only `hive_graph_versions` (one row per observed state, carrying 768-dim embeddings). *(shipped, PRD-005)*
|
|
99
|
-
- 🛡️ **Supervised daemon.** `nectar daemon` binds `127.0.0.1:3854`, serves `/health`, registers with Doctor, and installs as an OS service on launchd, systemd, and Windows. *(shipped, PRD-002/003/004)*
|
|
100
|
-
- ✍️ **LLM-minted descriptions.** Lazy, batched, cheap: a long-context model describes files on demand, not eagerly, so a full pass on a 2000-file repo lands at about $3.05 and a committed projection makes every subsequent clone free. *(shipped, PRD-007/010/016)*
|
|
101
|
-
- 🔒 **Portable projection.** `.honeycomb/nectars.json`, regenerated from Deeplake after every brood and enrich. *(shipped, PRD-011)*
|
|
102
|
-
- 🔀 **Hybrid recall.** `nectar search` (and `POST /api/hive-graph/search`) run a per-arm guarded lexical + vector query over described files, fused by Reciprocal Rank Fusion, with a silent BM25 fallback when embeddings are off. Folding these hits into Honeycomb's cross-memory recall as a 4th arm is future work (PRD-013, out of repo). *(search shipped, PRD-012)*
|
|
103
|
-
|
|
104
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
105
|
-
|
|
106
|
-
## 🚀 Install (one command)
|
|
107
|
-
|
|
108
|
-
No Node? No npm? No problem. The installer detects and sets up everything, then **opens a dashboard in your browser**. The terminal is just a progress log; the product is the first thing you touch.
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
# macOS / Linux
|
|
112
|
-
curl -fsSL https://get.theapiary.sh | sh
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
```powershell
|
|
116
|
-
# Windows (PowerShell)
|
|
117
|
-
irm https://get.theapiary.sh/install.ps1 | iex
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
That single line installs the Apiary stack and brings the **nectar daemon** up on `127.0.0.1:3854`, supervised by Doctor so it survives crashes and reboots without you thinking about it.
|
|
121
|
-
|
|
122
|
-
<details>
|
|
123
|
-
<summary><strong>Prefer to build from source?</strong></summary>
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
git clone https://github.com/legioncodeinc/nectar.git
|
|
127
|
-
cd nectar
|
|
128
|
-
npm install
|
|
129
|
-
npm run build # tsc → dist/
|
|
130
|
-
|
|
131
|
-
npm start # start the daemon (node dist/cli.js daemon)
|
|
132
|
-
node dist/cli.js install # register the OS service unit + the Doctor registry entry
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Requires Node ≥ 22. `npm run typecheck` and `npm test` are the local gates.
|
|
136
|
-
|
|
137
|
-
</details>
|
|
138
|
-
|
|
139
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
140
|
-
|
|
141
|
-
## 🖥️ Using the dashboard
|
|
142
|
-
|
|
143
|
-
<!-- screenshot pending: drop nectar dashboard capture into assets/screenshots/dashboard.png -->
|
|
144
|
-
<img src="assets/screenshots/dashboard.png" alt="Nectar dashboard" width="100%">
|
|
145
|
-
|
|
146
|
-
Straight talk: Nectar does not ship its own dashboard, and that is by design. The always-on **hive portal** owns the unified dashboard for the whole Apiary and aggregates from each daemon's API, fail-soft per daemon ([ADR-0004](library/knowledge/private/architecture/ADR-0004-hive-portal-daemon-role-and-boundaries.md)). The **Hive Graph page** (PRD-015, spec stage) renders your file graph, identity search, and brood status by fetching Nectar's `/api/hive-graph/*` endpoints through the portal. If the Nectar daemon is down, that page degrades gracefully instead of taking the whole dashboard with it.
|
|
147
|
-
|
|
148
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
149
|
-
|
|
150
|
-
## ⌨️ Using the CLI
|
|
151
|
-
|
|
152
|
-
The `nectar` binary ships with the package. What works today:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
nectar daemon # start the daemon (127.0.0.1:3854, /health)
|
|
156
|
-
nectar install # register the OS service unit + Doctor registry entry
|
|
157
|
-
nectar uninstall # deregister the OS service unit
|
|
158
|
-
nectar service-status # report the OS service unit's running state
|
|
159
|
-
nectar brood --dry-run # preview a full-codebase brood's cost locally (no LLM call, no writes)
|
|
160
|
-
nectar brood # run a full-codebase brood against Deeplake (needs the prerequisites below)
|
|
161
|
-
nectar search <query> # hybrid recall over described files. Flags: --limit N, --json
|
|
162
|
-
nectar rebuild-projection # regenerate .honeycomb/nectars.json from Deeplake
|
|
163
|
-
nectar prune --confirm # prune long-missing nectars from the durable store
|
|
164
|
-
nectar review-matches # review low-confidence identity matches against the durable store
|
|
165
|
-
nectar --help
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
`nectar search` reaches a running `nectar daemon` over loopback, so start the daemon first.
|
|
169
|
-
|
|
170
|
-
### Brood prerequisites
|
|
171
|
-
|
|
172
|
-
A mutating `nectar brood` (and the boot auto-brood) describes files only when **both** prerequisites are in place:
|
|
173
|
-
|
|
174
|
-
- `~/.deeplake/credentials.json`, the shared Deeplake credentials `hivemind login` writes.
|
|
175
|
-
- Portkey, enabled via `NECTAR_PORTKEY_ENABLED=1`, `NECTAR_PORTKEY_API_KEY`, and `NECTAR_PORTKEY_CONFIG`.
|
|
176
|
-
|
|
177
|
-
Without them the daemon still boots and serves `/health`, but brooding stays dormant and says so: a startup log line names the missing pieces, `/health` reports `brooding.reason` (for example `credentials_missing` or `portkey_disabled`), and on an interactive terminal the daemon prints the exact configuration steps. `nectar brood --dry-run` and `nectar search` do not need Portkey.
|
|
178
|
-
|
|
179
|
-
### Telemetry
|
|
180
|
-
|
|
181
|
-
Nectar sends anonymous, aggregate usage telemetry (install, first run, and version updates) by default, never file contents or paths. Opt out with `NECTAR_TELEMETRY=0` (it also accepts `off` and `false`, case-insensitive) or the cross-tool `DO_NOT_TRACK` standard.
|
|
182
|
-
|
|
183
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
184
|
-
|
|
185
|
-
## 🐝 Identity that survives the refactor
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
# The daemon minted src/auth/session-refresh.ts a nectar and described it.
|
|
189
|
-
# Now gut your directory structure:
|
|
190
|
-
git mv src/auth/session-refresh.ts src/middleware/token-lifecycle.ts
|
|
191
|
-
|
|
192
|
-
# …then ask recall about it:
|
|
193
|
-
nectar search "where do we refresh login sessions"
|
|
194
|
-
# → src/middleware/token-lifecycle.ts
|
|
195
|
-
# "refreshes JWT claims on each authenticated request,
|
|
196
|
-
# part of the login session lifecycle"
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
Same nectar, same description, new path. The identity followed the file, so the memory never went stale. `nectar search` runs the recall over described files today; folding it into your agent's cross-memory recall as a 4th arm is future work (PRD-013).
|
|
200
|
-
|
|
201
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
202
|
-
|
|
203
|
-
## 🏗️ How it works
|
|
204
|
-
|
|
205
|
-
```mermaid
|
|
206
|
-
flowchart TD
|
|
207
|
-
W["watcher + hiveantennae daemon<br/>127.0.0.1:3854"] --> M["mint 26-char ULID<br/>+ LLM-minted description"]
|
|
208
|
-
W --> L["re-association ladder<br/>path/mtime/size → hash → TLSH → mint"]
|
|
209
|
-
M --> DL["Deeplake<br/>hive_graph + hive_graph_versions<br/>768-dim embeddings, append-only history"]
|
|
210
|
-
L --> DL
|
|
211
|
-
DL --> P[".honeycomb/nectars.json<br/>committed projection (lockfile)"]
|
|
212
|
-
DL --> R["Honeycomb hybrid recall<br/>4th arm · BM25 + vector · RRF"]
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
The daemon watches your source tree. New file: mint a nectar, queue a description. Known file: run the ladder, append a version row, keep the chain. Everything durable lands in Deeplake first; the projection is regenerated from it after every pass; recall unions over the described files alongside sessions, memories, and skills.
|
|
216
|
-
|
|
217
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
218
|
-
|
|
219
|
-
## 🧭 Why identity beats paths
|
|
220
|
-
|
|
221
|
-
Path-keyed memory is a bet that your repo never changes shape. That bet loses every single sprint. Every rename orphans a memory, every directory reshuffle silently detonates the recall your agents depend on, and nobody notices until an agent confidently cites a file that has not existed for three weeks.
|
|
222
|
-
|
|
223
|
-
Stable identity flips the failure mode. The nectar is the anchor; the path is just the latest observation attached to it. The file can move, get edited offline, or get forked into a new module, and the daemon re-associates it and keeps writing to the same history chain. Memory attached to identity does not rot when the tree churns.
|
|
224
|
-
|
|
225
|
-
Meaning is the other half. Structural tools can tell you a symbol named `authenticate` exists; they cannot tell you that `session-refresh.ts` is a critical piece of login behavior. An LLM-minted description per file gives your agents the *what is this for* layer that grep and AST graphs structurally cannot provide. Identity keeps the answer alive; meaning makes it worth recalling.
|
|
226
|
-
|
|
227
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
228
|
-
|
|
229
|
-
## 💎 Why Deeplake makes the difference
|
|
230
|
-
|
|
231
|
-
Most code-indexing tools bolt onto a vector-only store, which forces every access pattern through a similarity engine. Nectar needs exact identity joins **and** semantic search, and [**Deeplake**](https://deeplake.ai), the database for AI, gives it both natively:
|
|
232
|
-
|
|
233
|
-
- **SQL + vector in one engine.** "Latest version row for this nectar" is a deterministic SQL join; "files that mean login" is a vector search over 768-dim embeddings. One store serves both. No second database, no sync problem, no sidecar.
|
|
234
|
-
- **Versioned and append-only.** `hive_graph_versions` never overwrites: every observed state of every file stays on disk. That is what makes re-association *auditable*: you can trace exactly when a nectar was carried across a move, at what confidence, and what the file looked like on both sides.
|
|
235
|
-
- **Identity table + versions table, cleanly split.** `hive_graph` anchors the stable key; `hive_graph_versions` carries the history. Collapsing them forces you to lose either history or the stable key. Deeplake makes the split cheap.
|
|
236
|
-
- **Graceful degradation.** Embeddings off? The embedding column stays NULL and recall falls back to BM25 over titles and descriptions. No error, no quality cliff.
|
|
237
|
-
|
|
238
|
-
> Nectar stands on the same two shoulders as the rest of the Apiary: **[Deeplake](https://deeplake.ai)** gives identity somewhere durable and queryable to live, and **[Hivemind](https://github.com/activeloopai/hivemind)**, Activeloop's open-source agent-memory project, is the foundation Legion Code extended into Honeycomb.
|
|
239
|
-
|
|
240
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
241
|
-
|
|
242
|
-
## 🔌 Supported harnesses
|
|
243
|
-
|
|
244
|
-
Nectar's file identity and descriptions reach every harness through Honeycomb's recall integration: same daemon boundary, same shared memory, no per-harness wiring of its own.
|
|
245
|
-
|
|
246
|
-
| | | |
|
|
247
|
-
|---|---|---|
|
|
248
|
-
| **Claude Code** | **Cursor** | **Codex** |
|
|
249
|
-
| **Hermes** | **pi** | **OpenClaw** |
|
|
250
|
-
|
|
251
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
252
|
-
|
|
253
|
-
## 🎛️ Other interfaces
|
|
254
|
-
|
|
255
|
-
- **Dashboard.** The hive portal's Hive Graph page (PRD-015, spec stage), fed by Nectar's `/api/hive-graph/*` endpoints (PRD-008). Nectar deliberately owns no dashboard of its own.
|
|
256
|
-
- **MCP server.** Nectar does not ship a separate MCP server; its results surface through Honeycomb's existing MCP recall tools once the recall arm (PRD-013) lands. One boundary, not two.
|
|
257
|
-
- **TypeScript SDK.** `@legioncodeinc/nectar` ships a typed `dist/index` entry today. It is early: the daemon and service lifecycle are the real surface right now, and the SDK grows as the API endpoints (PRD-008) land.
|
|
258
|
-
|
|
259
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
260
|
-
|
|
261
|
-
<h2 align="center"><a href="https://ideas.theapiary.sh">📍 Status & Roadmap</a></h2>
|
|
262
|
-
|
|
263
|
-
Nectar is **v0.0.1** with a PRD program in flight. Shipped: the daemon, health, single-instance lock, OS service install, Doctor supervision, the Deeplake catalog tables, and the file registration protocol (PRD-001 through 006). In work: the Portkey gateway, the portable projection, embeddings provider switching, and service check-in telemetry. Spec stage: brooding, the API endpoints, the recall arm, and the dashboard page. We document what's real and flag what isn't; the spec came before the code on purpose.
|
|
264
|
-
|
|
265
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
266
|
-
|
|
267
|
-
## 🛠️ Development
|
|
268
|
-
|
|
269
|
-
```bash
|
|
270
|
-
npm install
|
|
271
|
-
npm run build # tsc → dist/
|
|
272
|
-
npm run typecheck # tsc --noEmit
|
|
273
|
-
npm test # build + node --experimental-sqlite --test test/**/*.test.ts
|
|
274
|
-
npm run daemon # run the daemon from dist/
|
|
275
|
-
npm run clean # rm -rf dist
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Requires Node ≥ 22. Every change passes typecheck and the test suite before it lands.
|
|
279
|
-
|
|
280
|
-
<img src="assets/brand/divider-major.svg" width="100%" height="6">
|
|
281
|
-
|
|
282
|
-
## 🙏 Credits
|
|
283
|
-
|
|
284
|
-
Nectar exists because two halves fit together:
|
|
285
|
-
|
|
286
|
-
- **[Activeloop](https://activeloop.ai/)** brings **[Deeplake](https://deeplake.ai/)** (the versioned, multi-modal database for AI with native vector + columnar indexing and hybrid search) and **[Hivemind](https://github.com/activeloopai/hivemind)**, the open-source agent-memory project Honeycomb is built upon.
|
|
287
|
-
- **[Legion Code Inc](https://github.com/legioncodeinc)** brings the **multi-tier memory system** (Tier 1 / 2 / 3 keys, summaries, raw), **code base atlas memory architecture**, **auto healing service**, **session priming**, **automatic skill development & propagation**, the **pollinating loop**, the **knowledge graph**, **cross device cross repository cross team skill sharing**, and the daemon architecture that turns Deeplake into a shared brain your coding agents read and write on every turn.
|
|
288
|
-
|
|
289
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
290
|
-
|
|
291
|
-
## License
|
|
292
|
-
|
|
293
|
-
Nectar is licensed under the **GNU Affero General Public License v3.0 or later** ([AGPL-3.0-or-later](LICENSE.md)).
|
|
294
|
-
|
|
295
|
-
Use it commercially or privately, free of charge. In return: keep the copyright and license notices intact, and if you modify it, your changes ship under the same AGPL license with source available. The "Affero" part is the point: run a modified version as a network service and you owe its source to the users who interact with it. No locking a fork behind a SaaS wall.
|
|
296
|
-
|
|
297
|
-
© 2026 Legion Code Inc.
|
|
298
|
-
|
|
299
|
-
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
300
|
-
|
|
301
|
-
<p align="center">
|
|
302
|
-
<sub><strong>Built by <a href="https://github.com/legioncodeinc">Legion Code Inc</a></strong> · <strong>Powered by <a href="https://deeplake.ai/">Activeloop Deeplake</a></strong> · <strong><a href="https://theapiary.sh/">theapiary.sh</a></strong></sub>
|
|
303
|
-
</p>
|
|
304
|
-
|
|
305
|
-
<p align="center"><strong>I am Legion. We are Legion.</strong></p>
|
|
306
|
-
|
|
307
|
-
<p align="center">#vibewithlegion</p>
|
|
1
|
+
<!-- ─────────────────────────────── HERO ─────────────────────────────── -->
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<picture>
|
|
5
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/nectar-wordmark-on-dark.svg">
|
|
6
|
+
<img src="assets/brand/nectar-wordmark-black.svg" alt="Nectar" height="84">
|
|
7
|
+
</picture>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<h1 align="center">Nectar</h1>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<strong>Every file in your repo gets a stable identity and a meaning your agents can recall.</strong>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://www.npmjs.com/package/@legioncodeinc/nectar"><img src="https://img.shields.io/npm/v/@legioncodeinc/nectar?style=flat-square&color=FFD048&label=version" alt="npm version"></a>
|
|
18
|
+
<img src="https://img.shields.io/badge/harnesses-6-FFD048?style=flat-square" alt="6 harnesses">
|
|
19
|
+
<img src="https://img.shields.io/badge/OS-windows%20%7C%20macos%20%7C%20linux-6E6A62?style=flat-square" alt="Windows, macOS, Linux">
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="https://linktr.ee/marioaldayuz"><img src="https://img.shields.io/badge/designed%20by-Mario%20Aldayuz-8B7CF0?style=flat-square" alt="Designed by Mario Aldayuz"></a>
|
|
24
|
+
<a href="https://www.legioncodeinc.com"><img src="https://img.shields.io/badge/built%20by-Legion%20Code%20Inc.-111111?style=flat-square" alt="Built by Legion Code Inc."></a>
|
|
25
|
+
<a href="https://deeplake.ai"><img src="https://img.shields.io/badge/powered%20by-Deeplake-ff5a1f?style=flat-square" alt="Powered by Deeplake"></a>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<a href="https://github.com/legioncodeinc/nectar"><img src="https://img.shields.io/github/stars/legioncodeinc/nectar?style=flat-square&color=FFD048" alt="GitHub stars"></a>
|
|
30
|
+
<a href="https://discord.gg/GX95YTQypQ"><img src="https://img.shields.io/badge/discord-find%20us-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord"></a>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<!-- ────────────────────────────── PARTNERS ────────────────────────────── -->
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<a href="https://github.com/legioncodeinc">
|
|
37
|
+
<picture>
|
|
38
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/legion-logo-dark.svg">
|
|
39
|
+
<img src="assets/brand/legion-logo-light.svg" alt="Legion Code" height="34">
|
|
40
|
+
</picture>
|
|
41
|
+
</a>
|
|
42
|
+
|
|
43
|
+
<a href="https://github.com/activeloopai">
|
|
44
|
+
<picture>
|
|
45
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/activeloop-full-mark-logo-on-dark.svg">
|
|
46
|
+
<img src="assets/brand/activeloop-full-mark-logo.svg" alt="Activeloop" height="26">
|
|
47
|
+
</picture>
|
|
48
|
+
</a>
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
<p align="center"><em>A <a href="https://github.com/legioncodeinc">Legion Code Inc.</a> × <a href="https://github.com/activeloopai">Activeloop</a> collaboration.</em></p>
|
|
52
|
+
|
|
53
|
+
<img src="assets/brand/divider-major.svg" width="100%" height="6">
|
|
54
|
+
|
|
55
|
+
Files get renamed and agents lose the thread. You refactor, a file moves three directories over, and every memory keyed to its old path is dead weight. Grep finds strings, not meaning, so *"where is the login logic"* comes back empty when the file is called `session-refresh.ts`. **Nectar fixes that.** The daemon mints every file a stable 26-character identity (a *nectar*) plus an LLM-minted description of what the file is for, then tracks that identity through renames, moves, edits, and copy-paste. Ask *"what is this file and why does it exist"* and get an answer. Ask *"everything associated with logins"* and get files scattered across directories that are not named `login-*`. Recall that keys off paths breaks on every refactor; recall that keys off identity does not break at all.
|
|
56
|
+
|
|
57
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
58
|
+
|
|
59
|
+
> **New here?** One command and you're on a dashboard. [Jump to Install](#-install-one-command). · **Want the docs?** Everything lives at **[theapiary.sh](https://theapiary.sh)**.
|
|
60
|
+
|
|
61
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
62
|
+
|
|
63
|
+
<table>
|
|
64
|
+
<tr>
|
|
65
|
+
<td width="50%" valign="top">
|
|
66
|
+
|
|
67
|
+
#### 🛹 For AI Augmented Devs
|
|
68
|
+
Your agents finally know what every file *means*, not just what it's named. Rename it, move it, gut it and rewrite half of it: the identity and the description follow the file, so recall keeps working after every refactor instead of quietly going stale.
|
|
69
|
+
|
|
70
|
+
</td>
|
|
71
|
+
<td width="50%" valign="top">
|
|
72
|
+
|
|
73
|
+
#### 🏢 For Enterprise Teams
|
|
74
|
+
Provenance-tracked file identity across repos and teams. Every file's history chain is append-only and auditable: when it was minted, where it moved, what it was forked from, and who described it. A fresh clone inherits the whole thing from a committed projection.
|
|
75
|
+
|
|
76
|
+
</td>
|
|
77
|
+
</tr>
|
|
78
|
+
</table>
|
|
79
|
+
|
|
80
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
81
|
+
|
|
82
|
+
## ✨ What makes Nectar different
|
|
83
|
+
|
|
84
|
+
- **Identity never lives in your source.** No serial numbers in comments, no sidecar files bolted next to your code. [ADR-0001](library/knowledge/private/architecture/ADR-0001-minted-nectar-over-source-embedded-serial.md) kills that idea for four concrete reasons; read it before arguing about serials-in-source.
|
|
85
|
+
- **Daemon-minted ULIDs.** A nectar is a 26-character ULID minted once by the daemon and persisted in Deeplake. It is not derived from content, so edits don't churn it. It is not derived from path, so moves don't kill it.
|
|
86
|
+
- **The re-association ladder.** Five steps, first match wins: path/mtime/size fast path, path match with changed content, exact content-hash match for clean moves, TLSH fuzzy match for move-and-edit, mint fresh. Low-confidence fuzzy matches go to human review, never auto-claimed, because a mis-association corrupts the history chain.
|
|
87
|
+
- **Copy-paste as provenance, not ambiguity.** Copy a file and the copy gets a fresh nectar with a `derived_from_nectar` edge back to the original. The fork relationship survives forever, even after the copy diverges.
|
|
88
|
+
- **A committed lockfile, not a sidecar.** `.honeycomb/nectars.json` is a regenerable projection of Deeplake state. A fresh clone re-derives identity from it with zero LLM calls and zero network.
|
|
89
|
+
- **Hybrid recall you can run today.** `nectar search` runs a per-arm guarded lexical + vector query over described files, fused by Reciprocal Rank Fusion. Folding those hits into Honeycomb's cross-memory recall as a 4th arm alongside sessions, memories, and skills is future work (PRD-013, out of repo).
|
|
90
|
+
|
|
91
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
92
|
+
|
|
93
|
+
## 🍯 Features
|
|
94
|
+
|
|
95
|
+
- 🪪 **Stable file identity.** 26-char ULID per file, minted by the daemon, never reused, never deleted by the ladder. *(registration protocol shipped, PRD-006)*
|
|
96
|
+
- 🪜 **5-step re-association ladder.** Survives renames, moves, offline edits, and cold catch-up after your laptop was closed. TLSH fuzzy matching with a confidence-scored review surface. *(mechanics implemented and tested; durable-store wiring lands with daemon integration)*
|
|
97
|
+
- 🧬 **Copy-paste provenance.** `derived_from_nectar` + `fork_content_hash` record every fork as a first-class edge.
|
|
98
|
+
- 🗄️ **Two Deeplake tables.** `hive_graph` (one row per logical file) + append-only `hive_graph_versions` (one row per observed state, carrying 768-dim embeddings). *(shipped, PRD-005)*
|
|
99
|
+
- 🛡️ **Supervised daemon.** `nectar daemon` binds `127.0.0.1:3854`, serves `/health`, registers with Doctor, and installs as an OS service on launchd, systemd, and Windows. *(shipped, PRD-002/003/004)*
|
|
100
|
+
- ✍️ **LLM-minted descriptions.** Lazy, batched, cheap: a long-context model describes files on demand, not eagerly, so a full pass on a 2000-file repo lands at about $3.05 and a committed projection makes every subsequent clone free. *(shipped, PRD-007/010/016)*
|
|
101
|
+
- 🔒 **Portable projection.** `.honeycomb/nectars.json`, regenerated from Deeplake after every brood and enrich. *(shipped, PRD-011)*
|
|
102
|
+
- 🔀 **Hybrid recall.** `nectar search` (and `POST /api/hive-graph/search`) run a per-arm guarded lexical + vector query over described files, fused by Reciprocal Rank Fusion, with a silent BM25 fallback when embeddings are off. Folding these hits into Honeycomb's cross-memory recall as a 4th arm is future work (PRD-013, out of repo). *(search shipped, PRD-012)*
|
|
103
|
+
|
|
104
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
105
|
+
|
|
106
|
+
## 🚀 Install (one command)
|
|
107
|
+
|
|
108
|
+
No Node? No npm? No problem. The installer detects and sets up everything, then **opens a dashboard in your browser**. The terminal is just a progress log; the product is the first thing you touch.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# macOS / Linux
|
|
112
|
+
curl -fsSL https://get.theapiary.sh | sh
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```powershell
|
|
116
|
+
# Windows (PowerShell)
|
|
117
|
+
irm https://get.theapiary.sh/install.ps1 | iex
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
That single line installs the Apiary stack and brings the **nectar daemon** up on `127.0.0.1:3854`, supervised by Doctor so it survives crashes and reboots without you thinking about it.
|
|
121
|
+
|
|
122
|
+
<details>
|
|
123
|
+
<summary><strong>Prefer to build from source?</strong></summary>
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git clone https://github.com/legioncodeinc/nectar.git
|
|
127
|
+
cd nectar
|
|
128
|
+
npm install
|
|
129
|
+
npm run build # tsc → dist/
|
|
130
|
+
|
|
131
|
+
npm start # start the daemon (node dist/cli.js daemon)
|
|
132
|
+
node dist/cli.js install # register the OS service unit + the Doctor registry entry
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Requires Node ≥ 22. `npm run typecheck` and `npm test` are the local gates.
|
|
136
|
+
|
|
137
|
+
</details>
|
|
138
|
+
|
|
139
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
140
|
+
|
|
141
|
+
## 🖥️ Using the dashboard
|
|
142
|
+
|
|
143
|
+
<!-- screenshot pending: drop nectar dashboard capture into assets/screenshots/dashboard.png -->
|
|
144
|
+
<img src="assets/screenshots/dashboard.png" alt="Nectar dashboard" width="100%">
|
|
145
|
+
|
|
146
|
+
Straight talk: Nectar does not ship its own dashboard, and that is by design. The always-on **hive portal** owns the unified dashboard for the whole Apiary and aggregates from each daemon's API, fail-soft per daemon ([ADR-0004](library/knowledge/private/architecture/ADR-0004-hive-portal-daemon-role-and-boundaries.md)). The **Hive Graph page** (PRD-015, spec stage) renders your file graph, identity search, and brood status by fetching Nectar's `/api/hive-graph/*` endpoints through the portal. If the Nectar daemon is down, that page degrades gracefully instead of taking the whole dashboard with it.
|
|
147
|
+
|
|
148
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
149
|
+
|
|
150
|
+
## ⌨️ Using the CLI
|
|
151
|
+
|
|
152
|
+
The `nectar` binary ships with the package. What works today:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
nectar daemon # start the daemon (127.0.0.1:3854, /health)
|
|
156
|
+
nectar install # register the OS service unit + Doctor registry entry
|
|
157
|
+
nectar uninstall # deregister the OS service unit
|
|
158
|
+
nectar service-status # report the OS service unit's running state
|
|
159
|
+
nectar brood --dry-run # preview a full-codebase brood's cost locally (no LLM call, no writes)
|
|
160
|
+
nectar brood # run a full-codebase brood against Deeplake (needs the prerequisites below)
|
|
161
|
+
nectar search <query> # hybrid recall over described files. Flags: --limit N, --json
|
|
162
|
+
nectar rebuild-projection # regenerate .honeycomb/nectars.json from Deeplake
|
|
163
|
+
nectar prune --confirm # prune long-missing nectars from the durable store
|
|
164
|
+
nectar review-matches # review low-confidence identity matches against the durable store
|
|
165
|
+
nectar --help
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
`nectar search` reaches a running `nectar daemon` over loopback, so start the daemon first.
|
|
169
|
+
|
|
170
|
+
### Brood prerequisites
|
|
171
|
+
|
|
172
|
+
A mutating `nectar brood` (and the boot auto-brood) describes files only when **both** prerequisites are in place:
|
|
173
|
+
|
|
174
|
+
- `~/.deeplake/credentials.json`, the shared Deeplake credentials `hivemind login` writes.
|
|
175
|
+
- Portkey, enabled via `NECTAR_PORTKEY_ENABLED=1`, `NECTAR_PORTKEY_API_KEY`, and `NECTAR_PORTKEY_CONFIG`.
|
|
176
|
+
|
|
177
|
+
Without them the daemon still boots and serves `/health`, but brooding stays dormant and says so: a startup log line names the missing pieces, `/health` reports `brooding.reason` (for example `credentials_missing` or `portkey_disabled`), and on an interactive terminal the daemon prints the exact configuration steps. `nectar brood --dry-run` and `nectar search` do not need Portkey.
|
|
178
|
+
|
|
179
|
+
### Telemetry
|
|
180
|
+
|
|
181
|
+
Nectar sends anonymous, aggregate usage telemetry (install, first run, and version updates) by default, never file contents or paths. Opt out with `NECTAR_TELEMETRY=0` (it also accepts `off` and `false`, case-insensitive) or the cross-tool `DO_NOT_TRACK` standard.
|
|
182
|
+
|
|
183
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
184
|
+
|
|
185
|
+
## 🐝 Identity that survives the refactor
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# The daemon minted src/auth/session-refresh.ts a nectar and described it.
|
|
189
|
+
# Now gut your directory structure:
|
|
190
|
+
git mv src/auth/session-refresh.ts src/middleware/token-lifecycle.ts
|
|
191
|
+
|
|
192
|
+
# …then ask recall about it:
|
|
193
|
+
nectar search "where do we refresh login sessions"
|
|
194
|
+
# → src/middleware/token-lifecycle.ts
|
|
195
|
+
# "refreshes JWT claims on each authenticated request,
|
|
196
|
+
# part of the login session lifecycle"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Same nectar, same description, new path. The identity followed the file, so the memory never went stale. `nectar search` runs the recall over described files today; folding it into your agent's cross-memory recall as a 4th arm is future work (PRD-013).
|
|
200
|
+
|
|
201
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
202
|
+
|
|
203
|
+
## 🏗️ How it works
|
|
204
|
+
|
|
205
|
+
```mermaid
|
|
206
|
+
flowchart TD
|
|
207
|
+
W["watcher + hiveantennae daemon<br/>127.0.0.1:3854"] --> M["mint 26-char ULID<br/>+ LLM-minted description"]
|
|
208
|
+
W --> L["re-association ladder<br/>path/mtime/size → hash → TLSH → mint"]
|
|
209
|
+
M --> DL["Deeplake<br/>hive_graph + hive_graph_versions<br/>768-dim embeddings, append-only history"]
|
|
210
|
+
L --> DL
|
|
211
|
+
DL --> P[".honeycomb/nectars.json<br/>committed projection (lockfile)"]
|
|
212
|
+
DL --> R["Honeycomb hybrid recall<br/>4th arm · BM25 + vector · RRF"]
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The daemon watches your source tree. New file: mint a nectar, queue a description. Known file: run the ladder, append a version row, keep the chain. Everything durable lands in Deeplake first; the projection is regenerated from it after every pass; recall unions over the described files alongside sessions, memories, and skills.
|
|
216
|
+
|
|
217
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
218
|
+
|
|
219
|
+
## 🧭 Why identity beats paths
|
|
220
|
+
|
|
221
|
+
Path-keyed memory is a bet that your repo never changes shape. That bet loses every single sprint. Every rename orphans a memory, every directory reshuffle silently detonates the recall your agents depend on, and nobody notices until an agent confidently cites a file that has not existed for three weeks.
|
|
222
|
+
|
|
223
|
+
Stable identity flips the failure mode. The nectar is the anchor; the path is just the latest observation attached to it. The file can move, get edited offline, or get forked into a new module, and the daemon re-associates it and keeps writing to the same history chain. Memory attached to identity does not rot when the tree churns.
|
|
224
|
+
|
|
225
|
+
Meaning is the other half. Structural tools can tell you a symbol named `authenticate` exists; they cannot tell you that `session-refresh.ts` is a critical piece of login behavior. An LLM-minted description per file gives your agents the *what is this for* layer that grep and AST graphs structurally cannot provide. Identity keeps the answer alive; meaning makes it worth recalling.
|
|
226
|
+
|
|
227
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
228
|
+
|
|
229
|
+
## 💎 Why Deeplake makes the difference
|
|
230
|
+
|
|
231
|
+
Most code-indexing tools bolt onto a vector-only store, which forces every access pattern through a similarity engine. Nectar needs exact identity joins **and** semantic search, and [**Deeplake**](https://deeplake.ai), the database for AI, gives it both natively:
|
|
232
|
+
|
|
233
|
+
- **SQL + vector in one engine.** "Latest version row for this nectar" is a deterministic SQL join; "files that mean login" is a vector search over 768-dim embeddings. One store serves both. No second database, no sync problem, no sidecar.
|
|
234
|
+
- **Versioned and append-only.** `hive_graph_versions` never overwrites: every observed state of every file stays on disk. That is what makes re-association *auditable*: you can trace exactly when a nectar was carried across a move, at what confidence, and what the file looked like on both sides.
|
|
235
|
+
- **Identity table + versions table, cleanly split.** `hive_graph` anchors the stable key; `hive_graph_versions` carries the history. Collapsing them forces you to lose either history or the stable key. Deeplake makes the split cheap.
|
|
236
|
+
- **Graceful degradation.** Embeddings off? The embedding column stays NULL and recall falls back to BM25 over titles and descriptions. No error, no quality cliff.
|
|
237
|
+
|
|
238
|
+
> Nectar stands on the same two shoulders as the rest of the Apiary: **[Deeplake](https://deeplake.ai)** gives identity somewhere durable and queryable to live, and **[Hivemind](https://github.com/activeloopai/hivemind)**, Activeloop's open-source agent-memory project, is the foundation Legion Code extended into Honeycomb.
|
|
239
|
+
|
|
240
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
241
|
+
|
|
242
|
+
## 🔌 Supported harnesses
|
|
243
|
+
|
|
244
|
+
Nectar's file identity and descriptions reach every harness through Honeycomb's recall integration: same daemon boundary, same shared memory, no per-harness wiring of its own.
|
|
245
|
+
|
|
246
|
+
| | | |
|
|
247
|
+
|---|---|---|
|
|
248
|
+
| **Claude Code** | **Cursor** | **Codex** |
|
|
249
|
+
| **Hermes** | **pi** | **OpenClaw** |
|
|
250
|
+
|
|
251
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
252
|
+
|
|
253
|
+
## 🎛️ Other interfaces
|
|
254
|
+
|
|
255
|
+
- **Dashboard.** The hive portal's Hive Graph page (PRD-015, spec stage), fed by Nectar's `/api/hive-graph/*` endpoints (PRD-008). Nectar deliberately owns no dashboard of its own.
|
|
256
|
+
- **MCP server.** Nectar does not ship a separate MCP server; its results surface through Honeycomb's existing MCP recall tools once the recall arm (PRD-013) lands. One boundary, not two.
|
|
257
|
+
- **TypeScript SDK.** `@legioncodeinc/nectar` ships a typed `dist/index` entry today. It is early: the daemon and service lifecycle are the real surface right now, and the SDK grows as the API endpoints (PRD-008) land.
|
|
258
|
+
|
|
259
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
260
|
+
|
|
261
|
+
<h2 align="center"><a href="https://ideas.theapiary.sh">📍 Status & Roadmap</a></h2>
|
|
262
|
+
|
|
263
|
+
Nectar is **v0.0.1** with a PRD program in flight. Shipped: the daemon, health, single-instance lock, OS service install, Doctor supervision, the Deeplake catalog tables, and the file registration protocol (PRD-001 through 006). In work: the Portkey gateway, the portable projection, embeddings provider switching, and service check-in telemetry. Spec stage: brooding, the API endpoints, the recall arm, and the dashboard page. We document what's real and flag what isn't; the spec came before the code on purpose.
|
|
264
|
+
|
|
265
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
266
|
+
|
|
267
|
+
## 🛠️ Development
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
npm install
|
|
271
|
+
npm run build # tsc → dist/
|
|
272
|
+
npm run typecheck # tsc --noEmit
|
|
273
|
+
npm test # build + node --experimental-sqlite --test test/**/*.test.ts
|
|
274
|
+
npm run daemon # run the daemon from dist/
|
|
275
|
+
npm run clean # rm -rf dist
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Requires Node ≥ 22. Every change passes typecheck and the test suite before it lands.
|
|
279
|
+
|
|
280
|
+
<img src="assets/brand/divider-major.svg" width="100%" height="6">
|
|
281
|
+
|
|
282
|
+
## 🙏 Credits
|
|
283
|
+
|
|
284
|
+
Nectar exists because two halves fit together:
|
|
285
|
+
|
|
286
|
+
- **[Activeloop](https://activeloop.ai/)** brings **[Deeplake](https://deeplake.ai/)** (the versioned, multi-modal database for AI with native vector + columnar indexing and hybrid search) and **[Hivemind](https://github.com/activeloopai/hivemind)**, the open-source agent-memory project Honeycomb is built upon.
|
|
287
|
+
- **[Legion Code Inc](https://github.com/legioncodeinc)** brings the **multi-tier memory system** (Tier 1 / 2 / 3 keys, summaries, raw), **code base atlas memory architecture**, **auto healing service**, **session priming**, **automatic skill development & propagation**, the **pollinating loop**, the **knowledge graph**, **cross device cross repository cross team skill sharing**, and the daemon architecture that turns Deeplake into a shared brain your coding agents read and write on every turn.
|
|
288
|
+
|
|
289
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
290
|
+
|
|
291
|
+
## License
|
|
292
|
+
|
|
293
|
+
Nectar is licensed under the **GNU Affero General Public License v3.0 or later** ([AGPL-3.0-or-later](LICENSE.md)).
|
|
294
|
+
|
|
295
|
+
Use it commercially or privately, free of charge. In return: keep the copyright and license notices intact, and if you modify it, your changes ship under the same AGPL license with source available. The "Affero" part is the point: run a modified version as a network service and you owe its source to the users who interact with it. No locking a fork behind a SaaS wall.
|
|
296
|
+
|
|
297
|
+
© 2026 Legion Code Inc.
|
|
298
|
+
|
|
299
|
+
<img src="assets/brand/divider-minor.svg" width="100%" height="3">
|
|
300
|
+
|
|
301
|
+
<p align="center">
|
|
302
|
+
<sub><strong>Built by <a href="https://github.com/legioncodeinc">Legion Code Inc</a></strong> · <strong>Powered by <a href="https://deeplake.ai/">Activeloop Deeplake</a></strong> · <strong><a href="https://theapiary.sh/">theapiary.sh</a></strong></sub>
|
|
303
|
+
</p>
|
|
304
|
+
|
|
305
|
+
<p align="center"><strong>I am Legion. We are Legion.</strong></p>
|
|
306
|
+
|
|
307
|
+
<p align="center">#vibewithlegion</p>
|