fix: rename rsheet module to rsheets (fixes missing module crash)
The rsheet→rsheets rename was partially applied - server/index.ts imported rsheets/mod but the files still lived at rsheet/. This caused a crash on startup: "Cannot find module '../modules/rsheets/mod'". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1de038eeab
commit
8887e18dda
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* rSheet module — collaborative spreadsheets powered by dSheet.
|
||||
* rSheets module — collaborative spreadsheets powered by dSheet.
|
||||
*
|
||||
* Embeds @fileverse-dev/dsheet as an external app within the rSpace shell.
|
||||
*/
|
||||
|
|
@ -108,11 +108,11 @@ routes.get("/", (c) => {
|
|||
const space = c.req.param("space") || "demo";
|
||||
return c.html(
|
||||
renderExternalAppShell({
|
||||
title: `Spreadsheets — rSheet | rSpace`,
|
||||
moduleId: "rsheet",
|
||||
title: `Spreadsheets — rSheets | rSpace`,
|
||||
moduleId: "rsheets",
|
||||
spaceSlug: space,
|
||||
modules: getModuleInfoList(),
|
||||
appUrl: `/rsheet/app`,
|
||||
appUrl: `/rsheets/app`,
|
||||
appName: "dSheet",
|
||||
theme: "dark",
|
||||
})
|
||||
|
|
@ -128,7 +128,7 @@ routes.get("/app", (c) => {
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>rSheet — ${space}</title>
|
||||
<title>rSheets — ${space}</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
html, body, #sheet { width: 100%; height: 100%; background: #0f172a; color: #e2e8f0; }
|
||||
|
|
@ -265,16 +265,16 @@ export function getRecentSheetsForMI(space: string, limit = 5): { id: string; na
|
|||
|
||||
// ── Module definition ──
|
||||
|
||||
export const sheetModule: RSpaceModule = {
|
||||
id: "rsheet",
|
||||
name: "rSheet",
|
||||
export const sheetsModule: RSpaceModule = {
|
||||
id: "rsheets",
|
||||
name: "rSheets",
|
||||
icon: "\u{1F4CA}",
|
||||
description: "Collaborative spreadsheets",
|
||||
scoping: { defaultScope: "space", userConfigurable: false },
|
||||
docSchemas: [{ pattern: '{space}:sheet:sheets:{sheetId}', description: 'One doc per spreadsheet', init: sheetSchema.init }],
|
||||
routes,
|
||||
externalApp: {
|
||||
url: "/rsheet/app",
|
||||
url: "/rsheets/app",
|
||||
name: "dSheet",
|
||||
},
|
||||
async onInit(ctx) { _syncServer = ctx.syncServer; },
|
||||
|
|
@ -292,7 +292,7 @@ export const sheetModule: RSpaceModule = {
|
|||
icon: "\u{1F4CA}",
|
||||
description: "Create or edit a collaborative spreadsheet",
|
||||
type: "navigate" as any,
|
||||
href: "/rsheet",
|
||||
href: "/rsheets",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* rSheet Automerge document schemas.
|
||||
* rSheets Automerge document schemas.
|
||||
*
|
||||
* Granularity: one Automerge document per sheet.
|
||||
* DocId format: {space}:sheet:sheets:{sheetId}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
* rvote (3), rchoices (3), rtrips (4), rcart (4), rexchange (4), rbnb (4),
|
||||
* rvnb (3), crowdsurf (2), rbooks (2), rpubs (2), rmeets (2), rtube (2),
|
||||
* rswag (2), rdesign (2), rsplat (2), rphotos (2), rflows (2), rdocs (1),
|
||||
* rdata (1), rforum (2), rchats (3), rmaps (3), rsheet (2), rgov (2)
|
||||
* rdata (1), rforum (2), rchats (3), rmaps (3), rsheets (2), rgov (2)
|
||||
* 1 resource: rspace://spaces/{slug}
|
||||
*/
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ import { registerDataTools } from "./mcp-tools/rdata";
|
|||
import { registerForumTools } from "./mcp-tools/rforum";
|
||||
import { registerChatsTools } from "./mcp-tools/rchats";
|
||||
import { registerMapsTools } from "./mcp-tools/rmaps";
|
||||
import { registerSheetTools } from "./mcp-tools/rsheet";
|
||||
import { registerSheetsTools } from "./mcp-tools/rsheets";
|
||||
import { registerGovTools } from "./mcp-tools/rgov";
|
||||
|
||||
function createMcpServerInstance(syncServer: SyncServer): McpServer {
|
||||
|
|
@ -95,7 +95,7 @@ function createMcpServerInstance(syncServer: SyncServer): McpServer {
|
|||
registerForumTools(server, syncServer);
|
||||
registerChatsTools(server, syncServer);
|
||||
registerMapsTools(server, syncServer);
|
||||
registerSheetTools(server, syncServer);
|
||||
registerSheetsTools(server, syncServer);
|
||||
registerGovTools(server);
|
||||
|
||||
return server;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
/**
|
||||
* MCP tools for rSheet (collaborative spreadsheets).
|
||||
* MCP tools for rSheets (collaborative spreadsheets).
|
||||
* Multi-doc: {space}:sheet:sheets:{sheetId}
|
||||
*
|
||||
* Tools: rsheet_list_sheets, rsheet_get_sheet
|
||||
* Tools: rsheets_list_sheets, rsheets_get_sheet
|
||||
*/
|
||||
|
||||
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
||||
import { z } from "zod";
|
||||
import type { SyncServer } from "../local-first/sync-server";
|
||||
import { sheetDocId } from "../../modules/rsheet/schemas";
|
||||
import type { SheetDoc } from "../../modules/rsheet/schemas";
|
||||
import { sheetDocId } from "../../modules/rsheets/schemas";
|
||||
import type { SheetDoc } from "../../modules/rsheets/schemas";
|
||||
import { resolveAccess, accessDeniedResponse } from "./_auth";
|
||||
|
||||
export function registerSheetTools(server: McpServer, syncServer: SyncServer) {
|
||||
export function registerSheetsTools(server: McpServer, syncServer: SyncServer) {
|
||||
server.tool(
|
||||
"rsheet_list_sheets",
|
||||
"rsheets_list_sheets",
|
||||
"List spreadsheets in a space",
|
||||
{
|
||||
space: z.string().describe("Space slug"),
|
||||
|
|
@ -48,7 +48,7 @@ export function registerSheetTools(server: McpServer, syncServer: SyncServer) {
|
|||
);
|
||||
|
||||
server.tool(
|
||||
"rsheet_get_sheet",
|
||||
"rsheets_get_sheet",
|
||||
"Get full sheet data (meta, columns, cells)",
|
||||
{
|
||||
space: z.string().describe("Space slug"),
|
||||
|
|
@ -20,7 +20,7 @@ import { getRecentVideosForMI } from "../modules/rtube/mod";
|
|||
import { getRecentMessagesForMI } from "../modules/rchats/mod";
|
||||
import { getRecentPublicationsForMI } from "../modules/rpubs/mod";
|
||||
import { getRecentDesignsForMI } from "../modules/rswag/mod";
|
||||
import { getRecentSheetsForMI } from "../modules/rsheet/mod";
|
||||
import { getRecentSheetsForMI } from "../modules/rsheets/mod";
|
||||
import { getLinkedDocsForMI } from "../modules/rdocs/mod";
|
||||
import { getRecentSessionsForMI } from "../modules/rdesign/mod";
|
||||
import { getSharedAlbumsForMI } from "../modules/rphotos/mod";
|
||||
|
|
@ -205,7 +205,7 @@ export function queryModuleContent(
|
|||
return { ok: true, module, queryType, data: designs, summary: lines.length ? `Store designs:\n${lines.join("\n")}` : "No designs found." };
|
||||
}
|
||||
|
||||
case "rsheet": {
|
||||
case "rsheets": {
|
||||
const sheets = getRecentSheetsForMI(space, limit);
|
||||
if (queryType === "count") {
|
||||
return { ok: true, module, queryType, data: { count: sheets.length }, summary: `${sheets.length} spreadsheets found.` };
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import { getRecentVideosForMI } from "../modules/rtube/mod";
|
|||
import { getRecentMessagesForMI } from "../modules/rchats/mod";
|
||||
import { getRecentPublicationsForMI } from "../modules/rpubs/mod";
|
||||
import { getRecentDesignsForMI } from "../modules/rswag/mod";
|
||||
import { getRecentSheetsForMI } from "../modules/rsheet/mod";
|
||||
import { getRecentSheetsForMI } from "../modules/rsheets/mod";
|
||||
import { getLinkedDocsForMI } from "../modules/rdocs/mod";
|
||||
import { getRecentSessionsForMI } from "../modules/rdesign/mod";
|
||||
import { getSharedAlbumsForMI } from "../modules/rphotos/mod";
|
||||
|
|
@ -551,7 +551,7 @@ When you need to look up the user's actual data (notes, tasks, events):
|
|||
[MI_ACTION:{"type":"query-content","module":"rchats","queryType":"recent","limit":5}]
|
||||
[MI_ACTION:{"type":"query-content","module":"rpubs","queryType":"recent","limit":5}]
|
||||
[MI_ACTION:{"type":"query-content","module":"rswag","queryType":"recent","limit":5}]
|
||||
[MI_ACTION:{"type":"query-content","module":"rsheet","queryType":"recent","limit":5}]
|
||||
[MI_ACTION:{"type":"query-content","module":"rsheets","queryType":"recent","limit":5}]
|
||||
[MI_ACTION:{"type":"query-content","module":"rdocs","queryType":"recent","limit":5}]
|
||||
[MI_ACTION:{"type":"query-content","module":"rdesign","queryType":"recent","limit":5}]
|
||||
[MI_ACTION:{"type":"query-content","module":"rphotos","queryType":"recent","limit":5}]
|
||||
|
|
|
|||
Loading…
Reference in New Issue