Clone this repository
For self-hosted knots, clone URLs may differ based on your setup.
Lexicon namespace, source files, and generated types all updated.
Fixed hyphenated def IDs (web-search → webSearch, etc.) and
invalid schema types (json → unknown, inline object → ref).
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>
- island:discover: BFS to find connected components in global network.cosmik.connection graph, caches in SQLite
- island:detect: match our carry graph against discovered components to find closest island
- island:explore: find fringe nodes and suggest bridge edges back into island
- connection:detect: compare our carry graph against individual DIDs' connection records
- vault:analyze: parse Obsidian vault notes into carry data via letta-code-sdk agent
Dependencies: @atproto/api, @letta-ai/letta-code-sdk, jsdom
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>
The mapper was still trying to TF-IDF match carry entity names to
island vertex titles, producing garbage like "Vect" matching
"disinformation vector". The fundamental problem: carry entity URLs
and island vertex URLs have zero overlap — they track different things
(homepages vs articles).
Solution: follow carry semantics directly. A carry connection is
source → relation → target. If one side is in the island, create a
bridge. If neither side is in the island, emit as a "nearby" connection
that expands the knowledge graph. No keyword matching at all.
Changes:
- Remove TF-IDF scoring, tokenization, findBestVertexMatch
- Remove keywordOverlapSets, computeIdf, tfidfScore
- matchCarryData now only checks URL overlap and emits carry triples
- Fix synthesis to use deduped count (was showing 53, now shows 20)
Result: 20 connections, all real carry semantic triples:
- Cosmik Network → built → Semble
- Dialog DB → related-to → Ink and Switch
- Astera Institute → related-to → Arcadia Science
etc.
None bridge to the island (zero URL overlap) — honest result.
Tested locally with docker run -v carry-vault:/data/carry.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>
The mapper was producing garbage connections (e.g. "checkin" daily note
matched to mental health vertices) because it used raw keyword overlap
on vault note content. Carry already exports structured semantic triples
via `carry query --format json`.
Changes:
- Install carry binary in container (patchelf for Nix→Debian compat)
- Run `carry query` during sync to export JSON (entities, citations,
connections) — always runs, not just after git pull
- Rewrite mapper to use carry structured data:
1. Carry connections: match by URL overlap with island vertices,
resolve entity names to URLs via carry entity index
2. Carry entities/citations: match by TF-IDF name similarity
3. D1 carry data: same structured matching
- Remove vault note content matching entirely
- Remove Letta URL discovery (carry records already have URLs)
- Add TF-IDF weighting with IDF computed across carry + island corpus
- Expand stop words to filter common vault noise
- Add connections to D1 getCarryData (worker reads connection records)
- Remove Letta env vars from worker/container
Performance: 301-vertex island analysis drops from 3.5min to 0.26s.
Quality: all connections are real semantic triples, no more noise.
Tested locally with `docker run -v carry-vault:/data/carry`.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>
The O(n*m) keyword overlap between vault/carry notes and island
vertices was too slow for the full 301-vertex island. Now precomputes
token sets once and reuses them across all comparisons.
- tokenize() returns Set<string> for fast membership checks
- keywordOverlap(setA, textB) takes a precomputed set
- keywordOverlapSets(setA, setB) for set-set intersection
- findBestVertexMatch accepts precomputed vertexTokenSets
- All callers updated to pass precomputed sets
Full island analysis (301 vertices, 654 vault notes, 42 carry notes):
completes in ~3.5min (dominated by 10 Letta API calls for URL discovery).
Matching itself is now sub-second.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>