nyem69/martol
Multi-user AI collaboration workspace with role-based action gating
What's novel
A multi-user AI collaboration workspace where humans and AI agents work together in scoped rooms with server-enforced authority. Agents don't self-execute from chat — they submit structured intents validated against a role × risk matrix. Destructive actions require explicit owner approval.
Code Analysis
13 files read · 3 roundsA multi-user AI collaboration workspace on Cloudflare Workers where humans and AI agents interact in real-time WebSocket rooms, with server-enforced role×risk action gating, a full RAG document pipeline, Stripe billing, and MCP protocol support for agent tool invocation.
Strengths
Exceptionally deep implementation with production-grade concerns: HMAC-signed WebSocket identity, WAL-based Durable Object with degraded-mode backoff, server-authoritative risk matrix that never trusts agent input, topic-aware RAG chunking with cross-encoder reranking, comprehensive cron-based self-healing (orphan cleanup, stuck job detection, retry with backoff), and SSRF protection. The code reads like it was written by someone who has been burned in production.
Weaknesses
The chat-room.ts file at 83KB is a monolith that would benefit from further decomposition (streaming, RAG responder, and message handling could be separate modules). Some `any` types on the db parameter (noted with eslint-disable comments) reduce type safety at the Drizzle boundary, and the RAG responder's language handling (Malay/English) is hardcoded into prompts rather than being configurable per-room.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
445
Contributors
1
Files
374
Active weeks
3
Repository
Language
TypeScript
Stars
0
Forks
0
License
AGPL-3.0