@link-assistant/agent 0.7.0 → 0.8.1
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/package.json +9 -9
- package/src/cli/continuous-mode.js +188 -18
- package/src/cli/event-handler.js +99 -0
- package/src/config/config.ts +51 -0
- package/src/index.js +82 -157
- package/src/mcp/index.ts +125 -0
- package/src/session/message-v2.ts +30 -1
- package/src/session/processor.ts +21 -2
- package/src/session/prompt.ts +23 -1
- package/src/session/retry.ts +18 -0
- package/EXAMPLES.md +0 -462
- package/LICENSE +0 -24
- package/MODELS.md +0 -143
- package/README.md +0 -616
- package/TOOLS.md +0 -154
package/TOOLS.md
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# Supported Tools
|
|
2
|
-
|
|
3
|
-
This document lists all tools supported by `@link-assistant/agent`. All tools are enabled by default and produce OpenCode-compatible JSON output.
|
|
4
|
-
|
|
5
|
-
> ⚠️ **Bun-only** - This package requires [Bun](https://bun.sh) and does NOT support Node.js or Deno.
|
|
6
|
-
|
|
7
|
-
## File Operations
|
|
8
|
-
|
|
9
|
-
### read
|
|
10
|
-
|
|
11
|
-
Reads file contents from the filesystem.
|
|
12
|
-
|
|
13
|
-
**Status:** ✅ Fully supported and tested
|
|
14
|
-
**Test:** [tests/read.tools.test.js](tests/read.tools.test.js)
|
|
15
|
-
|
|
16
|
-
### write
|
|
17
|
-
|
|
18
|
-
Writes content to files in the filesystem.
|
|
19
|
-
|
|
20
|
-
**Status:** ✅ Fully supported and tested
|
|
21
|
-
**Test:** [tests/write.tools.test.js](tests/write.tools.test.js)
|
|
22
|
-
|
|
23
|
-
### edit
|
|
24
|
-
|
|
25
|
-
Performs exact string replacements in files.
|
|
26
|
-
|
|
27
|
-
**Status:** ✅ Fully supported and tested
|
|
28
|
-
**Test:** [tests/edit.tools.test.js](tests/edit.tools.test.js)
|
|
29
|
-
|
|
30
|
-
### list (ls)
|
|
31
|
-
|
|
32
|
-
Lists files and directories.
|
|
33
|
-
|
|
34
|
-
**Status:** ✅ Fully supported and tested
|
|
35
|
-
**Test:** [tests/list.tools.test.js](tests/list.tools.test.js)
|
|
36
|
-
|
|
37
|
-
## Search Tools
|
|
38
|
-
|
|
39
|
-
### glob
|
|
40
|
-
|
|
41
|
-
Fast file pattern matching tool that works with any codebase size. Supports glob patterns like `**/*.js` or `src/**/*.ts`.
|
|
42
|
-
|
|
43
|
-
**Status:** ✅ Fully supported and tested
|
|
44
|
-
**Test:** [tests/glob.tools.test.js](tests/glob.tools.test.js)
|
|
45
|
-
|
|
46
|
-
### grep
|
|
47
|
-
|
|
48
|
-
Powerful search tool built on ripgrep. Supports full regex syntax and can filter by file type or glob pattern.
|
|
49
|
-
|
|
50
|
-
**Status:** ✅ Fully supported and tested
|
|
51
|
-
**Test:** [tests/grep.tools.test.js](tests/grep.tools.test.js)
|
|
52
|
-
|
|
53
|
-
### websearch
|
|
54
|
-
|
|
55
|
-
Searches the web using Exa API for current information. Always enabled, no environment variables required.
|
|
56
|
-
|
|
57
|
-
**Status:** ✅ Fully supported and tested
|
|
58
|
-
**Test:** [tests/websearch.tools.test.js](tests/websearch.tools.test.js)
|
|
59
|
-
**OpenCode Compatibility:** ✅ 100% compatible
|
|
60
|
-
|
|
61
|
-
### codesearch
|
|
62
|
-
|
|
63
|
-
Searches code repositories and documentation using Exa API. Always enabled.
|
|
64
|
-
|
|
65
|
-
**Status:** ✅ Fully supported and tested
|
|
66
|
-
**Test:** [tests/codesearch.tools.test.js](tests/codesearch.tools.test.js)
|
|
67
|
-
**OpenCode Compatibility:** ✅ 100% compatible
|
|
68
|
-
|
|
69
|
-
## Execution Tools
|
|
70
|
-
|
|
71
|
-
### bash
|
|
72
|
-
|
|
73
|
-
Executes bash commands in a persistent shell session with optional timeout.
|
|
74
|
-
|
|
75
|
-
**Status:** ✅ Fully supported and tested
|
|
76
|
-
**Test:** [tests/bash.tools.test.js](tests/bash.tools.test.js)
|
|
77
|
-
|
|
78
|
-
### batch
|
|
79
|
-
|
|
80
|
-
Batches multiple tool calls together for optimal performance. Executes multiple tools in a single operation. Always enabled.
|
|
81
|
-
|
|
82
|
-
**Status:** ✅ Fully supported and tested
|
|
83
|
-
**Test:** [tests/batch.tools.test.js](tests/batch.tools.test.js)
|
|
84
|
-
|
|
85
|
-
### task
|
|
86
|
-
|
|
87
|
-
Launches specialized agents to handle complex, multi-step tasks autonomously.
|
|
88
|
-
|
|
89
|
-
**Status:** ✅ Fully supported and tested
|
|
90
|
-
**Test:** [tests/task.tools.test.js](tests/task.tools.test.js)
|
|
91
|
-
|
|
92
|
-
## Utility Tools
|
|
93
|
-
|
|
94
|
-
### todo (todowrite/todoread)
|
|
95
|
-
|
|
96
|
-
Reads and writes TODO items for task tracking during execution.
|
|
97
|
-
|
|
98
|
-
**Status:** ✅ Fully supported and tested
|
|
99
|
-
**Test:** [tests/todo.tools.test.js](tests/todo.tools.test.js)
|
|
100
|
-
|
|
101
|
-
### webfetch
|
|
102
|
-
|
|
103
|
-
Fetches content from a specified URL and processes it using an AI model.
|
|
104
|
-
|
|
105
|
-
**Status:** ✅ Fully supported and tested
|
|
106
|
-
**Test:** [tests/webfetch.tools.test.js](tests/webfetch.tools.test.js)
|
|
107
|
-
|
|
108
|
-
## Testing
|
|
109
|
-
|
|
110
|
-
### Run All Tool Tests
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
bun test tests/*.tools.test.js
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Run Specific Tool Test
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
bun test tests/bash.tools.test.js
|
|
120
|
-
bun test tests/websearch.tools.test.js
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Test Coverage
|
|
124
|
-
|
|
125
|
-
Each tool test verifies:
|
|
126
|
-
|
|
127
|
-
- ✅ Correct JSON output structure
|
|
128
|
-
- ✅ OpenCode compatibility (where applicable)
|
|
129
|
-
- ✅ Proper input/output handling
|
|
130
|
-
- ✅ Error handling
|
|
131
|
-
|
|
132
|
-
## Key Features
|
|
133
|
-
|
|
134
|
-
### No Configuration Required
|
|
135
|
-
|
|
136
|
-
- All tools work without environment variables or configuration files
|
|
137
|
-
- WebSearch and CodeSearch work without `OPENCODE_EXPERIMENTAL_EXA`
|
|
138
|
-
- Batch tool is always enabled, no experimental flag needed
|
|
139
|
-
|
|
140
|
-
### OpenCode Compatible
|
|
141
|
-
|
|
142
|
-
- All tools produce JSON output compatible with OpenCode's format
|
|
143
|
-
- WebSearch and CodeSearch tools are 100% compatible with OpenCode output
|
|
144
|
-
- Tool event structure matches OpenCode specifications
|
|
145
|
-
|
|
146
|
-
### Plain Text Input Support
|
|
147
|
-
|
|
148
|
-
`@link-assistant/agent` also accepts plain text input (not just JSON):
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
echo "hello world" | agent
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
Plain text is automatically converted to a message request.
|