Clone this repository
For self-hosted knots, clone URLs may differ based on your setup.
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>
When a carry or vault note has no https:// URL, the analysis now calls
the Letta API (url-discoverer agent with tavily_search tool) to find
the canonical URL. This ensures all connection records have valid
https:// targets.
- Created url-discoverer agent (agent-36607e8a) on Letta Cloud
- Container calls Letta API for notes lacking URLs during analysis
- Secrets: LETTA_API_KEY, LETTA_AGENT_ID in Cloudflare
- Fixed async/await for findFilesystemTouchpoints (was returning Promise)
- Health endpoint shows lettaKeySet and lettaAgentId
Test: 14 connections found for single-vertex island, all with https://
targets discovered via Letta web search.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>
carry:// and vault:// URI schemes are not valid connection targets.
The graph only deals with https:// URLs.
- Filesystem touchpoints: extract the https:// URL from each carry/vault
note and use it as the target. Notes without URLs are skipped.
- D1 carry touchpoints: use the carry record url field (not atUri) as
the target for entities and reasonings. Citations already used url.
- Deleted 41 garbage connection records from PDS (carry://, vault://,
and at:// targets).
- Removed temporary cleanupConnections endpoint.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>
Container now syncs both vault (ob sync) and carry (git pull) on startup:
- Fixed obsidian-cli → obsidian-headless (correct npm package name)
- Fixed ob sync path syntax (--path flag, not positional arg)
- Container writes auth token + vault config to ~/.config/obsidian-headless/
- Secrets: OBSIDIAN_AUTH_TOKEN, OBSIDIAN_ENCRYPTION_KEY, OBSIDIAN_ENCRYPTION_SALT
- Container health endpoint shows vaultFiles, carryFiles, token status
- Sync endpoint returns vault/carry log output for debugging
Result: 654 vault files + 42 carry files synced in container.
Analysis now finds 279 touchpoints (vault + carry) against island vertices.
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>
The strata analysis now cross-references island vertices against:
1. Carry data from filesystem (synced via git clone from GitHub)
2. Structured carry records from D1 (entities, citations, reasonings)
When semantic matches are found, new network.cosmik.connection records
are created on PDS linking island vertices to carry records.
Key changes:
- Container syncs carry vault from GitHub (CARRY_GITHUB_TOKEN secret)
- Analysis reads vault/carry markdown from filesystem
- findCarryTouchpoints matches carry records to island vertices
- findFilesystemTouchpoints matches vault/carry notes to vertices
- Worker creates connection records on PDS via createRecord
- Frontend sends vertex metadata (titles) with analyze request
- Added containerHealth and syncContainer endpoints
Test: 20 carry touchpoints found for AI island, matching citations
(Knowledge Synthesis, PROV-K), entities (Jacky Alciné, Dawn Foster),
and connections (Khayame-Vickers, Matt Akamatsu-Discourse Graphs).
👾 Generated with [Letta Code](https://letta.com)
Co-Authored-By: Letta Code <noreply@letta.com>