rspace-online/server/mcp-tools
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
..
_auth.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
crowdsurf.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
ragents.ts feat(mi): per-space knowledge index with ranked context injection 2026-04-12 22:19:07 -04:00
rbnb.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rbooks.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rcal.ts feat: object visibility membrane — per-object access filtering 2026-04-12 11:09:44 -04:00
rcart.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rchats.ts feat: object visibility membrane — per-object access filtering 2026-04-12 11:09:44 -04:00
rchoices.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rdata.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rdesign.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rdocs.ts feat: object visibility membrane — per-object access filtering 2026-04-12 11:09:44 -04:00
rexchange.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rfiles.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rflows.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rforum.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rgov.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rinbox.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rmaps.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rmeets.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rnetwork.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rnotes.ts feat: object visibility membrane — per-object access filtering 2026-04-12 11:09:44 -04:00
rphotos.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rpubs.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rschedule.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rsheets.ts fix: rename rsheet module to rsheets (fixes missing module crash) 2026-04-10 11:19:32 -04:00
rsocials.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rsplat.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rswag.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rtasks.ts feat: object visibility membrane — per-object access filtering 2026-04-12 11:09:44 -04:00
rtime.ts feat: object visibility membrane — per-object access filtering 2026-04-12 11:09:44 -04:00
rtrips.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rtube.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rvnb.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rvote.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
rwallet.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00
spaces.ts feat(mcp): 101 MCP tools across all 35 rApps + security hardening + MI integration 2026-04-10 10:25:17 -04:00