@oh-my-pi/pi-coding-agent 3.33.0 → 3.34.0
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/CHANGELOG.md +34 -9
- package/docs/custom-tools.md +1 -1
- package/docs/extensions.md +4 -4
- package/docs/hooks.md +2 -2
- package/docs/sdk.md +4 -8
- package/examples/custom-tools/README.md +2 -2
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/todo.ts +1 -1
- package/examples/hooks/custom-compaction.ts +4 -2
- package/examples/hooks/handoff.ts +1 -1
- package/examples/hooks/qna.ts +1 -1
- package/examples/sdk/02-custom-model.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/package.json +5 -5
- package/src/capability/ssh.ts +42 -0
- package/src/cli/file-processor.ts +1 -1
- package/src/cli/list-models.ts +1 -1
- package/src/core/agent-session.ts +19 -5
- package/src/core/auth-storage.ts +1 -1
- package/src/core/compaction/branch-summarization.ts +2 -2
- package/src/core/compaction/compaction.ts +2 -2
- package/src/core/compaction/utils.ts +1 -1
- package/src/core/custom-tools/types.ts +1 -1
- package/src/core/extensions/runner.ts +1 -1
- package/src/core/extensions/types.ts +1 -1
- package/src/core/extensions/wrapper.ts +1 -1
- package/src/core/hooks/runner.ts +2 -2
- package/src/core/hooks/types.ts +1 -1
- package/src/core/index.ts +11 -0
- package/src/core/messages.ts +1 -1
- package/src/core/model-registry.ts +1 -1
- package/src/core/model-resolver.ts +7 -6
- package/src/core/sdk.ts +26 -2
- package/src/core/session-manager.ts +1 -1
- package/src/core/ssh/connection-manager.ts +466 -0
- package/src/core/ssh/ssh-executor.ts +190 -0
- package/src/core/ssh/sshfs-mount.ts +162 -0
- package/src/core/ssh-executor.ts +5 -0
- package/src/core/system-prompt.ts +424 -1
- package/src/core/title-generator.ts +2 -2
- package/src/core/tools/index.test.ts +1 -0
- package/src/core/tools/index.ts +3 -0
- package/src/core/tools/output.ts +1 -1
- package/src/core/tools/read.ts +24 -11
- package/src/core/tools/renderers.ts +2 -0
- package/src/core/tools/ssh.ts +302 -0
- package/src/core/tools/task/index.ts +1 -1
- package/src/core/tools/task/types.ts +1 -1
- package/src/core/tools/task/worker.ts +1 -1
- package/src/core/voice.ts +1 -1
- package/src/discovery/index.ts +3 -0
- package/src/discovery/ssh.ts +162 -0
- package/src/main.ts +1 -1
- package/src/modes/interactive/components/assistant-message.ts +1 -1
- package/src/modes/interactive/components/custom-message.ts +1 -1
- package/src/modes/interactive/components/footer.ts +1 -1
- package/src/modes/interactive/components/hook-message.ts +1 -1
- package/src/modes/interactive/components/model-selector.ts +1 -1
- package/src/modes/interactive/components/oauth-selector.ts +1 -1
- package/src/modes/interactive/components/status-line.ts +1 -1
- package/src/modes/interactive/interactive-mode.ts +1 -1
- package/src/modes/print-mode.ts +1 -1
- package/src/modes/rpc/rpc-client.ts +1 -1
- package/src/modes/rpc/rpc-types.ts +1 -1
- package/src/prompts/system-prompt.md +4 -0
- package/src/prompts/tools/ssh.md +74 -0
- package/src/utils/image-resize.ts +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Execute commands on remote SSH hosts.
|
|
2
|
+
|
|
3
|
+
## Critical: Match Commands to Host Shell
|
|
4
|
+
|
|
5
|
+
Each host runs a specific shell. **You MUST use commands native to that shell.**
|
|
6
|
+
|
|
7
|
+
### Command Reference
|
|
8
|
+
|
|
9
|
+
**linux/bash, linux/zsh, macos/bash, macos/zsh** — Unix-like systems:
|
|
10
|
+
- Files: `ls`, `cat`, `head`, `tail`, `grep`, `find`
|
|
11
|
+
- System: `ps`, `top`, `df`, `uname`, `free` (Linux), `df`, `uname`, `top` (macOS)
|
|
12
|
+
- Navigation: `cd`, `pwd`
|
|
13
|
+
|
|
14
|
+
**windows/bash, windows/sh** — Windows with Unix compatibility layer (WSL, Cygwin, Git Bash):
|
|
15
|
+
- Files: `ls`, `cat`, `head`, `tail`, `grep`, `find`
|
|
16
|
+
- System: `ps`, `top`, `df`, `uname`
|
|
17
|
+
- Navigation: `cd`, `pwd`
|
|
18
|
+
- Note: These are Windows hosts but use Unix commands
|
|
19
|
+
|
|
20
|
+
**windows/powershell** — Native Windows PowerShell:
|
|
21
|
+
- Files: `Get-ChildItem`, `Get-Content`, `Select-String`
|
|
22
|
+
- System: `Get-Process`, `Get-ComputerInfo`
|
|
23
|
+
- Navigation: `Set-Location`, `Get-Location`
|
|
24
|
+
|
|
25
|
+
**windows/cmd** — Native Windows Command Prompt:
|
|
26
|
+
- Files: `dir`, `type`, `findstr`, `where`
|
|
27
|
+
- System: `tasklist`, `systeminfo`
|
|
28
|
+
- Navigation: `cd`, `echo %CD%`
|
|
29
|
+
|
|
30
|
+
## Execution Pattern
|
|
31
|
+
|
|
32
|
+
1. Check the host's shell type from "Available hosts" below
|
|
33
|
+
2. Use ONLY commands for that shell type
|
|
34
|
+
3. Construct your command using the reference above
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
<example>
|
|
39
|
+
Task: List files in /home/user on host "server1"
|
|
40
|
+
Host: server1 (10.0.0.1) | linux/bash
|
|
41
|
+
Command: `ls -la /home/user`
|
|
42
|
+
</example>
|
|
43
|
+
|
|
44
|
+
<example>
|
|
45
|
+
Task: Show running processes on host "winbox"
|
|
46
|
+
Host: winbox (192.168.1.5) | windows/cmd
|
|
47
|
+
Command: `tasklist /v`
|
|
48
|
+
</example>
|
|
49
|
+
|
|
50
|
+
<example>
|
|
51
|
+
Task: Check disk usage on host "wsl-dev"
|
|
52
|
+
Host: wsl-dev (192.168.1.10) | windows/bash
|
|
53
|
+
Command: `df -h`
|
|
54
|
+
Note: Windows host with WSL — use Unix commands
|
|
55
|
+
</example>
|
|
56
|
+
|
|
57
|
+
<example>
|
|
58
|
+
Task: Get system info on host "macbook"
|
|
59
|
+
Host: macbook (10.0.0.20) | macos/zsh
|
|
60
|
+
Command: `uname -a && sw_vers`
|
|
61
|
+
</example>
|
|
62
|
+
|
|
63
|
+
## Parameters
|
|
64
|
+
|
|
65
|
+
- **host**: Host name from "Available hosts" below
|
|
66
|
+
- **command**: Command to execute (see Command Reference above)
|
|
67
|
+
- **cwd**: Working directory (optional)
|
|
68
|
+
- **timeout**: Timeout in seconds (optional)
|
|
69
|
+
|
|
70
|
+
## Output
|
|
71
|
+
|
|
72
|
+
Truncated at 50KB. Exit codes captured.
|
|
73
|
+
|
|
74
|
+
**Before executing: verify host shell type below and use matching commands.**
|