- Added an `fd` command-line utility for searching the filesystem.
- Implemented file filtering capabilities for type, size, modification time, and ownership.
- Integrated directory traversal and ignore-pattern support for search optimization.
- Registered the builtin in the shell and added comprehensive integration tests for filtering and globbing.
- Implemented `rg` shell builtin using ripgrep libraries to enable file and directory searching.
- Added `RgSink` to handle output formatting, context, and vimgrep compatibility.
- Updated shell context and IO flags to support stdin as search input.
- Added integration tests for directory recursion, ignore filtering, and stdin handling.
- Added tree-sitter markdown support to resolve headings into full sections in `pi-ast`.
- Enabled block operations (`SWAP.BLK`, `DEL.BLK`, `INS.BLK.POST`) on markdown headings so they encompass the entire section, including nested deeper headings.
- Updated system prompt to guide agents in using structured markdown heading edits for plans.
- Fixed `plan-mode-guard` to correctly resolve local protocol options for subagents.
- Added support for `--quiet` (`-q`) and `--line-regexp` (`-x`) to the `grep` builtin.
- Enabled short-circuiting behavior for `-q` to suppress output and return early on the first match.
- Configured exit status logic to prioritize successful matches over error states when using `-q`.
- Added integration tests to verify correct exit status codes and line anchoring behavior.
- Ensure `-exec` commands run in the shell current working directory rather than the host process CWD.
- Update operand path resolution in `find` matchers to use the display path, matching behavior expected by shell-integrated utilities.
- Add an integration test to verify path substitution and execution context for shell-integrated `find`.
- Introduced `pi-uutils-ctx` to manage thread-local I/O redirection, environment context, and path resolution for in-process utilities.
- Integrated a suite of vendored coreutils (cat, find, grep, head, ls, mkdir, mv, rm, sort, tail, uniq, wc) as shell builtins.
- Added infrastructure for command cancellation, streaming I/O, and locale-aware error reporting within the shell environment.
- Configured shell-side dispatch logic to route commands through the new utility context, enhancing performance and binary integration.
Replace the compile-time cfg!(target_os = "macos") jamo-width heuristic
with a runtime override (process-global AtomicU8 in pi-natives, mirrored in
the TS width engine) plus terminal-identity detection: Ghostty renders
Hangul Compatibility Jamo (U+3131..U+318E) at 2 cells, so it is forced wide;
every other terminal keeps the platform default (macOS narrow, otherwise
UAX#11), making the override a no-op outside Ghostty.
Fixes doubled/ghosted jamo during Korean IME composition on Ghostty, where
the hardware cursor landed inside the typed text and the IME candidate window
drifted from the glyph. The width is resolved synchronously before the first
paint, so no stdin/CPR probe or async cache invalidation is needed.
A runtime DSR/CPR probe that auto-detects the width on unknown terminals is
tracked in a follow-up.
- Introduce `detach_reparent` parameter to command execution to support process reparenting.
- Add `detach_session_reparent` to Unix command extensions using a double-fork technique to orphan processes from the shell descendant tree.
- Update background pipeline logic to automatically apply reparenting when unwrapping transparent wrappers like `nohup`.
- Remove unused `command_is_resolvable` helper.
- Added `Shell.liveBackgroundJobCount` to query active background processes.
- Retained per-call `:async:` shells if background jobs are still running upon turn completion.
- Reaped shells automatically once their last background process exits to prevent lingering processes.
- Enabled Julia language support by adding a sub-syntax definition file.
- Integrated the new syntax into the highlighter by updating the syntax set builder.
- Configured the dependency to support YAML syntax loading via syntect feature flags.
- Updated `render`, `renderMany`, and native snapcompact methods to return promises, ensuring scalable async execution.
- Refactored `transformProviderContext` and `buildSideRequestContext` to support asynchronous operations in agent loops.
- Integrated `Promise.all` for improved concurrency when processing frame rendering and rendering batch operations.
- Updated all internal call sites, SDK hooks, and test suites to accommodate the asynchronous API signatures.
The parallel streaming walker accumulated match_count toward the
first-page stop budget, but match_count can exceed the matches actually
returned (collected) by one whenever a file overflows its per-file cap.
With the production config (max_count=2000, max_count_per_file=21) that
over-count could quit the walk a few percent short of the requested
page. Budget on collected instead, matching run_sequential_grep and
aggregate_parallel_results.
Carried the streaming-grep match budget into the parallel visitor via a shared atomic counter so production callers (`maxCount: INTERNAL_TOTAL_CAP`) early-stop the walker instead of scanning the rest of the tree. Kept the sequential ordered path for small budgets where strict path ordering matters; the parallel path tolerates up to one extra file per worker in the tail, far better than walking the entire tree.\n\nFixes #2738
Merged main into the PR branch and preserved the ordered small-budget grep cutoff on top of main's searched-file accounting and active-streaming worker fallback.\n\nFixes #2738
Limited the ordered streaming grep early-stop path to small first-page budgets so broad content searches keep the parallel walker. Added coverage that large budgets do not take the serial early-stop route.\n\nFixes #2738
The pi-natives test module had 8 warnings on Windows. Root cause: test
helpers (TempDirGuard, write_file, make_fifo, base_grep_config) and their
imports are only used by #[cfg(unix)] tests, so they appear as dead code
when compiled on Windows where those tests are excluded.
Fix: gate all unix-only test helpers, their imports, and the super::
imports they reference (classify_file_type, GrepConfig, GrepOutputMode,
grep_sync, crate::task, mpsc) with #[cfg(unix)] so they are excluded
from Windows compilation entirely. On Linux (CI), all helpers compile
and are used by the unix test suite.
Also removed genuinely unused import: Duration (from grep.rs test module
only — Duration in shell.rs is used by a non-cfg-gated test).
Verified: 0 warnings, 105 tests pass on Windows. Unix tests retain all
their helpers and imports.
Gate platform-specific XDG functions (APP_NAME, xdg_state_logs,
default_agent_dir) and their tests with #[cfg(any(target_os = "linux",
target_os = "macos"))] so they are not flagged as dead code on Windows.
Suppress the false-positive missing_const_for_fn lint on Process::group_id
(#[napi] generates a non-const wrapper).
These 4 clippy warnings broke bun check (check:rs) and the CI
native_linux_x64 baseline job on every PR.