diff --git a/README.md b/README.md index 143281056..644a5f579 100644 --- a/README.md +++ b/README.md @@ -341,20 +341,20 @@ Handles whitespace and indentation variance automatically: ## Packages -| Package | Description | -| ------------------------------------------------------ | ----------------------------------------------------------------------------- | +| Package | Description | +| ------------------------------------------------------ | -------------------------------------------------------------------------------------- | | **[@oh-my-pi/pi-ai](packages/ai)** | Multi-provider LLM client (Anthropic, OpenAI, Gemini, Bedrock, Cursor, Codex, Copilot) | -| **[@oh-my-pi/pi-agent-core](packages/agent)** | Agent runtime with tool calling and state management | -| **[@oh-my-pi/pi-coding-agent](packages/coding-agent)** | Interactive coding agent CLI | -| **[@oh-my-pi/pi-tui](packages/tui)** | Terminal UI library with differential rendering | -| **[@oh-my-pi/pi-natives](packages/natives)** | WASM bindings for native text, image, and grep operations | -| **[@oh-my-pi/omp-stats](packages/stats)** | Local observability dashboard for AI usage statistics | +| **[@oh-my-pi/pi-agent-core](packages/agent)** | Agent runtime with tool calling and state management | +| **[@oh-my-pi/pi-coding-agent](packages/coding-agent)** | Interactive coding agent CLI | +| **[@oh-my-pi/pi-tui](packages/tui)** | Terminal UI library with differential rendering | +| **[@oh-my-pi/pi-natives](packages/natives)** | WASM bindings for native text, image, and grep operations | +| **[@oh-my-pi/omp-stats](packages/stats)** | Local observability dashboard for AI usage statistics | ### Rust Crates -| Crate | Description | -| ---------------------------------- | -------------------------------------------------------- | -| **[pi-natives](crates/pi-natives)** | Rust WASM crate for performance-critical text/grep ops | +| Crate | Description | +| ----------------------------------- | --------------------------------------------- | +| **[pi-natives](crates/pi-natives)** | Rust N-API crate for performance-critical ops | --- diff --git a/packages/coding-agent/src/modes/components/tool-execution.ts b/packages/coding-agent/src/modes/components/tool-execution.ts index b53561d68..e35beab05 100644 --- a/packages/coding-agent/src/modes/components/tool-execution.ts +++ b/packages/coding-agent/src/modes/components/tool-execution.ts @@ -251,7 +251,7 @@ export class ToolExecutionComponent extends Container { if (img.mimeType === "image/png") continue; if (this.convertedImages.has(i)) continue; - // Convert async - catch errors from WASM processing + // Convert async - catch errors from processing const index = i; convertToPng(img.data, img.mimeType) .then(converted => { diff --git a/packages/coding-agent/src/task/executor.ts b/packages/coding-agent/src/task/executor.ts index 97a465319..2930f7e0e 100644 --- a/packages/coding-agent/src/task/executor.ts +++ b/packages/coding-agent/src/task/executor.ts @@ -1003,9 +1003,14 @@ export async function runSubprocess(options: ExecutorOptions): Promise 0) { exitCode = 0; stderr = ""; - } else { + } else if (exitCode === 0) { const warning = "SYSTEM WARNING: Subagent exited without calling submit_result tool after 3 reminders."; rawOutput = rawOutput ? `${warning}\n\n${rawOutput}` : warning; } diff --git a/packages/coding-agent/src/tools/fetch.ts b/packages/coding-agent/src/tools/fetch.ts index 95c53f417..0e094f7d8 100644 --- a/packages/coding-agent/src/tools/fetch.ts +++ b/packages/coding-agent/src/tools/fetch.ts @@ -385,7 +385,7 @@ function parseFeedToMarkdown(content: string, maxItems = 10): string { } /** - * Render HTML to markdown using native WASM, jina, trafilatura, lynx, or html-to-markdown (in order of preference) + * Render HTML to markdown using native, jina, trafilatura, lynx (in order of preference) */ async function renderHtmlToText( url: string, @@ -438,7 +438,7 @@ async function renderHtmlToText( } } - // Fall back to native WASM converter (fastest, no network/subprocess) + // Fall back to native converter (fastest, no network/subprocess) try { const content = await htmlToMarkdown(html, { cleanContent: true }); if (content.trim().length > 100 && !isLowQualityOutput(content)) { diff --git a/packages/coding-agent/src/tools/grep.ts b/packages/coding-agent/src/tools/grep.ts index ba0aed948..db93f0242 100644 --- a/packages/coding-agent/src/tools/grep.ts +++ b/packages/coding-agent/src/tools/grep.ts @@ -1,7 +1,7 @@ import * as nodePath from "node:path"; import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core"; -import { grep as wasmGrep } from "@oh-my-pi/pi-natives"; +import { grep } from "@oh-my-pi/pi-natives"; import type { Component } from "@oh-my-pi/pi-tui"; import { Text } from "@oh-my-pi/pi-tui"; import { untilAborted } from "@oh-my-pi/pi-utils"; @@ -124,10 +124,10 @@ export class GrepTool implements AgentTool { const effectiveOutputMode = "content"; const effectiveLimit = normalizedLimit ?? DEFAULT_MATCH_LIMIT; - // Run WASM grep - let result: Awaited>; + // Run grep + let result: Awaited>; try { - result = await wasmGrep({ + result = await grep({ pattern: normalizedPattern, path: searchPath, glob: glob?.trim() || undefined, @@ -150,7 +150,7 @@ export class GrepTool implements AgentTool { } const formatPath = (filePath: string): string => { - // WASM returns paths starting with / (the virtual root) + // returns paths starting with / (the virtual root) const cleanPath = filePath.startsWith("/") ? filePath.slice(1) : filePath; if (isDirectory) { return cleanPath.replace(/\\/g, "/"); diff --git a/packages/coding-agent/src/tools/read.ts b/packages/coding-agent/src/tools/read.ts index 71db6ec5e..2cc1c8875 100644 --- a/packages/coding-agent/src/tools/read.ts +++ b/packages/coding-agent/src/tools/read.ts @@ -636,7 +636,7 @@ export class ReadTool implements AgentTool { const base64 = Buffer.from(buffer).toString("base64"); if (this.autoResizeImages) { - // Resize image if needed - catch errors from WASM + // Resize image if needed - catch errors from Photon try { const resized = await resizeImage({ type: "image", data: base64, mimeType }); const dimensionNote = formatDimensionNote(resized); diff --git a/packages/coding-agent/src/utils/image-resize.ts b/packages/coding-agent/src/utils/image-resize.ts index aff3c0c29..19272164e 100644 --- a/packages/coding-agent/src/utils/image-resize.ts +++ b/packages/coding-agent/src/utils/image-resize.ts @@ -40,7 +40,7 @@ function pickSmaller( * Resize an image to fit within the specified max dimensions and file size. * Returns the original image if it already fits within the limits. * - * Uses Photon (Rust/WASM) for image processing. If Photon is not available, + * Uses Photon for image processing. If Photon is not available, * returns the original image unchanged. * * Strategy for staying under maxBytes: diff --git a/packages/natives/CHANGELOG.md b/packages/natives/CHANGELOG.md index f36fa80d4..c81efb91d 100644 --- a/packages/natives/CHANGELOG.md +++ b/packages/natives/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## [Unreleased] +### Removed + +- Removed legacy type aliases `WasmMatch` and `WasmSearchResult` ## [10.6.0] - 2026-02-04 diff --git a/packages/natives/src/grep/types.ts b/packages/natives/src/grep/types.ts index e187340e8..e1f5a70d3 100644 --- a/packages/natives/src/grep/types.ts +++ b/packages/natives/src/grep/types.ts @@ -130,11 +130,6 @@ export interface SearchResult { error?: string; } -/** Legacy alias for WASM match output. */ -export type WasmMatch = SearchMatch; -/** Legacy alias for WASM search output. */ -export type WasmSearchResult = SearchResult; - /** Options for fuzzy file path search. */ export interface FuzzyFindOptions extends Cancellable { /** Substring query to match against file paths (case-insensitive). */ diff --git a/types/assets/index.d.ts b/types/assets/index.d.ts index d815b4c1b..5ed830d6b 100644 --- a/types/assets/index.d.ts +++ b/types/assets/index.d.ts @@ -12,8 +12,3 @@ declare module "*.py" { const content: string; export default content; } - -declare module "*.wasm?raw" { - const content: string; - export default content; -}