@oh-my-pi/pi-coding-agent 13.3.3 → 13.3.4
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "13.3.
|
|
4
|
+
"version": "13.3.4",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/can1357/oh-my-pi",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@mozilla/readability": "^0.6",
|
|
44
|
-
"@oh-my-pi/omp-stats": "13.3.
|
|
45
|
-
"@oh-my-pi/pi-agent-core": "13.3.
|
|
46
|
-
"@oh-my-pi/pi-ai": "13.3.
|
|
47
|
-
"@oh-my-pi/pi-natives": "13.3.
|
|
48
|
-
"@oh-my-pi/pi-tui": "13.3.
|
|
49
|
-
"@oh-my-pi/pi-utils": "13.3.
|
|
44
|
+
"@oh-my-pi/omp-stats": "13.3.4",
|
|
45
|
+
"@oh-my-pi/pi-agent-core": "13.3.4",
|
|
46
|
+
"@oh-my-pi/pi-ai": "13.3.4",
|
|
47
|
+
"@oh-my-pi/pi-natives": "13.3.4",
|
|
48
|
+
"@oh-my-pi/pi-tui": "13.3.4",
|
|
49
|
+
"@oh-my-pi/pi-utils": "13.3.4",
|
|
50
50
|
"@sinclair/typebox": "^0.34",
|
|
51
51
|
"@xterm/headless": "^6.0",
|
|
52
52
|
"ajv": "^8.18",
|
|
@@ -22,7 +22,20 @@ Returns the output, and an exit code from command execution.
|
|
|
22
22
|
</output>
|
|
23
23
|
|
|
24
24
|
<critical>
|
|
25
|
+
You **MUST** use specialized tools instead of bash for ALL file operations:
|
|
26
|
+
|
|
27
|
+
|Instead of (WRONG)|Use (CORRECT)|
|
|
28
|
+
|---|---|
|
|
29
|
+
|`cat file`, `head -n N file`|`read(path="file", limit=N)`|
|
|
30
|
+
|`cat -n file \|sed -n '50,150p'`|`read(path="file", offset=50, limit=100)`|
|
|
31
|
+
|`grep -A 20 'pat' file`|`grep(pattern="pat", path="file", post=20)`|
|
|
32
|
+
|`grep -rn 'pat' dir/`|`grep(pattern="pat", path="dir/")`|
|
|
33
|
+
|`rg 'pattern' dir/`|`grep(pattern="pattern", path="dir/")`|
|
|
34
|
+
|`find dir -name '*.ts'`|`find(pattern="dir/**/*.ts")`|
|
|
35
|
+
|`ls dir/`|`read(path="dir/")`|
|
|
36
|
+
|`cat <<'EOF' > file`|`write(path="file", content="...")`|
|
|
37
|
+
|`sed -i 's/old/new/' file`|`edit(path="file", edits=[...])`|
|
|
25
38
|
- You **MUST NOT** use Bash for these operations like read, grep, find, edit, write, where specialized tools exist.
|
|
26
|
-
- You **MUST NOT** use `2>&1` pattern, stdout and stderr are already merged.
|
|
39
|
+
- You **MUST NOT** use `2>&1` | `2>/dev/null` pattern, stdout and stderr are already merged.
|
|
27
40
|
- You **MUST NOT** use `| head -n 50` or `| tail -n 100` pattern, use `head` and `tail` parameters instead.
|
|
28
41
|
</critical>
|
|
@@ -18,4 +18,11 @@ Reads files from local filesystem or internal URLs.
|
|
|
18
18
|
<output>
|
|
19
19
|
- Returns file content as text; images return visual content; PDFs return extracted text
|
|
20
20
|
- Missing files: returns closest filename matches for correction
|
|
21
|
-
</output>
|
|
21
|
+
</output>
|
|
22
|
+
|
|
23
|
+
<critical>
|
|
24
|
+
- You **MUST** use `read` instead of bash for ALL file reading: `cat`, `head`, `tail`, `less`, `more` are FORBIDDEN.
|
|
25
|
+
- You **MUST** use `read(path="dir/")` instead of `ls dir/` for directory listings.
|
|
26
|
+
- You **MUST** always include the `path` parameter — NEVER call `read` with empty arguments `{}`.
|
|
27
|
+
- When reading specific line ranges, use `offset` and `limit`: `read(path="file", offset=50, limit=100)` not `cat -n file | sed`.
|
|
28
|
+
</critical>
|
|
@@ -92,12 +92,12 @@ function buildCommonArgs(host: SSHConnectionTarget): string[] {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
async function runSshSync(args: string[]): Promise<{ exitCode: number | null; stderr: string }> {
|
|
95
|
-
const result = await $`ssh ${args}`.nothrow();
|
|
95
|
+
const result = await $`ssh ${args}`.quiet().nothrow();
|
|
96
96
|
return { exitCode: result.exitCode, stderr: result.stderr.toString().trim() };
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
async function runSshCaptureSync(args: string[]): Promise<{ exitCode: number | null; stdout: string; stderr: string }> {
|
|
100
|
-
const result = await $`ssh ${args}`.nothrow();
|
|
100
|
+
const result = await $`ssh ${args}`.quiet().nothrow();
|
|
101
101
|
return {
|
|
102
102
|
exitCode: result.exitCode,
|
|
103
103
|
stdout: result.stdout.toString().trim(),
|
package/src/ssh/ssh-executor.ts
CHANGED