@venizia/ignis-docs 0.0.1-3 → 0.0.1-5

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 (103) hide show
  1. package/README.md +408 -2
  2. package/mcp-server/dist/common/config.d.ts +58 -21
  3. package/mcp-server/dist/common/config.d.ts.map +1 -1
  4. package/mcp-server/dist/common/config.js +69 -14
  5. package/mcp-server/dist/common/config.js.map +1 -1
  6. package/mcp-server/dist/common/index.d.ts +2 -2
  7. package/mcp-server/dist/common/paths.js +11 -11
  8. package/mcp-server/dist/helpers/docs.helper.d.ts +5 -5
  9. package/mcp-server/dist/helpers/docs.helper.d.ts.map +1 -1
  10. package/mcp-server/dist/helpers/docs.helper.js +38 -34
  11. package/mcp-server/dist/helpers/docs.helper.js.map +1 -1
  12. package/mcp-server/dist/helpers/github.helper.d.ts +37 -0
  13. package/mcp-server/dist/helpers/github.helper.d.ts.map +1 -0
  14. package/mcp-server/dist/helpers/github.helper.js +100 -0
  15. package/mcp-server/dist/helpers/github.helper.js.map +1 -0
  16. package/mcp-server/dist/helpers/index.d.ts +3 -2
  17. package/mcp-server/dist/helpers/index.d.ts.map +1 -1
  18. package/mcp-server/dist/helpers/index.js +1 -0
  19. package/mcp-server/dist/helpers/index.js.map +1 -1
  20. package/mcp-server/dist/index.js +64 -36
  21. package/mcp-server/dist/index.js.map +1 -1
  22. package/mcp-server/dist/tools/base.tool.d.ts +8 -12
  23. package/mcp-server/dist/tools/base.tool.d.ts.map +1 -1
  24. package/mcp-server/dist/tools/base.tool.js +3 -5
  25. package/mcp-server/dist/tools/base.tool.js.map +1 -1
  26. package/mcp-server/dist/tools/{get-doc-content.tool.d.ts → docs/get-document-content.tool.d.ts} +5 -5
  27. package/mcp-server/dist/tools/docs/get-document-content.tool.d.ts.map +1 -0
  28. package/mcp-server/dist/tools/{get-doc-content.tool.js → docs/get-document-content.tool.js} +14 -13
  29. package/mcp-server/dist/tools/docs/get-document-content.tool.js.map +1 -0
  30. package/mcp-server/dist/tools/{get-doc-metadata.tool.d.ts → docs/get-document-metadata.tool.d.ts} +5 -5
  31. package/mcp-server/dist/tools/docs/get-document-metadata.tool.d.ts.map +1 -0
  32. package/mcp-server/dist/tools/{get-doc-metadata.tool.js → docs/get-document-metadata.tool.js} +18 -17
  33. package/mcp-server/dist/tools/docs/get-document-metadata.tool.js.map +1 -0
  34. package/mcp-server/dist/tools/docs/get-package-overview.tool.d.ts +50 -0
  35. package/mcp-server/dist/tools/docs/get-package-overview.tool.d.ts.map +1 -0
  36. package/mcp-server/dist/tools/docs/get-package-overview.tool.js +221 -0
  37. package/mcp-server/dist/tools/docs/get-package-overview.tool.js.map +1 -0
  38. package/mcp-server/dist/tools/docs/index.d.ts +7 -0
  39. package/mcp-server/dist/tools/docs/index.d.ts.map +1 -0
  40. package/mcp-server/dist/tools/docs/index.js +23 -0
  41. package/mcp-server/dist/tools/docs/index.js.map +1 -0
  42. package/mcp-server/dist/tools/{list-categories.tool.d.ts → docs/list-categories.tool.d.ts} +3 -3
  43. package/mcp-server/dist/tools/docs/list-categories.tool.d.ts.map +1 -0
  44. package/mcp-server/dist/tools/{list-categories.tool.js → docs/list-categories.tool.js} +10 -9
  45. package/mcp-server/dist/tools/docs/list-categories.tool.js.map +1 -0
  46. package/mcp-server/dist/tools/{list-docs.tool.d.ts → docs/list-documents.tool.d.ts} +5 -5
  47. package/mcp-server/dist/tools/docs/list-documents.tool.d.ts.map +1 -0
  48. package/mcp-server/dist/tools/{list-docs.tool.js → docs/list-documents.tool.js} +15 -14
  49. package/mcp-server/dist/tools/docs/list-documents.tool.js.map +1 -0
  50. package/mcp-server/dist/tools/{search-docs.tool.d.ts → docs/search-documents.tool.d.ts} +5 -5
  51. package/mcp-server/dist/tools/docs/search-documents.tool.d.ts.map +1 -0
  52. package/mcp-server/dist/tools/{search-docs.tool.js → docs/search-documents.tool.js} +24 -23
  53. package/mcp-server/dist/tools/docs/search-documents.tool.js.map +1 -0
  54. package/mcp-server/dist/tools/github/index.d.ts +5 -0
  55. package/mcp-server/dist/tools/github/index.d.ts.map +1 -0
  56. package/mcp-server/dist/tools/github/index.js +21 -0
  57. package/mcp-server/dist/tools/github/index.js.map +1 -0
  58. package/mcp-server/dist/tools/github/list-project-files.tool.d.ts +28 -0
  59. package/mcp-server/dist/tools/github/list-project-files.tool.d.ts.map +1 -0
  60. package/mcp-server/dist/tools/github/list-project-files.tool.js +98 -0
  61. package/mcp-server/dist/tools/github/list-project-files.tool.js.map +1 -0
  62. package/mcp-server/dist/tools/github/search-code.tool.d.ts +42 -0
  63. package/mcp-server/dist/tools/github/search-code.tool.d.ts.map +1 -0
  64. package/mcp-server/dist/tools/github/search-code.tool.js +194 -0
  65. package/mcp-server/dist/tools/github/search-code.tool.js.map +1 -0
  66. package/mcp-server/dist/tools/github/verify-dependencies.tool.d.ts +55 -0
  67. package/mcp-server/dist/tools/github/verify-dependencies.tool.d.ts.map +1 -0
  68. package/mcp-server/dist/tools/github/verify-dependencies.tool.js +167 -0
  69. package/mcp-server/dist/tools/github/verify-dependencies.tool.js.map +1 -0
  70. package/mcp-server/dist/tools/github/view-source-file.tool.d.ts +26 -0
  71. package/mcp-server/dist/tools/github/view-source-file.tool.d.ts.map +1 -0
  72. package/mcp-server/dist/tools/github/view-source-file.tool.js +91 -0
  73. package/mcp-server/dist/tools/github/view-source-file.tool.js.map +1 -0
  74. package/mcp-server/dist/tools/index.d.ts +3 -7
  75. package/mcp-server/dist/tools/index.d.ts.map +1 -1
  76. package/mcp-server/dist/tools/index.js +17 -13
  77. package/mcp-server/dist/tools/index.js.map +1 -1
  78. package/package.json +27 -8
  79. package/wiki/get-started/best-practices/api-usage-examples.md +42 -0
  80. package/wiki/get-started/best-practices/architectural-patterns.md +42 -1
  81. package/wiki/get-started/best-practices/code-style-standards.md +41 -0
  82. package/wiki/get-started/best-practices/contribution-workflow.md +40 -6
  83. package/wiki/get-started/best-practices/data-modeling.md +126 -0
  84. package/wiki/get-started/core-concepts/dependency-injection.md +13 -1
  85. package/wiki/get-started/mcp-docs-server.md +130 -32
  86. package/wiki/get-started/philosophy.md +198 -25
  87. package/wiki/references/base/application.md +5 -5
  88. package/wiki/references/base/controllers.md +3 -1
  89. package/wiki/references/base/dependency-injection.md +6 -5
  90. package/wiki/references/helpers/inversion.md +21 -11
  91. package/wiki/references/src-details/core.md +15 -1
  92. package/wiki/references/src-details/docs.md +19 -9
  93. package/wiki/references/src-details/mcp-server.md +185 -234
  94. package/mcp-server/dist/tools/get-doc-content.tool.d.ts.map +0 -1
  95. package/mcp-server/dist/tools/get-doc-content.tool.js.map +0 -1
  96. package/mcp-server/dist/tools/get-doc-metadata.tool.d.ts.map +0 -1
  97. package/mcp-server/dist/tools/get-doc-metadata.tool.js.map +0 -1
  98. package/mcp-server/dist/tools/list-categories.tool.d.ts.map +0 -1
  99. package/mcp-server/dist/tools/list-categories.tool.js.map +0 -1
  100. package/mcp-server/dist/tools/list-docs.tool.d.ts.map +0 -1
  101. package/mcp-server/dist/tools/list-docs.tool.js.map +0 -1
  102. package/mcp-server/dist/tools/search-docs.tool.d.ts.map +0 -1
  103. package/mcp-server/dist/tools/search-docs.tool.js.map +0 -1
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ListCategoriesTool = void 0;
4
+ const helpers_1 = require("@/mcp-server/helpers");
5
+ const tools_1 = require("@mastra/core/tools");
4
6
  const zod_1 = require("zod");
