rspace-online/server
Jeff Emmett 75fd5cf4be feat(mi): per-space knowledge index with ranked context injection
Replace the 265-line data dump (35 modules × 3 items) in MI system prompts
with a trigram-ranked knowledge index that surfaces only the top-18 most
relevant entries per query. Adds per-space conversation memory persisted
to disk for cross-session context.

New files:
- server/mi-trigrams.ts — trigram + Jaccard similarity utilities
- server/space-knowledge.ts — SpaceKnowledgeIndex with 5-min TTL cache
- server/space-memory.ts — SpaceMemory with debounced disk persistence

Changes:
- mi-routes.ts: ~280 lines removed, replaced with ranked index call
- sync-instance.ts: cache invalidation on doc changes
- rauctions/mod.ts: fix ModuleScoping type (defaultScope, userConfigurable)
- mcp-tools/ragents.ts: fix AccessResult property access (claims.username, claims.sub)

~80% token reduction per MI request (~6,300 → ~1,320 tokens).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 22:19:07 -04:00
..
local-first fix: comprehensive memory leak and performance fixes across 44 files 2026-04-10 22:26:24 -04:00
magic-link feat: magic link responses for polls and RSVPs 2026-04-09 13:41:17 -04:00
mcp-tools feat(mi): per-space knowledge index with ranked context injection 2026-04-12 22:19:07 -04:00
oauth feat(rcal): add Google Calendar sync integration with connectors menu 2026-04-10 19:45:52 -04:00
auth.ts refactor(auth): replace @encryptid/sdk imports with local auth module 2026-03-22 16:41:59 -07:00
bonding-curve.ts feat(rwallet): HyperSwitch full-loop fiat↔CRDT payment integration 2026-03-23 17:34:48 -07:00
bug-report-routes.ts feat: global bug report button — floating widget on every page 2026-04-09 14:03:27 -04:00
cad-orchestrator.ts fix(cad): CSS containment + Scribus image gen for all CAD shapes 2026-03-25 17:53:42 -07:00
clock-service.ts feat: system clock heartbeat + ephemeral clock delivery (TASK-47) 2026-03-11 16:20:04 -07:00
community-store.ts fix(spaces): pin visibility and ownerDID as server-authoritative 2026-03-25 18:03:43 -07:00
dashboard-routes.ts feat: customizable dashboard with persistent home icon and widget system 2026-04-10 23:10:27 -04:00
encryptid-sdk.d.ts feat(identity): local persona switcher for client-side multi-account 2026-03-23 12:10:55 -07:00
google-calendar.ts feat(rcal): add Google Calendar sync integration with connectors menu 2026-04-10 19:45:52 -04:00
index.ts fix(video-gen): use fal.ai status_url from submit response + add logging 2026-04-12 20:27:59 -04:00
ipfs-routes.ts feat(ipfs): add IPFS integration for backups and generated files 2026-04-02 14:24:39 -07:00
ipfs.ts fix(ipfs): correct Kubo container hostname (collab-server-ipfs-1) 2026-04-02 15:06:05 -07:00
landing-proxy.ts fix(infra): consolidate external service URLs to rspace.online (TASK-51.1) 2026-03-11 19:12:51 -07:00
landing.ts feat(landing): overhaul homepage — interop messaging, flow cards, reduced dashboard flash 2026-04-12 16:18:38 -04:00
mcp-server.ts feat(ragents): add agent-to-agent exchange module 2026-04-12 23:27:29 +00:00
mi-agent.ts feat(mi): agentic upgrade — multi-turn loop, LiteLLM, media gen, live data 2026-03-24 19:26:56 -07:00
mi-data-queries.ts feat(ragents): add agent-to-agent exchange module 2026-04-12 23:27:29 +00:00
mi-media.ts feat: ASCII art canvas tool, video gen fixes, scribus/notebook sidecars 2026-04-03 14:25:48 -07:00
mi-provider.ts feat(mi): agentic upgrade — multi-turn loop, LiteLLM, media gen, live data 2026-03-24 19:26:56 -07:00
mi-routes.ts feat(mi): per-space knowledge index with ranked context injection 2026-04-12 22:19:07 -04:00
mi-trigrams.ts feat(mi): per-space knowledge index with ranked context injection 2026-04-12 22:19:07 -04:00
notification-routes.ts fix(notifications): use full URL pathname for proxy path 2026-03-23 13:36:51 -07:00
notification-service.ts feat(comments): spatial comment pins on all rApp module pages 2026-04-10 11:15:05 -04:00
output-list.ts fix(routing): eliminate /{space} from paths on subdomain routing 2026-03-24 18:45:16 -07:00
seed-campaign.ts fix(canvas): prevent shape re-seeding after user clears canvas 2026-03-22 14:40:28 -07:00
seed-demo.ts fix: ensure demo community visibility is always public on startup 2026-03-24 13:21:59 -07:00
seed-template.ts fix(canvas): prevent shape re-seeding after user clears canvas 2026-03-22 14:40:28 -07:00
shell.ts fix: MI bar z-index, SW force-update, rtime mobile layout 2026-04-11 23:17:53 +00:00
sidecar-manager.ts fix(sidecar): bump Docker API version from 1.43 to 1.44 2026-04-09 12:43:24 -04:00
space-knowledge.ts feat(mi): per-space knowledge index with ranked context injection 2026-04-12 22:19:07 -04:00
space-memory.ts feat(mi): per-space knowledge index with ranked context injection 2026-04-12 22:19:07 -04:00
spaces.ts fix: use internal mailcow relay (port 25) for all SMTP transports 2026-04-03 15:12:42 -07:00
sync-instance.ts feat(mi): per-space knowledge index with ranked context injection 2026-04-12 22:19:07 -04:00
token-schemas.ts feat(rwallet): HyperSwitch full-loop fiat↔CRDT payment integration 2026-03-23 17:34:48 -07:00
token-service.ts feat(rwallet): HyperSwitch full-loop fiat↔CRDT payment integration 2026-03-23 17:34:48 -07:00