@axinom/mosaic-agent-skills 0.0.1

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 (72) hide show
  1. package/README.md +121 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +58 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/logger.d.ts +6 -0
  7. package/dist/logger.d.ts.map +1 -0
  8. package/dist/logger.js +15 -0
  9. package/dist/logger.js.map +1 -0
  10. package/dist/tools/graphql/index.d.ts +3 -0
  11. package/dist/tools/graphql/index.d.ts.map +1 -0
  12. package/dist/tools/graphql/index.js +84 -0
  13. package/dist/tools/graphql/index.js.map +1 -0
  14. package/dist/tools/graphql/tools.d.ts +71 -0
  15. package/dist/tools/graphql/tools.d.ts.map +1 -0
  16. package/dist/tools/graphql/tools.js +187 -0
  17. package/dist/tools/graphql/tools.js.map +1 -0
  18. package/dist/tools/graphql/utils.d.ts +20 -0
  19. package/dist/tools/graphql/utils.d.ts.map +1 -0
  20. package/dist/tools/graphql/utils.js +140 -0
  21. package/dist/tools/graphql/utils.js.map +1 -0
  22. package/dist/tools/skills/index.d.ts +3 -0
  23. package/dist/tools/skills/index.d.ts.map +1 -0
  24. package/dist/tools/skills/index.js +62 -0
  25. package/dist/tools/skills/index.js.map +1 -0
  26. package/dist/tools/skills/tools.d.ts +5 -0
  27. package/dist/tools/skills/tools.d.ts.map +1 -0
  28. package/dist/tools/skills/tools.js +67 -0
  29. package/dist/tools/skills/tools.js.map +1 -0
  30. package/dist/tools/skills/types.d.ts +12 -0
  31. package/dist/tools/skills/types.d.ts.map +1 -0
  32. package/dist/tools/skills/types.js +3 -0
  33. package/dist/tools/skills/types.js.map +1 -0
  34. package/dist/tools/skills/utils.d.ts +11 -0
  35. package/dist/tools/skills/utils.d.ts.map +1 -0
  36. package/dist/tools/skills/utils.js +127 -0
  37. package/dist/tools/skills/utils.js.map +1 -0
  38. package/package.json +40 -0
  39. package/skills/_shared/actions/execution-summary.md +53 -0
  40. package/skills/_shared/actions/typescript-codegen.md +32 -0
  41. package/skills/_shared/actions/typescript-validation.md +32 -0
  42. package/skills/_shared/conventions/field-component-mapping.md +155 -0
  43. package/skills/_shared/conventions/field-validation-schema.md +77 -0
  44. package/skills/_shared/discovery/discover-paths.md +52 -0
  45. package/skills/_shared/discovery/extract-entity-features.md +565 -0
  46. package/skills/generate-create-station/SKILL.md +93 -0
  47. package/skills/generate-create-station/refs/finalization/station-registration.md +163 -0
  48. package/skills/generate-create-station/refs/templates/create-form-station.md +206 -0
  49. package/skills/generate-create-station/refs/templates/graphql-operations.md +56 -0
  50. package/skills/generate-details-station/SKILL.md +125 -0
  51. package/skills/generate-details-station/refs/finalization/explorer-integration.md +242 -0
  52. package/skills/generate-details-station/refs/finalization/station-registration.md +139 -0
  53. package/skills/generate-details-station/refs/templates/actions.md +127 -0
  54. package/skills/generate-details-station/refs/templates/breadcrumb.md +67 -0
  55. package/skills/generate-details-station/refs/templates/details-form-station.md +589 -0
  56. package/skills/generate-details-station/refs/templates/details-wrapper.md +54 -0
  57. package/skills/generate-details-station/refs/templates/form-data-types.md +62 -0
  58. package/skills/generate-details-station/refs/templates/graphql-operations.md +256 -0
  59. package/skills/generate-details-station/refs/templates/managed-integrations/image-management-station.md +322 -0
  60. package/skills/generate-details-station/refs/templates/managed-integrations/video-management-station.md +283 -0
  61. package/skills/generate-explorer-station/SKILL.md +121 -0
  62. package/skills/generate-explorer-station/refs/finalization/station-registration.md +145 -0
  63. package/skills/generate-explorer-station/refs/select-columns-filters.md +63 -0
  64. package/skills/generate-explorer-station/refs/templates/bulk-edit.md +369 -0
  65. package/skills/generate-explorer-station/refs/templates/common/bulk-actions.md +64 -0
  66. package/skills/generate-explorer-station/refs/templates/common/columns.md +131 -0
  67. package/skills/generate-explorer-station/refs/templates/common/data-provider.md +83 -0
  68. package/skills/generate-explorer-station/refs/templates/common/filters.md +220 -0
  69. package/skills/generate-explorer-station/refs/templates/common/inline-actions.md +45 -0
  70. package/skills/generate-explorer-station/refs/templates/common/types.md +28 -0
  71. package/skills/generate-explorer-station/refs/templates/graphql-operations.md +235 -0
  72. package/skills/generate-explorer-station/refs/templates/navigation-explorer-station.md +144 -0
