indusagi-coding-agent 0.1.30 → 0.1.32
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/CHANGELOG.md +54 -0
- package/dist/cli/args.d.ts +12 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +30 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli.js +25 -0
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +88 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +257 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/sdk.d.ts +19 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +75 -2
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +39 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +54 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +44 -19
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/index.d.ts +57 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +101 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/memory.d.ts +83 -0
- package/dist/core/tools/memory.d.ts.map +1 -0
- package/dist/core/tools/memory.js +154 -0
- package/dist/core/tools/memory.js.map +1 -0
- package/dist/core/tools/registry.d.ts +18 -2
- package/dist/core/tools/registry.d.ts.map +1 -1
- package/dist/core/tools/registry.js +47 -1
- package/dist/core/tools/registry.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +113 -5
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +20 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +154 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/FEATURES.md +306 -0
- package/docs/MCP.md +341 -0
- package/docs/MEMORY.md +443 -0
- package/examples/mcp-servers.example.json +50 -0
- package/package.json +2 -3
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* - registry.ts: Custom tool metadata for this project
|
|
10
10
|
*/
|
|
11
11
|
export { createReadTool, readTool, type ReadOperations, type ReadToolDetails, type ReadToolOptions, createWriteTool, writeTool, type WriteOperations, type WriteToolOptions, createEditTool, editTool, type EditOperations, type EditToolDetails, type EditToolOptions, createBashTool, bashTool, type BashOperations, type BashToolDetails, type BashToolOptions, createGrepTool, grepTool, type GrepOperations, type GrepToolDetails, type GrepToolOptions, createFindTool, findTool, type FindToolDetails, type FindToolOptions, createLsTool, lsTool, type LsOperations, type LsToolDetails, type LsToolOptions, createWebFetchTool, webFetchTool, type WebFetchToolDetails, type WebFetchToolOptions, createWebSearchTool, webSearchTool, type WebSearchToolDetails, type WebSearchToolOptions, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, expandPath, resolveReadPath, resolveToCwd, computeEditDiff, generateDiffString, ToolFactory, ToolRegistry as IndusagiToolRegistry, type ToolMetadata, type ToolCategory, } from "indusagi/agent";
|
|
12
|
+
export { MCPClient, type MCPClientOptions, MCPClientPool, type MCPClientPoolOptions, type MCPServerStatus, loadMCPConfig, type MCPServerConfig, createMCPAgentToolFactory, registerMCPToolsInRegistry, type MCPToolClient, type MCPToolDefinition, type MCPResource, type MCPPrompt, type MCPToolCallResult, MCPError, MCPErrorCode, isMCPError, } from "indusagi/mcp";
|
|
12
13
|
export interface EditDiffResult {
|
|
13
14
|
diff: string;
|
|
14
15
|
firstChangedLine: number | undefined;
|
|
@@ -97,6 +98,12 @@ export interface ToolsOptions {
|
|
|
97
98
|
todoStore?: TodoStore;
|
|
98
99
|
/** Hook runner for tool-specific hooks (Note: local HookRunner has different interface than indusagi's) */
|
|
99
100
|
hookRunner?: HookRunner;
|
|
101
|
+
/** MCP options */
|
|
102
|
+
mcp?: {
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
configPath?: string;
|
|
105
|
+
timeout?: number;
|
|
106
|
+
};
|
|
100
107
|
}
|
|
101
108
|
/**
|
|
102
109
|
* Create coding tools configured for a specific working directory.
|
|
@@ -141,5 +148,55 @@ export declare function createAllTools(cwd: string, options?: ToolsOptions): Rec
|
|
|
141
148
|
* - logs: Get log file paths
|
|
142
149
|
* - kill: Terminate a process
|
|
143
150
|
* - clear: Remove finished processes
|
|
151
|
+
*
|
|
152
|
+
* MCP TOOLS (Model Context Protocol):
|
|
153
|
+
* - Dynamically loaded from configured MCP servers
|
|
154
|
+
* - Namespaced as <server>_<tool> (e.g., github_search_repositories)
|
|
155
|
+
* - Configured via ~/.indusagi/agent/mcp-servers.json
|
|
156
|
+
*/
|
|
157
|
+
import { MCPClientPool, type MCPServerStatus } from "indusagi/mcp";
|
|
158
|
+
/**
|
|
159
|
+
* Result from creating MCP tools
|
|
160
|
+
*/
|
|
161
|
+
export interface CreateMCPToolsResult {
|
|
162
|
+
/** Array of MCP tools wrapped as AgentTools */
|
|
163
|
+
tools: Tool[];
|
|
164
|
+
/** The client pool for managing connections */
|
|
165
|
+
pool: MCPClientPool;
|
|
166
|
+
/** Status of each server */
|
|
167
|
+
status: MCPServerStatus[];
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Create MCP tools from a config file.
|
|
171
|
+
*
|
|
172
|
+
* @param configPath - Path to the MCP servers config file
|
|
173
|
+
* @param options - Optional settings (currently unused, timeout is per-server)
|
|
174
|
+
* @returns Promise resolving to tools, pool, and status
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```typescript
|
|
178
|
+
* const { tools, pool, status } = await createMCPTools('/path/to/mcp-servers.json');
|
|
179
|
+
*
|
|
180
|
+
* // Add tools to agent
|
|
181
|
+
* agent.addTools(tools);
|
|
182
|
+
*
|
|
183
|
+
* // Check status
|
|
184
|
+
* console.log(status);
|
|
185
|
+
*
|
|
186
|
+
* // Cleanup when done
|
|
187
|
+
* await pool.disconnectAll();
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
export declare function createMCPTools(configPath: string, options?: {
|
|
191
|
+
timeout?: number;
|
|
192
|
+
}): Promise<CreateMCPToolsResult>;
|
|
193
|
+
/**
|
|
194
|
+
* Disconnect MCP servers and clean up tools.
|
|
195
|
+
*
|
|
196
|
+
* @param pool - The MCP client pool to disconnect
|
|
197
|
+
* @param serverNames - Optional specific servers to disconnect (all if omitted)
|
|
144
198
|
*/
|
|
199
|
+
export declare function disconnectMCPServers(pool: MCPClientPool, serverNames?: string[]): Promise<void>;
|
|
200
|
+
export { createMemoryTools, createMemory, DEFAULT_WORKING_MEMORY_TEMPLATE, type CreateMemoryToolsOptions, type CreateMemoryToolsResult, } from "./memory.js";
|
|
201
|
+
export type { Memory, MemoryConfig, StorageThreadType, MessageContentV2 as CoreMessage, } from "indusagi/memory";
|
|
145
202
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAEN,cAAc,EACd,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,eAAe,EACf,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAGrB,cAAc,EACd,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,cAAc,EACd,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,cAAc,EACd,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,cAAc,EACd,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,YAAY,EACZ,MAAM,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAGlB,kBAAkB,EAClB,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAGxB,mBAAmB,EACnB,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAGzB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,YAAY,EACZ,YAAY,EACZ,YAAY,EAGZ,UAAU,EACV,eAAe,EACf,YAAY,EAGZ,eAAe,EACf,kBAAkB,EAGlB,WAAW,EACX,YAAY,IAAI,oBAAoB,EACpC,KAAK,YAAY,EACjB,KAAK,YAAY,GACjB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAEN,cAAc,EACd,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,eAAe,EACf,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAGrB,cAAc,EACd,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,cAAc,EACd,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,cAAc,EACd,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,cAAc,EACd,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,YAAY,EACZ,MAAM,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAGlB,kBAAkB,EAClB,Y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wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,CAS/E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAiB1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,OAAO,EAAE,aAAa,EAA4C,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAG7G;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,+CAA+C;IAC/C,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,aAAa,CAAC;IACpB,4BAA4B;IAC5B,MAAM,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,cAAc,CACnC,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAqC/B;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACzC,IAAI,EAAE,aAAa,EACnB,WAAW,CAAC,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CAUf;AAMD,OAAO,EACN,iBAAiB,EACjB,YAAY,EACZ,+BAA+B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC5B,MAAM,aAAa,CAAC;AAGrB,YAAY,EACX,MAAM,EACN,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,IAAI,WAAW,GAC/B,MAAM,iBAAiB,CAAC"}
|
package/dist/core/tools/index.js
CHANGED
|
@@ -39,6 +39,20 @@ computeEditDiff, generateDiffString,
|
|
|
39
39
|
// Tool registry from indusagi
|
|
40
40
|
ToolFactory, ToolRegistry as IndusagiToolRegistry, } from "indusagi/agent";
|
|
41
41
|
// ============================================================================
|
|
42
|
+
// MCP (Model Context Protocol) EXPORTS
|
|
43
|
+
// ============================================================================
|
|
44
|
+
export {
|
|
45
|
+
// MCP Client
|
|
46
|
+
MCPClient,
|
|
47
|
+
// MCP Client Pool
|
|
48
|
+
MCPClientPool,
|
|
49
|
+
// MCP Config
|
|
50
|
+
loadMCPConfig,
|
|
51
|
+
// MCP Tool Factory
|
|
52
|
+
createMCPAgentToolFactory, registerMCPToolsInRegistry,
|
|
53
|
+
// MCP Errors
|
|
54
|
+
MCPError, MCPErrorCode, isMCPError, } from "indusagi/mcp";
|
|
55
|
+
// ============================================================================
|
|
42
56
|
// LOCAL CUSTOM TOOLS
|
|
43
57
|
// ============================================================================
|
|
44
58
|
export { createTodoReadTool, createTodoWriteTool, createSessionTodoStore, todoReadTool, todoWriteTool, TodoStore, } from "./todo.js";
|
|
@@ -170,5 +184,92 @@ export function createAllTools(cwd, options) {
|
|
|
170
184
|
* - logs: Get log file paths
|
|
171
185
|
* - kill: Terminate a process
|
|
172
186
|
* - clear: Remove finished processes
|
|
187
|
+
*
|
|
188
|
+
* MCP TOOLS (Model Context Protocol):
|
|
189
|
+
* - Dynamically loaded from configured MCP servers
|
|
190
|
+
* - Namespaced as <server>_<tool> (e.g., github_search_repositories)
|
|
191
|
+
* - Configured via ~/.indusagi/agent/mcp-servers.json
|
|
192
|
+
*/
|
|
193
|
+
// ============================================================================
|
|
194
|
+
// MCP TOOL FACTORY FUNCTIONS
|
|
195
|
+
// ============================================================================
|
|
196
|
+
import { MCPClientPool, loadMCPConfig, createMCPAgentToolFactory } from "indusagi/mcp";
|
|
197
|
+
import { registerMCPTool, unregisterMCPServerTools } from "./registry.js";
|
|
198
|
+
/**
|
|
199
|
+
* Create MCP tools from a config file.
|
|
200
|
+
*
|
|
201
|
+
* @param configPath - Path to the MCP servers config file
|
|
202
|
+
* @param options - Optional settings (currently unused, timeout is per-server)
|
|
203
|
+
* @returns Promise resolving to tools, pool, and status
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```typescript
|
|
207
|
+
* const { tools, pool, status } = await createMCPTools('/path/to/mcp-servers.json');
|
|
208
|
+
*
|
|
209
|
+
* // Add tools to agent
|
|
210
|
+
* agent.addTools(tools);
|
|
211
|
+
*
|
|
212
|
+
* // Check status
|
|
213
|
+
* console.log(status);
|
|
214
|
+
*
|
|
215
|
+
* // Cleanup when done
|
|
216
|
+
* await pool.disconnectAll();
|
|
217
|
+
* ```
|
|
173
218
|
*/
|
|
219
|
+
export async function createMCPTools(configPath, options) {
|
|
220
|
+
const configs = loadMCPConfig(configPath);
|
|
221
|
+
const pool = new MCPClientPool({ servers: configs });
|
|
222
|
+
// Connect to all servers
|
|
223
|
+
await pool.connectAll();
|
|
224
|
+
const tools = [];
|
|
225
|
+
// Get tools from each connected client
|
|
226
|
+
for (const client of pool.getAllClients()) {
|
|
227
|
+
try {
|
|
228
|
+
const mcpTools = await client.listTools();
|
|
229
|
+
for (const mcpTool of mcpTools) {
|
|
230
|
+
// Create AgentTool wrapper using factory
|
|
231
|
+
const factory = createMCPAgentToolFactory(mcpTool, client);
|
|
232
|
+
const agentTool = factory();
|
|
233
|
+
tools.push(agentTool);
|
|
234
|
+
// Register in tool registry
|
|
235
|
+
registerMCPTool({
|
|
236
|
+
name: agentTool.name,
|
|
237
|
+
category: "mcp",
|
|
238
|
+
description: mcpTool.description ?? "",
|
|
239
|
+
serverName: client.serverName,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
catch (err) {
|
|
244
|
+
console.warn(`Failed to load tools from MCP server ${client.serverName}:`, err);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
tools,
|
|
249
|
+
pool,
|
|
250
|
+
status: await pool.getStatus(),
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Disconnect MCP servers and clean up tools.
|
|
255
|
+
*
|
|
256
|
+
* @param pool - The MCP client pool to disconnect
|
|
257
|
+
* @param serverNames - Optional specific servers to disconnect (all if omitted)
|
|
258
|
+
*/
|
|
259
|
+
export async function disconnectMCPServers(pool, serverNames) {
|
|
260
|
+
if (serverNames) {
|
|
261
|
+
for (const name of serverNames) {
|
|
262
|
+
await pool.removeServer(name);
|
|
263
|
+
unregisterMCPServerTools(name);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
await pool.disconnectAll();
|
|
268
|
+
// Clear all MCP tools from registry is done by pool.disconnectAll internally
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
// ============================================================================
|
|
272
|
+
// MEMORY TOOL EXPORTS
|
|
273
|
+
// ============================================================================
|
|
274
|
+
export { createMemoryTools, createMemory, DEFAULT_WORKING_MEMORY_TEMPLATE, } from "./memory.js";
|
|
174
275
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,+EAA+E;AAC/E,kCAAkC;AAClC,+EAA+E;AAC/E,OAAO;AACN,YAAY;AACZ,cAAc,EACd,QAAQ;AAKR,aAAa;AACb,eAAe,EACf,SAAS;AAIT,YAAY;AACZ,cAAc,EACd,QAAQ;AAKR,YAAY;AACZ,cAAc,EACd,QAAQ;AAKR,YAAY;AACZ,cAAc,EACd,QAAQ;AAKR,YAAY;AACZ,cAAc,EACd,QAAQ;AAIR,UAAU;AACV,YAAY,EACZ,MAAM;AAKN,gBAAgB;AAChB,kBAAkB,EAClB,YAAY;AAIZ,iBAAiB;AACjB,mBAAmB,EACnB,aAAa;AAIb,uBAAuB;AACvB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EAGV,YAAY,EACZ,YAAY,EACZ,YAAY;AAEZ,iBAAiB;AACjB,UAAU,EACV,eAAe,EACf,YAAY;AAEZ,sBAAsB;AACt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CAAC,CAAC;YAC9B,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;IACF,CAAC;SAAM,CAAC;QACP,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3B,6EAA6E;IAC9E,CAAC;AACF,CAAC;AAED,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,OAAO,EACN,iBAAiB,EACjB,YAAY,EACZ,+BAA+B,GAG/B,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Tools Factory
|
|
3
|
+
* Creates tools for memory system interaction
|
|
4
|
+
*
|
|
5
|
+
* These tools allow the agent to interact with the memory system:
|
|
6
|
+
* - updateWorkingMemory: Update working memory for the current thread
|
|
7
|
+
*/
|
|
8
|
+
import type { AgentTool } from "indusagi/agent";
|
|
9
|
+
import type { Memory, MemoryConfig } from "indusagi/memory";
|
|
10
|
+
/**
|
|
11
|
+
* Options for creating memory tools
|
|
12
|
+
*/
|
|
13
|
+
export interface CreateMemoryToolsOptions {
|
|
14
|
+
/** Thread ID for memory operations (usually session ID) */
|
|
15
|
+
threadId: string;
|
|
16
|
+
/** Resource ID for memory scoping (usually user ID) */
|
|
17
|
+
resourceId: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Result from creating memory tools
|
|
21
|
+
*/
|
|
22
|
+
export interface CreateMemoryToolsResult {
|
|
23
|
+
/** Array of memory tools wrapped as AgentTools */
|
|
24
|
+
tools: AgentTool[];
|
|
25
|
+
/** The memory instance */
|
|
26
|
+
memory: Memory;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create memory tools for agent use.
|
|
30
|
+
*
|
|
31
|
+
* @param memory - The Memory instance to use
|
|
32
|
+
* @param options - Options for tool creation
|
|
33
|
+
* @returns Array of AgentTool instances
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { Memory, InMemoryStorage, InMemoryVectorStore, OpenAIEmbedder } from "indusagi/memory";
|
|
38
|
+
*
|
|
39
|
+
* const memory = new Memory({
|
|
40
|
+
* storage: new InMemoryStorage(),
|
|
41
|
+
* vector: new InMemoryVectorStore(),
|
|
42
|
+
* embedder: new OpenAIEmbedder({ apiKey: process.env.OPENAI_API_KEY }),
|
|
43
|
+
* options: { lastMessages: 20, workingMemory: { enabled: true } }
|
|
44
|
+
* });
|
|
45
|
+
*
|
|
46
|
+
* const tools = createMemoryTools(memory, {
|
|
47
|
+
* threadId: "session-123",
|
|
48
|
+
* resourceId: "user-456"
|
|
49
|
+
* });
|
|
50
|
+
*
|
|
51
|
+
* // Add to agent
|
|
52
|
+
* agent.addTools(tools);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function createMemoryTools(memory: Memory, options: CreateMemoryToolsOptions): AgentTool[];
|
|
56
|
+
/**
|
|
57
|
+
* Create and initialize a Memory instance with default configuration.
|
|
58
|
+
*
|
|
59
|
+
* @param options - Memory configuration options
|
|
60
|
+
* @returns Initialized Memory instance
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const memory = await createMemory({
|
|
65
|
+
* apiKey: process.env.OPENAI_API_KEY,
|
|
66
|
+
* lastMessages: 20,
|
|
67
|
+
* workingMemory: { enabled: true },
|
|
68
|
+
* semanticRecall: { enabled: true, topK: 5 }
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function createMemory(options: {
|
|
73
|
+
apiKey: string;
|
|
74
|
+
lastMessages?: number;
|
|
75
|
+
workingMemory?: MemoryConfig["workingMemory"];
|
|
76
|
+
semanticRecall?: MemoryConfig["semanticRecall"];
|
|
77
|
+
observationalMemory?: MemoryConfig["observationalMemory"];
|
|
78
|
+
}): Promise<Memory>;
|
|
79
|
+
/**
|
|
80
|
+
* Default working memory template for coding agent
|
|
81
|
+
*/
|
|
82
|
+
export declare const DEFAULT_WORKING_MEMORY_TEMPLATE = "# Working Memory\n\n## User Profile\n- **Name**:\n- **Preferences**:\n- **Coding Style**:\n\n## Project Context\n- **Language/Framework**:\n- **Key Files**:\n- **Architecture**:\n\n## Current Session\n- **Goal**:\n- **Progress**:\n- **Blockers**:\n\n## Important Notes\n- ";
|
|
83
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/core/tools/memory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAM5D;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,kDAAkD;IAClD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;CACf;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAC/B,SAAS,EAAE,CAqDb;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAChD,mBAAmB,CAAC,EAAE,YAAY,CAAC,qBAAqB,CAAC,CAAC;CAC1D,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BlB;AAMD;;GAEG;AACH,eAAO,MAAM,+BAA+B,qRAkBzC,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Tools Factory
|
|
3
|
+
* Creates tools for memory system interaction
|
|
4
|
+
*
|
|
5
|
+
* These tools allow the agent to interact with the memory system:
|
|
6
|
+
* - updateWorkingMemory: Update working memory for the current thread
|
|
7
|
+
*/
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// MEMORY TOOLS FACTORY
|
|
10
|
+
// ============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* Create memory tools for agent use.
|
|
13
|
+
*
|
|
14
|
+
* @param memory - The Memory instance to use
|
|
15
|
+
* @param options - Options for tool creation
|
|
16
|
+
* @returns Array of AgentTool instances
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { Memory, InMemoryStorage, InMemoryVectorStore, OpenAIEmbedder } from "indusagi/memory";
|
|
21
|
+
*
|
|
22
|
+
* const memory = new Memory({
|
|
23
|
+
* storage: new InMemoryStorage(),
|
|
24
|
+
* vector: new InMemoryVectorStore(),
|
|
25
|
+
* embedder: new OpenAIEmbedder({ apiKey: process.env.OPENAI_API_KEY }),
|
|
26
|
+
* options: { lastMessages: 20, workingMemory: { enabled: true } }
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* const tools = createMemoryTools(memory, {
|
|
30
|
+
* threadId: "session-123",
|
|
31
|
+
* resourceId: "user-456"
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* // Add to agent
|
|
35
|
+
* agent.addTools(tools);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export function createMemoryTools(memory, options) {
|
|
39
|
+
const tools = [];
|
|
40
|
+
// Create a simple updateWorkingMemory tool wrapper
|
|
41
|
+
const updateWorkingMemoryTool = {
|
|
42
|
+
name: "updateWorkingMemory",
|
|
43
|
+
label: "Update Working Memory",
|
|
44
|
+
description: "Update the working memory with new information about the user or context. Use this to remember important details across conversations.",
|
|
45
|
+
parameters: {
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: {
|
|
48
|
+
memoryContent: {
|
|
49
|
+
type: "string",
|
|
50
|
+
description: "The memory content to add or update"
|
|
51
|
+
},
|
|
52
|
+
reason: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description: "Why this memory is being updated",
|
|
55
|
+
enum: ["new-information", "correction", "context-update"]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
required: ["memoryContent"]
|
|
59
|
+
},
|
|
60
|
+
execute: async (_toolCallId, params) => {
|
|
61
|
+
const input = params;
|
|
62
|
+
try {
|
|
63
|
+
// Get current working memory
|
|
64
|
+
const currentMemory = await memory.getWorkingMemory?.({
|
|
65
|
+
threadId: options.threadId,
|
|
66
|
+
resourceId: options.resourceId,
|
|
67
|
+
});
|
|
68
|
+
// For now, just return a success message
|
|
69
|
+
// The actual memory update is handled internally by the memory system
|
|
70
|
+
return {
|
|
71
|
+
success: true,
|
|
72
|
+
message: `Memory noted: ${input.memoryContent.substring(0, 100)}${input.memoryContent.length > 100 ? '...' : ''}`,
|
|
73
|
+
previousMemory: typeof currentMemory === 'string'
|
|
74
|
+
? currentMemory.substring(0, 50)
|
|
75
|
+
: (currentMemory?.content?.substring(0, 50) || "(none)")
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
return {
|
|
80
|
+
success: false,
|
|
81
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
tools.push(updateWorkingMemoryTool);
|
|
87
|
+
return tools;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Create and initialize a Memory instance with default configuration.
|
|
91
|
+
*
|
|
92
|
+
* @param options - Memory configuration options
|
|
93
|
+
* @returns Initialized Memory instance
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* const memory = await createMemory({
|
|
98
|
+
* apiKey: process.env.OPENAI_API_KEY,
|
|
99
|
+
* lastMessages: 20,
|
|
100
|
+
* workingMemory: { enabled: true },
|
|
101
|
+
* semanticRecall: { enabled: true, topK: 5 }
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export async function createMemory(options) {
|
|
106
|
+
// Dynamic imports to avoid bundling issues
|
|
107
|
+
const { InMemoryStorage } = await import("indusagi/memory/storage");
|
|
108
|
+
const { InMemoryVectorStore } = await import("indusagi/memory/vector");
|
|
109
|
+
const { OpenAIEmbedder } = await import("indusagi/memory/embedder");
|
|
110
|
+
const { Memory } = await import("indusagi/memory");
|
|
111
|
+
const storage = new InMemoryStorage();
|
|
112
|
+
const vector = new InMemoryVectorStore();
|
|
113
|
+
const embedder = new OpenAIEmbedder({
|
|
114
|
+
apiKey: options.apiKey,
|
|
115
|
+
model: "text-embedding-3-small"
|
|
116
|
+
});
|
|
117
|
+
const memory = new Memory({
|
|
118
|
+
storage,
|
|
119
|
+
vector,
|
|
120
|
+
embedder,
|
|
121
|
+
lastMessages: options.lastMessages ?? 20,
|
|
122
|
+
workingMemory: options.workingMemory,
|
|
123
|
+
semanticRecall: options.semanticRecall,
|
|
124
|
+
observationalMemory: options.observationalMemory,
|
|
125
|
+
});
|
|
126
|
+
await memory.init?.();
|
|
127
|
+
return memory;
|
|
128
|
+
}
|
|
129
|
+
// ============================================================================
|
|
130
|
+
// DEFAULT WORKING MEMORY TEMPLATE
|
|
131
|
+
// ============================================================================
|
|
132
|
+
/**
|
|
133
|
+
* Default working memory template for coding agent
|
|
134
|
+
*/
|
|
135
|
+
export const DEFAULT_WORKING_MEMORY_TEMPLATE = `# Working Memory
|
|
136
|
+
|
|
137
|
+
## User Profile
|
|
138
|
+
- **Name**:
|
|
139
|
+
- **Preferences**:
|
|
140
|
+
- **Coding Style**:
|
|
141
|
+
|
|
142
|
+
## Project Context
|
|
143
|
+
- **Language/Framework**:
|
|
144
|
+
- **Key Files**:
|
|
145
|
+
- **Architecture**:
|
|
146
|
+
|
|
147
|
+
## Current Session
|
|
148
|
+
- **Goal**:
|
|
149
|
+
- **Progress**:
|
|
150
|
+
- **Blockers**:
|
|
151
|
+
|
|
152
|
+
## Important Notes
|
|
153
|
+
- `;
|
|
154
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/core/tools/memory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6BH,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,iBAAiB,CAChC,MAAc,EACd,OAAiC;IAEjC,MAAM,KAAK,GAAgB,EAAE,CAAC;IAE9B,mDAAmD;IACnD,MAAM,uBAAuB,GAAc;QAC1C,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,wIAAwI;QACrJ,UAAU,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACX,aAAa,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qCAAqC;iBAClD;gBACD,MAAM,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kCAAkC;oBAC/C,IAAI,EAAE,CAAC,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,CAAC;iBACzD;aACD;YACD,QAAQ,EAAE,CAAC,eAAe,CAAC;SACpB;QACR,OAAO,EAAE,KAAK,EAAE,WAAmB,EAAE,MAAe,EAAgB,EAAE;YACrE,MAAM,KAAK,GAAG,MAAoD,CAAC;YACnE,IAAI,CAAC;gBACJ,6BAA6B;gBAC7B,MAAM,aAAa,GAAG,MAAO,MAAc,CAAC,gBAAgB,EAAE,CAAC;oBAC9D,QAAQ,EA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AM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAEnD,MAAM,OAAO,GAAG,IAAI,eAAe,EAAE,CAAC;IACtC,MAAM,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC;QACnC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,wBAA+B;KACtC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;QACzB,OAAO;QACP,MAAM;QACN,QAAQ;QACR,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;KACzC,CAAC,CAAC;IAEV,MAAO,MAAc,CAAC,IAAI,EAAE,EAAE,CAAC;IAE/B,OAAO,MAAM,CAAC;AACf,CAAC;AAED,+EAA+E;AAC/E,kCAAkC;AAClC,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;;;;GAkB5C,CAAC"}
|
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool Registry - Complete list of all available tools
|
|
3
|
-
* Includes both built-in tools
|
|
3
|
+
* Includes both built-in tools, extension-provided tools, and MCP tools
|
|
4
4
|
*/
|
|
5
5
|
export interface ToolInfo {
|
|
6
6
|
name: string;
|
|
7
|
-
category: "core" | "extension";
|
|
7
|
+
category: "core" | "extension" | "mcp";
|
|
8
8
|
description: string;
|
|
9
|
+
serverName?: string;
|
|
9
10
|
actions?: string[];
|
|
10
11
|
example?: string;
|
|
11
12
|
}
|
|
12
13
|
export declare const ALL_AVAILABLE_TOOLS: ToolInfo[];
|
|
13
14
|
export declare const CORE_TOOLS: ToolInfo[];
|
|
14
15
|
export declare const EXTENSION_TOOLS: ToolInfo[];
|
|
16
|
+
export declare const MCP_TOOLS: ToolInfo[];
|
|
15
17
|
export declare function getToolInfo(toolName: string): ToolInfo | undefined;
|
|
16
18
|
export declare function listAllTools(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Add MCP tools to the registry dynamically.
|
|
21
|
+
* Called when MCP servers are connected.
|
|
22
|
+
*/
|
|
23
|
+
export declare function registerMCPTool(tool: ToolInfo): void;
|
|
24
|
+
/**
|
|
25
|
+
* Remove MCP tools for a specific server.
|
|
26
|
+
* Called when MCP servers are disconnected.
|
|
27
|
+
*/
|
|
28
|
+
export declare function unregisterMCPServerTools(serverName: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Clear all MCP tools from the registry.
|
|
31
|
+
*/
|
|
32
|
+
export declare function clearMCPTools(): void;
|
|
17
33
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/tools/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/tools/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,KAAK,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,EAAE,QAAQ,EA2FzC,CAAC;AAEF,eAAO,MAAM,UAAU,YAA2D,CAAC;AACnF,eAAO,MAAM,eAAe,YAAgE,CAAC;AAC7F,eAAO,MAAM,SAAS,YAA0D,CAAC;AAEjF,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAElE;AAED,wBAAgB,YAAY,IAAI,MAAM,CAiBrC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAUpD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAWjE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAOpC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool Registry - Complete list of all available tools
|
|
3
|
-
* Includes both built-in tools
|
|
3
|
+
* Includes both built-in tools, extension-provided tools, and MCP tools
|
|
4
4
|
*/
|
|
5
5
|
export const ALL_AVAILABLE_TOOLS = [
|
|
6
6
|
// Core File Tools
|
|
@@ -91,18 +91,64 @@ export const ALL_AVAILABLE_TOOLS = [
|
|
|
91
91
|
];
|
|
92
92
|
export const CORE_TOOLS = ALL_AVAILABLE_TOOLS.filter((t) => t.category === "core");
|
|
93
93
|
export const EXTENSION_TOOLS = ALL_AVAILABLE_TOOLS.filter((t) => t.category === "extension");
|
|
94
|
+
export const MCP_TOOLS = ALL_AVAILABLE_TOOLS.filter((t) => t.category === "mcp");
|
|
94
95
|
export function getToolInfo(toolName) {
|
|
95
96
|
return ALL_AVAILABLE_TOOLS.find((t) => t.name.toLowerCase() === toolName.toLowerCase());
|
|
96
97
|
}
|
|
97
98
|
export function listAllTools() {
|
|
98
99
|
const coreToolsList = CORE_TOOLS.map((t) => ` • ${t.name} - ${t.description}`).join("\n");
|
|
99
100
|
const extensionToolsList = EXTENSION_TOOLS.map((t) => ` • ${t.name} - ${t.description}`).join("\n");
|
|
101
|
+
const mcpToolsList = MCP_TOOLS.map((t) => ` • ${t.name} (${t.serverName}) - ${t.description}`).join("\n");
|
|
100
102
|
return `
|
|
101
103
|
CORE TOOLS (Built-in)
|
|
102
104
|
${coreToolsList}
|
|
103
105
|
|
|
104
106
|
EXTENSION TOOLS (@indusagi/bg-process)
|
|
105
107
|
${extensionToolsList}
|
|
108
|
+
|
|
109
|
+
MCP TOOLS (Model Context Protocol)
|
|
110
|
+
${mcpToolsList || " (No MCP tools connected)"}
|
|
106
111
|
`;
|
|
107
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Add MCP tools to the registry dynamically.
|
|
115
|
+
* Called when MCP servers are connected.
|
|
116
|
+
*/
|
|
117
|
+
export function registerMCPTool(tool) {
|
|
118
|
+
// Remove existing entry if present (for re-registration)
|
|
119
|
+
const existingIndex = ALL_AVAILABLE_TOOLS.findIndex((t) => t.category === "mcp" && t.name === tool.name && t.serverName === tool.serverName);
|
|
120
|
+
if (existingIndex >= 0) {
|
|
121
|
+
ALL_AVAILABLE_TOOLS[existingIndex] = tool;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
ALL_AVAILABLE_TOOLS.push(tool);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Remove MCP tools for a specific server.
|
|
129
|
+
* Called when MCP servers are disconnected.
|
|
130
|
+
*/
|
|
131
|
+
export function unregisterMCPServerTools(serverName) {
|
|
132
|
+
const indicesToRemove = [];
|
|
133
|
+
ALL_AVAILABLE_TOOLS.forEach((tool, index) => {
|
|
134
|
+
if (tool.category === "mcp" && tool.serverName === serverName) {
|
|
135
|
+
indicesToRemove.push(index);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
// Remove in reverse order to maintain valid indices
|
|
139
|
+
indicesToRemove.reverse().forEach((index) => {
|
|
140
|
+
ALL_AVAILABLE_TOOLS.splice(index, 1);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Clear all MCP tools from the registry.
|
|
145
|
+
*/
|
|
146
|
+
export function clearMCPTools() {
|
|
147
|
+
// Remove all MCP tools
|
|
148
|
+
for (let i = ALL_AVAILABLE_TOOLS.length - 1; i >= 0; i--) {
|
|
149
|
+
if (ALL_AVAILABLE_TOOLS[i].category === "mcp") {
|
|
150
|
+
ALL_AVAILABLE_TOOLS.splice(i, 1);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
108
154
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/core/tools/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/core/tools/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,MAAM,CAAC,MAAM,mBAAmB,GAAe;IAC9C,kBAAkB;IAClB;QACC,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,MAAM;QAChB,WAAW,EAAE,oFAAoF;QACjG,OAAO,EAAE,sBAAsB;KAC/B;IACD;QACC,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,MAAM;QAChB,WAAW,EAAE,wFAAwF;QACrG,OAAO,EAAE,uBAAuB;KAChC;IACD;QACC,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,MAAM;QAChB,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,+CAA+C;KACxD;IAED,qBAAqB;IACrB;QACC,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,MAAM;QAChB,WAAW,EAAE,0EAA0E;QACvF,OAAO,EAAE,aAAa;KACtB;IAED,oBAAoB;IACpB;QACC,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,MAAM;QAChB,WAAW,EAAE,4EAA4E;QACzF,OAAO,EAAE,yBAAyB;KAClC;IACD;QACC,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,MAAM;QAChB,WAAW,EAAE,uDAAuD;QACpE,OAAO,EAAE,8BAA8B;KACvC;IACD;QACC,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,MAAM;QAChB,WA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I,CAAC,EAAE,CAAC;QACxB,mBAAmB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IAC3C,CAAC;SAAM,CAAC;QACP,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,UAAkB;IAC1D,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,mBAAmB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC3C,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,IAAI,IAAI,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YAC/D,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;IACF,CAAC,CAAC,CAAC;IACH,oDAAoD;IACpD,eAAe,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC3C,mBAAmB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC5B,uBAAuB;IACvB,KAAK,IAAI,CAAC,GAAG,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1D,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,EAAE,CAAC;YAC/C,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;AACF,CAAC"}
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiiBH,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,iBA6QxC"}
|