@powerhousedao/reactor-mcp 4.1.0-dev.7 → 4.1.0-dev.8
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.
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +30 -23
- package/dist/src/index.js.map +1 -1
- package/dist/src/server.d.ts +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +1 -4
- package/dist/src/server.js.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +5 -5
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAkBD,wBAAsB,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAkBD,wBAAsB,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,iBAoF/C"}
|
package/dist/src/index.js
CHANGED
|
@@ -45,30 +45,37 @@ export async function init(options) {
|
|
|
45
45
|
}
|
|
46
46
|
// if a remote drive is passed then adds it to the reactor
|
|
47
47
|
if (remoteDrive) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
try {
|
|
49
|
+
await reactor.addRemoteDrive(remoteDrive, {
|
|
50
|
+
sharingType: "PUBLIC",
|
|
51
|
+
availableOffline: true,
|
|
52
|
+
listeners: [
|
|
53
|
+
{
|
|
54
|
+
block: true,
|
|
55
|
+
callInfo: {
|
|
56
|
+
data: remoteDrive,
|
|
57
|
+
name: "switchboard-push",
|
|
58
|
+
transmitterType: "SwitchboardPush",
|
|
59
|
+
},
|
|
60
|
+
filter: {
|
|
61
|
+
branch: ["main"],
|
|
62
|
+
documentId: ["*"],
|
|
63
|
+
documentType: ["*"],
|
|
64
|
+
scope: ["global"],
|
|
65
|
+
},
|
|
66
|
+
label: "Switchboard Sync",
|
|
67
|
+
listenerId: generateId(),
|
|
68
|
+
system: true,
|
|
64
69
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
],
|
|
71
|
+
triggers: [],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
throw new Error(`Failed to add remote drive "${remoteDrive}": ${e instanceof Error ? e.message : e}`, {
|
|
76
|
+
cause: e,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
72
79
|
}
|
|
73
80
|
// starts the server
|
|
74
81
|
const server = await createServer(reactor);
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACL,gCAAgC,EAChC,UAAU,GAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,Y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BACxC,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"}
|
package/dist/src/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { type IDocumentDriveServer } from "document-drive";
|
|
3
|
-
export declare const ReactorMcpInstructions = "MUST BE USED when
|
|
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
4
|
export declare function createServer(reactor: IDocumentDriveServer): Promise<McpServer>;
|
|
5
5
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/src/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,eAAO,MAAM,sBAAsB,+sGAclC,CAAC;AAEF,wBAAsB,YAAY,CAAC,OAAO,EAAE,oBAAoB,sBAoD/D"}
|
package/dist/src/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createReactorMcpProvider } from "#mcp/reactor.js";
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
-
export const ReactorMcpInstructions = `MUST BE USED when
|
|
3
|
+
export const ReactorMcpInstructions = `MUST BE USED when handling documents or document-models for the Powerhouse/Vetra ecosystem.
|
|
4
4
|
There are 5 main concepts to know of:
|
|
5
5
|
- Document Model: A template for creating documents. It defines the schema and allowed operations for a type of document.
|
|
6
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.
|
|
@@ -16,9 +16,6 @@ Examples:
|
|
|
16
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
17
|
`;
|
|
18
18
|
export async function createServer(reactor) {
|
|
19
|
-
// Create an MCP server for document model operations.
|
|
20
|
-
// For document model creation tasks, consider using the document-model-creator agent
|
|
21
|
-
// which provides a more guided experience.
|
|
22
19
|
const server = new McpServer({
|
|
23
20
|
name: "reactor-mcp-server",
|
|
24
21
|
version: "1.0.0",
|
package/dist/src/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;CAcrC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA6B;IAC9D,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;CAcrC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA6B;IAC9D,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,EAA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