@easbot/agent 0.2.4 → 0.2.5
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/context/prompt/anthropic.txt +6 -6
- package/dist/assets/txt/context/template/CODER.txt +4 -4
- package/dist/assets/txt/session/prompt/anthropic.txt +6 -6
- package/dist/assets/txt/tool/bash.txt +2 -2
- package/dist/assets/txt/tool/codebase.txt +26 -30
- package/dist/assets/txt/tool/gateway-channel.txt +31 -73
- package/dist/assets/txt/tool/ls.txt +6 -1
- package/dist/assets/txt/tool/note.txt +18 -15
- package/dist/assets/txt/tool/plan.txt +34 -0
- package/dist/assets/txt/tool/pty_session.txt +60 -52
- package/dist/assets/txt/tool/todo.txt +124 -0
- package/dist/cli.cjs +293 -298
- package/dist/cli.mjs +297 -302
- package/dist/index.cjs +305 -310
- package/dist/index.d.cts +4049 -1530
- package/dist/index.d.ts +4049 -1530
- package/dist/index.mjs +311 -316
- package/package.json +12 -12
- package/dist/assets/txt/tool/plan-enter.txt +0 -14
- package/dist/assets/txt/tool/plan-exit.txt +0 -13
- package/dist/assets/txt/tool/pty.txt +0 -41
- package/dist/assets/txt/tool/todoread.txt +0 -14
- package/dist/assets/txt/tool/todowrite.txt +0 -166
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easbot/agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Core Agent for the easbot monorepo ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -123,17 +123,17 @@
|
|
|
123
123
|
"xdg-basedir": "5.1.0",
|
|
124
124
|
"zod": "^4.4.3",
|
|
125
125
|
"zod-to-json-schema": "^3.25.2",
|
|
126
|
-
"@easbot/
|
|
127
|
-
"@easbot/
|
|
128
|
-
"@easbot/
|
|
129
|
-
"@easbot/
|
|
130
|
-
"@easbot/
|
|
131
|
-
"@easbot/ollama-sdk": "0.2.
|
|
132
|
-
"@easbot/
|
|
133
|
-
"@easbot/
|
|
134
|
-
"@easbot/
|
|
135
|
-
"@easbot/utils": "0.2.
|
|
136
|
-
"@easbot/
|
|
126
|
+
"@easbot/memory": "0.2.5",
|
|
127
|
+
"@easbot/codebase": "0.2.5",
|
|
128
|
+
"@easbot/local-model-sdk": "0.2.5",
|
|
129
|
+
"@easbot/gateway": "0.2.5",
|
|
130
|
+
"@easbot/note": "0.2.5",
|
|
131
|
+
"@easbot/ollama-sdk": "0.2.5",
|
|
132
|
+
"@easbot/tui": "0.2.5",
|
|
133
|
+
"@easbot/sdk": "0.2.5",
|
|
134
|
+
"@easbot/plugin": "0.2.5",
|
|
135
|
+
"@easbot/utils": "0.2.5",
|
|
136
|
+
"@easbot/types": "0.2.5"
|
|
137
137
|
},
|
|
138
138
|
"devDependencies": {
|
|
139
139
|
"@actions/core": "^3.0.1",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
Use this tool to suggest switching to plan agent when the user's request would benefit from planning before implementation.
|
|
2
|
-
|
|
3
|
-
If they explicitly mention wanting to create a plan ALWAYS call this tool first.
|
|
4
|
-
|
|
5
|
-
This tool will ask the user if they want to switch to plan agent.
|
|
6
|
-
|
|
7
|
-
Call this tool when:
|
|
8
|
-
- The user's request is complex and would benefit from planning first
|
|
9
|
-
- You want to research and design before making changes
|
|
10
|
-
- The task involves multiple files or significant architectural decisions
|
|
11
|
-
|
|
12
|
-
Do NOT call this tool:
|
|
13
|
-
- For simple, straightforward tasks
|
|
14
|
-
- When the user explicitly wants immediate implementation
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Use this tool when you have completed the planning phase and are ready to exit plan agent.
|
|
2
|
-
|
|
3
|
-
This tool will ask the user if they want to switch to build agent to start implementing the plan.
|
|
4
|
-
|
|
5
|
-
Call this tool:
|
|
6
|
-
- After you have written a complete plan to the plan file
|
|
7
|
-
- After you have clarified any questions with the user
|
|
8
|
-
- When you are confident the plan is ready for implementation
|
|
9
|
-
|
|
10
|
-
Do NOT call this tool:
|
|
11
|
-
- Before you have created or finalized the plan
|
|
12
|
-
- If you still have unanswered questions about the implementation
|
|
13
|
-
- If the user has indicated they want to continue planning
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
Execute commands in a pseudo-terminal (PTY) session with full interactive terminal support. Perfect for commands requiring terminal features like sudo, ssh, vim, interactive programs, and real-time output streaming.
|
|
2
|
-
|
|
3
|
-
**!! CRITICAL RESOURCE MANAGEMENT WARNING !!**
|
|
4
|
-
|
|
5
|
-
Key capabilities:
|
|
6
|
-
- Full terminal emulation (xterm-256color)
|
|
7
|
-
- Interactive command execution
|
|
8
|
-
- Real-time output streaming
|
|
9
|
-
- Automatic session cleanup after completion
|
|
10
|
-
- Terminal resizing support
|
|
11
|
-
|
|
12
|
-
Usage guidelines:
|
|
13
|
-
- Ideal for: sudo, ssh, vim, htop, interactive shells, build commands
|
|
14
|
-
- Supports: Password prompts, keyboard input, terminal applications
|
|
15
|
-
- Provides: Live output updates, automatic cleanup
|
|
16
|
-
- Use for: Commands that need full terminal interaction
|
|
17
|
-
|
|
18
|
-
Parameters:
|
|
19
|
-
- command (required): The command to execute in PTY session
|
|
20
|
-
- args (optional): Command arguments as array
|
|
21
|
-
- cwd (optional): Working directory (defaults to current)
|
|
22
|
-
- env (optional): Environment variables
|
|
23
|
-
- timeout (optional): Execution timeout in seconds (default: 300)
|
|
24
|
-
- cols/rows (optional): Terminal dimensions (default 120x30)
|
|
25
|
-
- title (optional): Session title for identification
|
|
26
|
-
|
|
27
|
-
**!! RESOURCE MANAGEMENT !!**
|
|
28
|
-
|
|
29
|
-
This tool automatically cleans up the PTY session after command completion or timeout.
|
|
30
|
-
|
|
31
|
-
For long-running background processes or persistent sessions:
|
|
32
|
-
- The session will be created and managed automatically
|
|
33
|
-
- Use pty_manage tool to monitor active sessions: pty_manage { "action": "list" }
|
|
34
|
-
- Use pty_manage tool to terminate sessions: pty_manage { "action": "close", "sessionId": "id" }
|
|
35
|
-
|
|
36
|
-
**IMPORTANT**:
|
|
37
|
-
- Sessions are automatically cleaned up after command completes
|
|
38
|
-
- For commands that don't exit (servers, daemons), use pty_manage to close them
|
|
39
|
-
- Check active sessions regularly with pty_manage list action
|
|
40
|
-
|
|
41
|
-
Security: Requires explicit user authorization for each execution.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
Use this tool to read the current to-do list for the session. This tool should be used proactively and frequently to ensure that you are aware of
|
|
2
|
-
the status of the current task list. You should make use of this tool as often as possible, especially in the following situations:
|
|
3
|
-
- At the beginning of conversations to see what's pending
|
|
4
|
-
- Before starting new tasks to prioritize work
|
|
5
|
-
- When the user asks about previous tasks or plans
|
|
6
|
-
- Whenever you're uncertain about what to do next
|
|
7
|
-
- After completing tasks to update your understanding of remaining work
|
|
8
|
-
- After every few messages to ensure you're on track
|
|
9
|
-
|
|
10
|
-
Usage:
|
|
11
|
-
- This tool takes in no parameters. So leave the input blank or empty. DO NOT include a dummy object, placeholder string or a key like "input" or "empty". LEAVE IT BLANK.
|
|
12
|
-
- Returns a list of todo items with their status, priority, and content
|
|
13
|
-
- Use this information to track progress and plan next steps
|
|
14
|
-
- If no todos exist yet, an empty list will be returned
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
|
|
2
|
-
It also helps the user understand the progress of the task and overall progress of their requests.
|
|
3
|
-
|
|
4
|
-
## When to Use This Tool
|
|
5
|
-
Use this tool proactively in these scenarios:
|
|
6
|
-
|
|
7
|
-
1. Complex multistep tasks - When a task requires 3 or more distinct steps or actions
|
|
8
|
-
2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
|
|
9
|
-
3. User explicitly requests todo list - When the user directly asks you to use the todo list
|
|
10
|
-
4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
|
|
11
|
-
5. After receiving new instructions - Immediately capture user requirements as todos. Feel free to edit the todo list based on new information.
|
|
12
|
-
6. After completing a task - Mark it complete and add any new follow-up tasks
|
|
13
|
-
7. When you start working on a new task, mark the todo as in_progress. Ideally you should only have one todo as in_progress at a time. Complete existing tasks before starting new ones.
|
|
14
|
-
|
|
15
|
-
## When NOT to Use This Tool
|
|
16
|
-
|
|
17
|
-
Skip using this tool when:
|
|
18
|
-
1. There is only a single, straightforward task
|
|
19
|
-
2. The task is trivial and tracking it provides no organizational benefit
|
|
20
|
-
3. The task can be completed in less than 3 trivial steps
|
|
21
|
-
4. The task is purely conversational or informational
|
|
22
|
-
|
|
23
|
-
NOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.
|
|
24
|
-
|
|
25
|
-
## Examples of When to Use the Todo List
|
|
26
|
-
|
|
27
|
-
<example>
|
|
28
|
-
User: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done!
|
|
29
|
-
Assistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation.
|
|
30
|
-
*Creates todo list with the following items:*
|
|
31
|
-
1. Create dark mode toggle component in Settings page
|
|
32
|
-
2. Add dark mode state management (context/store)
|
|
33
|
-
3. Implement CSS-in-JS styles for dark theme
|
|
34
|
-
4. Update existing components to support theme switching
|
|
35
|
-
5. Run tests and build process, addressing any failures or errors that occur
|
|
36
|
-
*Begins working on the first task*
|
|
37
|
-
|
|
38
|
-
<reasoning>
|
|
39
|
-
The assistant used the todo list because:
|
|
40
|
-
1. Adding dark mode is a multi-step feature requiring UI, state management, and styling changes
|
|
41
|
-
2. The user explicitly requested tests and build be run afterward
|
|
42
|
-
3. The assistant inferred that tests and build need to pass by adding "Ensure tests and build succeed" as the final task
|
|
43
|
-
</reasoning>
|
|
44
|
-
</example>
|
|
45
|
-
|
|
46
|
-
<example>
|
|
47
|
-
User: Help me rename the function getCwd to getCurrentWorkingDirectory across my project
|
|
48
|
-
Assistant: Let me first search through your codebase to find all occurrences of 'getCwd'.
|
|
49
|
-
*Uses grep or search tools to locate all instances of getCwd in the codebase*
|
|
50
|
-
Assistant: I've found 15 instances of 'getCwd' across 8 different files. Let me create a todo list to track these changes.
|
|
51
|
-
*Creates todo list with specific items for each file that needs updating*
|
|
52
|
-
|
|
53
|
-
<reasoning>
|
|
54
|
-
The assistant used the todo list because:
|
|
55
|
-
1. First, the assistant searched to understand the scope of the task
|
|
56
|
-
2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps
|
|
57
|
-
3. The todo list helps ensure every instance is tracked and updated systematically
|
|
58
|
-
4. This approach prevents missing any occurrences and maintains code consistency
|
|
59
|
-
</reasoning>
|
|
60
|
-
</example>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<example>
|
|
64
|
-
User: I need to implement these features for my e-commerce site: user registration, product catalog, shopping cart, and checkout flow.
|
|
65
|
-
Assistant: I'll help implement these features. First, let's add all the features to the todo list.
|
|
66
|
-
*Creates a todo list breaking down each feature into specific tasks based on the project architecture*
|
|
67
|
-
Assistant: Let's start with user registration. This will involve creating database models, API endpoints, and frontend forms that integrate with your existing authentication system.
|
|
68
|
-
|
|
69
|
-
<reasoning>
|
|
70
|
-
The assistant used the todo list because:
|
|
71
|
-
1. The user provided multiple complex features to implement in a comma separated list
|
|
72
|
-
2. The todo list helps organize these large features into manageable tasks
|
|
73
|
-
3. This approach allows for tracking progress across the entire implementation
|
|
74
|
-
</reasoning>
|
|
75
|
-
</example>
|
|
76
|
-
|
|
77
|
-
<example>
|
|
78
|
-
User: Can you help optimize my React application? It's rendering slowly and has performance issues.</user>
|
|
79
|
-
Assistant: I'll help optimize your React application. First, let me examine your codebase to identify potential performance bottlenecks.
|
|
80
|
-
*Reviews component structure, render patterns, state management, and data fetching*
|
|
81
|
-
Assistant: After analyzing your codebase, I've identified several performance issues. Let me create a todo list to track our optimization efforts.
|
|
82
|
-
*Creates todo list with items like: 1) Implement memoization for expensive calculations in ProductList, 2) Add virtualization for long lists in Dashboard, 3) Optimize image loading in Gallery component, 4) Fix state update loops in ShoppingCart, 5) Review bundle size and implement code splitting*
|
|
83
|
-
Let's start by implementing memoization for the expensive calculations in your ProductList component.</assistant>
|
|
84
|
-
|
|
85
|
-
<reasoning>
|
|
86
|
-
The assistant used the todo list because:
|
|
87
|
-
1. First, the assistant examined the codebase to identify specific performance issues
|
|
88
|
-
2. Based on this analysis, it identified multiple optimization opportunities
|
|
89
|
-
3. Performance optimization is a non-trivial task requiring multiple steps
|
|
90
|
-
4. The todo list helps methodically track improvements across different components
|
|
91
|
-
5. This systematic approach ensures all performance bottlenecks are addressed
|
|
92
|
-
</reasoning>
|
|
93
|
-
</example>
|
|
94
|
-
|
|
95
|
-
## Examples of When NOT to Use the Todo List
|
|
96
|
-
|
|
97
|
-
<example>
|
|
98
|
-
User: How do I print 'Hello World' in Python?
|
|
99
|
-
Assistant: In Python, you can print "Hello World" with this simple code:
|
|
100
|
-
|
|
101
|
-
python
|
|
102
|
-
print("Hello World")
|
|
103
|
-
|
|
104
|
-
This will output the text "Hello World" to the console when executed.</assistant>
|
|
105
|
-
|
|
106
|
-
<reasoning>
|
|
107
|
-
The assistant did not use the todo list because this is a single, trivial task that can be completed in one step. There's no need to track multiple tasks or steps for such a straightforward request.
|
|
108
|
-
</reasoning>
|
|
109
|
-
</example>
|
|
110
|
-
|
|
111
|
-
<example>
|
|
112
|
-
User: What does the git status command do?
|
|
113
|
-
Assistant: The git status command shows the current state of your working directory and staging area. It displays which changes have been staged, which haven't, and which files aren't being tracked by Git. This is a fundamental command for understanding the current state of your repository before making commits.
|
|
114
|
-
|
|
115
|
-
<reasoning>
|
|
116
|
-
The assistant did not use the todo list because this is an informational request with no actual coding task to complete. The user is simply asking for an explanation, not for the assistant to perform multiple steps or tasks.
|
|
117
|
-
</reasoning>
|
|
118
|
-
</example>
|
|
119
|
-
|
|
120
|
-
<example>
|
|
121
|
-
User: Can you add a comment to the calculateTotal function to explain what it does?
|
|
122
|
-
Assistant: Sure, let me add a comment to the calculateTotal function to explain what it does.
|
|
123
|
-
* Uses the Edit tool to add a comment to the calculateTotal function *
|
|
124
|
-
|
|
125
|
-
<reasoning>
|
|
126
|
-
The assistant did not use the todo list because this is a single, straightforward task confined to one location in the code. Adding a comment doesn't require tracking multiple steps or systematic organization.
|
|
127
|
-
</reasoning>
|
|
128
|
-
</example>
|
|
129
|
-
|
|
130
|
-
<example>
|
|
131
|
-
User: Run npm install for me and tell me what happens.
|
|
132
|
-
Assistant: I'll run the npm install command for you.
|
|
133
|
-
|
|
134
|
-
*Executes: npm install*
|
|
135
|
-
|
|
136
|
-
The command completed successfully. Here's the output:
|
|
137
|
-
[Output of npm install command]
|
|
138
|
-
|
|
139
|
-
All dependencies have been installed according to your package.json file.
|
|
140
|
-
|
|
141
|
-
<reasoning>
|
|
142
|
-
The assistant did not use the todo list because this is a single command execution with immediate results. There are no multiple steps to track or organize, making the todo list unnecessary for this straightforward task.
|
|
143
|
-
</reasoning>
|
|
144
|
-
</example>
|
|
145
|
-
|
|
146
|
-
## Task States and Management
|
|
147
|
-
|
|
148
|
-
1. **Task States**: Use these states to track progress:
|
|
149
|
-
- pending: Task not yet started
|
|
150
|
-
- in_progress: Currently working on (limit to ONE task at a time)
|
|
151
|
-
- completed: Task finished successfully
|
|
152
|
-
- cancelled: Task no longer needed
|
|
153
|
-
|
|
154
|
-
2. **Task Management**:
|
|
155
|
-
- Update task status in real-time as you work
|
|
156
|
-
- Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
|
|
157
|
-
- Only have ONE task in_progress at any time
|
|
158
|
-
- Complete current tasks before starting new ones
|
|
159
|
-
- Cancel tasks that become irrelevant
|
|
160
|
-
|
|
161
|
-
3. **Task Breakdown**:
|
|
162
|
-
- Create specific, actionable items
|
|
163
|
-
- Break complex tasks into smaller, manageable steps
|
|
164
|
-
- Use clear, descriptive task names
|
|
165
|
-
|
|
166
|
-
When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.
|