This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: deploy container with docker, fix Dockerfile paths

- Dockerfile COPY paths relative to container/ build context
- Landing page now uses getIslands (lightweight) instead of listStrataIslands
- Removed listStrataIslands (dead code)
- wrangler.jsonc with container + DO + migrations config

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>

author
nandi
co-author
Letta Code
date (May 14, 2026, 2:53 AM UTC) commit 28ea0d15 parent 755598c2
+19 -53
+4 -4
container/Dockerfile
··· 13 13 RUN npm install -g obsidian-cli 14 14 15 15 # Install deps 16 - COPY container/package.json ./ 16 + COPY package.json ./ 17 17 RUN npm install --production 18 18 19 19 # Copy analysis engine 20 - COPY container/server.ts ./ 21 - COPY container/analysis.ts ./ 22 - COPY container/sync.ts ./ 20 + COPY server.ts ./ 21 + COPY analysis.ts ./ 22 + COPY sync.ts ./ 23 23 24 24 # Create data directories 25 25 RUN mkdir -p /data/vault /data/carry
+6 -47
src/worker.ts
··· 367 367 368 368 // ─── List strata islands from records_strata ────────────────────── 369 369 370 - async function listStrataIslands(db: D1Database): Promise<any[]> { 371 - await ensureContrailReady(db); 372 - 373 - const rows = await db 374 - .prepare("SELECT uri, record FROM records_strata ORDER BY time_us DESC LIMIT 50") 375 - .all<{ uri: string; record: string }>(); 376 - 377 - const results: any[] = []; 378 - for (const row of rows.results || []) { 379 - try { 380 - const rec = JSON.parse(row.record); 381 - const lexmin = rec.source?.uri; 382 - if (!lexmin) continue; 383 - 384 - const island = await deriveIsland(db, lexmin); 385 - if (!island) continue; 386 - 387 - const meta = await resolveVertexMeta(db, island.vertices); 388 - const analysis = rec.analysis || {}; 389 - 390 - results.push({ 391 - ...island, 392 - vertexMeta: Object.fromEntries(meta), 393 - summary: analysis.title || null, 394 - strata: { 395 - prose: analysis.synthesis || "", 396 - title: analysis.title || "", 397 - themes: analysis.themes || [], 398 - relationships: (analysis.connections || []).map((c: any) => c.description || ""), 399 - tensions: analysis.tensions || [], 400 - open_questions: analysis.openQuestions || [], 401 - synthesis: analysis.synthesis || "", 402 - }, 403 - recordUri: row.uri, 404 - }); 405 - } catch {} 406 - } 407 - 408 - return results; 409 - } 410 - 411 - // ─── Island cache ────────────────────────────────────────────────── 412 - // 413 370 // ─── Hono app ─────────────────────────────────────────────────────── 414 371 415 372 let app: Hono<{ Bindings: Env }> | null = null; ··· 424 381 app.get("/", async (c) => { 425 382 let islandsJson = "[]"; 426 383 try { 427 - const islands = await listStrataIslands(db); 428 - islandsJson = JSON.stringify(islands); 384 + const resp = await fetch(new URL("/xrpc/org.latha.strata.getIslands", c.req.url)); 385 + const data = await resp.json() as { islands: any[] }; 386 + islandsJson = JSON.stringify(data.islands); 429 387 } catch (e) { 430 388 console.error("Failed to load islands:", e); 431 389 } ··· 841 799 app.get(path, async (c) => { 842 800 let islandsJson = "[]"; 843 801 try { 844 - const islands = await listStrataIslands(db); 845 - islandsJson = JSON.stringify(islands); 802 + const resp = await fetch(new URL("/xrpc/org.latha.strata.getIslands", c.req.url)); 803 + const data = await resp.json() as { islands: any[] }; 804 + islandsJson = JSON.stringify(data.islands); 846 805 } catch {} 847 806 848 807 const page = LANDING_PAGE.replace(
+9 -2
wrangler.jsonc
··· 17 17 "containers": [ 18 18 { 19 19 "name": "strata-analysis", 20 + "class_name": "StrataContainer", 20 21 "image": "./container/Dockerfile", 21 - "instances": 1, 22 - "durable_object": { "binding": "STRATA_CONTAINER" } 22 + "max_instances": 1 23 23 } 24 24 ], 25 25 ··· 31 31 } 32 32 ] 33 33 }, 34 + 35 + "migrations": [ 36 + { 37 + "tag": "v1", 38 + "new_sqlite_classes": ["StrataContainer"] 39 + } 40 + ], 34 41 35 42 "triggers": { 36 43 "crons": ["*/1 * * * *"]