@oh-my-pi/pi-coding-agent 10.2.0 → 10.2.1
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 +6 -0
- package/package.json +7 -7
- package/src/tools/bash-normalize.ts +2 -21
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [10.2.1] - 2026-02-02
|
|
6
|
+
### Breaking Changes
|
|
7
|
+
|
|
8
|
+
- Removed `strippedRedirect` field from `NormalizedCommand` interface returned by `normalizeBashCommand()`
|
|
9
|
+
- Removed automatic stripping of `2>&1` stderr redirections from bash command normalization
|
|
10
|
+
|
|
5
11
|
## [10.1.0] - 2026-02-01
|
|
6
12
|
### Added
|
|
7
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"ompConfig": {
|
|
@@ -79,12 +79,12 @@
|
|
|
79
79
|
"test": "bun test"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@oh-my-pi/omp-stats": "10.2.
|
|
83
|
-
"@oh-my-pi/pi-agent-core": "10.2.
|
|
84
|
-
"@oh-my-pi/pi-ai": "10.2.
|
|
85
|
-
"@oh-my-pi/pi-natives": "10.2.
|
|
86
|
-
"@oh-my-pi/pi-tui": "10.2.
|
|
87
|
-
"@oh-my-pi/pi-utils": "10.2.
|
|
82
|
+
"@oh-my-pi/omp-stats": "10.2.1",
|
|
83
|
+
"@oh-my-pi/pi-agent-core": "10.2.1",
|
|
84
|
+
"@oh-my-pi/pi-ai": "10.2.1",
|
|
85
|
+
"@oh-my-pi/pi-natives": "10.2.1",
|
|
86
|
+
"@oh-my-pi/pi-tui": "10.2.1",
|
|
87
|
+
"@oh-my-pi/pi-utils": "10.2.1",
|
|
88
88
|
"@openai/agents": "^0.4.4",
|
|
89
89
|
"@sinclair/typebox": "^0.34.48",
|
|
90
90
|
"ajv": "^8.17.1",
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Bash command normalizer -
|
|
2
|
+
* Bash command normalizer - extracts patterns that are better handled natively.
|
|
3
3
|
*
|
|
4
|
-
* Detects and
|
|
4
|
+
* Detects and extracts:
|
|
5
5
|
* - `| head -n N` / `| head -N` - extracted to headLines
|
|
6
6
|
* - `| tail -n N` / `| tail -N` - extracted to tailLines
|
|
7
|
-
* - `2>&1` - redundant since we merge stdout/stderr
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
export interface NormalizedCommand {
|
|
@@ -14,8 +13,6 @@ export interface NormalizedCommand {
|
|
|
14
13
|
headLines?: number;
|
|
15
14
|
/** Extracted tail line count, if any */
|
|
16
15
|
tailLines?: number;
|
|
17
|
-
/** Whether 2>&1 was stripped */
|
|
18
|
-
strippedRedirect: boolean;
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
/**
|
|
@@ -32,14 +29,6 @@ export interface NormalizedCommand {
|
|
|
32
29
|
*/
|
|
33
30
|
const TRAILING_HEAD_TAIL_PATTERN = /\|\s*(head|tail)\s+(?:-n\s*(\d+)|(-\d+))\s*$/;
|
|
34
31
|
|
|
35
|
-
/**
|
|
36
|
-
* Pattern to match 2>&1 redirection.
|
|
37
|
-
* Common variations:
|
|
38
|
-
* - `2>&1`
|
|
39
|
-
* - `2>&1 |` (before a pipe)
|
|
40
|
-
*/
|
|
41
|
-
const STDERR_REDIRECT_PATTERN = /\s*2>&1\s*/g;
|
|
42
|
-
|
|
43
32
|
/**
|
|
44
33
|
* Normalize a bash command by stripping patterns better handled natively.
|
|
45
34
|
*
|
|
@@ -52,13 +41,6 @@ export function normalizeBashCommand(command: string): NormalizedCommand {
|
|
|
52
41
|
let normalized = command;
|
|
53
42
|
let headLines: number | undefined;
|
|
54
43
|
let tailLines: number | undefined;
|
|
55
|
-
let strippedRedirect = false;
|
|
56
|
-
|
|
57
|
-
// Strip 2>&1 patterns (we merge streams already)
|
|
58
|
-
if (STDERR_REDIRECT_PATTERN.test(normalized)) {
|
|
59
|
-
normalized = normalized.replace(STDERR_REDIRECT_PATTERN, " ");
|
|
60
|
-
strippedRedirect = true;
|
|
61
|
-
}
|
|
62
44
|
|
|
63
45
|
// Extract trailing head/tail
|
|
64
46
|
const match = normalized.match(TRAILING_HEAD_TAIL_PATTERN);
|
|
@@ -82,7 +64,6 @@ export function normalizeBashCommand(command: string): NormalizedCommand {
|
|
|
82
64
|
command: normalized,
|
|
83
65
|
headLines,
|
|
84
66
|
tailLines,
|
|
85
|
-
strippedRedirect,
|
|
86
67
|
};
|
|
87
68
|
}
|
|
88
69
|
|