@react-querybuilder/mcp 8.24.4 → 8.26.0
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/LICENSE.md +21 -0
- package/dist/cli.mjs +2 -3
- package/dist/index.d.mts +2 -12
- package/dist/index.mjs +1 -1
- package/dist/{server-ClTRN2X5.mjs → server-BVOAyrEd.mjs} +433 -314
- package/dist/server-BVOAyrEd.mjs.map +1 -0
- package/package.json +11 -10
- package/dist/server-ClTRN2X5.mjs.map +0 -1
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Jake Boone and other contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/cli.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as serverName, t as createServer } from "./server-
|
|
2
|
+
import { n as serverName, t as createServer } from "./server-BVOAyrEd.mjs";
|
|
3
3
|
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
4
|
-
|
|
4
|
+
// src/cli.ts
|
|
5
5
|
const handle = serveStdio(createServer);
|
|
6
6
|
console.error(`${serverName} MCP server listening on stdio`);
|
|
7
7
|
for (const signal of ["SIGINT", "SIGTERM"]) process.on(signal, () => void handle.close().then(() => process.exit(0)));
|
|
8
|
-
//#endregion
|
|
9
8
|
export {};
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=cli.mjs.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ExportFormat, FormatQueryOptions, GetQueryJsonSchemaOptions } from "@react-querybuilder/core";
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
3
|
-
//#region src/types.d.ts
|
|
4
3
|
/** Docs page metadata. */
|
|
5
4
|
interface DocsPage {
|
|
6
5
|
/** Path under `/docs/`, e.g. `utils/export`. */
|
|
@@ -37,8 +36,6 @@ type ToolResult = {
|
|
|
37
36
|
structuredContent?: Record<string, unknown>;
|
|
38
37
|
isError?: boolean;
|
|
39
38
|
};
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/docs.d.ts
|
|
42
39
|
/** Build-time docs snapshot. */
|
|
43
40
|
export declare const docsIndex: DocsIndex;
|
|
44
41
|
/** Search hit. */
|
|
@@ -65,8 +62,6 @@ export declare const getPageMarkdown: (page: DocsPage) => string;
|
|
|
65
62
|
export declare const getSectionMarkdown: (page: DocsPage, anchor: string) => string | undefined;
|
|
66
63
|
/** Page markdown, or one section's when `anchor` is non-empty. */
|
|
67
64
|
export declare const getDocMarkdown: (page: DocsPage, anchor?: string) => string | undefined;
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/formats.d.ts
|
|
70
65
|
/** ORM formats: need live ORM objects (columns, `Op`, etc.); unsupported over JSON. */
|
|
71
66
|
export type OrmFormat = "drizzle" | "prisma" | "sequelize" | "tanstack_db";
|
|
72
67
|
/** `format_query` formats (every {@link ExportFormat} except {@link OrmFormat}s). */
|
|
@@ -76,8 +71,6 @@ export type McpImportFormat = "sql" | "cel" | "mongodb" | "jsonlogic" | "spel" |
|
|
|
76
71
|
export declare const ormFormats: readonly OrmFormat[];
|
|
77
72
|
export declare const exportFormats: readonly McpExportFormat[];
|
|
78
73
|
export declare const importFormats: readonly McpImportFormat[];
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/handlers.d.ts
|
|
81
74
|
/** JSON-serializable `fields` (array, option groups, or object map). */
|
|
82
75
|
export type FieldsInput = unknown[] | Record<string, unknown>;
|
|
83
76
|
/** JSON-serializable subset of {@link FormatQueryOptions}. */
|
|
@@ -115,6 +108,8 @@ export interface ValidateQueryArgs {
|
|
|
115
108
|
query: unknown;
|
|
116
109
|
fields: FieldsInput;
|
|
117
110
|
queryType?: "standard" | "ic";
|
|
111
|
+
/** Report rules this export format can't express (`format-check` warnings). */
|
|
112
|
+
targetFormat?: ExportFormat;
|
|
118
113
|
}
|
|
119
114
|
export interface GetQuerySchemaArgs {
|
|
120
115
|
fields: FieldsInput;
|
|
@@ -146,8 +141,6 @@ export declare const handleValidateQuery: (args: ValidateQueryArgs) => Promise<T
|
|
|
146
141
|
export declare const handleGetQuerySchema: (args: GetQuerySchemaArgs) => Promise<ToolResult>;
|
|
147
142
|
export declare const handleSearchDocs: (args: SearchDocsArgs) => Promise<ToolResult>;
|
|
148
143
|
export declare const handleGetDoc: (args: GetDocArgs) => Promise<ToolResult>;
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region src/prompts.d.ts
|
|
151
144
|
/** MCP `GetPromptResult` subset. */
|
|
152
145
|
export type PromptResult = {
|
|
153
146
|
description?: string;
|
|
@@ -163,8 +156,6 @@ export type PromptResult = {
|
|
|
163
156
|
export declare const setupQueryBuilderPrompt: (uiLibrary?: string, fields?: string) => PromptResult;
|
|
164
157
|
/** `convert_filter` prompt. */
|
|
165
158
|
export declare const convertFilterPrompt: (input: string, from?: string, to?: string) => PromptResult;
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region src/server.d.ts
|
|
168
159
|
/** Server name advertised to clients. */
|
|
169
160
|
export declare const serverName = "react-querybuilder";
|
|
170
161
|
/**
|
|
@@ -172,6 +163,5 @@ export declare const serverName = "react-querybuilder";
|
|
|
172
163
|
* see `cli.ts` for stdio.
|
|
173
164
|
*/
|
|
174
165
|
export declare const createServer: () => McpServer;
|
|
175
|
-
//#endregion
|
|
176
166
|
export type { DocsIndex, DocsPage, DocsSection, ToolResult };
|
|
177
167
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as checkShape, r as convertFilterPrompt, t as createServer, y as docsIndex, g as exportFormats, o as fail, b as getDocMarkdown, x as getPageMarkdown, S as getSectionMarkdown, s as handleConvertQuery, c as handleFormatQuery, l as handleGetDoc, u as handleGetQuerySchema, d as handleParseQuery, f as handleSearchDocs, p as handleValidateQuery, _ as importFormats, C as makeSnippet, m as ok, v as ormFormats, h as parseQueryInput, w as resolveDocRef, T as searchDocs, E as sectionTitle, D as sectionUrl, n as serverName, i as setupQueryBuilderPrompt } from "./server-
|
|
1
|
+
export { a as checkShape, r as convertFilterPrompt, t as createServer, y as docsIndex, g as exportFormats, o as fail, b as getDocMarkdown, x as getPageMarkdown, S as getSectionMarkdown, s as handleConvertQuery, c as handleFormatQuery, l as handleGetDoc, u as handleGetQuerySchema, d as handleParseQuery, f as handleSearchDocs, p as handleValidateQuery, _ as importFormats, C as makeSnippet, m as ok, v as ormFormats, h as parseQueryInput, w as resolveDocRef, T as searchDocs, E as sectionTitle, D as sectionUrl, n as serverName, i as setupQueryBuilderPrompt } from "./server-BVOAyrEd.mjs";
|