feat: implement local deep search engine
This commit is contained in:
+17
-2
@@ -401,7 +401,14 @@ function sandboxMcpEnvs(sandboxMcp, mcpTools) {
|
||||
*/
|
||||
export function buildAgentExtensionPolicy(
|
||||
capabilities,
|
||||
{ unrestricted = false, policies = null, sandboxMcp = null, toolMode = 'chat', mindSearchConfig = null } = {},
|
||||
{
|
||||
unrestricted = false,
|
||||
policies = null,
|
||||
sandboxMcp = null,
|
||||
toolMode = 'chat',
|
||||
mindSearchConfig = null,
|
||||
userId = null,
|
||||
} = {},
|
||||
) {
|
||||
if (unrestricted) {
|
||||
return { extensionOverrides: null, enableContextMemory: true, gooseMode: 'auto' };
|
||||
@@ -518,8 +525,16 @@ export function buildAgentExtensionPolicy(
|
||||
TKMIND_SEARCH_READER_MAX_CHARS: String(mindSearchConfig.settings?.readerMaxChars ?? 12000),
|
||||
TKMIND_SEARCH_SERVICES_JSON: JSON.stringify(mindSearchConfig.services ?? []),
|
||||
TKMIND_SEARCH_ROUTES_JSON: JSON.stringify(mindSearchConfig.routes ?? {}),
|
||||
TKMIND_SEARCH_USER_ID: userId ? String(userId) : '',
|
||||
TKMIND_DEEP_SEARCH_SECRET: process.env.TKMIND_DEEP_SEARCH_SECRET ?? '',
|
||||
},
|
||||
available_tools: ['tkmind_search', 'tkmind_read', ...(hasResearchService ? ['tkmind_research'] : [])],
|
||||
available_tools: [
|
||||
'tkmind_search',
|
||||
'tkmind_read',
|
||||
...(hasResearchService
|
||||
? ['tkmind_research', 'tkmind_research_status', 'tkmind_research_cancel']
|
||||
: []),
|
||||
],
|
||||
});
|
||||
}
|
||||
if (capabilities.excel_analysis) {
|
||||
|
||||
Reference in New Issue
Block a user