rowpipe 2.10.3 → 2.10.4
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/README.md +123 -3
- package/dist/cli/commands/mcp.d.ts +17 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +40 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +9 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +20 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +13 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +63 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +712 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +471 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/readers/json.js +3 -3
- package/dist/readers/json.js.map +1 -1
- package/dist/rowpipe +4 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { createRowpipeMcpServer } from "./server.js";
|
|
3
|
+
export * from "./tools.js";
|
|
4
|
+
export * from "./server.js";
|
|
5
|
+
/**
|
|
6
|
+
* Runs the rowpipe MCP server CLI / stdio bridge.
|
|
7
|
+
*/
|
|
8
|
+
export async function runRowpipeMcpServer(options = {}) {
|
|
9
|
+
const app = createRowpipeMcpServer(options);
|
|
10
|
+
await app.run();
|
|
11
|
+
}
|
|
12
|
+
// Standalone execution entrypoint
|
|
13
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
14
|
+
if (process.argv[1] && currentFilePath.endsWith(process.argv[1])) {
|
|
15
|
+
runRowpipeMcpServer().catch((err) => {
|
|
16
|
+
process.stderr.write(`rowpipe MCP server failed: ${err.message}\n`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAgC,MAAM,aAAa,CAAC;AAEnF,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,UAAmC,EAAE;IAC7E,MAAM,GAAG,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,GAAG,CAAC,GAAG,EAAE,CAAC;AAClB,CAAC;AAED,kCAAkC;AAClC,MAAM,eAAe,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACjE,mBAAmB,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type McpApp } from "mcponce";
|
|
2
|
+
export interface RowpipeMcpServerOptions {
|
|
3
|
+
name?: string;
|
|
4
|
+
version?: string;
|
|
5
|
+
registerInCentral?: boolean;
|
|
6
|
+
background?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Creates and initializes a rowpipe MCP Server application with all tools
|
|
10
|
+
* and resource templates registered.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createRowpipeMcpServer(options?: RowpipeMcpServerOptions): McpApp;
|
|
13
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAIvD,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,CA0DpF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { createMcpServer } from "mcponce";
|
|
2
|
+
import { VERSION } from "../version.js";
|
|
3
|
+
import { allRowpipeTools, inspectToolDefinition, schemaToolDefinition } from "./tools.js";
|
|
4
|
+
/**
|
|
5
|
+
* Creates and initializes a rowpipe MCP Server application with all tools
|
|
6
|
+
* and resource templates registered.
|
|
7
|
+
*/
|
|
8
|
+
export function createRowpipeMcpServer(options = {}) {
|
|
9
|
+
const app = createMcpServer({
|
|
10
|
+
name: options.name || "rowpipe",
|
|
11
|
+
version: options.version || VERSION,
|
|
12
|
+
registerInCentral: options.registerInCentral ?? true,
|
|
13
|
+
background: options.background ?? false,
|
|
14
|
+
toolTimeoutMs: 120_000, // 2 minutes for processing large tabular datasets
|
|
15
|
+
});
|
|
16
|
+
// Register all tabular data tools
|
|
17
|
+
for (const toolDef of allRowpipeTools) {
|
|
18
|
+
app.tool(toolDef);
|
|
19
|
+
}
|
|
20
|
+
// Register Resource Templates
|
|
21
|
+
app.resourceTemplate({
|
|
22
|
+
uriTemplate: "rowpipe://metadata/{filePath}",
|
|
23
|
+
name: "Dataset Metadata",
|
|
24
|
+
description: "Metadata, format, size, and sheet information for a tabular dataset",
|
|
25
|
+
mimeType: "application/json",
|
|
26
|
+
handler: async (uri, params) => {
|
|
27
|
+
const rawPath = params.filePath ?? "";
|
|
28
|
+
const filePath = decodeURIComponent(rawPath);
|
|
29
|
+
const res = await inspectToolDefinition.handler({ filePath });
|
|
30
|
+
return {
|
|
31
|
+
contents: [
|
|
32
|
+
{
|
|
33
|
+
uri: uri.toString(),
|
|
34
|
+
mimeType: "application/json",
|
|
35
|
+
text: JSON.stringify(res, null, 2),
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
app.resourceTemplate({
|
|
42
|
+
uriTemplate: "rowpipe://schema/{filePath}",
|
|
43
|
+
name: "Dataset Schema",
|
|
44
|
+
description: "Inferred column types, null rates, and semantic types for a tabular dataset",
|
|
45
|
+
mimeType: "application/json",
|
|
46
|
+
handler: async (uri, params) => {
|
|
47
|
+
const rawPath = params.filePath ?? "";
|
|
48
|
+
const filePath = decodeURIComponent(rawPath);
|
|
49
|
+
const res = await schemaToolDefinition.handler({ filePath });
|
|
50
|
+
return {
|
|
51
|
+
contents: [
|
|
52
|
+
{
|
|
53
|
+
uri: uri.toString(),
|
|
54
|
+
mimeType: "application/json",
|
|
55
|
+
text: JSON.stringify(res, null, 2),
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
return app;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"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