Skip to content

Commit c8844f2

Browse files
committed
Remove eca_ prefix from eca tools, we already pass server prefix (eca) after #196.
1 parent 00c3ac8 commit c8844f2

38 files changed

+277
-272
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- Prefix tool name with server to LLM: <server>__<toolname>. #196
6+
- Remove `eca_` prefix from eca tools, we already pass server prefix (eca) after #196.
67

78
## 0.77.1
89

docs/configuration.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Check some examples:
145145
"approval": {
146146
"byDefault": "allow",
147147
"ask": {
148-
"eca_shell_command": {"argsMatchers": {"command": [".*rm.*",
148+
"shell_command": {"argsMatchers": {"command": [".*rm.*",
149149
".*mv.*"]}}
150150
}
151151
}
@@ -161,7 +161,7 @@ Check some examples:
161161
"approval": {
162162
"byDefault": "allow",
163163
"deny": {
164-
"eca_shell_command": {"argsMatchers": {"command": [".*rm.*",
164+
"shell_command": {"argsMatchers": {"command": [".*rm.*",
165165
".*mv.*"]}}
166166
}
167167
}
@@ -175,7 +175,7 @@ __The `manualApproval` setting was deprecated and replaced by the `approval` one
175175

176176
### File Reading
177177

178-
You can configure the maximum number of lines returned by the `eca_read_file` tool:
178+
You can configure the maximum number of lines returned by the `eca__read_file` tool:
179179

180180
```javascript title="~/.config/eca/config.json"
181181
{
@@ -560,11 +560,11 @@ To configure, add your OTLP collector config via `:otlp` map following [otlp aut
560560
"toolCall": {
561561
"approval": {
562562
"byDefault": "ask",
563-
"allow": {"eca_directory_tree": {},
564-
"eca_read_file": {},
565-
"eca_grep": {},
566-
"eca_preview_file_change": {},
567-
"eca_editor_diagnostics": {}},
563+
"allow": {"directory_tree": {},
564+
"read_file": {},
565+
"grep": {},
566+
"preview_file_change": {},
567+
"editor_diagnostics": {}},
568568
"ask": {},
569569
"deny": {}
570570
},
@@ -580,10 +580,10 @@ To configure, add your OTLP collector config via `:otlp` map following [otlp aut
580580
"mcpServers" : {},
581581
"behavior" {
582582
"agent": {"systemPromptFile": "prompts/agent_behavior.md",
583-
"disabledTools": ["eca_preview_file_change"]},
583+
"disabledTools": ["preview_file_change"]},
584584
"plan": {"systemPromptFile": "prompts/plan_behavior.md",
585-
"disabledTools": ["eca_edit_file", "eca_write_file", "eca_move_file"],
586-
"toolCall": {"approval": {"deny": {"eca_shell_command":
585+
"disabledTools": ["edit_file", "write_file", "move_file"],
586+
"toolCall": {"approval": {"deny": {"shell_command":
587587
{"argsMatchers": {"command" [".*>.*",
588588
".*\\|\\s*(tee|dd|xargs).*",
589589
".*\\b(sed|awk|perl)\\s+.*-i.*",

docs/features.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,25 @@ ECA support built-in tools to avoid user extra installation and configuration, t
4040

4141
Provides access to the filesystem for listing, reading, writing, editing and moving files. Operates primarily on workspace files; paths outside the workspace require approval.
4242

43-
- `eca_directory_tree`: list a directory as a tree (can be recursive).
44-
- `eca_read_file`: read a file content.
45-
- `eca_write_file`: write content to a new file.
46-
- `eca_edit_file`: replace lines of a file with a new content.
47-
- `eca_preview_edit_file`: Only used in plan mode, showing what changes will happen after user decides to execute the plan.
48-
- `eca_move_file`: move/rename a file.
49-
- `eca_grep`: ripgrep/grep for paths with specified content.
43+
- `directory_tree`: list a directory as a tree (can be recursive).
44+
- `read_file`: read a file content.
45+
- `write_file`: write content to a new file.
46+
- `edit_file`: replace lines of a file with a new content.
47+
- `preview_edit_file`: Only used in plan mode, showing what changes will happen after user decides to execute the plan.
48+
- `move_file`: move/rename a file.
49+
- `grep`: ripgrep/grep for paths with specified content.
5050

5151
=== "Shell"
5252

5353
Provides access to run shell commands, useful to run build tools, tests, and other common commands, supports exclude/include commands.
5454

55-
- `eca_shell_command`: run shell command. Command exclusion can be configured using toolCall approval configuration with regex patterns.
55+
- `shell_command`: run shell command. Command exclusion can be configured using toolCall approval configuration with regex patterns.
5656

5757
=== "Editor"
5858

5959
Provides access to get information from editor workspaces.
6060

61-
- `eca_editor_diagnostics`: Ask client about the diagnostics (like LSP diagnostics).
61+
- `editor_diagnostics`: Ask client about the diagnostics (like LSP diagnostics).
6262

6363
!!! info "Custom Tools"
6464

docs/protocol.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ _Notification:_
313313
L--)S: Stream data
314314
S--)C: chat/contentReceived (assistant: text)
315315
S--)C: chat/contentReceived (toolCallPrepare: name + args)
316-
L->>-S: Finish response:<br/>needs tool call<br/>'eca_directory_tree'
316+
L->>-S: Finish response:<br/>needs tool call<br/>'eca__directory_tree'
317317
S->>C: chat/contentReceived (toolCallRun)<br/>Ask user if should call tool
318318
C--)S: chat/toolCallApprove
319319
S->>C: chat/contentReceived (toolCallRunning)
@@ -422,7 +422,7 @@ interface WebContext {
422422
* Clients should include this to chat by default but users may want exclude
423423
* this context to reduce context size if needed.
424424
*
425-
* @deprecated No longer needed, replaced by eca_directory_tree tool.
425+
* @deprecated No longer needed, replaced by eca__directory_tree tool.
426426
*/
427427
interface RepoMapContext {
428428
type: 'repoMap';

integration-test/integration/chat/anthropic_test.clj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -211,25 +211,25 @@
211211
(match-content chat-id "system" {:type "progress" :state "running" :text "Generating"})
212212
(match-content chat-id "assistant" {:type "reasonStarted" :id (m/pred string?)})
213213
(match-content chat-id "assistant" {:type "reasonText" :id (m/pred string?) :text "I should call tool"})
214-
(match-content chat-id "assistant" {:type "reasonText" :id (m/pred string?) :text " eca__eca_directory_tree"})
214+
(match-content chat-id "assistant" {:type "reasonText" :id (m/pred string?) :text " eca__directory_tree"})
215215
(match-content chat-id "assistant" {:type "reasonFinished" :id (m/pred string?) :totalTimeMs (m/pred number?)})
216216
(match-content chat-id "assistant" {:type "text" :text "I will list files"})
217217
(match-content chat-id "assistant" {:type "toolCallPrepare"
218218
:origin "native"
219219
:id "tool-1"
220-
:name "eca_directory_tree"
220+
:name "directory_tree"
221221
:argumentsText ""
222222
:summary "Listing file tree"})
223223
(match-content chat-id "assistant" {:type "toolCallPrepare"
224224
:origin "native"
225225
:id "tool-1"
226-
:name "eca_directory_tree"
226+
:name "directory_tree"
227227
:argumentsText "{\"pat"
228228
:summary "Listing file tree"})
229229
(match-content chat-id "assistant" {:type "toolCallPrepare"
230230
:origin "native"
231231
:id "tool-1"
232-
:name "eca_directory_tree"
232+
:name "directory_tree"
233233
:argumentsText (str "h\":\"" (h/json-escape-path (h/project-path->canon-path "resources")) "\"}")
234234
:summary "Listing file tree"})
235235
(match-content chat-id "system" {:type "usage"
@@ -239,21 +239,21 @@
239239
(match-content chat-id "assistant" {:type "toolCallRun"
240240
:origin "native"
241241
:id "tool-1"
242-
:name "eca_directory_tree"
242+
:name "directory_tree"
243243
:arguments {:path (h/project-path->canon-path "resources")}
244244
:manualApproval false
245245
:summary "Listing file tree"})
246246
(match-content chat-id "assistant" {:type "toolCallRunning"
247247
:origin "native"
248248
:id "tool-1"
249-
:name "eca_directory_tree"
249+
:name "directory_tree"
250250
:arguments {:path (h/project-path->canon-path "resources")}
251251
:summary "Listing file tree"})
252252
(match-content chat-id "system" {:type "progress" :state "running" :text "Calling tool"})
253253
(match-content chat-id "assistant" {:type "toolCalled"
254254
:origin "native"
255255
:id "tool-1"
256-
:name "eca_directory_tree"
256+
:name "directory_tree"
257257
:arguments {:path (h/project-path->canon-path "resources")}
258258
:summary "Listing file tree"
259259
:totalTimeMs (m/pred number?)
@@ -270,12 +270,12 @@
270270
{:role "assistant"
271271
:content [{:type "thinking"
272272
:signature "enc-123"
273-
:thinking "I should call tool eca__eca_directory_tree"}]}
273+
:thinking "I should call tool eca__directory_tree"}]}
274274
{:role "assistant" :content [{:type "text" :text "I will list files"}]}
275275
{:role "assistant"
276276
:content [{:type "tool_use"
277277
:id "tool-1"
278-
:name "eca__eca_directory_tree"
278+
:name "eca__directory_tree"
279279
:input {:path (h/project-path->canon-path "resources")}}]}
280280
{:role "user"
281281
:content [{:type "tool_result"
@@ -285,6 +285,6 @@
285285
" file2.md\n\n"
286286
"0 directories, 2 files\n")}]}]
287287
:tools (m/embeds
288-
[{:name "eca__eca_directory_tree"}])
288+
[{:name "eca__directory_tree"}])
289289
:system (m/pred vector?)}
290290
(llm.mocks/get-req-body :tool-calling-0)))))))

integration-test/integration/chat/github_copilot_test.clj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,27 +199,27 @@
199199
(match-content chat-id "system" {:type "progress" :state "running" :text "Generating"})
200200
(match-content chat-id "assistant" {:type "reasonStarted" :id (m/pred string?)})
201201
(match-content chat-id "assistant" {:type "reasonText" :id (m/pred string?) :text "I should call tool"})
202-
(match-content chat-id "assistant" {:type "reasonText" :id (m/pred string?) :text " eca__eca_directory_tree"})
202+
(match-content chat-id "assistant" {:type "reasonText" :id (m/pred string?) :text " eca__directory_tree"})
203203
(match-content chat-id "assistant" {:type "reasonFinished" :id (m/pred string?) :totalTimeMs (m/pred number?)})
204204
(match-content chat-id "assistant" {:type "text" :text "I will list files"})
205205
(match-content chat-id "assistant" {:type "toolCallPrepare"
206206
:origin "native"
207207
:id "tool-1"
208-
:name "eca_directory_tree"
208+
:name "directory_tree"
209209
:argumentsText ""
210210
:manualApproval false
211211
:summary "Listing file tree"})
212212
(match-content chat-id "assistant" {:type "toolCallPrepare"
213213
:origin "native"
214214
:id "tool-1"
215-
:name "eca_directory_tree"
215+
:name "directory_tree"
216216
:argumentsText "{\"pat"
217217
:manualApproval false
218218
:summary "Listing file tree"})
219219
(match-content chat-id "assistant" {:type "toolCallPrepare"
220220
:origin "native"
221221
:id "tool-1"
222-
:name "eca_directory_tree"
222+
:name "directory_tree"
223223
:argumentsText (str "h\":\"" (h/project-path->canon-path "resources") "\"}")
224224
:manualApproval false
225225
:summary "Listing file tree"})
@@ -232,21 +232,21 @@
232232
(match-content chat-id "assistant" {:type "toolCallRun"
233233
:origin "native"
234234
:id "tool-1"
235-
:name "eca_directory_tree"
235+
:name "directory_tree"
236236
:arguments {:path (h/project-path->canon-path "resources")}
237237
:manualApproval false
238238
:summary "Listing file tree"})
239239
(match-content chat-id "assistant" {:type "toolCallRunning"
240240
:origin "native"
241241
:id "tool-1"
242-
:name "eca_directory_tree"
242+
:name "directory_tree"
243243
:arguments {:path (h/project-path->canon-path "resources")}
244244
:totalTimeMs number?
245245
:summary "Listing file tree"})
246246
(match-content chat-id "assistant" {:type "toolCalled"
247247
:origin "native"
248248
:id "tool-1"
249-
:name "eca_directory_tree"
249+
:name "directory_tree"
250250
:arguments {:path (h/project-path->canon-path "resources")}
251251
:summary "Listing file tree"
252252
:error false
@@ -266,19 +266,19 @@
266266
{:role "assistant"
267267
:content [{:type "thinking"
268268
:signature "enc-123"
269-
:thinking "I should call tool eca__eca_directory_tree"}]}
269+
:thinking "I should call tool eca__directory_tree"}]}
270270
{:role "assistant" :content [{:type "text" :text "I will list files"}]}
271271
{:role "assistant"
272272
:content [{:type "tool_use"
273273
:id "tool-1"
274-
:name "eca__eca_directory_tree"
274+
:name "eca__directory_tree"
275275
:input {:path (h/project-path->canon-path "resources")}}]}
276276
{:role "user"
277277
:content [{:type "tool_result"
278278
:tool_use_id "tool-1"
279279
:content (str "[FILE] " (h/project-path->canon-path "resources/file1.md\n")
280280
"[FILE] " (h/project-path->canon-path "resources/file2.md\n\n"))}]}]
281281
:tools (m/embeds
282-
[{:name "eca__eca_directory_tree"}])
282+
[{:name "eca__directory_tree"}])
283283
:system (m/pred vector?)}
284284
llm.mocks/*last-req-body*))))))

0 commit comments

Comments
 (0)