@sweetoburrito/backstage-plugin-ai-assistant-backend 0.10.0 → 0.11.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/dist/constants/prompts.cjs.js +12 -6
- package/dist/constants/prompts.cjs.js.map +1 -1
- package/dist/services/mcp.cjs.js +3 -1
- package/dist/services/mcp.cjs.js.map +1 -1
- package/dist/services/tools/searchKnowledge.cjs.js +12 -2
- package/dist/services/tools/searchKnowledge.cjs.js.map +1 -1
- package/package.json +2 -2
|
@@ -14,17 +14,21 @@ CRITICAL FORMATTING RULES - MUST ALWAYS FOLLOW:
|
|
|
14
14
|
5. Use headings (##, ###), bullet points, numbered lists, and **bold**/*italic* text appropriately
|
|
15
15
|
6. Format code with backticks: \`inline code\` or \`\`\`language for code blocks
|
|
16
16
|
7. Structure responses clearly with proper spacing and organization
|
|
17
|
+
8. **MANDATORY: If metadata.urls are present in tool responses, ALWAYS include them in your answer as a "Sources" or "References" section at the end**
|
|
18
|
+
9. **Format source URLs as**: [Source Name or Document Title](url)
|
|
17
19
|
`;
|
|
18
20
|
const DEFAULT_SYSTEM_PROMPT = `
|
|
19
21
|
Content Rules:
|
|
20
22
|
1. Always base your answers on the provided context. Do not make up information.
|
|
21
23
|
2. When relevant, cite or reference the source information provided in the context.
|
|
22
|
-
3.
|
|
23
|
-
4.
|
|
24
|
-
5.
|
|
25
|
-
6.
|
|
26
|
-
7.
|
|
27
|
-
8.
|
|
24
|
+
3. **MANDATORY: When tool responses include metadata.urls, you MUST include these URLs in your response**
|
|
25
|
+
4. **Always add a "Sources:" or "References:" section at the end listing all metadata.urls from tool calls**
|
|
26
|
+
5. Maintain a professional, friendly, and helpful tone.
|
|
27
|
+
6. Return only the relevant information without any filler or unnecessary details.
|
|
28
|
+
7. If you don't know the answer, admit it and suggest ways to find the information.
|
|
29
|
+
8. **Actively use available tools** to enhance your responses
|
|
30
|
+
9. Adapt your approach based on the specific tools and capabilities available in the current session
|
|
31
|
+
10. When you do not have the information needed to answer, use the tools provided to gather more context before responding.
|
|
28
32
|
`;
|
|
29
33
|
const DEFAULT_TOOL_GUIDELINE = `
|
|
30
34
|
TOOL USAGE GUIDELINES:
|
|
@@ -34,6 +38,8 @@ TOOL USAGE GUIDELINES:
|
|
|
34
38
|
- IMPORTANT: When using tools, always explain why you're using each tool
|
|
35
39
|
- Use tools in logical sequence, not randomly
|
|
36
40
|
- If a tool fails, try an alternative approach before using another tool
|
|
41
|
+
- **MANDATORY: After using tools, check for metadata.urls in the response and ALWAYS include them in your final answer**
|
|
42
|
+
- **Format tool source URLs in a dedicated "Sources:" section using markdown links**
|
|
37
43
|
`;
|
|
38
44
|
|
|
39
45
|
exports.DEFAULT_CONVERSATION_SUMMARY_PROMPT = DEFAULT_CONVERSATION_SUMMARY_PROMPT;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.cjs.js","sources":["../../src/constants/prompts.ts"],"sourcesContent":["export const DEFAULT_CONVERSATION_SUMMARY_PROMPT =\n \"Summarize this conversation in a concise manner. The summary should capture the main points. Return the summary only, without any additional text. Do not include any introductions or other part of the conversation that doesn't contribute to the summary or form part of the overall conversation as part of the summary.\";\n\nexport const DEFAULT_SUMMARY_PROMPT =\n \"Summarize the following content in a concise manner. The summary should capture the main points. Return the summary only, without any additional text. Do not include any introductions or other part of the content that doesn't contribute to the summary.\";\n\nexport const DEFAULT_IDENTITY_PROMPT = `\nYou are a helpful assistant that answers questions based on provided context from various documents. The context may come from sources such as internal wikis, code repositories, technical documentation, or other structured or unstructured data.\n`;\n\nexport const DEFAULT_FORMATTING_PROMPT = `\nCRITICAL FORMATTING RULES - MUST ALWAYS FOLLOW:\n1. **ALWAYS use proper markdown formatting in ALL responses**\n2. **NEVER output plain URLs** - ALWAYS convert them to clickable markdown links using [description](url) syntax\n3. **For images, ALWAYS use markdown image syntax**: \n4. **For all URLs, ALWAYS format as**: [descriptive text](url) - never just paste the raw URL\n5. Use headings (##, ###), bullet points, numbered lists, and **bold**/*italic* text appropriately\n6. Format code with backticks: \\`inline code\\` or \\`\\`\\`language for code blocks\n7. Structure responses clearly with proper spacing and organization\n`;\n\nexport const DEFAULT_SYSTEM_PROMPT = `\nContent Rules:\n1. Always base your answers on the provided context. Do not make up information.\n2. When relevant, cite or reference the source information provided in the context.\n3. Maintain a professional, friendly, and helpful tone.\
|
|
1
|
+
{"version":3,"file":"prompts.cjs.js","sources":["../../src/constants/prompts.ts"],"sourcesContent":["export const DEFAULT_CONVERSATION_SUMMARY_PROMPT =\n \"Summarize this conversation in a concise manner. The summary should capture the main points. Return the summary only, without any additional text. Do not include any introductions or other part of the conversation that doesn't contribute to the summary or form part of the overall conversation as part of the summary.\";\n\nexport const DEFAULT_SUMMARY_PROMPT =\n \"Summarize the following content in a concise manner. The summary should capture the main points. Return the summary only, without any additional text. Do not include any introductions or other part of the content that doesn't contribute to the summary.\";\n\nexport const DEFAULT_IDENTITY_PROMPT = `\nYou are a helpful assistant that answers questions based on provided context from various documents. The context may come from sources such as internal wikis, code repositories, technical documentation, or other structured or unstructured data.\n`;\n\nexport const DEFAULT_FORMATTING_PROMPT = `\nCRITICAL FORMATTING RULES - MUST ALWAYS FOLLOW:\n1. **ALWAYS use proper markdown formatting in ALL responses**\n2. **NEVER output plain URLs** - ALWAYS convert them to clickable markdown links using [description](url) syntax\n3. **For images, ALWAYS use markdown image syntax**: \n4. **For all URLs, ALWAYS format as**: [descriptive text](url) - never just paste the raw URL\n5. Use headings (##, ###), bullet points, numbered lists, and **bold**/*italic* text appropriately\n6. Format code with backticks: \\`inline code\\` or \\`\\`\\`language for code blocks\n7. Structure responses clearly with proper spacing and organization\n8. **MANDATORY: If metadata.urls are present in tool responses, ALWAYS include them in your answer as a \"Sources\" or \"References\" section at the end**\n9. **Format source URLs as**: [Source Name or Document Title](url)\n`;\n\nexport const DEFAULT_SYSTEM_PROMPT = `\nContent Rules:\n1. Always base your answers on the provided context. Do not make up information.\n2. When relevant, cite or reference the source information provided in the context.\n3. **MANDATORY: When tool responses include metadata.urls, you MUST include these URLs in your response**\n4. **Always add a \"Sources:\" or \"References:\" section at the end listing all metadata.urls from tool calls**\n5. Maintain a professional, friendly, and helpful tone.\n6. Return only the relevant information without any filler or unnecessary details.\n7. If you don't know the answer, admit it and suggest ways to find the information.\n8. **Actively use available tools** to enhance your responses\n9. Adapt your approach based on the specific tools and capabilities available in the current session\n10. When you do not have the information needed to answer, use the tools provided to gather more context before responding.\n`;\n\nexport const DEFAULT_TOOL_GUIDELINE = `\nTOOL USAGE GUIDELINES:\n- Only use tools when explicitly needed to answer the user's question\n- Read tool descriptions carefully before using them\n- If you can answer without tools, do so\n- IMPORTANT: When using tools, always explain why you're using each tool\n- Use tools in logical sequence, not randomly\n- If a tool fails, try an alternative approach before using another tool\n- **MANDATORY: After using tools, check for metadata.urls in the response and ALWAYS include them in your final answer**\n- **Format tool source URLs in a dedicated \"Sources:\" section using markdown links**\n`;\n"],"names":[],"mappings":";;AAAO,MAAM,mCAAA,GACX;AAEK,MAAM,sBAAA,GACX;AAEK,MAAM,uBAAA,GAA0B;AAAA;AAAA;AAIhC,MAAM,yBAAA,GAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAalC,MAAM,qBAAA,GAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAc9B,MAAM,sBAAA,GAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;"}
|
package/dist/services/mcp.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.cjs.js","sources":["../../src/services/mcp.ts"],"sourcesContent":["import {\n BackstageCredentials,\n DatabaseService,\n RootConfigService,\n UserInfoService,\n} from '@backstage/backend-plugin-api';\nimport { MultiServerMCPClient } from '@langchain/mcp-adapters';\nimport {\n McpServerConfig,\n McpServerConfigOptions,\n} from '@sweetoburrito/backstage-plugin-ai-assistant-common';\nimport {\n createAssistantTool,\n Tool,\n} from '@sweetoburrito/backstage-plugin-ai-assistant-node';\nimport { McpStore } from '../database/mcp-store';\nimport {\n encrypt,\n decrypt,\n} from '@sweetoburrito/backstage-plugin-ai-assistant-node';\n\ntype CreateMcpServiceOptions = {\n config: RootConfigService;\n userInfo: UserInfoService;\n database: DatabaseService;\n};\n\nexport type McpService = {\n getTools: (credentials: BackstageCredentials) => Promise<Tool[]>;\n createUserMcpServerConfig: (\n credentials: BackstageCredentials,\n config: McpServerConfig,\n ) => Promise<void>;\n updateUserMcpServerConfig: (\n credentials: BackstageCredentials,\n config: McpServerConfig,\n ) => Promise<void>;\n getUserMcpServerConfigNames: (\n credentials: BackstageCredentials,\n ) => Promise<string[]>;\n deleteUserMcpServerConfig: (\n credentials: BackstageCredentials,\n name: string,\n ) => Promise<void>;\n};\n\nexport const createMcpService = async ({\n config,\n userInfo,\n database,\n}: CreateMcpServiceOptions): Promise<McpService> => {\n const serversConfig = config.getOptionalConfigArray(\n 'aiAssistant.mcp.servers',\n );\n const encryptionKey = config.getString('aiAssistant.mcp.encryptionKey');\n\n const preConfiguredMcpServers = serversConfig\n ? serversConfig.reduce((acc, server) => {\n const serverName = server.getString('name');\n const options = server.get<McpServerConfigOptions>('options');\n\n acc[serverName] = options;\n\n return acc;\n }, {} as Record<string, McpServerConfigOptions>)\n : null;\n\n const preConfiguredMcpClient = preConfiguredMcpServers\n ? new MultiServerMCPClient({\n prefixToolNameWithServerName: true,\n useStandardContentBlocks: true,\n mcpServers: preConfiguredMcpServers,\n })\n : null;\n\n const mcpStore = await McpStore.fromConfig({ database });\n\n const getUserMcpServerConfigNames: McpService['getUserMcpServerConfigNames'] =\n async credentials => {\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n return mcpStore.getUserUserMcpConfigNames(userEntityRef);\n };\n\n const getUserMcpServerConfig = async (\n credentials: BackstageCredentials,\n ): Promise<McpServerConfig[]> => {\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n\n const encryptedMcpConfig = await mcpStore.getUserMcpConfigs(userEntityRef);\n\n const mcpConfig: McpServerConfig[] = encryptedMcpConfig.map(c => ({\n name: c.name,\n options: JSON.parse(decrypt(c.encryptedOptions, encryptionKey)),\n }));\n\n return mcpConfig;\n };\n\n const getTools: McpService['getTools'] = async credentials => {\n const userMcpConfig = await getUserMcpServerConfig(credentials);\n\n const userMcpServers = userMcpConfig.length\n ? userMcpConfig.reduce((acc, server) => {\n const { name, options } = server;\n\n acc[name] = options;\n\n return acc;\n }, {} as Record<string, McpServerConfigOptions>)\n : null;\n\n const userConfigClient = userMcpServers\n ? new MultiServerMCPClient({\n prefixToolNameWithServerName: true,\n useStandardContentBlocks: true,\n mcpServers: userMcpServers,\n })\n : null;\n\n const userMcpTools = userConfigClient\n ? await userConfigClient.getTools()\n : [];\n const preConfiguredMcpTools = preConfiguredMcpClient\n ? await preConfiguredMcpClient.getTools()\n : [];\n\n const mcpTools = [...userMcpTools, ...preConfiguredMcpTools];\n\n const tools = mcpTools.map(mcpTool => {\n const { name, description, schema } = mcpTool;\n return createAssistantTool({\n tool: {\n name,\n description,\n schema: schema as Tool['schema'],\n func: async (params: any) => {\n const result = await mcpTool.invoke(params);\n return JSON.stringify(result);\n },\n },\n });\n });\n\n return tools;\n };\n\n const validateMcpServerConfig = async (\n mcpConfig: McpServerConfig[],\n ): Promise<void> => {\n try {\n const userMcpServers = mcpConfig.reduce((acc, server) => {\n const { name, options } = server;\n\n acc[name] = options;\n\n return acc;\n }, {} as Record<string, McpServerConfigOptions>);\n\n const userConfigClient = new MultiServerMCPClient({\n prefixToolNameWithServerName: true,\n useStandardContentBlocks: true,\n mcpServers: userMcpServers,\n });\n\n await userConfigClient.getTools();\n } catch (e) {\n const error = new Error('Invalid MCP server configuration');\n error.name = 'McpConfigurationError';\n throw error;\n }\n };\n\n const createUserMcpServerConfig: McpService['createUserMcpServerConfig'] =\n async (credentials, mcpConfig) => {\n await validateMcpServerConfig([mcpConfig]);\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n const { name, options } = mcpConfig;\n\n const encryptedOptions = encrypt(JSON.stringify(options), encryptionKey);\n\n await mcpStore.createUserMcpConfig(userEntityRef, name, encryptedOptions);\n };\n\n const updateUserMcpServerConfig: McpService['updateUserMcpServerConfig'] =\n async (credentials, mcpConfig) => {\n await validateMcpServerConfig([mcpConfig]);\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n const { name, options } = mcpConfig;\n\n const encryptedOptions = encrypt(JSON.stringify(options), encryptionKey);\n\n await mcpStore.updateUserMcpConfig(userEntityRef, name, encryptedOptions);\n };\n\n const deleteUserMcpServerConfig: McpService['deleteUserMcpServerConfig'] =\n async (credentials, name) => {\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n await mcpStore.deleteUserMcpConfig(userEntityRef, name);\n };\n\n return {\n getTools,\n createUserMcpServerConfig,\n updateUserMcpServerConfig,\n getUserMcpServerConfigNames,\n deleteUserMcpServerConfig,\n };\n};\n"],"names":["MultiServerMCPClient","mcpStore","McpStore","decrypt","createAssistantTool","encrypt"],"mappings":";;;;;;AA8CO,MAAM,mBAAmB,OAAO;AAAA,EACrC,MAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF,CAAA,KAAoD;AAClD,EAAA,MAAM,gBAAgB,MAAA,CAAO,sBAAA;AAAA,IAC3B;AAAA,GACF;AACA,EAAA,MAAM,aAAA,GAAgB,MAAA,CAAO,SAAA,CAAU,+BAA+B,CAAA;AAEtE,EAAA,MAAM,0BAA0B,aAAA,GAC5B,aAAA,CAAc,MAAA,CAAO,CAAC,KAAK,MAAA,KAAW;AACpC,IAAA,MAAM,UAAA,GAAa,MAAA,CAAO,SAAA,CAAU,MAAM,CAAA;AAC1C,IAAA,MAAM,OAAA,GAAU,MAAA,CAAO,GAAA,CAA4B,SAAS,CAAA;AAE5D,IAAA,GAAA,CAAI,UAAU,CAAA,GAAI,OA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Y,WAAW,CAAA;AAChE,IAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAQ,GAAI,SAAA;AAE1B,IAAA,MAAM,mBAAmBI,sCAAA,CAAQ,IAAA,CAAK,SAAA,CAAU,OAAO,GAAG,aAAa,CAAA;AAEvE,IAAA,MAAMJ,UAAA,CAAS,mBAAA,CAAoB,aAAA,EAAe,IAAA,EAAM,gBAAgB,CAAA;AAAA,EAC1E,CAAA;AAEF,EAAA,MAAM,yBAAA,GACJ,OAAO,WAAA,EAAa,IAAA,KAAS;AAC3B,IAAA,MAAM,EAAE,aAAA,EAAc,GAAI,MAAM,QAAA,CAAS,YAAY,WAAW,CAAA;AAChE,IAAA,MAAMA,UAAA,CAAS,mBAAA,CAAoB,aAAA,EAAe,IAAI,CAAA;AAAA,EACxD,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,QAAA;AAAA,IACA,yBAAA;AAAA,IACA,yBAAA;AAAA,IACA,2BAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"mcp.cjs.js","sources":["../../src/services/mcp.ts"],"sourcesContent":["import {\n BackstageCredentials,\n DatabaseService,\n RootConfigService,\n UserInfoService,\n} from '@backstage/backend-plugin-api';\nimport { MultiServerMCPClient } from '@langchain/mcp-adapters';\nimport {\n McpServerConfig,\n McpServerConfigOptions,\n} from '@sweetoburrito/backstage-plugin-ai-assistant-common';\nimport {\n createAssistantTool,\n Tool,\n} from '@sweetoburrito/backstage-plugin-ai-assistant-node';\nimport { McpStore } from '../database/mcp-store';\nimport {\n encrypt,\n decrypt,\n} from '@sweetoburrito/backstage-plugin-ai-assistant-node';\n\ntype CreateMcpServiceOptions = {\n config: RootConfigService;\n userInfo: UserInfoService;\n database: DatabaseService;\n};\n\nexport type McpService = {\n getTools: (credentials: BackstageCredentials) => Promise<Tool[]>;\n createUserMcpServerConfig: (\n credentials: BackstageCredentials,\n config: McpServerConfig,\n ) => Promise<void>;\n updateUserMcpServerConfig: (\n credentials: BackstageCredentials,\n config: McpServerConfig,\n ) => Promise<void>;\n getUserMcpServerConfigNames: (\n credentials: BackstageCredentials,\n ) => Promise<string[]>;\n deleteUserMcpServerConfig: (\n credentials: BackstageCredentials,\n name: string,\n ) => Promise<void>;\n};\n\nexport const createMcpService = async ({\n config,\n userInfo,\n database,\n}: CreateMcpServiceOptions): Promise<McpService> => {\n const serversConfig = config.getOptionalConfigArray(\n 'aiAssistant.mcp.servers',\n );\n const encryptionKey = config.getString('aiAssistant.mcp.encryptionKey');\n\n const preConfiguredMcpServers = serversConfig\n ? serversConfig.reduce((acc, server) => {\n const serverName = server.getString('name');\n const options = server.get<McpServerConfigOptions>('options');\n\n acc[serverName] = options;\n\n return acc;\n }, {} as Record<string, McpServerConfigOptions>)\n : null;\n\n const preConfiguredMcpClient = preConfiguredMcpServers\n ? new MultiServerMCPClient({\n prefixToolNameWithServerName: true,\n useStandardContentBlocks: true,\n mcpServers: preConfiguredMcpServers,\n })\n : null;\n\n const mcpStore = await McpStore.fromConfig({ database });\n\n const getUserMcpServerConfigNames: McpService['getUserMcpServerConfigNames'] =\n async credentials => {\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n return mcpStore.getUserUserMcpConfigNames(userEntityRef);\n };\n\n const getUserMcpServerConfig = async (\n credentials: BackstageCredentials,\n ): Promise<McpServerConfig[]> => {\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n\n const encryptedMcpConfig = await mcpStore.getUserMcpConfigs(userEntityRef);\n\n const mcpConfig: McpServerConfig[] = encryptedMcpConfig.map(c => ({\n name: c.name,\n options: JSON.parse(decrypt(c.encryptedOptions, encryptionKey)),\n }));\n\n return mcpConfig;\n };\n\n const getTools: McpService['getTools'] = async credentials => {\n const userMcpConfig = await getUserMcpServerConfig(credentials);\n\n const userMcpServers = userMcpConfig.length\n ? userMcpConfig.reduce((acc, server) => {\n const { name, options } = server;\n\n acc[name] = options;\n\n return acc;\n }, {} as Record<string, McpServerConfigOptions>)\n : null;\n\n const userConfigClient = userMcpServers\n ? new MultiServerMCPClient({\n prefixToolNameWithServerName: true,\n useStandardContentBlocks: true,\n mcpServers: userMcpServers,\n })\n : null;\n\n const userMcpTools = userConfigClient\n ? await userConfigClient.getTools()\n : [];\n const preConfiguredMcpTools = preConfiguredMcpClient\n ? await preConfiguredMcpClient.getTools()\n : [];\n\n const mcpTools = [...userMcpTools, ...preConfiguredMcpTools];\n\n const tools = mcpTools.map(mcpTool => {\n const { name, description, schema } = mcpTool;\n return createAssistantTool({\n tool: {\n name,\n description,\n schema: schema as Tool['schema'],\n func: async (params: any) => {\n const result = await mcpTool.invoke(params);\n return {\n content: JSON.stringify(result),\n };\n },\n },\n });\n });\n\n return tools;\n };\n\n const validateMcpServerConfig = async (\n mcpConfig: McpServerConfig[],\n ): Promise<void> => {\n try {\n const userMcpServers = mcpConfig.reduce((acc, server) => {\n const { name, options } = server;\n\n acc[name] = options;\n\n return acc;\n }, {} as Record<string, McpServerConfigOptions>);\n\n const userConfigClient = new MultiServerMCPClient({\n prefixToolNameWithServerName: true,\n useStandardContentBlocks: true,\n mcpServers: userMcpServers,\n });\n\n await userConfigClient.getTools();\n } catch (e) {\n const error = new Error('Invalid MCP server configuration');\n error.name = 'McpConfigurationError';\n throw error;\n }\n };\n\n const createUserMcpServerConfig: McpService['createUserMcpServerConfig'] =\n async (credentials, mcpConfig) => {\n await validateMcpServerConfig([mcpConfig]);\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n const { name, options } = mcpConfig;\n\n const encryptedOptions = encrypt(JSON.stringify(options), encryptionKey);\n\n await mcpStore.createUserMcpConfig(userEntityRef, name, encryptedOptions);\n };\n\n const updateUserMcpServerConfig: McpService['updateUserMcpServerConfig'] =\n async (credentials, mcpConfig) => {\n await validateMcpServerConfig([mcpConfig]);\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n const { name, options } = mcpConfig;\n\n const encryptedOptions = encrypt(JSON.stringify(options), encryptionKey);\n\n await mcpStore.updateUserMcpConfig(userEntityRef, name, encryptedOptions);\n };\n\n const deleteUserMcpServerConfig: McpService['deleteUserMcpServerConfig'] =\n async (credentials, name) => {\n const { userEntityRef } = await userInfo.getUserInfo(credentials);\n await mcpStore.deleteUserMcpConfig(userEntityRef, name);\n };\n\n return {\n getTools,\n createUserMcpServerConfig,\n updateUserMcpServerConfig,\n getUserMcpServerConfigNames,\n deleteUserMcpServerConfig,\n };\n};\n"],"names":["MultiServerMCPClient","mcpStore","McpStore","decrypt","createAssistantTool","encrypt"],"mappings":";;;;;;AA8CO,MAAM,mBAAmB,OAAO;AAAA,EACrC,MAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF,CAAA,KAAoD;AAClD,EAAA,MAAM,gBAAgB,MAAA,CAAO,sBAAA;AAAA,IAC3B;AAAA,GACF;AACA,EAAA,MAAM,aAAA,GAAgB,MAAA,CAAO,SAAA,CAAU,+BAA+B,CAAA;AAEtE,EAAA,MAAM,0BAA0B,aAAA,GAC5B,aAAA,CAAc,MAAA,CAAO,CAAC,KAAK,MAAA,KAAW;AACpC,IAAA,MAAM,UAAA,GAAa,MAAA,CAAO,SAAA,CAAU,MAAM,CAAA;AAC1C,IAAA,MAAM,OAAA,GAAU,MAAA,CAAO,GAAA,CAA4B,SAAS,CAAA;AAE5D,IAAA,GAAA,CAAI,UAAU,CAAA,GAAI,OAAA;AAElB,IAAA,OAAO,GAAA;AAAA,EACT,CAAA,EAAG,EAA4C,CAAA,GAC/C,IAAA;AAEJ,EAAA,MAAM,sBAAA,GAAyB,uBAAA,GAC3B,IAAIA,gCAAA,CAAqB;AAAA,IACvB,4BAAA,EAA8B,IAAA;AAAA,IAC9B,wBAAA,EAA0B,IAAA;AAAA,IAC1B,UAAA,EAAY;AAAA,GACb,CAAA,GACD,IAAA;AAEJ,EAAA,MAAMC,aAAW,MAAMC,iBAAA,CAAS,UAAA,CAAW,EAAE,UAAU,CAAA;AAEvD,EAAA,MAAM,2BAAA,GACJ,OAAM,WAAA,KAAe;AACnB,IAAA,M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AI,MAAM,QAAA,CAAS,YAAY,WAAW,CAAA;AAChE,IAAA,MAAMA,UAAA,CAAS,mBAAA,CAAoB,aAAA,EAAe,IAAI,CAAA;AAAA,EACxD,CAAA;AAEF,EAAA,OAAO;AAAA,IACL,QAAA;AAAA,IACA,yBAAA;AAAA,IACA,yBAAA;AAAA,IACA,2BAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -33,10 +33,20 @@ Do NOT use for general knowledge that doesn't require company-specific informati
|
|
|
33
33
|
filter,
|
|
34
34
|
amount
|
|
35
35
|
);
|
|
36
|
+
console.log(results);
|
|
36
37
|
if (results.length === 0) {
|
|
37
|
-
return
|
|
38
|
+
return {
|
|
39
|
+
content: "No relevant information found in the knowledge base."
|
|
40
|
+
};
|
|
38
41
|
}
|
|
39
|
-
|
|
42
|
+
const content = results.map((r) => r.content).join("\n---\n");
|
|
43
|
+
const urls = results.map((r) => r.metadata.url);
|
|
44
|
+
return {
|
|
45
|
+
content,
|
|
46
|
+
metadata: {
|
|
47
|
+
urls
|
|
48
|
+
}
|
|
49
|
+
};
|
|
40
50
|
}
|
|
41
51
|
}
|
|
42
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchKnowledge.cjs.js","sources":["../../../src/services/tools/searchKnowledge.ts"],"sourcesContent":["import {\n createAssistantTool,\n Tool,\n VectorStore,\n} from '@sweetoburrito/backstage-plugin-ai-assistant-node';\nimport z from 'zod';\n\ntype CreateSearchKnowledgeToolOptions = {\n vectorStore: VectorStore;\n};\n\nexport const createSearchKnowledgeTool = ({\n vectorStore,\n}: CreateSearchKnowledgeToolOptions): Tool => {\n const knowledgeTool = createAssistantTool({\n tool: {\n name: 'search-knowledge-base',\n description: `Search the internal knowledge base containing company specific information.\n\nUse this tool when users ask about:\n- General questions about the company or internal information\n\nDo NOT use for general knowledge that doesn't require company-specific information.`,\n schema: z.object({\n query: z.string().describe('The query to search for.'),\n filter: z\n .object({\n source: z.string().optional().describe('Source to filter by.'),\n id: z.string().optional().describe('ID to filter by.'),\n })\n .optional()\n .describe('Filters to apply to the search.'),\n amount: z\n .number()\n .min(1)\n .optional()\n .describe('The number of results to return.'),\n }),\n func: async ({ query, filter, amount }) => {\n const results = await vectorStore.similaritySearch(\n query,\n filter,\n amount,\n );\n if (results.length === 0) {\n return 'No relevant information found.';\n }\n
|
|
1
|
+
{"version":3,"file":"searchKnowledge.cjs.js","sources":["../../../src/services/tools/searchKnowledge.ts"],"sourcesContent":["import {\n createAssistantTool,\n Tool,\n VectorStore,\n} from '@sweetoburrito/backstage-plugin-ai-assistant-node';\nimport z from 'zod';\n\ntype CreateSearchKnowledgeToolOptions = {\n vectorStore: VectorStore;\n};\n\nexport const createSearchKnowledgeTool = ({\n vectorStore,\n}: CreateSearchKnowledgeToolOptions): Tool => {\n const knowledgeTool = createAssistantTool({\n tool: {\n name: 'search-knowledge-base',\n description: `Search the internal knowledge base containing company specific information.\n\nUse this tool when users ask about:\n- General questions about the company or internal information\n\nDo NOT use for general knowledge that doesn't require company-specific information.`,\n schema: z.object({\n query: z.string().describe('The query to search for.'),\n filter: z\n .object({\n source: z.string().optional().describe('Source to filter by.'),\n id: z.string().optional().describe('ID to filter by.'),\n })\n .optional()\n .describe('Filters to apply to the search.'),\n amount: z\n .number()\n .min(1)\n .optional()\n .describe('The number of results to return.'),\n }),\n func: async ({ query, filter, amount }) => {\n const results = await vectorStore.similaritySearch(\n query,\n filter,\n amount,\n );\n\n console.log(results);\n\n if (results.length === 0) {\n return {\n content: 'No relevant information found in the knowledge base.',\n };\n }\n\n const content = results.map(r => r.content).join('\\n---\\n');\n\n const urls = results.map(r => r.metadata.url);\n\n return {\n content,\n metadata: {\n urls,\n },\n };\n },\n },\n });\n\n return knowledgeTool;\n};\n"],"names":["createAssistantTool","z"],"mappings":";;;;;;;;;AAWO,MAAM,4BAA4B,CAAC;AAAA,EACxC;AACF,CAAA,KAA8C;AAC5C,EAAA,MAAM,gBAAgBA,kDAAA,CAA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ACA,QAAA,EAAU;AAAA,YACR;AAAA;AACF,SACF;AAAA,MACF;AAAA;AACF,GACD,CAAA;AAED,EAAA,OAAO,aAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sweetoburrito/backstage-plugin-ai-assistant-backend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@langchain/mcp-adapters": "^1.0.0",
|
|
45
45
|
"@langchain/textsplitters": "^0.1.0",
|
|
46
46
|
"@sweetoburrito/backstage-plugin-ai-assistant-common": "^0.6.0",
|
|
47
|
-
"@sweetoburrito/backstage-plugin-ai-assistant-node": "^0.
|
|
47
|
+
"@sweetoburrito/backstage-plugin-ai-assistant-node": "^0.7.0",
|
|
48
48
|
"express": "^4.17.1",
|
|
49
49
|
"express-promise-router": "^4.1.0",
|
|
50
50
|
"knex": "^3.1.0",
|