@powerhousedao/reactor-mcp 6.0.0-dev.25 → 6.0.0-dev.251

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/cli.d.mts +1 -0
  2. package/dist/cli.mjs +138 -0
  3. package/dist/cli.mjs.map +1 -0
  4. package/dist/index.d.mts +637 -0
  5. package/dist/index.d.mts.map +1 -0
  6. package/dist/index.mjs +46 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/server-B68G2N1-.mjs +391 -0
  9. package/dist/server-B68G2N1-.mjs.map +1 -0
  10. package/package.json +24 -21
  11. package/dist/src/cli.d.ts +0 -2
  12. package/dist/src/cli.d.ts.map +0 -1
  13. package/dist/src/cli.js +0 -10
  14. package/dist/src/cli.js.map +0 -1
  15. package/dist/src/express.d.ts +0 -5
  16. package/dist/src/express.d.ts.map +0 -1
  17. package/dist/src/express.js +0 -59
  18. package/dist/src/express.js.map +0 -1
  19. package/dist/src/feature-flags.d.ts +0 -2
  20. package/dist/src/feature-flags.d.ts.map +0 -1
  21. package/dist/src/feature-flags.js +0 -9
  22. package/dist/src/feature-flags.js.map +0 -1
  23. package/dist/src/index.d.ts +0 -5
  24. package/dist/src/index.d.ts.map +0 -1
  25. package/dist/src/index.js +0 -5
  26. package/dist/src/index.js.map +0 -1
  27. package/dist/src/logger.d.ts +0 -3
  28. package/dist/src/logger.d.ts.map +0 -1
  29. package/dist/src/logger.js +0 -3
  30. package/dist/src/logger.js.map +0 -1
  31. package/dist/src/sdk/chat.d.ts +0 -19
  32. package/dist/src/sdk/chat.d.ts.map +0 -1
  33. package/dist/src/sdk/chat.js +0 -60
  34. package/dist/src/sdk/chat.js.map +0 -1
  35. package/dist/src/server.d.ts +0 -5
  36. package/dist/src/server.d.ts.map +0 -1
  37. package/dist/src/server.js +0 -56
  38. package/dist/src/server.js.map +0 -1
  39. package/dist/src/stdio/index.d.ts +0 -7
  40. package/dist/src/stdio/index.d.ts.map +0 -1
  41. package/dist/src/stdio/index.js +0 -93
  42. package/dist/src/stdio/index.js.map +0 -1
  43. package/dist/src/stdio/loader.d.ts +0 -18
  44. package/dist/src/stdio/loader.d.ts.map +0 -1
  45. package/dist/src/stdio/loader.js +0 -89
  46. package/dist/src/stdio/loader.js.map +0 -1
  47. package/dist/src/tools/index.d.ts +0 -3
  48. package/dist/src/tools/index.d.ts.map +0 -1
  49. package/dist/src/tools/index.js +0 -3
  50. package/dist/src/tools/index.js.map +0 -1
  51. package/dist/src/tools/reactor.d.ts +0 -847
  52. package/dist/src/tools/reactor.d.ts.map +0 -1
  53. package/dist/src/tools/reactor.js +0 -461
  54. package/dist/src/tools/reactor.js.map +0 -1
  55. package/dist/src/tools/types.d.ts +0 -24
  56. package/dist/src/tools/types.d.ts.map +0 -1
  57. package/dist/src/tools/types.js +0 -2
  58. package/dist/src/tools/types.js.map +0 -1
  59. package/dist/src/tools/utils.d.ts +0 -23
  60. package/dist/src/tools/utils.d.ts.map +0 -1
  61. package/dist/src/tools/utils.js +0 -99
  62. package/dist/src/tools/utils.js.map +0 -1
  63. package/dist/test/reactor.test.d.ts +0 -2
  64. package/dist/test/reactor.test.d.ts.map +0 -1
  65. package/dist/test/reactor.test.js +0 -501
  66. package/dist/test/reactor.test.js.map +0 -1
  67. package/dist/tsconfig.tsbuildinfo +0 -1
  68. package/dist/vitest.config.d.ts +0 -3
  69. package/dist/vitest.config.d.ts.map +0 -1
  70. package/dist/vitest.config.js +0 -9
  71. package/dist/vitest.config.js.map +0 -1
