@easbot/agent 0.2.3 → 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 +295 -300
- package/dist/cli.mjs +299 -304
- package/dist/index.cjs +307 -312
- package/dist/index.d.cts +4049 -1530
- package/dist/index.d.ts +4049 -1530
- package/dist/index.mjs +313 -318
- 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
|
@@ -21,7 +21,7 @@ When the user directly asks about easbot (eg. "can easbot do...", "does easbot h
|
|
|
21
21
|
Prioritize technical accuracy and truthfulness over validating the user's beliefs. Focus on facts and problem-solving, providing direct, objective technical info without any unnecessary superlatives, praise, or emotional validation. It is best for the user if easbot honestly applies the same rigorous standards to all ideas and disagrees when necessary, even if it may not be what the user wants to hear. Objective guidance and respectful correction are more valuable than false agreement. Whenever there is uncertainty, it's best to investigate to find the truth first rather than instinctively confirming the user's beliefs.
|
|
22
22
|
|
|
23
23
|
# Task Management
|
|
24
|
-
You have access to the
|
|
24
|
+
You have access to the Todo tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
|
|
25
25
|
These tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.
|
|
26
26
|
|
|
27
27
|
It is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.
|
|
@@ -30,13 +30,13 @@ Examples:
|
|
|
30
30
|
|
|
31
31
|
<example>
|
|
32
32
|
user: Run the build and fix any type errors
|
|
33
|
-
assistant: I'm going to use the
|
|
33
|
+
assistant: I'm going to use the Todo tool to write the following items to the todo list:
|
|
34
34
|
- Run the build
|
|
35
35
|
- Fix any type errors
|
|
36
36
|
|
|
37
37
|
I'm now going to run the build using Bash.
|
|
38
38
|
|
|
39
|
-
Looks like I found 10 type errors. I'm going to use the
|
|
39
|
+
Looks like I found 10 type errors. I'm going to use the Todo tool to write 10 items to the todo list.
|
|
40
40
|
|
|
41
41
|
marking the first todo as in_progress
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@ In the above example, the assistant completes all the tasks, including the 10 er
|
|
|
50
50
|
|
|
51
51
|
<example>
|
|
52
52
|
user: Help me write a new feature that allows users to track their usage metrics and export them to various formats
|
|
53
|
-
assistant: I'll help you implement a usage metrics tracking and export feature. Let me first use the
|
|
53
|
+
assistant: I'll help you implement a usage metrics tracking and export feature. Let me first use the Todo tool to plan this task.
|
|
54
54
|
Adding the following todos to the todo list:
|
|
55
55
|
1. Research existing metrics tracking in the codebase
|
|
56
56
|
2. Design the metrics collection system
|
|
@@ -70,7 +70,7 @@ I've found some existing telemetry code. Let me mark the first todo as in_progre
|
|
|
70
70
|
# Doing tasks
|
|
71
71
|
The user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:
|
|
72
72
|
-
|
|
73
|
-
- Use the
|
|
73
|
+
- Use the Todo tool to plan the task if required
|
|
74
74
|
|
|
75
75
|
- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are automatically added by the system, and bear no direct relation to the specific tool results or user messages in which they appear.
|
|
76
76
|
|
|
@@ -93,7 +93,7 @@ user: What is the codebase structure?
|
|
|
93
93
|
assistant: [Uses the Task tool]
|
|
94
94
|
</example>
|
|
95
95
|
|
|
96
|
-
IMPORTANT: Always use the
|
|
96
|
+
IMPORTANT: Always use the Todo tool to plan and track tasks throughout the conversation.
|
|
97
97
|
|
|
98
98
|
# Code References
|
|
99
99
|
|
|
@@ -31,12 +31,12 @@ Coder mode is for code development, debugging, and refactoring. The agent must d
|
|
|
31
31
|
|
|
32
32
|
### NEVER
|
|
33
33
|
- Implement features beyond what was requested
|
|
34
|
-
- Use `task` or `plan` tools for subtask decomposition (use `
|
|
34
|
+
- Use `task` or `plan` tools for subtask decomposition (use `Todo` instead)
|
|
35
35
|
- Leave code in broken state
|
|
36
36
|
- Skip verification steps
|
|
37
37
|
|
|
38
38
|
### ALWAYS
|
|
39
|
-
- Use `
|
|
39
|
+
- Use `Todo` tool to track multi-step task progress
|
|
40
40
|
- Run lint/typecheck after code changes
|
|
41
41
|
- Create tests for new functionality
|
|
42
42
|
- Verify all tests pass before completion
|
|
@@ -94,14 +94,14 @@ Transform tasks into verifiable goals:
|
|
|
94
94
|
- "Refactor X" → "Ensure tests pass before and after"
|
|
95
95
|
|
|
96
96
|
**For multi-step tasks, use the Todo tool to track progress:**
|
|
97
|
-
- Use `
|
|
97
|
+
- Use `Todo` tool to create and update task lists
|
|
98
98
|
- Update todo status after each step completion
|
|
99
99
|
- Plan steps before implementation
|
|
100
100
|
|
|
101
101
|
**Example workflow:**
|
|
102
102
|
```
|
|
103
103
|
1. [Analyze requirements] → verify: [understand user intent]
|
|
104
|
-
2. [Create todo list] → verify: [use
|
|
104
|
+
2. [Create todo list] → verify: [use Todo tool to record steps]
|
|
105
105
|
3. [Implement step 1] → verify: [run tests/verify]
|
|
106
106
|
4. [Update todo status] → verify: [confirm progress]
|
|
107
107
|
5. [Implement step 2...] → verify: [run tests/verify]
|
|
@@ -21,7 +21,7 @@ When the user directly asks about easbot (eg. "can easbot do...", "does easbot h
|
|
|
21
21
|
Prioritize technical accuracy and truthfulness over validating the user's beliefs. Focus on facts and problem-solving, providing direct, objective technical info without any unnecessary superlatives, praise, or emotional validation. It is best for the user if easbot honestly applies the same rigorous standards to all ideas and disagrees when necessary, even if it may not be what the user wants to hear. Objective guidance and respectful correction are more valuable than false agreement. Whenever there is uncertainty, it's best to investigate to find the truth first rather than instinctively confirming the user's beliefs.
|
|
22
22
|
|
|
23
23
|
# Task Management
|
|
24
|
-
You have access to the
|
|
24
|
+
You have access to the Todo tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
|
|
25
25
|
These tools are also EXTREMELY helpful for planning tasks, and for breaking down larger complex tasks into smaller steps. If you do not use this tool when planning, you may forget to do important tasks - and that is unacceptable.
|
|
26
26
|
|
|
27
27
|
It is critical that you mark todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.
|
|
@@ -30,13 +30,13 @@ Examples:
|
|
|
30
30
|
|
|
31
31
|
<example>
|
|
32
32
|
user: Run the build and fix any type errors
|
|
33
|
-
assistant: I'm going to use the
|
|
33
|
+
assistant: I'm going to use the Todo tool to write the following items to the todo list:
|
|
34
34
|
- Run the build
|
|
35
35
|
- Fix any type errors
|
|
36
36
|
|
|
37
37
|
I'm now going to run the build using Bash.
|
|
38
38
|
|
|
39
|
-
Looks like I found 10 type errors. I'm going to use the
|
|
39
|
+
Looks like I found 10 type errors. I'm going to use the Todo tool to write 10 items to the todo list.
|
|
40
40
|
|
|
41
41
|
marking the first todo as in_progress
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@ In the above example, the assistant completes all the tasks, including the 10 er
|
|
|
50
50
|
|
|
51
51
|
<example>
|
|
52
52
|
user: Help me write a new feature that allows users to track their usage metrics and export them to various formats
|
|
53
|
-
assistant: I'll help you implement a usage metrics tracking and export feature. Let me first use the
|
|
53
|
+
assistant: I'll help you implement a usage metrics tracking and export feature. Let me first use the Todo tool to plan this task.
|
|
54
54
|
Adding the following todos to the todo list:
|
|
55
55
|
1. Research existing metrics tracking in the codebase
|
|
56
56
|
2. Design the metrics collection system
|
|
@@ -70,7 +70,7 @@ I've found some existing telemetry code. Let me mark the first todo as in_progre
|
|
|
70
70
|
# Doing tasks
|
|
71
71
|
The user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:
|
|
72
72
|
-
|
|
73
|
-
- Use the
|
|
73
|
+
- Use the Todo tool to plan the task if required
|
|
74
74
|
|
|
75
75
|
- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are automatically added by the system, and bear no direct relation to the specific tool results or user messages in which they appear.
|
|
76
76
|
|
|
@@ -93,7 +93,7 @@ user: What is the codebase structure?
|
|
|
93
93
|
assistant: [Uses the Task tool]
|
|
94
94
|
</example>
|
|
95
95
|
|
|
96
|
-
IMPORTANT: Always use the
|
|
96
|
+
IMPORTANT: Always use the Todo tool to plan and track tasks throughout the conversation.
|
|
97
97
|
|
|
98
98
|
# Code References
|
|
99
99
|
|
|
@@ -81,7 +81,7 @@ Git Safety Protocol:
|
|
|
81
81
|
|
|
82
82
|
Important notes:
|
|
83
83
|
- NEVER run additional commands to read or explore code, besides git bash commands
|
|
84
|
-
- NEVER use the
|
|
84
|
+
- NEVER use the Todo or Task tools
|
|
85
85
|
- DO NOT push to the remote repository unless the user explicitly asks you to do so
|
|
86
86
|
- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.
|
|
87
87
|
- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit
|
|
@@ -108,7 +108,7 @@ gh pr create --title "the pr title" --body "$(cat <<'EOF'
|
|
|
108
108
|
</example>
|
|
109
109
|
|
|
110
110
|
Important:
|
|
111
|
-
- DO NOT use the
|
|
111
|
+
- DO NOT use the Todo or Task tools
|
|
112
112
|
- Return the PR URL when you're done, so the user can see it
|
|
113
113
|
|
|
114
114
|
# Other common operations
|
|
@@ -1,42 +1,38 @@
|
|
|
1
1
|
Use this tool to search and analyze code structure in the codebase knowledge graph. It provides code snippets with AST type, language, name, and file location.
|
|
2
2
|
|
|
3
|
-
**search** —
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- Useful for understanding code dependencies and navigation
|
|
17
|
-
|
|
18
|
-
## Supported Filter Values
|
|
19
|
-
|
|
20
|
-
**astType** — Code element types:
|
|
21
|
-
`class_declaration`, `class_definition`, `function_declaration`, `function_definition`, `method_definition`, `method_declaration`, `interface_declaration`, `type_alias_declaration`, `enum_declaration`, `variable_declaration`, `import_declaration`, `import_statement`, `struct_declaration`, `struct_specifier`
|
|
22
|
-
|
|
23
|
-
**language** — Programming languages:
|
|
24
|
-
`ts`, `tsx`, `js`, `jsx`, `py`, `rs`, `go`, `c`, `cpp`, `csharp`, `java`, `scala`, `ruby`, `php`, `zig`
|
|
3
|
+
**search** — Find code by query:
|
|
4
|
+
- operation="search"
|
|
5
|
+
- query: Search query string
|
|
6
|
+
- maxResults: Max results to return (default: 10)
|
|
7
|
+
- astType: Filter by AST type (e.g., class_declaration, function_declaration)
|
|
8
|
+
- language: Filter by language (e.g., ts, py, rs)
|
|
9
|
+
- minScore: Min score threshold (default: 0.3)
|
|
10
|
+
|
|
11
|
+
**queryEdges** — Explore code relationships:
|
|
12
|
+
- operation="queryEdges"
|
|
13
|
+
- nodeId: Node ID to query relations (required)
|
|
14
|
+
- direction: Edge direction - "in", "out", or "both" (default: "both")
|
|
15
|
+
- maxDepth: Max depth of relations (default: 2)
|
|
25
16
|
|
|
26
17
|
## Usage Examples
|
|
27
18
|
|
|
28
19
|
```
|
|
29
|
-
# Search for Session class
|
|
20
|
+
# Search for Session class
|
|
30
21
|
codebase(operation="search" query="Session" astType="class_declaration")
|
|
31
22
|
|
|
32
|
-
# Search
|
|
33
|
-
codebase(operation="search" query="handler" language="py"
|
|
23
|
+
# Search Python functions
|
|
24
|
+
codebase(operation="search" query="handler" language="py")
|
|
34
25
|
|
|
35
|
-
# Query
|
|
36
|
-
codebase(operation="queryEdges" nodeId="
|
|
26
|
+
# Query node relationships
|
|
27
|
+
codebase(operation="queryEdges" nodeId="ts:/path/file.ts:class:Session")
|
|
37
28
|
```
|
|
38
29
|
|
|
39
|
-
##
|
|
30
|
+
## Filter Values
|
|
31
|
+
|
|
32
|
+
**astType** — Code element types:
|
|
33
|
+
`class_declaration`, `class_definition`, `function_declaration`, `function_definition`, `method_definition`, `method_declaration`, `interface_declaration`, `type_alias_declaration`, `enum_declaration`, `variable_declaration`, `import_declaration`, `import_statement`, `struct_declaration`, `struct_specifier`
|
|
34
|
+
|
|
35
|
+
**language** — Programming languages:
|
|
36
|
+
`ts`, `tsx`, `js`, `jsx`, `py`, `rs`, `go`, `c`, `cpp`, `csharp`, `java`, `scala`, `ruby`, `php`, `zig`
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
- Use queryEdges to explore relationships between code elements
|
|
38
|
+
**direction**: in (incoming), out (outgoing), both
|
|
@@ -1,73 +1,31 @@
|
|
|
1
|
-
Send messages to external channels through the Gateway.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Send
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
Parameters:
|
|
33
|
-
- `content` (required): The message content to send
|
|
34
|
-
- `channelId` (optional): Specific channel to send to. If not provided:
|
|
35
|
-
- If `sessionId` is provided, uses the channel bound to that session
|
|
36
|
-
- Otherwise, auto-selects the highest priority available channel
|
|
37
|
-
- `sessionId` (optional): Session ID for channel binding lookup
|
|
38
|
-
- `messageType` (optional): "text" or "markdown" (default: "text")
|
|
39
|
-
|
|
40
|
-
## Channel Selection Logic
|
|
41
|
-
|
|
42
|
-
When `channelId` is not specified:
|
|
43
|
-
1. If `sessionId` is provided and that session is bound to a channel, use that channel
|
|
44
|
-
2. Otherwise, select the highest priority running channel
|
|
45
|
-
|
|
46
|
-
## Examples
|
|
47
|
-
|
|
48
|
-
List available channels:
|
|
49
|
-
```
|
|
50
|
-
Use gateway_channel with operation: "list"
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Send to a specific channel:
|
|
54
|
-
```
|
|
55
|
-
Use gateway_channel with:
|
|
56
|
-
- operation: "send"
|
|
57
|
-
- channelId: "telegram-main"
|
|
58
|
-
- content: "Hello!"
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Send with auto-selection:
|
|
62
|
-
```
|
|
63
|
-
Use gateway_channel with:
|
|
64
|
-
- operation: "send"
|
|
65
|
-
- content: "Hello!"
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Notes
|
|
69
|
-
|
|
70
|
-
- The Gateway must be running for this tool to work
|
|
71
|
-
- Channels must be registered and running to receive messages
|
|
72
|
-
- Messages are sent proactively - no incoming message is required
|
|
73
|
-
- Use this tool when you need to notify users or send updates to external platforms
|
|
1
|
+
Send messages to external channels through the Gateway system.
|
|
2
|
+
|
|
3
|
+
**list** — List available channels:
|
|
4
|
+
- operation="list"
|
|
5
|
+
- sessionId: Optional session ID for channel binding lookup
|
|
6
|
+
|
|
7
|
+
**send** — Send message to channel:
|
|
8
|
+
- operation="send"
|
|
9
|
+
- content: Message content (required)
|
|
10
|
+
- channelId: Specific channel ID (optional, auto-selects if not provided)
|
|
11
|
+
- sessionId: Session ID for channel lookup (optional)
|
|
12
|
+
- messageType: "text", "image", or "file" (default: "text")
|
|
13
|
+
|
|
14
|
+
## Usage Examples
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
# List channels
|
|
18
|
+
gateway_channel(operation="list")
|
|
19
|
+
|
|
20
|
+
# Send message
|
|
21
|
+
gateway_channel(operation="send" content="Hello!")
|
|
22
|
+
|
|
23
|
+
# Send to specific channel
|
|
24
|
+
gateway_channel(operation="send" channelId="telegram-main" content="Hello!")
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Channel Selection
|
|
28
|
+
|
|
29
|
+
If channelId not provided:
|
|
30
|
+
1. Use channel bound to sessionId (if provided)
|
|
31
|
+
2. Otherwise auto-select highest priority running channel
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
Lists files and directories in a given path
|
|
1
|
+
- Lists all files and directories in a given path
|
|
2
|
+
- Supports tree-style output showing directory hierarchy
|
|
3
|
+
- Automatically ignores common directories like node_modules, .git, dist, build, and more
|
|
4
|
+
- Supports custom ignore patterns via the ignore parameter
|
|
5
|
+
- Returns file count and truncation status when limit is reached
|
|
6
|
+
- When you need to find files by name patterns, prefer the Glob tool
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
Use this tool to search and retrieve information from the local note/document knowledge base. It returns document paths, line ranges, snippets, and related graph nodes.
|
|
2
2
|
|
|
3
|
-
**search** —
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
3
|
+
**search** — Find notes by query:
|
|
4
|
+
- operation="search"
|
|
5
|
+
- query: Search query string
|
|
6
|
+
- maxResults: Max results to return (default: 10)
|
|
7
|
+
- minScore: Min score threshold 0-1 (default: 0.3, higher = more precise)
|
|
8
8
|
|
|
9
|
-
**queryEdges** —
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- Useful for exploring connections between notes
|
|
9
|
+
**queryEdges** — Explore note relationships:
|
|
10
|
+
- operation="queryEdges"
|
|
11
|
+
- nodeId: Node ID (number) to query relations
|
|
12
|
+
- maxDepth: Max depth of relations (default: 2)
|
|
14
13
|
|
|
15
|
-
##
|
|
14
|
+
## Usage Examples
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
```
|
|
17
|
+
# Search for notes
|
|
18
|
+
note(operation="search" query="API design" maxResults=10)
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
# Query node relationships
|
|
21
|
+
note(operation="queryEdges" nodeId=123)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use when you need to:
|
|
22
25
|
- Find information from project documentation
|
|
23
26
|
- Search for specific topics in notes
|
|
24
27
|
- Explore relationships between documents
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Switch between plan mode and build mode for structured workflow.
|
|
2
|
+
|
|
3
|
+
Operations:
|
|
4
|
+
- enter: Request to switch to plan mode for research and planning
|
|
5
|
+
- exit: Request to exit plan mode and switch to build mode
|
|
6
|
+
|
|
7
|
+
**Enter Plan Mode (operation: "enter")**
|
|
8
|
+
|
|
9
|
+
Call this tool when:
|
|
10
|
+
- The user's request is complex and would benefit from planning first
|
|
11
|
+
- You want to research and design before making changes
|
|
12
|
+
- The task involves multiple files or significant architectural decisions
|
|
13
|
+
- If they explicitly mention wanting to create a plan ALWAYS call this tool first
|
|
14
|
+
|
|
15
|
+
Do NOT call this tool:
|
|
16
|
+
- For simple, straightforward tasks
|
|
17
|
+
- When the user explicitly wants immediate implementation
|
|
18
|
+
|
|
19
|
+
After entering plan mode:
|
|
20
|
+
- Research the requirements
|
|
21
|
+
- Create a detailed plan file
|
|
22
|
+
- Use plan_exit tool when planning is complete
|
|
23
|
+
|
|
24
|
+
**Exit Plan Mode (operation: "exit")**
|
|
25
|
+
|
|
26
|
+
Call this tool when:
|
|
27
|
+
- You have written a complete plan to the plan file
|
|
28
|
+
- You have clarified any questions with the user
|
|
29
|
+
- You are confident the plan is ready for implementation
|
|
30
|
+
|
|
31
|
+
Do NOT call this tool:
|
|
32
|
+
- Before you have created or finalized the plan
|
|
33
|
+
- If you still have unanswered questions about the implementation
|
|
34
|
+
- If the user has indicated they want to continue planning
|
|
@@ -1,52 +1,60 @@
|
|
|
1
|
-
Create and manage persistent interactive PTY sessions for long-running processes. Enables background execution, session persistence, and reconnection capabilities for continuous operations.
|
|
2
|
-
|
|
3
|
-
**!! CRITICAL WARNING: PERSISTENT BACKGROUND SESSIONS !!**
|
|
4
|
-
|
|
5
|
-
Key capabilities:
|
|
6
|
-
- Persistent session creation
|
|
7
|
-
- Background process management
|
|
8
|
-
- Session reconnection
|
|
9
|
-
- Multi-session support
|
|
10
|
-
- State preservation
|
|
11
|
-
|
|
12
|
-
Usage scenarios:
|
|
13
|
-
- Long-running services (web servers, databases)
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
Parameters:
|
|
20
|
-
- command (required): Initial command to run in session
|
|
21
|
-
- sessionName (optional): Unique identifier for session
|
|
22
|
-
- cols/rows (optional): Terminal dimensions
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
1
|
+
Create and manage persistent interactive PTY sessions for long-running processes. Enables background execution, session persistence, and reconnection capabilities for continuous operations.
|
|
2
|
+
|
|
3
|
+
**!! CRITICAL WARNING: PERSISTENT BACKGROUND SESSIONS !!**
|
|
4
|
+
|
|
5
|
+
Key capabilities:
|
|
6
|
+
- Persistent session creation
|
|
7
|
+
- Background process management
|
|
8
|
+
- Session reconnection
|
|
9
|
+
- Multi-session support
|
|
10
|
+
- State preservation
|
|
11
|
+
|
|
12
|
+
Usage scenarios:
|
|
13
|
+
- Long-running services (web servers, databases)
|
|
14
|
+
- Interactive SSH sessions
|
|
15
|
+
- REPL environments (Node.js, Python, etc.)
|
|
16
|
+
- Continuous monitoring (log tailing, system monitoring)
|
|
17
|
+
- Interactive development environments
|
|
18
|
+
|
|
19
|
+
Parameters:
|
|
20
|
+
- command (required): Initial command to run in session
|
|
21
|
+
- sessionName (optional): Unique identifier for session
|
|
22
|
+
- cols/rows (optional): Terminal dimensions
|
|
23
|
+
- persistent (optional): Keep session running after command completes (default: true)
|
|
24
|
+
- truncateMode (optional): head or tail for output truncation (default: tail)
|
|
25
|
+
|
|
26
|
+
**!! INPUT INTERACTION !!**
|
|
27
|
+
|
|
28
|
+
Send input to session using pty_manage tool:
|
|
29
|
+
```
|
|
30
|
+
pty_manage { "action": "write", "sessionId": "<sessionId>", "data": "your input\n" }
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Interactive workflow:
|
|
34
|
+
1. Create session: pty_session { "command": "ssh user@host" }
|
|
35
|
+
2. Send input: pty_manage { "action": "write", "sessionId": "...", "data": "password\n" }
|
|
36
|
+
3. Send commands: pty_manage { "action": "write", "sessionId": "...", "data": "ls -la\n" }
|
|
37
|
+
4. Check output: pty_manage { "action": "get", "sessionId": "..." }
|
|
38
|
+
5. Close session: pty_manage { "action": "close", "sessionId": "..." }
|
|
39
|
+
|
|
40
|
+
**!! ABSOLUTELY CRITICAL RESOURCE MANAGEMENT !!**
|
|
41
|
+
|
|
42
|
+
**WARNING**: Sessions run PERSISTENTLY in background until EXPLICITLY terminated!
|
|
43
|
+
|
|
44
|
+
**MANDATORY CLEANUP PROCEDURES**:
|
|
45
|
+
1. **MUST use pty_manage** tool for ALL session cleanup operations
|
|
46
|
+
2. **UNUSED sessions CONTINUE consuming system resources indefinitely**
|
|
47
|
+
3. **Sessions do not automatically terminate** - they run indefinitely until explicitly closed
|
|
48
|
+
4. **REGULAR monitoring required**: pty_manage { "action": "list" }
|
|
49
|
+
5. **IMMEDIATE termination**: pty_manage { "action": "close", "sessionId": "id" }
|
|
50
|
+
6. **FAILURE to clean up WILL lead to SYSTEM RESOURCE EXHAUSTION**
|
|
51
|
+
7. **SECURITY RISK**: Uncleaned sessions provide persistent system access
|
|
52
|
+
|
|
53
|
+
**RESOURCE CONSUMPTION IMPACT**:
|
|
54
|
+
- CPU cycles for active processes
|
|
55
|
+
- Memory allocation for session buffers
|
|
56
|
+
- File descriptors for terminal I/O
|
|
57
|
+
- Network connections (if applicable)
|
|
58
|
+
- System limits may be reached causing crashes
|
|
59
|
+
|
|
60
|
+
Security: Requires authorization for session creation and management.
|