package/README.md ADDED
@@ -0,0 +1,121 @@
1
+ # Axinom Mosaic Agent Skills
2
+
3
+ Model Context Protocol (MCP) server providing comprehensive Axinom Mosaic
4
+ development tools for AI agents.
5
+
6
+ ## Features
7
+
8
+ This unified package provides two categories of tools:
9
+
10
+ ### 1. Skills Management (4 tools)
11
+
12
+ Official Mosaic development workflows with step-by-step guidance:
13
+
14
+ - `list_skills` - List all available skill workflows
15
+ - `get_skill` - Read a complete skill workflow
16
+ - `get_skill_references` - Read reference files mentioned in workflows
17
+ - `execute_skill` - Commit to executing a workflow
18
+
19
+ ### 2. GraphQL Schema Tools (5 tools)
20
+
21
+ Schema inspection and code generation utilities:
22
+
23
+ - `search_schema` - Search schema with regex patterns
24
+ - `get_type_definitions` - Get type definitions (type, input, enum, interface,
25
+ union, scalar)
26
+ - `get_query_fields` - Get Query field definitions with args and return types
27
+ - `get_mutation_fields` - Get Mutation field definitions
28
+ - `get_subscription_fields` - Get Subscription field definitions
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ yarn add @axinom/mosaic-agent-skills
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ### As MCP Server (Claude Desktop, etc.)
39
+
40
+ Add to your MCP client configuration:
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "mosaic-agent-skills": {
46
+ "command": "node",
47
+ "args": [
48
+ "/path/to/node_modules/@axinom/mosaic-agent-skills/dist/index.js"
49
+ ],
50
+ "env": {
51
+ "SKILLS_PATH": "/optional/custom/skills/path"
52
+ }
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### Configuration
59
+
60
+ - `SKILLS_PATH` - Optional environment variable to override skills directory
61
+ - Default: `./skills` (bundled with package)
62
+ - Custom: Set to absolute path for external skills
63
+
64
+ ## Development
65
+
66
+ ```bash
67
+ # Build
68
+ yarn build
69
+
70
+ # Watch mode
71
+ yarn dev
72
+
73
+ # Start server
74
+ yarn start
75
+ ```
76
+
77
+ ## Architecture
78
+
79
+ ```
80
+ src/
81
+ ├── index.ts # MCP server setup & tool registration
82
+ ├── logger.ts # Logging utility
83
+ └── tools/
84
+ ├── skills/ # Skills management tools
85
+ │ ├── index.ts # Tool registration
86
+ │ ├── tools.ts # Tool handlers
87
+ │ ├── utils.ts # File scanning & parsing
88
+ │ └── types.ts # Type definitions
89
+ └── graphql/ # GraphQL schema tools
90
+ ├── index.ts # Tool registration
91
+ ├── tools.ts # Tool handlers
92
+ └── utils.ts # Schema inspection & loading
93
+
94
+ skills/ # Bundled skill workflows
95
+ ├── _shared/ # Common references & utilities
96
+ └── [skill-name]/ # Individual skill workflows
97
+ ```
98
+
99
+ ## Skills Workflows
100
+
101
+ Skills are step-by-step workflows that encode Axinom Mosaic development best
102
+ practices. Each skill provides:
103
+
104
+ - Clear goals and prerequisites
105
+ - Detailed implementation steps
106
+ - Reference files and code examples
107
+ - Validation criteria
108
+
109
+ Skills cover various aspects of Mosaic development including UI generation,
110
+ GraphQL operations, code patterns, and architectural conventions. Use
111
+ `list_skills` to discover available workflows.
112
+
113
+ ## Security
114
+
115
+ - Path validation prevents directory traversal attacks
116
+ - Schema paths must be absolute
117
+ - Reference paths resolved relative to skill location
118
+
119
+ ## License
120
+
121
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ const path = __importStar(require("path"));
28
+ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
29
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
30
+ const logger_1 = require("./logger");
31
+ const graphql_1 = require("./tools/graphql");
32
+ const skills_1 = require("./tools/skills");
33
+ const SKILLS_PATH = process.env.SKILLS_PATH
34
+ ? path.resolve(process.env.SKILLS_PATH)
35
+ : path.resolve(__dirname, '../skills');
36
+ async function main() {
37
+ logger_1.logger.info('Starting Axinom Mosaic Agent Skills MCP Server...');
38
+ logger_1.logger.info(`Skills path: ${SKILLS_PATH}`);
39
+ const server = new mcp_js_1.McpServer({
40
+ name: '@axinom/mosaic-agent-skills',
41
+ version: '0.0.1',
42
+ }, {
43
+ capabilities: {
44
+ tools: {},
45
+ },
46
+ });
47
+ (0, skills_1.registerSkillsTools)(server, SKILLS_PATH);
48
+ (0, graphql_1.registerGraphQLTools)(server);
49
+ const transport = new stdio_js_1.StdioServerTransport();
50
+ await server.connect(transport);
51
+ logger_1.logger.info('Server running on stdio');
52
+ logger_1.logger.info('Tools available: list_skills, get_skill, get_skill_references, execute_skill, search_schema, get_type_definitions, get_query_fields, get_mutation_fields, get_subscription_fields');
53
+ }
54
+ main().catch((error) => {
55
+ logger_1.logger.error('Fatal error:', error);
56
+ process.exit(1);
57
+ });
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,2CAA6B;AAE7B,oEAAoE;AACpE,wEAAiF;AAEjF,qCAAkC;AAClC,6CAAuD;AACvD,2CAAqD;AAMrD,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW;IACzC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACvC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAMzC,KAAK,UAAU,IAAI;IACjB,eAAM,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;IACjE,eAAM,CAAC,IAAI,CAAC,gBAAgB,WAAW,EAAE,CAAC,CAAC;IAE3C,MAAM,MAAM,GAAG,IAAI,kBAAS,CAC1B;QACE,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,OAAO;KACjB,EACD;QACE,YAAY,EAAE;YACZ,KAAK,EAAE,EAAE;SACV;KACF,CACF,CAAC;IAGF,IAAA,4BAAmB,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACzC,IAAA,8BAAoB,EAAC,MAAM,CAAC,CAAC;IAG7B,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,eAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IACvC,eAAM,CAAC,IAAI,CACT,mLAAmL,CACpL,CAAC;AACJ,CAAC;AAGD,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,eAAM,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const logger: {
2
+ info(message: string, ...args: unknown[]): void;
3
+ error(message: string, ...args: unknown[]): void;
4
+ warn(message: string, ...args: unknown[]): void;
5
+ };
6
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM;kBACH,MAAM,WAAW,OAAO,EAAE,GAAG,IAAI;mBAIhC,MAAM,WAAW,OAAO,EAAE,GAAG,IAAI;kBAIlC,MAAM,WAAW,OAAO,EAAE,GAAG,IAAI;CAGhD,CAAC"}
package/dist/logger.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logger = void 0;
4
+ exports.logger = {
5
+ info(message, ...args) {
6
+ console.error(`[MCP Server] ${message}`, ...args);
7
+ },
8
+ error(message, ...args) {
9
+ console.error(`[MCP Server] ERROR: ${message}`, ...args);
10
+ },
11
+ warn(message, ...args) {
12
+ console.error(`[MCP Server] WARNING: ${message}`, ...args);
13
+ },
14
+ };
15
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;;AAQa,QAAA,MAAM,GAAG;IACpB,IAAI,CAAC,OAAe,EAAE,GAAG,IAAe;QACtC,OAAO,CAAC,KAAK,CAAC,gBAAgB,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,IAAe;QACvC,OAAO,CAAC,KAAK,CAAC,uBAAuB,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,GAAG,IAAe;QACtC,OAAO,CAAC,KAAK,CAAC,yBAAyB,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;IAC7D,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerGraphQLTools(server: McpServer): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/graphql/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAgBpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmH5D"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerGraphQLTools = void 0;
4
+ const zod_1 = require("zod");
5
+ const tools_1 = require("./tools");
6
+ function registerGraphQLTools(server) {
7
+ server.registerTool('search_schema', {
8
+ title: 'Search GraphQL Schema',
9
+ description: 'Search a GraphQL schema using regex pattern. Finds matching type definitions (type, input, enum, interface, union, scalar) and field names in Query, Mutation, and Subscription. Use regex patterns like "Movie" to find all related types/fields at once. Returns arrays of matching type names and fields (as TypeName.fieldName).',
10
+ inputSchema: zod_1.z.object({
11
+ schemaPath: zod_1.z
12
+ .string()
13
+ .describe('Absolute path to the GraphQL schema file'),
14
+ pattern: zod_1.z
15
+ .string()
16
+ .describe('Regex pattern to search for (case-insensitive). Examples: "Movie", "^create", "Filter$"'),
17
+ }),
18
+ }, async (args) => {
19
+ const validated = tools_1.SearchSchemaInputSchema.parse(args);
20
+ return (0, tools_1.searchSchemaTool)(validated);
21
+ });
22
+ server.registerTool('get_type_definitions', {
23
+ title: 'Get GraphQL Type Definitions',
24
+ description: 'Get GraphQL type definitions in SDL format. Works with any type kind: type, input, enum, interface, union, scalar. Supports batch requests - pass multiple type names to retrieve all definitions in one call.',
25
+ inputSchema: zod_1.z.object({
26
+ schemaPath: zod_1.z
27
+ .string()
28
+ .describe('Absolute path to the GraphQL schema file'),
29
+ typeNames: zod_1.z
30
+ .array(zod_1.z.string())
31
+ .describe('Array of type names to retrieve (e.g., ["Movie", "MovieFilter", "PublishStatus"])'),
32
+ }),
33
+ }, async (args) => {
34
+ const validated = tools_1.GetTypeDefinitionsInputSchema.parse(args);
35
+ return (0, tools_1.getTypeDefinitionsTool)(validated);
36
+ });
37
+ server.registerTool('get_query_fields', {
38
+ title: 'Get GraphQL Query Fields',
39
+ description: 'Get GraphQL Query field definitions in SDL format. Returns field signatures with arguments and return types. Supports batch requests - pass multiple field names to retrieve all definitions in one call.',
40
+ inputSchema: zod_1.z.object({
41
+ schemaPath: zod_1.z
42
+ .string()
43
+ .describe('Absolute path to the GraphQL schema file'),
44
+ fieldNames: zod_1.z
45
+ .array(zod_1.z.string())
46
+ .describe('Array of Query field names (e.g., ["movies", "movie", "tvshows"])'),
47
+ }),
48
+ }, async (args) => {
49
+ const validated = tools_1.GetQueryFieldsInputSchema.parse(args);
50
+ return (0, tools_1.getQueryFieldsTool)(validated);
51
+ });
52
+ server.registerTool('get_mutation_fields', {
53
+ title: 'Get GraphQL Mutation Fields',
54
+ description: 'Get GraphQL Mutation field definitions in SDL format. Returns field signatures with arguments and return types. Supports batch requests - pass multiple field names to retrieve all definitions in one call.',
55
+ inputSchema: zod_1.z.object({
56
+ schemaPath: zod_1.z
57
+ .string()
58
+ .describe('Absolute path to the GraphQL schema file'),
59
+ fieldNames: zod_1.z
60
+ .array(zod_1.z.string())
61
+ .describe('Array of Mutation field names (e.g., ["createMovie", "updateMovie", "deleteMovie"])'),
62
+ }),
63
+ }, async (args) => {
64
+ const validated = tools_1.GetMutationFieldsInputSchema.parse(args);
65
+ return (0, tools_1.getMutationFieldsTool)(validated);
66
+ });
67
+ server.registerTool('get_subscription_fields', {
68
+ title: 'Get GraphQL Subscription Fields',
69
+ description: 'Get GraphQL Subscription field definitions in SDL format. Returns field signatures with return types. Supports batch requests - pass multiple field names to retrieve all definitions in one call.',
70
+ inputSchema: zod_1.z.object({
71
+ schemaPath: zod_1.z
72
+ .string()
73
+ .describe('Absolute path to the GraphQL schema file'),
74
+ fieldNames: zod_1.z
75
+ .array(zod_1.z.string())
76
+ .describe('Array of Subscription field names (e.g., ["movieMutated", "tvshowMutated"])'),
77
+ }),
78
+ }, async (args) => {
79
+ const validated = tools_1.GetSubscriptionFieldsInputSchema.parse(args);
80
+ return (0, tools_1.getSubscriptionFieldsTool)(validated);
81
+ });
82
+ }
83
+ exports.registerGraphQLTools = registerGraphQLTools;
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/graphql/index.ts"],"names":[],"mappings":";;;AAKA,6BAAwB;AAExB,mCAWiB;AAEjB,SAAgB,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,sUAAsU;QACxU,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,UAAU,EAAE,OAAC;iBACV,MAAM,EAAE;iBACR,QAAQ,CAAC,0CAA0C,CAAC;YACvD,OAAO,EAAE,OAAC;iBACP,MAAM,EAAE;iBACR,QAAQ,CACP,yFAAyF,CAC1F;SACJ,CAAC;KACH,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,SAAS,GAAG,+BAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtD,OAAO,IAAA,wBAAgB,EAAC,SAAS,CAAC,CAAC;IACrC,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,KAAK,EAAE,8BAA8B;Q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E,CAAC;iBACjB,QAAQ,CACP,qFAAqF,CACtF;SACJ,CAAC;KACH,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,SAAS,GAAG,oCAA4B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3D,OAAO,IAAA,6BAAqB,EAAC,SAAS,CAAC,CAAC;IAC1C,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,KAAK,EAAE,iCAAiC;QACxC,WAAW,EACT,oMAAoM;QACtM,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC;YACpB,UAAU,EAAE,OAAC;iBACV,MAAM,EAAE;iBACR,QAAQ,CAAC,0CAA0C,CAAC;YACvD,UAAU,EAAE,OAAC;iBACV,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;iBACjB,QAAQ,CACP,6EAA6E,CAC9E;SACJ,CAAC;KACH,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,SAAS,GAAG,wCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/D,OAAO,IAAA,iCAAyB,EAAC,SAAS,CAAC,CAAC;IAC9C,CAAC,CACF,CAAC;AACJ,CAAC;AAnHD,oDAmHC"}
@@ -0,0 +1,71 @@
1
+ import { z } from 'zod';
2
+ export declare const SearchSchemaInputSchema: z.ZodObject<{
3
+ schemaPath: z.ZodString;
4
+ pattern: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ schemaPath: string;
7
+ pattern: string;
8
+ }, {
9
+ schemaPath: string;
10
+ pattern: string;
11
+ }>;
12
+ export declare const GetTypeDefinitionsInputSchema: z.ZodObject<{
13
+ schemaPath: z.ZodString;
14
+ typeNames: z.ZodArray<z.ZodString, "many">;
15
+ }, "strip", z.ZodTypeAny, {
16
+ schemaPath: string;
17
+ typeNames: string[];
18
+ }, {
19
+ schemaPath: string;
20
+ typeNames: string[];
21
+ }>;
22
+ export declare const GetQueryFieldsInputSchema: z.ZodObject<{
23
+ schemaPath: z.ZodString;
24
+ fieldNames: z.ZodArray<z.ZodString, "many">;
25
+ }, "strip", z.ZodTypeAny, {
26
+ schemaPath: string;
27
+ fieldNames: string[];
28
+ }, {
29
+ schemaPath: string;
30
+ fieldNames: string[];
31
+ }>;
32
+ export declare const GetMutationFieldsInputSchema: z.ZodObject<{
33
+ schemaPath: z.ZodString;
34
+ fieldNames: z.ZodArray<z.ZodString, "many">;
35
+ }, "strip", z.ZodTypeAny, {
36
+ schemaPath: string;
37
+ fieldNames: string[];
38
+ }, {
39
+ schemaPath: string;
40
+ fieldNames: string[];
41
+ }>;
42
+ export declare const GetSubscriptionFieldsInputSchema: z.ZodObject<{
43
+ schemaPath: z.ZodString;
44
+ fieldNames: z.ZodArray<z.ZodString, "many">;
45
+ }, "strip", z.ZodTypeAny, {
46
+ schemaPath: string;
47
+ fieldNames: string[];
48
+ }, {
49
+ schemaPath: string;
50
+ fieldNames: string[];
51
+ }>;
52
+ export type SearchSchemaInput = z.infer<typeof SearchSchemaInputSchema>;
53
+ export type GetTypeDefinitionsInput = z.infer<typeof GetTypeDefinitionsInputSchema>;
54
+ export type GetQueryFieldsInput = z.infer<typeof GetQueryFieldsInputSchema>;
55
+ export type GetMutationFieldsInput = z.infer<typeof GetMutationFieldsInputSchema>;
56
+ export type GetSubscriptionFieldsInput = z.infer<typeof GetSubscriptionFieldsInputSchema>;
57
+ interface ToolResponse {
58
+ [key: string]: unknown;
59
+ content: {
60
+ type: 'text';
61
+ text: string;
62
+ }[];
63
+ isError?: boolean;
64
+ }
65
+ export declare function searchSchemaTool(input: SearchSchemaInput): ToolResponse;
66
+ export declare function getTypeDefinitionsTool(input: GetTypeDefinitionsInput): ToolResponse;
67
+ export declare function getQueryFieldsTool(input: GetQueryFieldsInput): ToolResponse;
68
+ export declare function getMutationFieldsTool(input: GetMutationFieldsInput): ToolResponse;
69
+ export declare function getSubscriptionFieldsTool(input: GetSubscriptionFieldsInput): ToolResponse;
70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,mBAAmB,GAAG,YAAY,CAgC3E;AAKD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,sBAAsB,GAC5B,YAAY,CAgCd;AAKD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,0BAA0B,GAChC,YAAY,CAgCd"}
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSubscriptionFieldsTool = exports.getMutationFieldsTool = exports.getQueryFieldsTool = exports.getTypeDefinitionsTool = exports.searchSchemaTool = exports.GetSubscriptionFieldsInputSchema = exports.GetMutationFieldsInputSchema = exports.GetQueryFieldsInputSchema = exports.GetTypeDefinitionsInputSchema = exports.SearchSchemaInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const utils_1 = require("./utils");
6
+ exports.SearchSchemaInputSchema = zod_1.z.object({
7
+ schemaPath: zod_1.z.string().describe('Absolute path to the GraphQL schema file'),
8
+ pattern: zod_1.z
9
+ .string()
10
+ .describe('Regex pattern to search for in type and field names (case-insensitive)'),
11
+ });
12
+ exports.GetTypeDefinitionsInputSchema = zod_1.z.object({
13
+ schemaPath: zod_1.z.string().describe('Absolute path to the GraphQL schema file'),
14
+ typeNames: zod_1.z
15
+ .array(zod_1.z.string())
16
+ .describe('Array of type names to retrieve definitions for'),
17
+ });
18
+ exports.GetQueryFieldsInputSchema = zod_1.z.object({
19
+ schemaPath: zod_1.z.string().describe('Absolute path to the GraphQL schema file'),
20
+ fieldNames: zod_1.z
21
+ .array(zod_1.z.string())
22
+ .describe('Array of query field names to retrieve definitions for'),
23
+ });
24
+ exports.GetMutationFieldsInputSchema = zod_1.z.object({
25
+ schemaPath: zod_1.z.string().describe('Absolute path to the GraphQL schema file'),
26
+ fieldNames: zod_1.z
27
+ .array(zod_1.z.string())
28
+ .describe('Array of mutation field names to retrieve definitions for'),
29
+ });
30
+ exports.GetSubscriptionFieldsInputSchema = zod_1.z.object({
31
+ schemaPath: zod_1.z.string().describe('Absolute path to the GraphQL schema file'),
32
+ fieldNames: zod_1.z
33
+ .array(zod_1.z.string())
34
+ .describe('Array of subscription field names to retrieve definitions for'),
35
+ });
36
+ function searchSchemaTool(input) {
37
+ try {
38
+ const schema = (0, utils_1.loadSchema)(input.schemaPath);
39
+ const result = (0, utils_1.searchSchema)(schema, input.pattern);
40
+ return {
41
+ content: [
42
+ {
43
+ type: 'text',
44
+ text: JSON.stringify({
45
+ success: true,
46
+ matchingTypes: result.matchingTypes,
47
+ matchingFields: result.matchingFields,
48
+ }, null, 2),
49
+ },
50
+ ],
51
+ };
52
+ }
53
+ catch (error) {
54
+ const errorMessage = error instanceof Error ? error.message : String(error);
55
+ return {
56
+ content: [
57
+ {
58
+ type: 'text',
59
+ text: JSON.stringify({ error: errorMessage }, null, 2),
60
+ },
61
+ ],
62
+ isError: true,
63
+ };
64
+ }
65
+ }
66
+ exports.searchSchemaTool = searchSchemaTool;
67
+ function getTypeDefinitionsTool(input) {
68
+ try {
69
+ const schema = (0, utils_1.loadSchema)(input.schemaPath);
70
+ const results = (0, utils_1.getTypes)(schema, input.typeNames);
71
+ return {
72
+ content: [
73
+ {
74
+ type: 'text',
75
+ text: JSON.stringify({
76
+ success: true,
77
+ types: results,
78
+ }, null, 2),
79
+ },
80
+ ],
81
+ };
82
+ }
83
+ catch (error) {
84
+ const errorMessage = error instanceof Error ? error.message : String(error);
85
+ return {
86
+ content: [
87
+ {
88
+ type: 'text',
89
+ text: JSON.stringify({ error: errorMessage }, null, 2),
90
+ },
91
+ ],
92
+ isError: true,
93
+ };
94
+ }
95
+ }
96
+ exports.getTypeDefinitionsTool = getTypeDefinitionsTool;
97
+ function getQueryFieldsTool(input) {
98
+ try {
99
+ const schema = (0, utils_1.loadSchema)(input.schemaPath);
100
+ const results = (0, utils_1.getQueryFields)(schema, input.fieldNames);
101
+ return {
102
+ content: [
103
+ {
104
+ type: 'text',
105
+ text: JSON.stringify({
106
+ success: true,
107
+ fields: results,
108
+ }, null, 2),
109
+ },
110
+ ],
111
+ };
112
+ }
113
+ catch (error) {
114
+ const errorMessage = error instanceof Error ? error.message : String(error);
115
+ return {
116
+ content: [
117
+ {
118
+ type: 'text',
119
+ text: JSON.stringify({ error: errorMessage }, null, 2),
120
+ },
121
+ ],
122
+ isError: true,
123
+ };
124
+ }
125
+ }
126
+ exports.getQueryFieldsTool = getQueryFieldsTool;
127
+ function getMutationFieldsTool(input) {
128
+ try {
129
+ const schema = (0, utils_1.loadSchema)(input.schemaPath);
130
+ const results = (0, utils_1.getMutationFields)(schema, input.fieldNames);
131
+ return {
132
+ content: [
133
+ {
134
+ type: 'text',
135
+ text: JSON.stringify({
136
+ success: true,
137
+ fields: results,
138
+ }, null, 2),
139
+ },
140
+ ],
141
+ };
142
+ }
143
+ catch (error) {
144
+ const errorMessage = error instanceof Error ? error.message : String(error);
145
+ return {
146
+ content: [
147
+ {
148
+ type: 'text',
149
+ text: JSON.stringify({ error: errorMessage }, null, 2),
150
+ },
151
+ ],
152
+ isError: true,
153
+ };
154
+ }
155
+ }
156
+ exports.getMutationFieldsTool = getMutationFieldsTool;
157
+ function getSubscriptionFieldsTool(input) {
158
+ try {
159
+ const schema = (0, utils_1.loadSchema)(input.schemaPath);
160
+ const results = (0, utils_1.getSubscriptionFields)(schema, input.fieldNames);
161
+ return {
162
+ content: [
163
+ {
164
+ type: 'text',
165
+ text: JSON.stringify({
166
+ success: true,
167
+ fields: results,
168
+ }, null, 2),
169
+ },
170
+ ],
171
+ };
172
+ }
173
+ catch (error) {
174
+ const errorMessage = error instanceof Error ? error.message : String(error);
175
+ return {
176
+ content: [
177
+ {
178
+ type: 'text',
179
+ text: JSON.stringify({ error: errorMessage }, null, 2),
180
+ },
181
+ ],
182
+ isError: true,
183
+ };
184
+ }
185
+ }
186
+ exports.getSubscriptionFieldsTool = getSubscriptionFieldsTool;
187
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/tools/graphql/tools.ts"],"names":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I,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBACvD;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;KACH;AACH,CAAC;AAlCD,8DAkCC"}
@@ -0,0 +1,20 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ export interface SearchResult {
3
+ matchingTypes: string[];
4
+ matchingFields: string[];
5
+ }
6
+ export interface FieldDefinition {
7
+ name: string;
8
+ definition: string;
9
+ }
10
+ export interface TypeDefinition {
11
+ name: string;
12
+ definition: string;
13
+ }
14
+ export declare function loadSchema(schemaPath: string): GraphQLSchema;
15
+ export declare function searchSchema(schema: GraphQLSchema, pattern: string): SearchResult;
16
+ export declare function getTypes(schema: GraphQLSchema, typeNames: string[]): TypeDefinition[];
17
+ export declare function getQueryFields(schema: GraphQLSchema, fieldNames: string[]): FieldDefinition[];
18
+ export declare function getMutationFields(schema: GraphQLSchema, fieldNames: string[]): FieldDefinition[];
19
+ export declare function getSubscriptionFields(schema: GraphQLSchema, fieldNames: string[]): FieldDefinition[];
20
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tools/graphql/utils.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,aAAa,EAEd,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAa5D;AAKD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,MAAM,GACd,YAAY,CAsBd;AAKD,wBAAgB,QAAQ,CACtB,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EAAE,GAClB,cAAc,EAAE,CA0BlB;AAKD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAAE,GACnB,eAAe,EAAE,CAWnB;AAKD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAAE,GACnB,eAAe,EAAE,CAWnB;AAKD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAAE,GACnB,eAAe,EAAE,CAWnB"}