@docrouter/mcp 0.1.1 → 0.1.2
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/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1760,9 +1760,9 @@ This server provides access to DocRouter resources and tools.
|
|
|
1760
1760
|
}
|
|
1761
1761
|
case "help_prompts": {
|
|
1762
1762
|
try {
|
|
1763
|
-
const
|
|
1764
|
-
const
|
|
1765
|
-
const promptsPath = path.join(
|
|
1763
|
+
const currentFile = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)));
|
|
1764
|
+
const currentDir = path.dirname(currentFile);
|
|
1765
|
+
const promptsPath = path.join(currentDir, "docs/knowledge_base/prompts.md");
|
|
1766
1766
|
const promptsContent = fs.readFileSync(promptsPath, "utf-8");
|
|
1767
1767
|
return {
|
|
1768
1768
|
content: [
|
|
@@ -1786,9 +1786,9 @@ This server provides access to DocRouter resources and tools.
|
|
|
1786
1786
|
}
|
|
1787
1787
|
case "help_schemas": {
|
|
1788
1788
|
try {
|
|
1789
|
-
const
|
|
1790
|
-
const
|
|
1791
|
-
const schemasPath = path.join(
|
|
1789
|
+
const currentFile = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)));
|
|
1790
|
+
const currentDir = path.dirname(currentFile);
|
|
1791
|
+
const schemasPath = path.join(currentDir, "docs/knowledge_base/schemas.md");
|
|
1792
1792
|
const schemasContent = fs.readFileSync(schemasPath, "utf-8");
|
|
1793
1793
|
return {
|
|
1794
1794
|
content: [
|
|
@@ -1812,9 +1812,9 @@ This server provides access to DocRouter resources and tools.
|
|
|
1812
1812
|
}
|
|
1813
1813
|
case "help_forms": {
|
|
1814
1814
|
try {
|
|
1815
|
-
const
|
|
1816
|
-
const
|
|
1817
|
-
const formsPath = path.join(
|
|
1815
|
+
const currentFile = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href)));
|
|
1816
|
+
const currentDir = path.dirname(currentFile);
|
|
1817
|
+
const formsPath = path.join(currentDir, "docs/knowledge_base/forms.md");
|
|
1818
1818
|
const formsContent = fs.readFileSync(formsPath, "utf-8");
|
|
1819
1819
|
return {
|
|
1820
1820
|
content: [
|