@zerone-agent/open-agent-sdk 0.5.4 → 0.5.6
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/tools/todo-tool.d.ts.map +1 -1
- package/dist/tools/todo-tool.js +13 -20
- package/dist/tools/todo-tool.js.map +1 -1
- package/dist/tools/todowrite.txt +25 -155
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todo-tool.d.ts","sourceRoot":"","sources":["../../src/tools/todo-tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"todo-tool.d.ts","sourceRoot":"","sources":["../../src/tools/todo-tool.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,aAAa,CAAA;AAW1E,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,WAAW,CAAA;AAC9E,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;AAEpD,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,UAAU,CAAA;IAClB,QAAQ,EAAE,YAAY,CAAA;CACvB;AA6FD,wBAAsB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAErE;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjE;AAED,eAAO,MAAM,aAAa,EAAE,cAqE3B,CAAA"}
|
package/dist/tools/todo-tool.js
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
2
|
-
import {
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { join, dirname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
let _description;
|
|
7
|
+
try {
|
|
8
|
+
_description = readFileSync(join(__dirname, 'todowrite.txt'), 'utf-8');
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
_description = 'Manage a structured task list for your current coding session.';
|
|
12
|
+
}
|
|
3
13
|
const VALID_STATUSES = ['pending', 'in_progress', 'completed', 'cancelled'];
|
|
4
14
|
const VALID_PRIORITIES = ['high', 'medium', 'low'];
|
|
5
|
-
let _description = '';
|
|
6
|
-
async function loadDescription() {
|
|
7
|
-
if (_description)
|
|
8
|
-
return _description;
|
|
9
|
-
try {
|
|
10
|
-
const { fileURLToPath } = await import('node:url');
|
|
11
|
-
const { dirname, join } = await import('node:path');
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
-
const __dirname = dirname(__filename);
|
|
14
|
-
const { readFile } = await import('node:fs/promises');
|
|
15
|
-
_description = await readFile(join(__dirname, 'todowrite.txt'), 'utf-8');
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
_description = 'Manage a structured task list for your current coding session.';
|
|
19
|
-
}
|
|
20
|
-
return _description;
|
|
21
|
-
}
|
|
22
15
|
function getTodosDir() {
|
|
23
16
|
const home = process.env.HOME || process.env.USERPROFILE || '/tmp';
|
|
24
17
|
return join(home, '.openagent', 'sessions');
|
|
@@ -97,7 +90,7 @@ export async function clearTodos(sessionId) {
|
|
|
97
90
|
}
|
|
98
91
|
export const TodoWriteTool = {
|
|
99
92
|
name: 'TodoWrite',
|
|
100
|
-
description:
|
|
93
|
+
description: _description,
|
|
101
94
|
inputSchema: {
|
|
102
95
|
type: 'object',
|
|
103
96
|
properties: {
|
|
@@ -129,7 +122,7 @@ export const TodoWriteTool = {
|
|
|
129
122
|
isConcurrencySafe: () => true,
|
|
130
123
|
isEnabled: () => true,
|
|
131
124
|
async prompt() {
|
|
132
|
-
return
|
|
125
|
+
return _description;
|
|
133
126
|
},
|
|
134
127
|
async call(input, context) {
|
|
135
128
|
const todos = input.todos;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todo-tool.js","sourceRoot":"","sources":["../../src/tools/todo-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"todo-tool.js","sourceRoot":"","sources":["../../src/tools/todo-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAIxC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAEzD,IAAI,YAAoB,CAAA;AACxB,IAAI,CAAC;IACH,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,OAAO,CAAC,CAAA;AACxE,CAAC;AAAC,MAAM,CAAC;IACP,YAAY,GAAG,gEAAgE,CAAA;AACjF,CAAC;AAWD,MAAM,cAAc,GAAsB,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,CAAC,CAAA;AAC9F,MAAM,gBAAgB,GAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;AAErE,SAAS,WAAW;IAClB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,MAAM,CAAA;IAClE,OAAO,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,CAAC,CAAA;AAC7C,CAAC;AAED,SAAS,YAAY,CAAC,SAA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M,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;QAC3C,MAAM,MAAM,GAAG,GAAG,SAAS,OAAO,IAAI,EAAE,CAAA;QAExC,MAAM,OAAO,GAAG,eAAe,CAAC,CAAC,CAAC,aAAa,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAErE,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,EAAE;YACf,OAAO,EAAE,MAAM,GAAG,OAAO;SAC1B,CAAA;IACH,CAAC;CACF,CAAA"}
|
package/dist/tools/todowrite.txt
CHANGED
|
@@ -1,155 +1,25 @@
|
|
|
1
|
-
Use this tool to create and manage a structured task list for your current
|
|
2
|
-
|
|
3
|
-
## When to Use
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<example>
|
|
27
|
-
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!
|
|
28
|
-
Assistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation.
|
|
29
|
-
*Creates todo list with the following items:*
|
|
30
|
-
1. Create dark mode toggle component in Settings page
|
|
31
|
-
2. Add dark mode state management (context/store)
|
|
32
|
-
3. Implement CSS-in-JS styles for dark theme
|
|
33
|
-
4. Update existing components to support theme switching
|
|
34
|
-
5. Run tests and build process, addressing any failures or errors that occur
|
|
35
|
-
*Begins working on the first task*
|
|
36
|
-
|
|
37
|
-
<reasoning>
|
|
38
|
-
The assistant used the todo list because:
|
|
39
|
-
1. Adding dark mode is a multi-step feature requiring UI, state management, and styling changes
|
|
40
|
-
2. The user explicitly requested tests and build be run afterward
|
|
41
|
-
3. The assistant inferred that tests and build need to pass by adding "Ensure tests and build succeed" as the final task
|
|
42
|
-
</reasoning>
|
|
43
|
-
</example>
|
|
44
|
-
|
|
45
|
-
<example>
|
|
46
|
-
User: Help me rename the function getCwd to getCurrentWorkingDirectory across my project
|
|
47
|
-
Assistant: Let me first search through your codebase to find all occurrences of 'getCwd'.
|
|
48
|
-
*Uses grep or search tools to locate all instances of getCwd in the codebase*
|
|
49
|
-
Assistant: I've found 15 instances of 'getCwd' across 8 different files. Let me create a todo list to track these changes.
|
|
50
|
-
*Creates todo list with specific items for each file that needs updating*
|
|
51
|
-
|
|
52
|
-
<reasoning>
|
|
53
|
-
The assistant used the todo list because:
|
|
54
|
-
1. First, the assistant searched to understand the scope of the task
|
|
55
|
-
2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps
|
|
56
|
-
3. The todo list helps ensure every instance is tracked and updated systematically
|
|
57
|
-
4. This approach prevents missing any occurrences and maintains code consistency
|
|
58
|
-
</reasoning>
|
|
59
|
-
</example>
|
|
60
|
-
|
|
61
|
-
<example>
|
|
62
|
-
User: I need to implement these features for my e-commerce site: user registration, product catalog, shopping cart, and checkout flow.
|
|
63
|
-
Assistant: I'll help implement these features. First, let's add all the features to the todo list.
|
|
64
|
-
*Creates a todo list breaking down each feature into specific tasks based on the project architecture*
|
|
65
|
-
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.
|
|
66
|
-
|
|
67
|
-
<reasoning>
|
|
68
|
-
The assistant used the todo list because:
|
|
69
|
-
1. The user provided multiple complex features to implement
|
|
70
|
-
2. The todo list helps organize these large features into manageable tasks
|
|
71
|
-
3. This approach allows for tracking progress across the entire implementation
|
|
72
|
-
</reasoning>
|
|
73
|
-
</example>
|
|
74
|
-
|
|
75
|
-
<example>
|
|
76
|
-
User: Can you help optimize my React application? It's rendering slowly and has performance issues.
|
|
77
|
-
Assistant: I'll help optimize your React application. First, let me examine your codebase to identify potential performance bottlenecks.
|
|
78
|
-
*Reviews component structure, render patterns, state management, and data fetching*
|
|
79
|
-
Assistant: After analyzing your codebase, I've identified several performance issues. Let me create a todo list to track our optimization efforts.
|
|
80
|
-
*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*
|
|
81
|
-
Let's start by implementing memoization for the expensive calculations in your ProductList component.
|
|
82
|
-
|
|
83
|
-
<reasoning>
|
|
84
|
-
The assistant used the todo list because:
|
|
85
|
-
1. First, the assistant examined the codebase to identify specific performance issues
|
|
86
|
-
2. Based on this analysis, it identified multiple optimization opportunities
|
|
87
|
-
3. Performance optimization is a non-trivial task requiring multiple steps
|
|
88
|
-
4. The todo list helps methodically track improvements across different components
|
|
89
|
-
</reasoning>
|
|
90
|
-
</example>
|
|
91
|
-
|
|
92
|
-
## Examples of When NOT to Use the Todo List
|
|
93
|
-
|
|
94
|
-
<example>
|
|
95
|
-
User: How do I print 'Hello World' in Python?
|
|
96
|
-
Assistant: In Python, you can print "Hello World" with this simple code:
|
|
97
|
-
|
|
98
|
-
python
|
|
99
|
-
print("Hello World")
|
|
100
|
-
|
|
101
|
-
<reasoning>
|
|
102
|
-
The assistant did not use the todo list because this is a single, trivial task that can be completed in one step.
|
|
103
|
-
</reasoning>
|
|
104
|
-
</example>
|
|
105
|
-
|
|
106
|
-
<example>
|
|
107
|
-
User: What does the git status command do?
|
|
108
|
-
Assistant: The git status command shows the current state of your working directory and staging area.
|
|
109
|
-
|
|
110
|
-
<reasoning>
|
|
111
|
-
The assistant did not use the todo list because this is an informational request with no actual coding task to complete.
|
|
112
|
-
</reasoning>
|
|
113
|
-
</example>
|
|
114
|
-
|
|
115
|
-
<example>
|
|
116
|
-
User: Can you add a comment to the calculateTotal function to explain what it does?
|
|
117
|
-
Assistant: Sure, let me add a comment to the calculateTotal function.
|
|
118
|
-
* Uses the Edit tool to add a comment to the calculateTotal function *
|
|
119
|
-
|
|
120
|
-
<reasoning>
|
|
121
|
-
The assistant did not use the todo list because this is a single, straightforward task confined to one location in the code.
|
|
122
|
-
</reasoning>
|
|
123
|
-
</example>
|
|
124
|
-
|
|
125
|
-
<example>
|
|
126
|
-
User: Run npm install for me and tell me what happens.
|
|
127
|
-
Assistant: I'll run the npm install command for you.
|
|
128
|
-
*Executes: npm install*
|
|
129
|
-
|
|
130
|
-
<reasoning>
|
|
131
|
-
The assistant did not use the todo list because this is a single command execution with immediate results.
|
|
132
|
-
</reasoning>
|
|
133
|
-
</example>
|
|
134
|
-
|
|
135
|
-
## Task States and Management
|
|
136
|
-
|
|
137
|
-
1. **Task States**: Use these states to track progress:
|
|
138
|
-
- pending: Task not yet started
|
|
139
|
-
- in_progress: Currently working on (limit to ONE task at a time)
|
|
140
|
-
- completed: Task finished successfully
|
|
141
|
-
- cancelled: Task no longer needed
|
|
142
|
-
|
|
143
|
-
2. **Task Management**:
|
|
144
|
-
- Update task status in real-time as you work
|
|
145
|
-
- Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
|
|
146
|
-
- Only have ONE task in_progress at any time
|
|
147
|
-
- Complete current tasks before starting new ones
|
|
148
|
-
- Cancel tasks that become irrelevant
|
|
149
|
-
|
|
150
|
-
3. **Task Breakdown**:
|
|
151
|
-
- Create specific, actionable items
|
|
152
|
-
- Break complex tasks into smaller, manageable steps
|
|
153
|
-
- Use clear, descriptive task names
|
|
154
|
-
|
|
155
|
-
When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.
|
|
1
|
+
Use this tool to create and manage a structured task list for your current session. It helps track progress and surface status to the user.
|
|
2
|
+
|
|
3
|
+
## When to Use
|
|
4
|
+
1. Multi-step tasks requiring 3+ distinct steps or careful planning
|
|
5
|
+
2. User provides multiple tasks (numbered or comma-separated)
|
|
6
|
+
3. After receiving new instructions — capture as todos immediately
|
|
7
|
+
4. After completing a task — mark complete, add follow-ups
|
|
8
|
+
|
|
9
|
+
## When NOT to Use
|
|
10
|
+
1. Single straightforward task (< 3 trivial steps)
|
|
11
|
+
2. Purely conversational or informational requests
|
|
12
|
+
3. One trivial action — just do it directly
|
|
13
|
+
|
|
14
|
+
## Task States
|
|
15
|
+
- **pending**: Not yet started
|
|
16
|
+
- **in_progress**: Currently working on (limit to ONE at a time)
|
|
17
|
+
- **completed**: Finished successfully
|
|
18
|
+
- **cancelled**: No longer needed
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
- Only ONE task should be `in_progress` at any time
|
|
22
|
+
- Mark tasks `completed` IMMEDIATELY after finishing (don't batch)
|
|
23
|
+
- Cancel tasks that become irrelevant
|
|
24
|
+
- Create specific, actionable items with clear descriptions
|
|
25
|
+
- Break complex tasks into smaller steps
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/Zerone-Agent/open-agent-sdk/issues"
|
|
14
14
|
},
|
|
15
|
-
"version": "0.5.
|
|
15
|
+
"version": "0.5.6",
|
|
16
16
|
"description": "Open-source Agent SDK. Runs the full agent loop in-process — no local CLI required. Deploy anywhere: cloud, serverless, Docker, CI/CD.",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"main": "./dist/index.js",
|