@@ -1,59 +0,0 @@
1
- import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
2
- import { logger } from "./logger.js";
3
- import { createServer } from "./server.js";
4
- export async function setupMcpServer(reactor, app) {
5
- const server = await createServer(reactor);
6
- app.post("/mcp", (req, res) => {
7
- // In stateless mode, create a new instance of transport and server for each request
8
- // to ensure complete isolation. A single instance would cause request ID collisions
9
- // when multiple clients connect concurrently.
10
- try {
11
- const transport = new StreamableHTTPServerTransport({
12
- sessionIdGenerator: undefined,
13
- });
14
- res.on("close", () => {
15
- void transport.close();
16
- void server.close();
17
- });
18
- void server.connect(transport);
19
- void transport.handleRequest(req, res, req.body);
20
- }
21
- catch (error) {
22
- logger.error("Error handling MCP request:", error);
23
- if (!res.headersSent) {
24
- res.status(500).json({
25
- jsonrpc: "2.0",
26
- error: {
27
- code: -32603,
28
- message: "Internal server error",
29
- },
30
- id: null,
31
- });
32
- }
33
- }
34
- });
35
- // SSE notifications not supported in stateless mode
36
- app.get("/mcp", (req, res) => {
37
- res.writeHead(405).end(JSON.stringify({
38
- jsonrpc: "2.0",
39
- error: {
40
- code: -32000,
41
- message: "Method not allowed.",
42
- },
43
- id: null,
44
- }));
45
- });
46
- // Session termination not needed in stateless mode
47
- app.delete("/mcp", (req, res) => {
48
- res.writeHead(405).end(JSON.stringify({
49
- jsonrpc: "2.0",
50
- error: {
51
- code: -32000,
52
- message: "Method not allowed.",
53
- },
54
- id: null,
55
- }));
56
- });
57
- return server;
58
- }
59
- //# sourceMappingURL=express.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"express.js","sourceRoot":"","sources":["../../src/express.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAGnG,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,OAA6B,EAC7B,GAAY;IAEZ,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;IAC3C,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE;QAC/C,oFAAoF;QACpF,oFAAoF;QACpF,8CAA8C;QAC9C,IAAI,CAAC;YACH,MAAM,SAAS,GACb,IAAI,6BAA6B,CAAC;gBAChC,kBAAkB,E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CAAC,GAAG,CACpB,IAAI,CAAC,SAAS,CAAC;YACb,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACL,IAAI,EAAE,CAAC,KAAK;gBACZ,OAAO,EAAE,qBAAqB;aAC/B;YACD,EAAE,EAAE,IAAI;SACT,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function initFeatureFlags(): Promise<import("@openfeature/server-sdk").Client>;
2
- //# sourceMappingURL=feature-flags.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature-flags.d.ts","sourceRoot":"","sources":["../../src/feature-flags.ts"],"names":[],"mappings":"AAGA,wBAAsB,gBAAgB,sDAOrC"}
@@ -1,9 +0,0 @@
1
- import { EnvVarProvider } from "@openfeature/env-var-provider";
2
- import { OpenFeature } from "@openfeature/server-sdk";
3
- export async function initFeatureFlags() {
4
- // for now, we're only using env vars for feature flags
5
- const provider = new EnvVarProvider();
6
- await OpenFeature.setProviderAndWait(provider);
7
- return OpenFeature.getClient();
8
- }
9
- //# sourceMappingURL=feature-flags.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature-flags.js","sourceRoot":"","sources":["../../src/feature-flags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,uDAAuD;IACvD,MAAM,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;IAEtC,MAAM,WAAW,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAE/C,OAAO,WAAW,CAAC,SAAS,EAAE,CAAC;AACjC,CAAC"}
@@ -1,5 +0,0 @@
1
- export { setupMcpServer } from "./express.js";
2
- export { createServer } from "./server.js";
3
- export * from "./tools/index.js";
4
- export * from "./tools/types.js";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
package/dist/src/index.js DELETED
@@ -1,5 +0,0 @@
1
- export { setupMcpServer } from "./express.js";
2
- export { createServer } from "./server.js";
3
- export * from "./tools/index.js";
4
- export * from "./tools/types.js";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ILogger } from "document-drive";
2
- export declare const logger: ILogger;
3
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,eAAO,MAAM,MAAM,EAAE,OAAsC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { childLogger } from "document-drive";
2
- export const logger = childLogger(["reactor-mcp"]);
3
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,MAAM,GAAY,WAAW,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { Provider } from "ai";
2
- export interface ChatMessage {
3
- role: "user" | "assistant" | "system";
4
- content: string;
5
- }
6
- export interface ChatOptions {
7
- provider?: Provider;
8
- model?: string;
9
- systemPrompt?: string;
10
- }
11
- export declare class LLMChat {
12
- private provider;
13
- private model;
14
- private systemPrompt;
15
- constructor(options?: ChatOptions);
16
- sendMessage(messages: ChatMessage[]): Promise<string>;
17
- streamMessage(messages: ChatMessage[], onChunk: (chunk: string) => void): Promise<void>;
18
- }
19
- //# sourceMappingURL=chat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/sdk/chat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,QAAQ,EAAE,MAAM,IAAI,CAAC;AAIjD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,YAAY,CAAS;gBAEjB,OAAO,GAAE,WAAgB;IAU/B,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAyBrD,aAAa,CACjB,QAAQ,EAAE,WAAW,EAAE,EACvB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAC/B,OAAO,CAAC,IAAI,CAAC;CAqBjB"}
@@ -1,60 +0,0 @@
1
- import { createOpenAI } from "@ai-sdk/openai";
2
- import { streamText } from "ai";
3
- import { logger } from "../logger.js";
4
- export class LLMChat {
5
- provider;
6
- model;
7
- systemPrompt;
8
- constructor(options = {}) {
9
- this.provider =
10
- options.provider ||
11
- createOpenAI({
12
- apiKey: process.env.OPENAI_API_KEY || "",
13
- });
14
- this.model = options.model || "gpt-4-turbo";
15
- this.systemPrompt = options.systemPrompt || "You are a helpful assistant.";
16
- }
17
- async sendMessage(messages) {
18
- try {
19
- const coreMessages = messages.map((msg) => ({
20
- role: msg.role,
21
- content: msg.content,
22
- }));
23
- const result = streamText({
24
- model: this.provider.languageModel(this.model),
25
- system: this.systemPrompt,
26
- messages: coreMessages,
27
- });
28
- let fullResponse = "";
29
- for await (const textPart of result.textStream) {
30
- fullResponse += textPart;
31
- }
32
- return fullResponse;
33
- }
34
- catch (error) {
35
- logger.error("Error sending message to LLM:", error);
36
- throw error;
37
- }
38
- }
39
- async streamMessage(messages, onChunk) {
40
- try {
41
- const coreMessages = messages.map((msg) => ({
42
- role: msg.role,
43
- content: msg.content,
44
- }));
45
- const result = streamText({
46
- model: this.provider.languageModel(this.model),
47
- system: this.systemPrompt,
48
- messages: coreMessages,
49
- });
50
- for await (const textPart of result.textStream) {
51
- onChunk(textPart);
52
- }
53
- }
54
- catch (error) {
55
- logger.error("Error streaming message from LLM:", error);
56
- throw error;
57
- }
58
- }
59
- }
60
- //# sourceMappingURL=chat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../src/sdk/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAatC,MAAM,OAAO,OAAO;IACV,QAAQ,CAAW;IACnB,KAAK,CAAS;IACd,YAAY,CAAS;IAE7B,YAAY,UAAuB,EAAE;QACnC,IAAI,CAAC,QAAQ;YACX,OAAO,CAAC,QAAQ;gBAChB,YAAY,CAAC;oBACX,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,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AAU,CAAC;gBACxB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC9C,MAAM,EAAE,IAAI,CAAC,YAAY;gBACzB,QAAQ,EAAE,YAAY;aACvB,CAAC,CAAC;YAEH,IAAI,KAAK,EAAE,MAAM,QAAQ,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;gBAC/C,OAAO,CAAC,QAAQ,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;YACzD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -1,5 +0,0 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import type { IDocumentDriveServer } from "document-drive";
3
- export declare const ReactorMcpInstructions = "MUST BE USED when handling documents or document-models for the Powerhouse/Vetra ecosystem.\nThere are 5 main concepts to know of: \n- Document Model: A template for creating documents. It defines the schema and allowed operations for a type of document.\n- Document: An instance of a document model. It contains actual data following the structure defined by the document model and can be changed using operations.\n- Drive: A document of type \"powerhouse/document-drive\" which represents a collection of documents and folders. To add documents to a drive, use the \"addActions\" tool with an \"ADD_FILE\" action.\n- Action: A proposed change to a document. It is a JSON object with the action name and input that defines the action to be taken on the document. Should be dispatched by calling the \"addActions\" tool.\n- Operation: A change done to a document. It contains the action object plus additional metadata such as the index of the operation in the document history, the timestamp it was added, the hash of the resulting document data, the number of operations skipped, and the error message if the operation failed. Actions dispatched with \"addActions\" get converted into an operation.\n\nWhen planning to add multiple actions to a document, try to reduce the number of \"addActions\" calls to a minimum by adding multiple actions at once.\nUnless the user specifies otherwise, and a drive with slug \"vetra\" is available, add newly created documents to it.\n\nExamples:\n<example>Context: User needs to create a new document model for their application. user: 'I need to create a user profile document model with fields for name, email, and preferences' assistant: 'I'll use the reactor-mcp-server to help you create this document model.' <commentary>Since the user is requesting document model creation, use the reactor-mcp-document-expert agent to ensure proper reactor-mcp tool usage.</commentary></example> <example>Context: User is building a content management system and needs create documents for certain types of document models. user: 'Can you help me create example documents for blog posts and categories document models?' assistant: 'Let me use the reactor-mcp-server to create these documents using the appropriate reactor-mcp tool calls.' <commentary>Document model creation requires the reactor-mcp-server tool calls to ensure compliance.</commentary></example>\n<example>Context: User needs to create a new document instance of a given document model. user: 'I need to create a demo user profile document' assistant: 'I'll use the reactor-mcp-server to help you create this document with example values.' <commentary>Since the user is requesting document model creation, use the reactor-mcp-document-expert agent to ensure proper reactor-mcp tool usage.</commentary></example> <example>Context: User is building a content management system and needs create documents for certain types of document models. user: 'Can you help me create example documents for blog posts and categories document models?' assistant: 'Let me use the reactor-mcp-server to create these documents using the appropriate reactor-mcp tool calls.' <commentary>Document creation requires the reactor-mcp-server tool calls to ensure compliance.</commentary></example>\n";
4
- export declare function createServer(reactor: IDocumentDriveServer): Promise<McpServer>;
5
- //# sourceMappingURL=server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,eAAO,MAAM,sBAAsB,+sGAclC,CAAC;AAEF,wBAAsB,YAAY,CAChC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,SAAS,CAAC,CAmDpB"}
@@ -1,56 +0,0 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { createReactorMcpProvider } from "./tools/reactor.js";
3
- export const ReactorMcpInstructions = `MUST BE USED when handling documents or document-models for the Powerhouse/Vetra ecosystem.
4
- There are 5 main concepts to know of:
5
- - Document Model: A template for creating documents. It defines the schema and allowed operations for a type of document.
6
- - Document: An instance of a document model. It contains actual data following the structure defined by the document model and can be changed using operations.
7
- - Drive: A document of type "powerhouse/document-drive" which represents a collection of documents and folders. To add documents to a drive, use the "addActions" tool with an "ADD_FILE" action.
8
- - Action: A proposed change to a document. It is a JSON object with the action name and input that defines the action to be taken on the document. Should be dispatched by calling the "addActions" tool.
9
- - Operation: A change done to a document. It contains the action object plus additional metadata such as the index of the operation in the document history, the timestamp it was added, the hash of the resulting document data, the number of operations skipped, and the error message if the operation failed. Actions dispatched with "addActions" get converted into an operation.
10
-
11
- When planning to add multiple actions to a document, try to reduce the number of "addActions" calls to a minimum by adding multiple actions at once.
12
- Unless the user specifies otherwise, and a drive with slug "vetra" is available, add newly created documents to it.
13
-
14
- Examples:
15
- <example>Context: User needs to create a new document model for their application. user: 'I need to create a user profile document model with fields for name, email, and preferences' assistant: 'I'll use the reactor-mcp-server to help you create this document model.' <commentary>Since the user is requesting document model creation, use the reactor-mcp-document-expert agent to ensure proper reactor-mcp tool usage.</commentary></example> <example>Context: User is building a content management system and needs create documents for certain types of document models. user: 'Can you help me create example documents for blog posts and categories document models?' assistant: 'Let me use the reactor-mcp-server to create these documents using the appropriate reactor-mcp tool calls.' <commentary>Document model creation requires the reactor-mcp-server tool calls to ensure compliance.</commentary></example>
16
- <example>Context: User needs to create a new document instance of a given document model. user: 'I need to create a demo user profile document' assistant: 'I'll use the reactor-mcp-server to help you create this document with example values.' <commentary>Since the user is requesting document model creation, use the reactor-mcp-document-expert agent to ensure proper reactor-mcp tool usage.</commentary></example> <example>Context: User is building a content management system and needs create documents for certain types of document models. user: 'Can you help me create example documents for blog posts and categories document models?' assistant: 'Let me use the reactor-mcp-server to create these documents using the appropriate reactor-mcp tool calls.' <commentary>Document creation requires the reactor-mcp-server tool calls to ensure compliance.</commentary></example>
17
- `;
18
- export async function createServer(reactor) {
19
- const server = new McpServer({
20
- name: "reactor-mcp-server",
21
- version: "1.0.0",
22
- description: ReactorMcpInstructions,
23
- instructions: ReactorMcpInstructions,
24
- }, {
25
- capabilities: {
26
- tools: {},
27
- resources: {
28
- subscribe: true,
29
- listChanged: true,
30
- },
31
- prompts: {
32
- listChanged: true,
33
- },
34
- },
35
- });
36
- server.registerResource("instructions", "reactor://instructions", {
37
- title: "Instructions",
38
- description: "General instructions on how to use the tools of this MCP",
39
- mimeType: "text/plain",
40
- }, (uri) => ({
41
- contents: [
42
- {
43
- uri: uri.href,
44
- text: ReactorMcpInstructions,
45
- },
46
- ],
47
- }));
48
- const reactorProvider = await createReactorMcpProvider(reactor);
49
- const { callback, ...toolSchema } = reactorProvider.tools.getDocumentModels;
50
- // server.registerTool("getDocumentModels", toolSchema, callback);
51
- Object.entries(reactorProvider.tools).forEach(([toolName, { callback, ...schema }]) => {
52
- server.registerTool(toolName, schema, callback);
53
- });
54
- return server;
55
- }
56
- //# sourceMappingURL=server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;CAcrC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAA6B;IAE7B,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;QACE,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,sBAAsB;QACnC,YAAY,EAAE,sBAAsB;KACrC,EACD;QACE,YAAY,EAAE;YACZ,KAAK,EAAE,EAAE;YACT,SAAS,EAAE;gBACT,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,IAAI;aAClB;YACD,OAAO,EAAE;gBACP,WAAW,EAAE,IAAI;aAClB;SACF;KACF,CACF,CAAC;IAEF,MAAM,CAAC,gBAAgB,CACrB,cAAc,EACd,wBAAwB,EACxB;QACE,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,0DAA0D;QACvE,QAAQ,EAAE,YAAY;KACvB,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACR,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,GAAG,CAAC,IAAI;gBACb,IAAI,EAAE,sBAAsB;aAC7B;SACF;KACF,CAAC,CACH,CAAC;IAEF,MAAM,eAAe,GAAG,MAAM,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAEhE,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,iBAAiB,CAAC;IAC5E,kEAAkE;IAClE,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,OAAO,CAC3C,CAAC,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAa,EAAE,QAAe,CAAC,CAAC;IAChE,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,7 +0,0 @@
1
- export interface IMcpOptions {
2
- remoteDrive?: string;
3
- root?: string;
4
- documentModelsDir?: string;
5
- }
6
- export declare function initStdioMcpServer(options?: IMcpOptions): Promise<void>;
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stdio/index.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAmBD,wBAAsB,kBAAkB,CAAC,OAAO,CAAC,EAAE,WAAW,iBA2F7D"}
@@ -1,93 +0,0 @@
1
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
2
- import { driveDocumentModelModule, ReactorBuilder, } from "document-drive";
3
- import { documentModelDocumentModelModule } from "document-model";
4
- import { generateId } from "document-model/core";
5
- import { initFeatureFlags } from "../feature-flags.js";
6
- import { logger } from "../logger.js";
7
- import { createServer } from "../server.js";
8
- import { VitePackageLoader } from "./loader.js";
9
- const baseDocumentModels = [
10
- documentModelDocumentModelModule,
11
- driveDocumentModelModule,
12
- ];
13
- async function createReactor(documentModels, documentDriveServerOptions) {
14
- const reactor = new ReactorBuilder(baseDocumentModels.concat(documentModels))
15
- .withOptions(documentDriveServerOptions)
16
- .build();
17
- await reactor.initialize();
18
- return reactor;
19
- }
20
- export async function initStdioMcpServer(options) {
21
- const { remoteDrive, root, documentModelsDir = "./document-models", } = options ?? {};
22
- // initialize feature flags
23
- await initFeatureFlags();
24
- // if root of project is passed then loads local document models
25
- let documentModelsLoader;
26
- const documentModels = [];
27
- if (root) {
28
- documentModelsLoader = new VitePackageLoader(root, documentModelsDir);
29
- try {
30
- const loadedModels = await documentModelsLoader.load();
31
- documentModels.push(...loadedModels);
32
- logger.log("Loaded document models:", loadedModels.map((m) => m.documentModel.global.name).join(", "));
33
- }
34
- catch (e) {
35
- logger.error(e);
36
- }
37
- }
38
- // initializes reactor with loaded document models
39
- const reactor = await createReactor(documentModels, {
40
- featureFlags: {
41
- enableDualActionCreate: true,
42
- },
43
- });
44
- // listens for changes in the local document models to update the reactor
45
- if (documentModelsLoader) {
46
- const unsubscribe = await documentModelsLoader.onDocumentModelsChange((models) => {
47
- reactor.setDocumentModelModules(baseDocumentModels.concat(models));
48
- });
49
- process.on("exit", () => {
50
- unsubscribe();
51
- });
52
- }
53
- // if a remote drive is passed then adds it to the reactor
54
- if (remoteDrive) {
55
- try {
56
- await reactor.addRemoteDrive(remoteDrive, {
57
- sharingType: "PUBLIC",
58
- availableOffline: true,
59
- listeners: [
60
- {
61
- block: true,
62
- callInfo: {
63
- data: remoteDrive,
64
- name: "switchboard-push",
65
- transmitterType: "SwitchboardPush",
66
- },
67
- filter: {
68
- branch: ["main"],
69
- documentId: ["*"],
70
- documentType: ["*"],
71
- scope: ["global"],
72
- },
73
- label: "Switchboard Sync",
74
- listenerId: generateId(),
75
- system: true,
76
- },
77
- ],
78
- triggers: [],
79
- });
80
- }
81
- catch (e) {
82
- throw new Error(`Failed to add remote drive "${remoteDrive}": ${e instanceof Error ? e.message : e}`, {
83
- cause: e,
84
- });
85
- }
86
- }
87
- // starts the server
88
- const server = await createServer(reactor);
89
- // starts Stdio transport
90
- const transport = new StdioServerTransport();
91
- await server.connect(transport);
92
- }
93
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stdio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,wBAAwB,EACxB,cAAc,GAEf,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQhD,MAAM,kBAAkB,GAA+B;IACrD,gCAAgC;IAChC,wBAAwB;CACzB,CAAC;AAEF,KAAK,UAAU,aAAa,CAC1B,cAAqC,EACrC,0BAAsD;IAEtD,MAAM,OAAO,GAAG,IAAI,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;SAC1E,WAAW,CAAC,0BAA0B,CAAC;SACvC,KAAK,EAAE,CAAC;IACX,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;IAE3B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,OAAqB;IAC5D,MAAM,EACJ,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ED,0DAA0D;IAC1D,IAAI,WAAW,EAAE,CAAC;QAChB,IAAI,CAAC;YACH,MAAM,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE;gBACxC,WAAW,EAAE,QAAQ;gBACrB,gBAAgB,EAAE,IAAI;gBACtB,SAAS,EAAE;oBACT;wBACE,KAAK,EAAE,IAAI;wBACX,QAAQ,EAAE;4BACR,IAAI,EAAE,WAAW;4BACjB,IAAI,EAAE,kBAAkB;4BACxB,eAAe,EAAE,iBAAiB;yBACnC;wBACD,MAAM,EAAE;4BACN,MAAM,EAAE,CAAC,MAAM,CAAC;4BAChB,UAAU,EAAE,CAAC,GAAG,CAAC;4BACjB,YAAY,EAAE,CAAC,GAAG,CAAC;4BACnB,KAAK,EAAE,CAAC,QAAQ,CAAC;yBAClB;wBACD,KAAK,EAAE,kBAAkB;wBACzB,UAAU,EAAE,UAAU,EAAE;wBACxB,MAAM,EAAE,IAAI;qBACb;iBACF;gBACD,QAAQ,EAAE,EAAE;aACb,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,+BAA+B,WAAW,MAAM,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EACpF;gBACE,KAAK,EAAE,CAAC;aACT,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,oBAAoB;IACpB,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;IAE3C,yBAAyB;IACzB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { DocumentModelModule } from "document-model";
2
- interface IPackageLoader {
3
- load(): Promise<DocumentModelModule[]>;
4
- onDocumentModelsChange(callback: (models: DocumentModelModule[]) => void): Promise<() => void>;
5
- }
6
- export declare class VitePackageLoader implements IPackageLoader {
7
- private readonly logger;
8
- private readonly root;
9
- private readonly documentModelsDir;
10
- private vite;
11
- constructor(root: string, documentModelsDir: string);
12
- private get fullPath();
13
- private initVite;
14
- load(): Promise<DocumentModelModule[]>;
15
- onDocumentModelsChange(callback: (models: DocumentModelModule[]) => void): Promise<() => void>;
16
- }
17
- export {};
18
- //# sourceMappingURL=loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/stdio/loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAM1D,UAAU,cAAc;IACtB,IAAI,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IACvC,sBAAsB,CACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,IAAI,GAChD,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;CACxB;AAkBD,qBAAa,iBAAkB,YAAW,cAAc;IACtD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiD;IAExE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAE3C,OAAO,CAAC,IAAI,CAA4B;gBAE5B,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM;IAKnD,OAAO,KAAK,QAAQ,GAEnB;YAEa,QAAQ;IA4BhB,IAAI,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAoCtC,sBAAsB,CAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,IAAI;CAepD"}
@@ -1,89 +0,0 @@
1
- import { childLogger } from "document-drive";
2
- import { access } from "node:fs/promises";
3
- import path from "node:path";
4
- import { createServer } from "vite";
5
- function debounce(func, delay = 100) {
6
- let timeoutId;
7
- return (...args) => {
8
- clearTimeout(timeoutId);
9
- timeoutId = setTimeout(() => func(...args), delay);
10
- };
11
- }
12
- function isSubpath(parent, dir) {
13
- const relative = path.relative(parent, dir);
14
- return relative && !relative.startsWith("..") && !path.isAbsolute(relative);
15
- }
16
- export class VitePackageLoader {
17
- logger = childLogger(["reactor-local", "vite-loader"]);
18
- root;
19
- documentModelsDir;
20
- vite;
21
- constructor(root, documentModelsDir) {
22
- this.root = root;
23
- this.documentModelsDir = documentModelsDir;
24
- }
25
- get fullPath() {
26
- return path.join(this.root, this.documentModelsDir);
27
- }
28
- async initVite() {
29
- if (this.vite) {
30
- return this.vite;
31
- }
32
- this.vite = await createServer({
33
- root: this.root,
34
- logLevel: "info",
35
- server: {
36
- hmr: false,
37
- middlewareMode: true,
38
- warmup: {
39
- ssrFiles: [this.fullPath],
40
- },
41
- fs: {
42
- allow: [this.fullPath],
43
- },
44
- },
45
- optimizeDeps: {
46
- // It's recommended to disable deps optimization
47
- noDiscovery: true,
48
- include: [],
49
- },
50
- });
51
- return this.vite;
52
- }
53
- async load() {
54
- const vite = await this.initVite();
55
- await access(this.fullPath);
56
- this.logger.verbose("Loading document models from", this.fullPath);
57
- try {
58
- const localDMs = (await vite.ssrLoadModule(this.fullPath));
59
- const exports = Object.values(localDMs);
60
- // duck type
61
- const documentModels = [];
62
- for (const dm of exports) {
63
- if (dm.documentModel) {
64
- documentModels.push(dm);
65
- }
66
- }
67
- this.logger.verbose(` ➜ Loaded ${documentModels.length} Document Models from: ${this.fullPath}`);
68
- return documentModels;
69
- }
70
- catch (e) {
71
- this.logger.verbose(` ➜ No Document Models found for: ${this.fullPath}${e ? `\n${JSON.stringify(e)}` : ""}`);
72
- }
73
- return [];
74
- }
75
- async onDocumentModelsChange(callback) {
76
- const vite = await this.initVite();
77
- const listener = debounce(async (changedPath) => {
78
- if (isSubpath(this.fullPath, changedPath)) {
79
- const documentModels = await this.load();
80
- callback(documentModels);
81
- }
82
- }, 100);
83
- vite.watcher.on("change", listener);
84
- return () => {
85
- vite.watcher.off("change", listener);
86
- };
87
-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AE,CAAC,CAAC;gBAC1B,CAAC;YACH,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,OAAO,CACjB,eAAe,cAAc,CAAC,MAAM,0BAA0B,IAAI,CAAC,QAAQ,EAAE,CAC9E,CAAC;YAEF,OAAO,cAAc,CAAC;QACxB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,OAAO,CACjB,sCAAsC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1F,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,KAAK,CAAC,sBAAsB,CAC1B,QAAiD;QAEjD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACnC,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,WAAmB,EAAE,EAAE;YACtD,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,CAAC;gBAC1C,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;gBACzC,QAAQ,CAAC,cAAc,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;QACR,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAEpC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC,CAAC;IACJ,CAAC;CACF"}
@@ -1,3 +0,0 @@
1
- export * from "./reactor.js";
2
- export * from "./utils.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from "./reactor.js";
2
- export * from "./utils.js";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}