5
- const helpers_1 = require("../helpers");
6
- const base_tool_1 = require("./base.tool");
7
+ const base_tool_1 = require("../base.tool");
7
8
  // ----------------------------------------------------------------------------
8
9
  // DESCRIPTIONS
9
10
  // ----------------------------------------------------------------------------
@@ -68,9 +69,9 @@ Pass any category name to listDocs(category) to filter documents by that categor
68
69
  // ----------------------------------------------------------------------------
69
70
  // SCHEMAS
70
71
  // ----------------------------------------------------------------------------
71
- const InputSchema = zod_1.z.object({}).describe("No input parameters required.");
72
+ const InputSchema = zod_1.z.object({}).describe('No input parameters required.');
72
73
  const OutputSchema = zod_1.z.object({
73
- count: zod_1.z.number().int().describe("Total number of unique categories."),
74
+ count: zod_1.z.number().int().describe('Total number of unique categories.'),
74
75
  categories: zod_1.z.array(zod_1.z.string()).describe(CATEGORIES_DESCRIPTION),
75
76
  });
76
77
  // ----------------------------------------------------------------------------
@@ -79,12 +80,12 @@ const OutputSchema = zod_1.z.object({
79
80
  class ListCategoriesTool extends base_tool_1.BaseTool {
80
81
  constructor() {
81
82
  super(...arguments);
82
- this.id = "listCategories";
83
+ this.id = 'listCategories';
83
84
  this.description = TOOL_DESCRIPTION;
84
85
  this.inputSchema = InputSchema;
85
86
  this.outputSchema = OutputSchema;
86
87
  }
87
- async execute(_input) {
88
+ async execute(_opts) {
88
89
  const categories = await helpers_1.DocsHelper.listCategories();
89
90
  return {
90
91
  count: categories.length,
@@ -92,11 +93,11 @@ class ListCategoriesTool extends base_tool_1.BaseTool {
92
93
  };
93
94
  }
94
95
  getTool() {
95
- return (0, base_tool_1.createTool)({
96
+ return (0, tools_1.createTool)({
96
97
  id: this.id,
97
98
  description: this.description,
98
- inputSchema: InputSchema,
99
- outputSchema: OutputSchema,
99
+ inputSchema: this.inputSchema,
100
+ outputSchema: this.outputSchema,
100
101
  execute: async ({ context }) => this.execute(context),
101
102
  });
102
103
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-categories.tool.js","sourceRoot":"","sources":["../../../tools/docs/list-categories.tool.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,8CAAgD;AAChD,6BAAwB;AACxB,4CAAqD;AAErD,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;CAkB9B,CAAC;AAEF,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC,CAAC;AAE3E,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACtE,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC;CACjE,CAAC,CAAC;AAEH,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,MAAa,kBAAmB,SAAQ,oBAAiD;IAAzF;;QACW,OAAE,GAAG,gBAAgB,CAAC;QACtB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,YAAY,CAAC;IAoBvC,CAAC;IAlBC,KAAK,CAAC,OAAO,CAAC,KAAkC;QAC9C,MAAM,UAAU,GAAG,MAAM,oBAAU,CAAC,cAAc,EAAE,CAAC;QAErD,OAAO;YACL,KAAK,EAAE,UAAU,CAAC,MAAM;YACxB,UAAU;SACX,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,IAAA,kBAAU,EAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,gDAwBC"}
@@ -1,5 +1,5 @@
1
- import { z } from "zod";
2
- import { BaseTool, type TMastraTool } from "./base.tool";
1
+ import { z } from 'zod';
2
+ import { BaseTool, TMastraTool } from '../base.tool';
3
3
  declare const InputSchema: z.ZodObject<{
4
4
  category: z.ZodOptional<z.ZodString>;
5
5
  }, z.core.$strip>;
@@ -12,7 +12,7 @@ declare const OutputSchema: z.ZodObject<{
12
12
  }, z.core.$strip>>;
13
13
  }, z.core.$strip>;
14
14
  export declare class ListDocsTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
15
- readonly id = "listDocs";
15
+ readonly id = "listDocuments";
16
16
  readonly description = "\nLists all available Ignis Framework documentation files with their identifiers, titles, and categories.\n\nPURPOSE:\nUse this tool to discover what documentation is available. It provides a complete catalog\nof all documents, optionally filtered by category. Essential for understanding the documentation\nstructure and finding specific pages.\n\nWHEN TO USE:\n- To explore what documentation exists\n- To find document IDs for use with getDocContent\n- To browse documents within a specific category\n- When searchDocs doesn't find what you're looking for\n- To understand the overall documentation structure\n- To provide users with a list of available resources\n\nWHEN NOT TO USE:\n- When you know what you're looking for (use searchDocs instead)\n- When you need document content (use getDocContent after getting IDs)\n\nCATEGORY FILTERING:\n- Omit 'category' parameter to get ALL documents\n- Provide exact category name to filter (case-sensitive)\n- Use listCategories first to see available category names\n\nCOMMON CATEGORIES IN IGNIS DOCS:\n- \"Getting Started\" - Introductory guides, quickstart, philosophy\n- \"Core Concepts\" - DI, lifecycle, configuration fundamentals\n- \"Best Practices\" - Recommended patterns and approaches\n- \"References\" - API documentation, component details\n- \"Helpers\" - Utility libraries documentation\n- \"Utilities\" - Utility function references\n\nWORKFLOW EXAMPLES:\n1. Browse all docs:\n listDocs() \u2192 Review titles \u2192 getDocContent(id)\n\n2. Explore a category:\n listCategories() \u2192 Pick category \u2192 listDocs(category) \u2192 getDocContent(id)\n\n3. Find specific documentation:\n searchDocs(query) \u2192 If not found \u2192 listDocs() to browse manually\n";
17
17
  readonly inputSchema: z.ZodObject<{
18
18
  category: z.ZodOptional<z.ZodString>;
@@ -25,8 +25,8 @@ export declare class ListDocsTool extends BaseTool<typeof InputSchema, typeof Ou
25
25
  category: z.ZodString;
26
26
  }, z.core.$strip>>;
27
27
  }, z.core.$strip>;
28
- execute(input: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
28
+ execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
29
29
  getTool(): TMastraTool;
30
30
  }
31
31
  export {};
32
- //# sourceMappingURL=list-docs.tool.d.ts.map
32
+ //# sourceMappingURL=list-documents.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-documents.tool.d.ts","sourceRoot":"","sources":["../../../tools/docs/list-documents.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAsFrD,QAAA,MAAM,WAAW;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;iBAGhB,CAAC;AAMH,qBAAa,YAAa,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACjF,QAAQ,CAAC,EAAE,mBAAmB;IAC9B,QAAQ,CAAC,WAAW,+sDAAoB;IACxC,QAAQ,CAAC,WAAW;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IASvF,OAAO,IAAI,WAAW;CASvB"}
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ListDocsTool = void 0;
4
4
  const zod_1 = require("zod");
5
- const helpers_1 = require("../helpers");
6
- const base_tool_1 = require("./base.tool");
5
+ const tools_1 = require("@mastra/core/tools");
6
+ const base_tool_1 = require("../base.tool");
7
+ const helpers_1 = require("@/mcp-server/helpers");
7
8
  // ----------------------------------------------------------------------------
8
9
  // DESCRIPTIONS
9
10
  // ----------------------------------------------------------------------------
@@ -78,16 +79,16 @@ TIP: If unsure of exact category name, call listCategories first or omit this pa
78
79
  const DocEntrySchema = zod_1.z.object({
79
80
  id: zod_1.z
80
81
  .string()
81
- .describe("Document ID (relative file path). Use with getDocContent or getDocMetadata."),
82
- title: zod_1.z.string().describe("Document title from frontmatter or filename."),
83
- category: zod_1.z.string().describe("Document category for organizational grouping."),
82
+ .describe('Document ID (relative file path). Use with getDocContent or getDocMetadata.'),
83
+ title: zod_1.z.string().describe('Document title from frontmatter or filename.'),
84
+ category: zod_1.z.string().describe('Document category for organizational grouping.'),
84
85
  });
85
86
  const InputSchema = zod_1.z.object({
86
87
  category: zod_1.z.string().optional().describe(CATEGORY_DESCRIPTION),
87
88
  });
88
89
  const OutputSchema = zod_1.z.object({
89
- count: zod_1.z.number().int().describe("Total documents returned. Reflects filter if applied."),
90
- docs: zod_1.z.array(DocEntrySchema).describe("Document entries with id, title, and category."),
90
+ count: zod_1.z.number().int().describe('Total documents returned. Reflects filter if applied.'),
91
+ docs: zod_1.z.array(DocEntrySchema).describe('Document entries with id, title, and category.'),
91
92
  });
92
93
  // ----------------------------------------------------------------------------
93
94
  // TOOL CLASS
@@ -95,27 +96,27 @@ const OutputSchema = zod_1.z.object({
95
96
  class ListDocsTool extends base_tool_1.BaseTool {
96
97
  constructor() {
97
98
  super(...arguments);
98
- this.id = "listDocs";
99
+ this.id = 'listDocuments';
99
100
  this.description = TOOL_DESCRIPTION;
100
101
  this.inputSchema = InputSchema;
101
102
  this.outputSchema = OutputSchema;
102
103
  }
103
- async execute(input) {
104
- const docs = await helpers_1.DocsHelper.listDocs({ category: input.category });
104
+ async execute(opts) {
105
+ const docs = await helpers_1.DocsHelper.listDocumentFiles({ category: opts.category });
105
106
  return {
106
107
  count: docs.length,
107
108
  docs,
108
109
  };
109
110
  }
110
111
  getTool() {
111
- return (0, base_tool_1.createTool)({
112
+ return (0, tools_1.createTool)({
112
113
  id: this.id,
113
114
  description: this.description,
114
- inputSchema: InputSchema,
115
- outputSchema: OutputSchema,
115
+ inputSchema: this.inputSchema,
116
+ outputSchema: this.outputSchema,
116
117
  execute: async ({ context }) => this.execute(context),
117
118
  });
118
119
  }
119
120
  }
120
121
  exports.ListDocsTool = ListDocsTool;
121
- //# sourceMappingURL=list-docs.tool.js.map
122
+ //# sourceMappingURL=list-documents.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-documents.tool.js","sourceRoot":"","sources":["../../../tools/docs/list-documents.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,8CAAgD;AAChD,4CAAqD;AACrD,kDAAkD;AAElD,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CxB,CAAC;AAEF,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqB5B,CAAC;AAEF,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,OAAC;SACF,MAAM,EAAE;SACR,QAAQ,CAAC,6EAA6E,CAAC;IAC1F,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IAC1E,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;CAChF,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CAC/D,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IACzF,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,gDAAgD,CAAC;CACzF,CAAC,CAAC;AAEH,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,MAAa,YAAa,SAAQ,oBAAiD;IAAnF;;QACW,OAAE,GAAG,eAAe,CAAC;QACrB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,YAAY,CAAC;IAoBvC,CAAC;IAlBC,KAAK,CAAC,OAAO,CAAC,IAAiC;QAC7C,MAAM,IAAI,GAAG,MAAM,oBAAU,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE7E,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,IAAI;SACL,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,IAAA,kBAAU,EAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,oCAwBC"}
@@ -1,5 +1,5 @@
1
- import { z } from "zod";
2
- import { BaseTool, type TMastraTool } from "./base.tool";
1
+ import { z } from 'zod';
2
+ import { BaseTool, TMastraTool } from '../base.tool';
3
3
  declare const InputSchema: z.ZodObject<{
4
4
  query: z.ZodString;
5
5
  limit: z.ZodDefault<z.ZodNumber>;
@@ -14,7 +14,7 @@ declare const OutputSchema: z.ZodObject<{
14
14
  }, z.core.$strip>>;
15
15
  }, z.core.$strip>;
16
16
  export declare class SearchDocsTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
17
- readonly id = "searchDocs";
17
+ readonly id = "searchDocuments";
18
18
  readonly description = "\nPerforms intelligent fuzzy search across the entire Ignis Framework documentation corpus.\n\nPURPOSE:\nUse this tool to find documentation pages relevant to a user's question or topic.\nIt searches both document titles (weighted higher) and content body using the Fuse.js fuzzy matching algorithm.\n\nWHEN TO USE:\n- User asks \"how do I...\" or \"what is...\" questions about Ignis\n- You need to find documentation about a specific feature, concept, or API\n- You want to discover related documentation before diving into specifics\n- User mentions keywords that might appear in documentation\n\nSEARCH BEHAVIOR:\n- Fuzzy matching tolerates typos and partial matches\n- Title matches are weighted 70%, content matches 30%\n- Results sorted by relevance score (lower = better match)\n- Returns snippet previews for quick assessment\n\nWORKFLOW RECOMMENDATION:\n1. Start with searchDocs to find relevant pages\n2. Review returned snippets to identify best matches\n3. Use getDocContent with specific IDs to retrieve full content\n4. Use getDocMetadata if you need document statistics\n\nOUTPUT STRUCTURE:\nReturns array of {id, title, category, snippet, score} objects.\nUse the 'id' field with getDocContent to fetch full document content.\n";
19
19
  readonly inputSchema: z.ZodObject<{
20
20
  query: z.ZodString;
@@ -29,8 +29,8 @@ export declare class SearchDocsTool extends BaseTool<typeof InputSchema, typeof
29
29
  score: z.ZodOptional<z.ZodNumber>;
30
30
  }, z.core.$strip>>;
31
31
  }, z.core.$strip>;
32
- execute(input: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
32
+ execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
33
33
  getTool(): TMastraTool;
34
34
  }
35
35
  export {};
36
- //# sourceMappingURL=search-docs.tool.d.ts.map
36
+ //# sourceMappingURL=search-documents.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-documents.tool.d.ts","sourceRoot":"","sources":["../../../tools/docs/search-documents.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAiFrD,QAAA,MAAM,WAAW;;;iBASf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;iBAIhB,CAAC;AAMH,qBAAa,cAAe,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACnF,QAAQ,CAAC,EAAE,qBAAqB;IAChC,QAAQ,CAAC,WAAW,kuCAAoB;IACxC,QAAQ,CAAC,WAAW;;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAQvF,OAAO,IAAI,WAAW;CASvB"}
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SearchDocsTool = void 0;
4
+ const common_1 = require("@/mcp-server/common");
5
+ const helpers_1 = require("@/mcp-server/helpers");
6
+ const tools_1 = require("@mastra/core/tools");
4
7
  const zod_1 = require("zod");
5
- const common_1 = require("../common");
6
- const helpers_1 = require("../helpers");
7
- const base_tool_1 = require("./base.tool");
8
+ const base_tool_1 = require("../base.tool");
8
9
  // ----------------------------------------------------------------------------
9
10
  // DESCRIPTIONS
10
11
  // ----------------------------------------------------------------------------
@@ -41,7 +42,7 @@ const QUERY_DESCRIPTION = `
41
42
  Search query string to match against documentation titles and content.
42
43
 
43
44
  REQUIREMENTS:
44
- - Minimum ${common_1.MCP_CONFIG.search.minQueryLength} characters required
45
+ - Minimum ${common_1.MCPConfigs.search.minQueryLength} characters required
45
46
  - Supports natural language queries (e.g., "dependency injection setup")
46
47
  - Supports technical terms (e.g., "HttpServer middleware")
47
48
  - Case-insensitive matching
@@ -56,8 +57,8 @@ Maximum number of results to return.
56
57
 
57
58
  CONSTRAINTS:
58
59
  - Minimum: 1
59
- - Maximum: ${common_1.MCP_CONFIG.search.maxLimit}
60
- - Default: ${common_1.MCP_CONFIG.search.defaultLimit}
60
+ - Maximum: ${common_1.MCPConfigs.search.maxLimit}
61
+ - Default: ${common_1.MCPConfigs.search.defaultLimit}
61
62
 
62
63
  RECOMMENDATIONS:
63
64
  - Use default (10) for general queries
@@ -70,26 +71,26 @@ RECOMMENDATIONS:
70
71
  const SearchResultSchema = zod_1.z.object({
71
72
  id: zod_1.z
72
73
  .string()
73
- .describe("Unique document identifier (relative file path). Use with getDocContent to retrieve full document."),
74
- title: zod_1.z.string().describe("Human-readable document title from frontmatter or filename."),
74
+ .describe('Unique document identifier (relative file path). Use with getDocContent to retrieve full document.'),
75
+ title: zod_1.z.string().describe('Human-readable document title from frontmatter or filename.'),
75
76
  category: zod_1.z.string().describe('Document category (e.g., "Getting Started", "References").'),
76
- snippet: zod_1.z.string().describe("Content preview (max 300 chars) for quick assessment."),
77
- score: zod_1.z.number().optional().describe("Relevance score 0-1 (lower = better match)."),
77
+ snippet: zod_1.z.string().describe('Content preview (max 300 chars) for quick assessment.'),
78
+ score: zod_1.z.number().optional().describe('Relevance score 0-1 (lower = better match).'),
78
79
  });
79
80
  const InputSchema = zod_1.z.object({
80
- query: zod_1.z.string().min(common_1.MCP_CONFIG.search.minQueryLength).describe(QUERY_DESCRIPTION),
81
+ query: zod_1.z.string().min(common_1.MCPConfigs.search.minQueryLength).describe(QUERY_DESCRIPTION),
81
82
  limit: zod_1.z
82
83
  .number()
83
84
  .int()
84
85
  .min(1)
85
- .max(common_1.MCP_CONFIG.search.maxLimit)
86
- .default(common_1.MCP_CONFIG.search.defaultLimit)
86
+ .max(common_1.MCPConfigs.search.maxLimit)
87
+ .default(common_1.MCPConfigs.search.defaultLimit)
87
88
  .describe(LIMIT_DESCRIPTION),
88
89
  });
89
90
  const OutputSchema = zod_1.z.object({
90
91
  results: zod_1.z
91
92
  .array(SearchResultSchema)
92
- .describe("Search results sorted by relevance. Empty array if no matches."),
93
+ .describe('Search results sorted by relevance. Empty array if no matches.'),
93
94
  });
94
95
  // ----------------------------------------------------------------------------
95
96
  // TOOL CLASS
@@ -97,27 +98,27 @@ const OutputSchema = zod_1.z.object({
97
98
  class SearchDocsTool extends base_tool_1.BaseTool {
98
99
  constructor() {
99
100
  super(...arguments);
100
- this.id = "searchDocs";
101
+ this.id = 'searchDocuments';
101
102
  this.description = TOOL_DESCRIPTION;
102
103
  this.inputSchema = InputSchema;
103
104
  this.outputSchema = OutputSchema;
104
105
  }
105
- async execute(input) {
106
- const results = await helpers_1.DocsHelper.searchDocs({
107
- query: input.query,
108
- limit: input.limit,
106
+ async execute(opts) {
107
+ const results = await helpers_1.DocsHelper.searchDocuments({
108
+ query: opts.query,
109
+ limit: opts.limit,
109
110
  });
110
111
  return { results };
111
112
  }
112
113
  getTool() {
113
- return (0, base_tool_1.createTool)({
114
+ return (0, tools_1.createTool)({
114
115
  id: this.id,
115
116
  description: this.description,
116
- inputSchema: InputSchema,
117
- outputSchema: OutputSchema,
117
+ inputSchema: this.inputSchema,
118
+ outputSchema: this.outputSchema,
118
119
  execute: async ({ context }) => this.execute(context),
119
120
  });
120
121
  }
121
122
  }
122
123
  exports.SearchDocsTool = SearchDocsTool;
123
- //# sourceMappingURL=search-docs.tool.js.map
124
+ //# sourceMappingURL=search-documents.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-documents.tool.js","sourceRoot":"","sources":["../../../tools/docs/search-documents.tool.ts"],"names":[],"mappings":";;;AAAA,gDAAiD;AACjD,kDAAkD;AAClD,8CAAgD;AAChD,6BAAwB;AACxB,4CAAqD;AAErD,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxB,CAAC;AAEF,MAAM,iBAAiB,GAAG;;;;YAId,mBAAU,CAAC,MAAM,CAAC,cAAc;;;;;;;;;CAS3C,CAAC;AAEF,MAAM,iBAAiB,GAAG;;;;;aAKb,mBAAU,CAAC,MAAM,CAAC,QAAQ;aAC1B,mBAAU,CAAC,MAAM,CAAC,YAAY;;;;;;CAM1C,CAAC;AAEF,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,OAAC;SACF,MAAM,EAAE;SACR,QAAQ,CACP,oGAAoG,CACrG;IACH,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6DAA6D,CAAC;IACzF,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4DAA4D,CAAC;IAC3F,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IACrF,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;CACrF,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,mBAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACnF,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,mBAAU,CAAC,MAAM,CAAC,QAAQ,CAAC;SAC/B,OAAO,CAAC,mBAAU,CAAC,MAAM,CAAC,YAAY,CAAC;SACvC,QAAQ,CAAC,iBAAiB,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,OAAO,EAAE,OAAC;SACP,KAAK,CAAC,kBAAkB,CAAC;SACzB,QAAQ,CAAC,gEAAgE,CAAC;CAC9E,CAAC,CAAC;AAEH,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,MAAa,cAAe,SAAQ,oBAAiD;IAArF;;QACW,OAAE,GAAG,iBAAiB,CAAC;QACvB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,YAAY,CAAC;IAmBvC,CAAC;IAjBC,KAAK,CAAC,OAAO,CAAC,IAAiC;QAC7C,MAAM,OAAO,GAAG,MAAM,oBAAU,CAAC,eAAe,CAAC;YAC/C,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAED,OAAO;QACL,OAAO,IAAA,kBAAU,EAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AAvBD,wCAuBC"}
@@ -0,0 +1,5 @@
1
+ export * from './list-project-files.tool';
2
+ export * from './search-code.tool';
3
+ export * from './verify-dependencies.tool';
4
+ export * from './view-source-file.tool';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../tools/github/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./list-project-files.tool"), exports);
18
+ __exportStar(require("./search-code.tool"), exports);
19
+ __exportStar(require("./verify-dependencies.tool"), exports);
20
+ __exportStar(require("./view-source-file.tool"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tools/github/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,qDAAmC;AACnC,6DAA2C;AAC3C,0DAAwC"}
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ import { BaseTool, TMastraTool } from '../base.tool';
3
+ declare const InputSchema: z.ZodObject<{
4
+ directoryPath: z.ZodDefault<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ declare const OutputSchema: z.ZodObject<{
7
+ directoryPath: z.ZodString;
8
+ files: z.ZodArray<z.ZodString>;
9
+ directories: z.ZodArray<z.ZodString>;
10
+ error: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>;
12
+ export declare class ListProjectFilesTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
13
+ readonly id = "listProjectFiles";
14
+ readonly description = "\nLists files and directories within the Ignis GitHub repository.\n\nPURPOSE:\nExplore the project structure, discover source code files, and navigate the monorepo.\nPrimary tool for understanding codebase layout before reading specific files.\n\nWHEN TO USE:\n- To understand overall project structure\n- To find location of specific modules (e.g., \"where are the controllers?\")\n- To get list of files in a directory before using viewSourceFile\n- To find configuration files, examples, or documentation\n\nWHEN NOT TO USE:\n- When searching for specific code patterns or keywords (use searchCode instead)\n- When you need to read a file's content (use viewSourceFile instead)\n- For documentation content (use searchDocs, listDocs, getDocContent instead)\n\nWORKFLOW:\n1. Start at root: listProjectFiles()\n2. Explore a package: listProjectFiles({ directoryPath: \"packages/core/src\" })\n3. Identify a file of interest\n4. Read the file: viewSourceFile({ filePath: \"packages/core/src/application.ts\" })\n";
15
+ readonly inputSchema: z.ZodObject<{
16
+ directoryPath: z.ZodDefault<z.ZodString>;
17
+ }, z.core.$strip>;
18
+ readonly outputSchema: z.ZodObject<{
19
+ directoryPath: z.ZodString;
20
+ files: z.ZodArray<z.ZodString>;
21
+ directories: z.ZodArray<z.ZodString>;
22
+ error: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
24
+ execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
25
+ getTool(): TMastraTool;
26
+ }
27
+ export {};
28
+ //# sourceMappingURL=list-project-files.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-project-files.tool.d.ts","sourceRoot":"","sources":["../../../tools/github/list-project-files.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA8CrD,QAAA,MAAM,WAAW;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;iBAOhB,CAAC;AAMH,qBAAa,oBAAqB,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACzF,QAAQ,CAAC,EAAE,sBAAsB;IACjC,QAAQ,CAAC,WAAW,0/BAAoB;IACxC,QAAQ,CAAC,WAAW;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAuBvF,OAAO,IAAI,WAAW;CASvB"}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListProjectFilesTool = void 0;
4
+ const tools_1 = require("@mastra/core/tools");
5
+ const zod_1 = require("zod");
6
+ const base_tool_1 = require("../base.tool");
7
+ const helpers_1 = require("@/mcp-server/helpers");
8
+ // ----------------------------------------------------------------------------
9
+ // DESCRIPTIONS
10
+ // ----------------------------------------------------------------------------
11
+ const TOOL_DESCRIPTION = `
12
+ Lists files and directories within the Ignis GitHub repository.
13
+
14
+ PURPOSE:
15
+ Explore the project structure, discover source code files, and navigate the monorepo.
16
+ Primary tool for understanding codebase layout before reading specific files.
17
+
18
+ WHEN TO USE:
19
+ - To understand overall project structure
20
+ - To find location of specific modules (e.g., "where are the controllers?")
21
+ - To get list of files in a directory before using viewSourceFile
22
+ - To find configuration files, examples, or documentation
23
+
24
+ WHEN NOT TO USE:
25
+ - When searching for specific code patterns or keywords (use searchCode instead)
26
+ - When you need to read a file's content (use viewSourceFile instead)
27
+ - For documentation content (use searchDocs, listDocs, getDocContent instead)
28
+
29
+ WORKFLOW:
30
+ 1. Start at root: listProjectFiles()
31
+ 2. Explore a package: listProjectFiles({ directoryPath: "packages/core/src" })
32
+ 3. Identify a file of interest
33
+ 4. Read the file: viewSourceFile({ filePath: "packages/core/src/application.ts" })
34
+ `;
35
+ const DIRECTORY_PATH_DESCRIPTION = `
36
+ The path to the directory you want to list, relative to the project root.
37
+ If omitted, it defaults to the root of the repository.
38
+
39
+ EXAMPLES:
40
+ - "." (or omitted) -> lists the root directory
41
+ - "packages" -> lists the contents of the 'packages' directory
42
+ - "packages/core/src" -> lists the source files of the core package
43
+ `;
44
+ // ----------------------------------------------------------------------------
45
+ // SCHEMAS
46
+ // ----------------------------------------------------------------------------
47
+ const InputSchema = zod_1.z.object({
48
+ directoryPath: zod_1.z.string().default('.').describe(DIRECTORY_PATH_DESCRIPTION),
49
+ });
50
+ const OutputSchema = zod_1.z.object({
51
+ directoryPath: zod_1.z.string(),
52
+ files: zod_1.z.array(zod_1.z.string()).describe('A list of file names within the specified directory.'),
53
+ directories: zod_1.z
54
+ .array(zod_1.z.string())
55
+ .describe('A list of subdirectory names within the specified directory.'),
56
+ error: zod_1.z.string().optional().describe('An error message if the directory could not be listed.'),
57
+ });
58
+ // ----------------------------------------------------------------------------
59
+ // TOOL CLASS
60
+ // ----------------------------------------------------------------------------
61
+ class ListProjectFilesTool extends base_tool_1.BaseTool {
62
+ constructor() {
63
+ super(...arguments);
64
+ this.id = 'listProjectFiles';
65
+ this.description = TOOL_DESCRIPTION;
66
+ this.inputSchema = InputSchema;
67
+ this.outputSchema = OutputSchema;
68
+ }
69
+ async execute(opts) {
70
+ const contents = await helpers_1.GithubHelper.getDirectoryContents({ path: opts.directoryPath });
71
+ if ('error' in contents) {
72
+ return {
73
+ directoryPath: opts.directoryPath,
74
+ files: [],
75
+ directories: [],
76
+ error: contents.error,
77
+ };
78
+ }
79
+ const files = contents.filter(item => item.type === 'file').map(item => item.name);
80
+ const directories = contents.filter(item => item.type === 'dir').map(item => item.name);
81
+ return {
82
+ directoryPath: opts.directoryPath,
83
+ files,
84
+ directories,
85
+ };
86
+ }
87
+ getTool() {
88
+ return (0, tools_1.createTool)({
89
+ id: this.id,
90
+ description: this.description,
91
+ inputSchema: this.inputSchema,
92
+ outputSchema: this.outputSchema,
93
+ execute: async ({ context }) => this.execute(context),
94
+ });
95
+ }
96
+ }
97
+ exports.ListProjectFilesTool = ListProjectFilesTool;
98
+ //# sourceMappingURL=list-project-files.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-project-files.tool.js","sourceRoot":"","sources":["../../../tools/github/list-project-files.tool.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAChD,6BAAwB;AACxB,4CAAqD;AACrD,kDAAoD;AAEpD,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBxB,CAAC;AAEF,MAAM,0BAA0B,GAAG;;;;;;;;CAQlC,CAAC;AAEF,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC;CAC5E,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,sDAAsD,CAAC;IAC3F,WAAW,EAAE,OAAC;SACX,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CAAC,8DAA8D,CAAC;IAC3E,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;CAChG,CAAC,CAAC;AAEH,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,MAAa,oBAAqB,SAAQ,oBAAiD;IAA3F;;QACW,OAAE,GAAG,kBAAkB,CAAC;QACxB,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,YAAY,CAAC;IAkCvC,CAAC;IAhCC,KAAK,CAAC,OAAO,CAAC,IAAiC;QAC7C,MAAM,QAAQ,GAAG,MAAM,sBAAY,CAAC,oBAAoB,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAEvF,IAAI,OAAO,IAAI,QAAQ,EAAE,CAAC;YACxB,OAAO;gBACL,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,EAAE;gBACf,KAAK,EAAE,QAAQ,CAAC,KAAK;aACtB,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnF,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAExF,OAAO;YACL,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,KAAK;YACL,WAAW;SACZ,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,IAAA,kBAAU,EAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AAtCD,oDAsCC"}
@@ -0,0 +1,42 @@
1
+ import { z } from 'zod';
2
+ import { BaseTool, TMastraTool } from '../base.tool';
3
+ declare const InputSchema: z.ZodObject<{
4
+ query: z.ZodString;
5
+ limit: z.ZodDefault<z.ZodNumber>;
6
+ }, z.core.$strip>;
7
+ declare const OutputSchema: z.ZodObject<{
8
+ query: z.ZodString;
9
+ totalCount: z.ZodNumber;
10
+ results: z.ZodArray<z.ZodObject<{
11
+ filePath: z.ZodString;
12
+ fileName: z.ZodString;
13
+ matchSnippet: z.ZodOptional<z.ZodString>;
14
+ url: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>>;
16
+ error: z.ZodOptional<z.ZodString>;
17
+ rateLimitWarning: z.ZodOptional<z.ZodString>;
18
+ }, z.core.$strip>;
19
+ export declare class SearchCodeTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
20
+ readonly id = "searchCode";
21
+ readonly description = "\nSearches for code patterns, function names, class definitions, and keywords across the Ignis source code.\n\nPURPOSE:\nFind specific code implementations, locate where functions/classes are defined, and discover\ncode patterns throughout the repository. Essential for understanding how features are implemented.\n\nWHEN TO USE:\n- To find where a specific function or class is defined\n- To locate usages of a particular API or pattern\n- To find configuration files or specific code constructs\n- When you know WHAT you're looking for but not WHERE it is\n- To answer questions like \"where is X implemented?\" or \"how is Y used?\"\n\nWHEN NOT TO USE:\n- For general project structure exploration (use listProjectFiles instead)\n- For documentation content (use searchDocs instead)\n- When you already know the file path (use viewSourceFile instead)\n\nSEARCH TIPS:\n- Use specific terms: \"createApplication\" instead of \"create\"\n- Include file extension for targeted results: \"extension:ts HttpServer\"\n- Search for class/function names: \"class DependencyContainer\"\n- Combine terms: \"inject decorator\"\n\nOUTPUT:\nReturns matching files with code snippets showing the match context.\nUse viewSourceFile to read the complete file content.\n";
22
+ readonly inputSchema: z.ZodObject<{
23
+ query: z.ZodString;
24
+ limit: z.ZodDefault<z.ZodNumber>;
25
+ }, z.core.$strip>;
26
+ readonly outputSchema: z.ZodObject<{
27
+ query: z.ZodString;
28
+ totalCount: z.ZodNumber;
29
+ results: z.ZodArray<z.ZodObject<{
30
+ filePath: z.ZodString;
31
+ fileName: z.ZodString;
32
+ matchSnippet: z.ZodOptional<z.ZodString>;
33
+ url: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strip>>;
35
+ error: z.ZodOptional<z.ZodString>;
36
+ rateLimitWarning: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>;
38
+ execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
39
+ getTool(): TMastraTool;
40
+ }
41
+ export {};
42
+ //# sourceMappingURL=search-code.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-code.tool.d.ts","sourceRoot":"","sources":["../../../tools/github/search-code.tool.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAmFrD,QAAA,MAAM,WAAW;;;iBASf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;iBAShB,CAAC;AA6BH,qBAAa,cAAe,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACnF,QAAQ,CAAC,EAAE,gBAAgB;IAC3B,QAAQ,CAAC,WAAW,6uCAAoB;IACxC,QAAQ,CAAC,WAAW;;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;;;;;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAiFvF,OAAO,IAAI,WAAW;CASvB"}