@oh-my-pi/pi-coding-agent 10.2.0 → 10.2.2

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 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.0",
3
+ "version": "10.2.2",
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.0",
83
- "@oh-my-pi/pi-agent-core": "10.2.0",
84
- "@oh-my-pi/pi-ai": "10.2.0",
85
- "@oh-my-pi/pi-natives": "10.2.0",
86
- "@oh-my-pi/pi-tui": "10.2.0",
87
- "@oh-my-pi/pi-utils": "10.2.0",
82
+ "@oh-my-pi/omp-stats": "10.2.2",
83
+ "@oh-my-pi/pi-agent-core": "10.2.2",
84
+ "@oh-my-pi/pi-ai": "10.2.2",
85
+ "@oh-my-pi/pi-natives": "10.2.2",
86
+ "@oh-my-pi/pi-tui": "10.2.2",
87
+ "@oh-my-pi/pi-utils": "10.2.2",
88
88
  "@openai/agents": "^0.4.4",
89
89
  "@sinclair/typebox": "^0.34.48",
90
90
  "ajv": "^8.17.1",
@@ -4,7 +4,7 @@
4
4
  * Provides tools for debugging, bug report generation, and system diagnostics.
5
5
  */
6
6
  import * as fs from "node:fs/promises";
7
- import { getWorkProfile } from "@oh-my-pi/pi-natives/work";
7
+ import { getWorkProfile } from "@oh-my-pi/pi-natives";
8
8
  import { Container, Loader, type SelectItem, SelectList, Spacer, Text } from "@oh-my-pi/pi-tui";
9
9
  import { getSessionsDir } from "../config";
10
10
  import { DynamicBorder } from "../modes/components/dynamic-border";
@@ -6,7 +6,7 @@
6
6
  import * as fs from "node:fs/promises";
7
7
  import * as os from "node:os";
8
8
  import * as path from "node:path";
9
- import type { WorkProfile } from "@oh-my-pi/pi-natives/work";
9
+ import type { WorkProfile } from "@oh-my-pi/pi-natives";
10
10
  import { isEnoent } from "@oh-my-pi/pi-utils";
11
11
  import type { CpuProfile, HeapSnapshot } from "./profiler";
12
12
  import { collectSystemInfo, sanitizeEnv } from "./system-info";
@@ -515,18 +515,18 @@ export class InteractiveMode implements InteractiveModeContext {
515
515
  }
516
516
 
517
517
  private async applyPlanModeModel(): Promise<void> {
518
- const slowModel = this.session.resolveRoleModel("slow");
519
- if (!slowModel) return;
518
+ const planModel = this.session.resolveRoleModel("plan");
519
+ if (!planModel) return;
520
520
  const currentModel = this.session.model;
521
- if (currentModel && currentModel.provider === slowModel.provider && currentModel.id === slowModel.id) {
521
+ if (currentModel && currentModel.provider === planModel.provider && currentModel.id === planModel.id) {
522
522
  return;
523
523
  }
524
524
  this.planModePreviousModel = currentModel;
525
525
  try {
526
- await this.session.setModelTemporary(slowModel);
526
+ await this.session.setModelTemporary(planModel);
527
527
  } catch (error) {
528
528
  this.showWarning(
529
- `Failed to switch to slow model for plan mode: ${error instanceof Error ? error.message : String(error)}`,
529
+ `Failed to switch to plan model for plan mode: ${error instanceof Error ? error.message : String(error)}`,
530
530
  );
531
531
  }
532
532
  }
@@ -1,10 +1,9 @@
1
1
  /**
2
- * Bash command normalizer - strips patterns that are better handled natively.
2
+ * Bash command normalizer - extracts patterns that are better handled natively.
3
3
  *
4
- * Detects and removes:
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