@kb-labs/agent-tools 0.2.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/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # @kb-labs/agent-tools
2
+
3
+ Tool registry and implementations for KB Labs agents. Provides all tools an agent can call through LLM function calling.
4
+
5
+ ## Tools
6
+
7
+ | Tool | Module | Description |
8
+ |------|--------|-------------|
9
+ | `fs_read` | filesystem | Read file contents |
10
+ | `fs_write` | filesystem | Write/create files |
11
+ | `fs_list` | filesystem | List directory contents |
12
+ | `fs_search` | filesystem | Search files by pattern |
13
+ | `grep_search` | search | Regex search across files |
14
+ | `glob_search` | search | Find files by glob pattern |
15
+ | `semantic_search` | search | Semantic code search (Mind RAG) |
16
+ | `shell_exec` | shell | Execute shell commands (sandboxed) |
17
+ | `memory_read` | memory | Read agent memory |
18
+ | `memory_write` | memory | Write to agent memory |
19
+ | `todo_create` | reporting | Create todo items |
20
+ | `todo_update` | reporting | Update todo status |
21
+ | `delegate_task` | delegation | Delegate subtask to another agent |
22
+ | `ask_user` | interaction | Request user input |
23
+ | `mass_replace` | mass-replace | Bulk find-and-replace across files |
24
+
25
+ ## Usage
26
+
27
+ ```typescript
28
+ import { createToolRegistry } from '@kb-labs/agent-tools';
29
+
30
+ const registry = createToolRegistry(context);
31
+
32
+ // Get tool definitions for LLM function calling
33
+ const tools = registry.getDefinitions();
34
+
35
+ // Execute a tool call
36
+ const result = await registry.execute('fs_read', { path: 'src/index.ts' });
37
+ ```
38
+
39
+ ## Tool Configuration
40
+
41
+ Permissions and sandbox rules defined in `src/config.ts`:
42
+ - File system access boundaries
43
+ - Shell command allowlists
44
+ - Memory size limits
45
+ - Network access rules
46
+
47
+ ## Structure
48
+
49
+ ```
50
+ src/
51
+ ├── types.ts # Tool interface definitions
52
+ ├── registry.ts # Tool registry (register, get, execute)
53
+ ├── config.ts # Permissions and sandbox configuration
54
+ ├── utils.ts # Shared utilities
55
+ └── tools/
56
+ ├── index.ts # createToolRegistry factory
57
+ ├── filesystem.ts # File read/write/list/search
58
+ ├── search.ts # grep, glob, semantic search
59
+ ├── shell.ts # Shell command execution
60
+ ├── memory.ts # Agent memory operations
61
+ ├── reporting.ts # Todo and reporting tools
62
+ ├── delegation.ts # Task delegation
63
+ ├── interaction.ts# User interaction
64
+ └── mass-replace.ts
65
+ ```
66
+
67
+ ## Dependencies
68
+
69
+ - `@kb-labs/agent-contracts` — shared types
70
+ - `@kb-labs/core-platform` — platform services (semantic search)
71
+ - `glob` — file pattern matching