/** * rGov module — Modular governance decision circuits (GovMods). * * Do-ocratic circuit components for multiplayer collaboration around * shared goals. Wire together governance primitives on a shared canvas: * signoff gates, resource thresholds, tunable knobs, project aggregators, * and amendable circuits. */ import { Hono } from "hono"; import { resolve } from "path"; import { renderShell } from "../../server/shell"; import { getModuleInfoList } from "../../shared/module"; import type { RSpaceModule } from "../../shared/module"; import { renderLanding } from "./landing"; import { addShapes, getDocumentData } from "../../server/community-store"; const routes = new Hono(); // ── Canvas content loader (same approach as rspace module) ── const DIST_DIR = resolve(import.meta.dir, "../../dist"); let canvasCache: { body: string; styles: string; scripts: string } | null = null; function extractCanvasContent(html: string) { const bodyMatch = html.match(/
]*>([\s\S]*?)<\/body>/i); const styleMatches = [...html.matchAll(/