@easbot/agent 0.2.1 → 0.2.3

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.
@@ -19,15 +19,35 @@ Example patch:
19
19
  *** Add File: hello.txt
20
20
  +Hello world
21
21
  *** Update File: src/app.py
22
- *** Move to: src/main.py
23
- @@ def greet():
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
- It is important to remember:
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
- Use this tool when you need to:
25
- - Understand code structure and implementation details
26
- - Find specific functions, classes, or code patterns
27
- - Explore relationships between code elements
28
- - Navigate code dependencies
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
- Launch a new agent to handle complex, multistep tasks autonomously.
2
-
3
- Available agent types and the tools they have access to:
4
- {agents}
5
-
6
- When using the Task tool, you must specify a subagent_type parameter to select which agent type to use.
7
-
8
- When to use the Task tool:
9
- - When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt. The slash command can take arguments. For example: Task(description="Check the file", prompt="/check-file path/to/file.py")
10
-
11
- When NOT to use the Task tool:
12
- - If you want to read a specific file path, use the Read or Glob tool instead of the Task tool, to find the match more quickly
13
- - If you are searching for a specific class definition like "class Foo", use the Glob tool instead, to find the match more quickly
14
- - If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Task tool, to find the match more quickly
15
- - Other tasks that are not related to the agent descriptions above
16
-
17
-
18
- Usage notes:
19
- 1. Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses
20
- 2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result. The output includes a task_id you can reuse later to continue the same subagent session.
21
- 3. Each agent invocation starts with a fresh context unless you provide task_id to resume the same subagent session (which continues with its previous messages and tool outputs). When starting fresh, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.
22
- 4. The agent's outputs should generally be trusted
23
- 5. Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent. Tell it how to verify its work if possible (e.g., relevant test commands).
24
- 6. If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.
25
-
26
- Example usage (NOTE: The agents below are fictional examples for illustration only - use the actual agents listed above):
27
-
28
- <example_agent_descriptions>
29
- "code-reviewer": use this agent after you are done writing a significant piece of code
30
- "greeting-responder": use this agent when to respond to user greetings with a friendly joke
31
- </example_agent_description>
32
-
33
- <example>
34
- user: "Please write a function that checks if a number is prime"
35
- assistant: Sure let me write a function that checks if a number is prime
36
- assistant: First let me use the Write tool to write a function that checks if a number is prime
37
- assistant: I'm going to use the Write tool to write the following code:
38
- <code>
39
- function isPrime(n) {
40
- if (n <= 1) return false
41
- for (let i = 2; i * i <= n; i++) {
42
- if (n % i === 0) return false
43
- }
44
- return true
45
- }
46
- </code>
47
- <commentary>
48
- Since a significant piece of code was written and the task was completed, now use the code-reviewer agent to review the code
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