@easbot/agent 0.2.0 → 0.2.2
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/dist/assets/txt/tool/apply_patch.txt +25 -5
- package/dist/assets/txt/tool/codebase.txt +21 -7
- package/dist/assets/txt/tool/task.txt +48 -60
- package/dist/cli.cjs +542 -588
- package/dist/cli.mjs +542 -588
- package/dist/index.cjs +556 -601
- package/dist/index.mjs +556 -601
- package/package.json +97 -106
|
@@ -19,15 +19,35 @@ Example patch:
|
|
|
19
19
|
*** Add File: hello.txt
|
|
20
20
|
+Hello world
|
|
21
21
|
*** Update File: src/app.py
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
@@ -1,4 +1,4 @@
|
|
23
|
+
def greet():
|
|
24
24
|
-print("Hi")
|
|
25
25
|
+print("Hello, world!")
|
|
26
|
+
def farewell():
|
|
26
27
|
*** Delete File: obsolete.txt
|
|
27
28
|
*** End Patch
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
Unified Diff Format for Update File:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
@@ -<old_start>,<old_count> +<new_start>,<new_count> @@ [optional context]
|
|
35
|
+
<context line (unchanged)>
|
|
36
|
+
-<line to delete>
|
|
37
|
+
+<new line to add>
|
|
38
|
+
<context line (unchanged)>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Key rules:
|
|
42
|
+
- Lines starting with `+` are added
|
|
43
|
+
- Lines starting with `-` are deleted
|
|
44
|
+
- Lines starting with space are context (must match file content exactly)
|
|
45
|
+
- The `@@ -...,+... @@` header MUST include line ranges
|
|
46
|
+
- Context lines must match the original file content exactly
|
|
47
|
+
- Use `*** Move to: <new_path>` after Update File for renaming
|
|
48
|
+
|
|
49
|
+
Common mistakes to avoid:
|
|
50
|
+
- DO NOT use `@@ context_line` without line numbers
|
|
51
|
+
- DO NOT use `@@` alone without ranges
|
|
52
|
+
- Context lines MUST match the actual file content
|
|
31
53
|
|
|
32
|
-
- You must include a header with your intended action (Add/Delete/Update)
|
|
33
|
-
- You must prefix new lines with `+` even when creating a new file
|
|
@@ -3,13 +3,15 @@ Use this tool to search and analyze code structure in the codebase knowledge gra
|
|
|
3
3
|
**search** — Use this operation to find code by query:
|
|
4
4
|
- Set operation="search"
|
|
5
5
|
- Provide query string to search code content
|
|
6
|
-
- Use astType to filter by code element type
|
|
7
|
-
- Use language to filter by programming language
|
|
6
|
+
- Use astType to filter by code element type (e.g., class_declaration, function_declaration)
|
|
7
|
+
- Use language to filter by programming language (e.g., ts, py, rs)
|
|
8
8
|
- Returns code snippets with related edges when available
|
|
9
9
|
|
|
10
10
|
**queryEdges** — Use this operation to explore code relationships:
|
|
11
11
|
- Set operation="queryEdges"
|
|
12
12
|
- Provide nodeId to get node information and all connected relations
|
|
13
|
+
- IMPORTANT: nodeId must be in full format: `language:filepath:type:name`
|
|
14
|
+
- Example: `ts:E:/work/apps/eas/project/src/session.ts:class_declaration:Session`
|
|
13
15
|
- Returns node details and incoming/outgoing edges (shown as [in] or [out])
|
|
14
16
|
- Useful for understanding code dependencies and navigation
|
|
15
17
|
|
|
@@ -21,8 +23,20 @@ Use this tool to search and analyze code structure in the codebase knowledge gra
|
|
|
21
23
|
**language** — Programming languages:
|
|
22
24
|
`ts`, `tsx`, `js`, `jsx`, `py`, `rs`, `go`, `c`, `cpp`, `csharp`, `java`, `scala`, `ruby`, `php`, `zig`
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
## Usage Examples
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
# Search for Session class definitions
|
|
30
|
+
codebase(operation="search" query="Session" astType="class_declaration")
|
|
31
|
+
|
|
32
|
+
# Search for Python functions only
|
|
33
|
+
codebase(operation="search" query="handler" language="py" astType="function_declaration")
|
|
34
|
+
|
|
35
|
+
# Query edges of a specific node (copy nodeId from search results)
|
|
36
|
+
codebase(operation="queryEdges" nodeId="<paste nodeId from search results>")
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Important Notes
|
|
40
|
+
|
|
41
|
+
- When searching, the nodeId is returned in results (e.g., `node id=ts:E:/path/to/file.ts:class_declaration:Session`)
|
|
42
|
+
- Use queryEdges to explore relationships between code elements
|
|
@@ -1,60 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</commentary>
|
|
50
|
-
assistant: Now let me use the code-reviewer agent to review the code
|
|
51
|
-
assistant: Uses the Task tool to launch the code-reviewer agent
|
|
52
|
-
</example>
|
|
53
|
-
|
|
54
|
-
<example>
|
|
55
|
-
user: "Hello"
|
|
56
|
-
<commentary>
|
|
57
|
-
Since the user is greeting, use the greeting-responder agent to respond with a friendly joke
|
|
58
|
-
</commentary>
|
|
59
|
-
assistant: "I'm going to use the Task tool to launch the with the greeting-responder agent"
|
|
60
|
-
</example>
|
|
1
|
+
Task management tool - create, query, continue, or delete background tasks.
|
|
2
|
+
|
|
3
|
+
## Operations
|
|
4
|
+
|
|
5
|
+
### create
|
|
6
|
+
Create a new background task. Task will run asynchronously and results will be injected when complete.
|
|
7
|
+
- description: Short task description
|
|
8
|
+
- prompt: Detailed task instructions for the subagent
|
|
9
|
+
- subagent_type: Type of specialized agent to use
|
|
10
|
+
|
|
11
|
+
### query
|
|
12
|
+
Query task status or list all tasks for current session.
|
|
13
|
+
- taskId (optional): Task ID to query. Omit to list all tasks.
|
|
14
|
+
|
|
15
|
+
### continue
|
|
16
|
+
Continue a failed or pending task.
|
|
17
|
+
- taskId: Task ID to continue
|
|
18
|
+
|
|
19
|
+
### delete
|
|
20
|
+
Delete a task by ID.
|
|
21
|
+
- taskId: Task ID to delete
|
|
22
|
+
|
|
23
|
+
### agents
|
|
24
|
+
List available agents for task execution (excludes hidden agents).
|
|
25
|
+
- No parameters required
|
|
26
|
+
|
|
27
|
+
## Concurrency
|
|
28
|
+
|
|
29
|
+
Multiple tasks can run concurrently (max 5). Use query to check task status.
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
task(operation="create" description="Review PR" prompt="Review code changes in the PR" subagent_type="code-reviewer")
|
|
35
|
+
task(operation="query")
|
|
36
|
+
task(operation="query" taskId="task_xxx")
|
|
37
|
+
task(operation="continue" taskId="task_xxx")
|
|
38
|
+
task(operation="delete" taskId="task_xxx")
|
|
39
|
+
task(operation="agents")
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
|
|
44
|
+
- Tasks run asynchronously in the background
|
|
45
|
+
- Multiple tasks can run concurrently
|
|
46
|
+
- Results are injected into the conversation when complete
|
|
47
|
+
- Use taskId to track and query specific tasks
|
|
48
|
+
- Completed or running tasks cannot be restarted, use query to check status
|