diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb527c008..d7ce1c1ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: sudo apt-get install -y gcc-aarch64-linux-gnu - name: Build native addon env: - CARGO_BUILD_TARGET: ${{ matrix.target }} + CROSS_TARGET: ${{ matrix.target }} TARGET_PLATFORM: ${{ matrix.platform }} TARGET_ARCH: ${{ matrix.arch }} CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc diff --git a/Cargo.lock b/Cargo.lock index 6831d7d2a..7ea6abb14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,19 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.4" @@ -250,6 +263,18 @@ dependencies = [ "new_debug_unreachable", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + [[package]] name = "gif" version = "0.14.1" @@ -332,10 +357,11 @@ dependencies = [ [[package]] name = "html-to-markdown-rs" -version = "2.24.3" +version = "2.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e190e3bcf14728f08547b10ba3afdae24c84299045e0831bb9ee1e199d54ad" +checksum = "4c31524fe00816ec55538e9049c5015691b6d8451dd99fadcee81b49dca0550a" dependencies = [ + "ahash", "astral-tl", "base64", "html-escape", @@ -648,7 +674,7 @@ dependencies = [ [[package]] name = "pi-natives" -version = "9.5.1" +version = "9.6.0" dependencies = [ "globset", "grep-matcher", @@ -724,6 +750,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "rayon" version = "1.11.0" @@ -973,6 +1005,12 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091" +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "walkdir" version = "2.5.0" @@ -983,6 +1021,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "web_atoms" version = "0.2.3" @@ -1025,6 +1072,12 @@ dependencies = [ "windows-link", ] +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + [[package]] name = "xml5ever" version = "0.36.1" @@ -1035,6 +1088,26 @@ dependencies = [ "markup5ever", ] +[[package]] +name = "zerocopy" +version = "0.8.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7456cf00f0685ad319c5b1693f291a650eaf345e941d082fc4e03df8a03996ac" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1328722bbf2115db7e19d69ebcc15e795719e2d66b60827c6a69a117365e37a0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zune-core" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index acddc524e..4806d319c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "3" [workspace.package] -version = "9.5.1" +version = "9.6.0" edition = "2024" license = "MIT" authors = ["Can Boluk"] diff --git a/bun.lock b/bun.lock index 974d6c3b9..0f18ed1ac 100644 --- a/bun.lock +++ b/bun.lock @@ -22,7 +22,7 @@ }, "packages/agent": { "name": "@oh-my-pi/pi-agent-core", - "version": "9.5.1", + "version": "9.6.0", "dependencies": { "@oh-my-pi/pi-ai": "workspace:*", "@oh-my-pi/pi-tui": "workspace:*", @@ -35,7 +35,7 @@ }, "packages/ai": { "name": "@oh-my-pi/pi-ai", - "version": "9.5.1", + "version": "9.6.0", "bin": { "pi-ai": "./src/cli.ts", }, @@ -65,7 +65,7 @@ }, "packages/coding-agent": { "name": "@oh-my-pi/pi-coding-agent", - "version": "9.5.1", + "version": "9.6.0", "bin": { "omp": "src/cli.ts", }, @@ -100,7 +100,7 @@ }, "packages/natives": { "name": "@oh-my-pi/pi-natives", - "version": "9.5.1", + "version": "9.6.0", "dependencies": { "@oh-my-pi/pi-utils": "workspace:*", }, @@ -128,7 +128,7 @@ }, "packages/stats": { "name": "@oh-my-pi/omp-stats", - "version": "9.5.1", + "version": "9.6.0", "bin": { "omp-stats": "./src/index.ts", }, @@ -148,7 +148,7 @@ }, "packages/tui": { "name": "@oh-my-pi/pi-tui", - "version": "9.5.1", + "version": "9.6.0", "dependencies": { "@oh-my-pi/pi-natives": "workspace:*", "@types/mime-types": "^3.0.1", @@ -163,7 +163,7 @@ }, "packages/utils": { "name": "@oh-my-pi/pi-utils", - "version": "9.5.1", + "version": "9.6.0", "dependencies": { "winston": "^3.19.0", "winston-daily-rotate-file": "^5.0.0", diff --git a/packages/agent/package.json b/packages/agent/package.json index ed8644670..24a47e912 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-agent-core", - "version": "9.5.1", + "version": "9.6.0", "description": "General-purpose agent with transport abstraction, state management, and attachment support", "type": "module", "main": "./src/index.ts", diff --git a/packages/ai/package.json b/packages/ai/package.json index f3047935f..0729e3900 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-ai", - "version": "9.5.1", + "version": "9.6.0", "description": "Unified LLM API with automatic model discovery and provider configuration", "type": "module", "main": "./src/index.ts", diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 58c1a7928..ec46bef6b 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog ## [Unreleased] +### Fixed + +- Fixed bash command normalization to preserve newlines in heredocs and multiline commands + +## [9.6.0] - 2026-02-01 ### Breaking Changes - Replaced `SettingsManager` class with new `Settings` singleton providing sync get/set API with background persistence diff --git a/packages/coding-agent/package.json b/packages/coding-agent/package.json index 1f17daf39..fc6539cae 100644 --- a/packages/coding-agent/package.json +++ b/packages/coding-agent/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-coding-agent", - "version": "9.5.1", + "version": "9.6.0", "description": "Coding agent CLI with read, bash, edit, write tools and session management", "type": "module", "ompConfig": { diff --git a/packages/coding-agent/src/tools/bash-normalize.ts b/packages/coding-agent/src/tools/bash-normalize.ts index 7d730cd4f..2a082c5c0 100644 --- a/packages/coding-agent/src/tools/bash-normalize.ts +++ b/packages/coding-agent/src/tools/bash-normalize.ts @@ -75,8 +75,8 @@ export function normalizeBashCommand(command: string): NormalizedCommand { normalized = normalized.slice(0, -fullMatch.length); } - // Clean up multiple spaces - normalized = normalized.replace(/\s{2,}/g, " ").trim(); + // Clean up multiple horizontal spaces (preserve newlines for heredocs/multiline) + normalized = normalized.replace(/[ \t]{2,}/g, " ").trim(); return { command: normalized, diff --git a/packages/natives/CHANGELOG.md b/packages/natives/CHANGELOG.md index 38e8a339b..3d4a5f136 100644 --- a/packages/natives/CHANGELOG.md +++ b/packages/natives/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] + +## [9.6.0] - 2026-02-01 ### Added - Support for cross-compilation via `CARGO_BUILD_TARGET` environment variable diff --git a/packages/natives/package.json b/packages/natives/package.json index c83197b13..a0a6a99c3 100644 --- a/packages/natives/package.json +++ b/packages/natives/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-natives", - "version": "9.5.1", + "version": "9.6.0", "description": "Native Rust functionality via N-API", "type": "module", "main": "./src/index.ts", diff --git a/packages/natives/scripts/build-native.ts b/packages/natives/scripts/build-native.ts index 147541edc..cbfe7bda0 100644 --- a/packages/natives/scripts/build-native.ts +++ b/packages/natives/scripts/build-native.ts @@ -4,7 +4,7 @@ import * as path from "node:path"; const repoRoot = path.join(import.meta.dir, "../../.."); const rustDir = path.join(repoRoot, "crates/pi-natives"); -const cargoTarget = process.env.CARGO_BUILD_TARGET; +const cargoTarget = process.env.CROSS_TARGET || undefined; const targetRoots = [ process.env.CARGO_TARGET_DIR ? path.resolve(process.env.CARGO_TARGET_DIR) : undefined, path.join(repoRoot, "target"), diff --git a/packages/stats/package.json b/packages/stats/package.json index 71e592ddf..d4ef68dee 100644 --- a/packages/stats/package.json +++ b/packages/stats/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/omp-stats", - "version": "9.5.1", + "version": "9.6.0", "description": "Local observability dashboard for pi AI usage statistics", "type": "module", "main": "./src/index.ts", diff --git a/packages/tui/package.json b/packages/tui/package.json index 789de1296..5ce737591 100644 --- a/packages/tui/package.json +++ b/packages/tui/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-tui", - "version": "9.5.1", + "version": "9.6.0", "description": "Terminal User Interface library with differential rendering for efficient text-based applications", "type": "module", "main": "./src/index.ts", diff --git a/packages/utils/package.json b/packages/utils/package.json index 26484557d..127f0a4db 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@oh-my-pi/pi-utils", - "version": "9.5.1", + "version": "9.6.0", "description": "Shared utilities for pi packages", "type": "module", "main": "./src/index.ts",