16 Commits

Author SHA1 Message Date
can1357 edc0caeb0f feat(builtins): sweep of GNU/BSD compat fixes + str performance opts
Addresses a broad audit of built-in shell utilities against their real counterparts: timeout gains signal delivery, -s/-k/--preserve-status/--foreground/-v, and GNU exit codes; diff defaults to normal format and gains -w/-b/-B/-i/-c/-x/-L/-s/--strip-trailing-cr and proper -r gating; find fixes -newerXY timestamp comparison direction, anchors -regex to whole paths, and gains BSD -perm +mode, -type lists, -size T/P suffixes, -E/-x/-s flags; date gains BSD -r epoch, -v adjustments, -j -f strptime, and non-greedy -I; tail/head accept obsolete -N/+N at any position with any file count; rg resolves case flags by last occurrence and gains --path-separator and clean -0 output; stat prints integer epochs for %X/%Y/%Z and gains BSD -s/-x/-t; cksum is registered as a builtin; truncate implements -o/--io-blocks and b/= size suffixes; sleep/timeout accept infinity; yes/errno/kill accept hyphen-prefixed operands; nohup -- cmd no longer runs --; which gains BSD -s.
2026-08-20 02:33:10 +02:00
can1357 bc39ffa265 feat: introduced omptype validation package and migrated workspace dependencies
- Introduce `@oh-my-pi/omptype` as a new ArkType-compatible schema validation package featuring a lazy JIT runtime, JSON Schema emission, and compatibility adapters.
- Replace `arktype` across workspace packages and test utilities with `@oh-my-pi/omptype`.
- Add benchmark suites, tests, and documentation for the new validation engine and adapters.
- Update workspace build, test runner, and release configurations to include the new package.
2026-08-03 21:56:48 +02:00
can1357 52ad6516ef feat(diff): implemented native UTF-16 diff processing and removed jsdiff
- Implemented native UTF-16 text processing in Rust diff module with support for unpaired surrogates.
- Removed `similar` crate from Rust workspace and `diff` npm package from coding-agent, hashline, and natives.
- Removed jsdiff fallback wrappers and `isWellFormed()` guards from TypeScript diff implementations.
- Added comprehensive test suite for native diff functions covering random inputs and edge cases including surrogates and emoji.
- Renamed model `codex-auto-review` to `gpt-5.3-codex-spark` with updated pricing and context window.
2026-07-23 01:35:31 +02:00
Wolfgang Schoenberger b1653f51eb test(natives): refresh diff bench evidence on an idle host with guard-inclusive timings 2026-07-22 05:30:52 -07:00
Wolfgang Schoenberger 973bad0c61 test(natives): include production isWellFormed guards in native diff timings 2026-07-22 05:09:09 -07:00
Wolfgang Schoenberger 85b44bb0e4 test(natives): refresh diff bench results at final revision 2026-07-22 03:13:29 -07:00
Wolfgang Schoenberger c1495d9ff2 test(natives): make diff bench iterations and scenario ceiling tunable 2026-07-22 02:30:33 -07:00
Wolfgang Schoenberger 178dd214b7 perf(natives): add crossing-inclusive diff benchmark 2026-07-22 01:55:56 -07:00
can1357 78bc44a5ac feat(pi-natives): removed filesystem cache and implement sequential fallback for streaming grep
- Removed the `cache` option from `GrepOptions` and eliminated the internal directory cache path.
- Implemented `run_sequential_grep` as a single-threaded fallback when too many concurrent streaming searches are active.
- Restricted concurrent grep workers under heavy resource contention using a global `ACTIVE_STREAMING_GREPS` atomic counter.
- Cleaned up obsolete benchmark scenarios, typescript type definitions, and reference tests for cached grep searches.
- Removed the `cache` option from `GrepOptions` and internal caching mechanisms in `grep_sync`.
2026-06-18 02:29:39 +02:00
can1357 cc13fd3dce feat: added ScanDetail modes for fd, glob, and ast scans
- Added configurable `ScanDetail` modes across native fd/glob/ast flows and exposed `size` on `GlobMatch`/types.
- Added parallel grep processing with optional workers, buffered entry visits, and direct small-file reads.
- Changed `filesWithMatches` to stop at first match per file and report `totalMatches` as matching-file count.
- Fixed grep count/offset limits, timeout checks, and cancel handling by enforcing offsets in aggregate results.
- Updated PI_GREP_WORKERS and auto-absorb/read-summarize behavior/docs, including `read.summarize.prose` and pure-insert defaults.
- Added tests for filesWithMatches counts, cancel cases, and count-mode behavior, plus updated grep benchmark imports.
2026-05-06 17:00:45 +02:00
can1357 3260dcd829 refactor(pi-natives): reworked fs cache APIs to use ScanOptions
- Added `ScanOptions` to `fs_cache` and replaced separate scan booleans with a shared struct for cache keys and scan entry points.
- Updated ast, fd, glob, and grep call sites to construct and pass `scan_options` through `get_or_scan` and `force_rescan`.
- Adjusted fs_cache tests to pass explicit `ScanOptions` instances with the new API.
2026-04-13 21:27:38 +02:00
can1357 17d596ab44 feat: fff
- Added SearchDb class for stateful shared search database instances enabling persistent file indexing and frecency tracking across grep, glob, and fuzzyFind operations.
- Added optional db parameter to grep(), glob(), and fuzzyFind() functions for database-backed searching with improved performance via cached file indices.
- Replaced grep-searcher with fff-grep and added fff-search dependency for enhanced file discovery and search capabilities with memory-mapped file support.
- Migrated fuzzy file discovery from fd module to fff module with SearchDb integration for stateful caching and improved search performance.
- Exported SearchDb type from @oh-my-pi/pi-natives public API for type-safe usage in grep, glob, and fuzzyFind workflows.
2026-03-27 11:28:49 +01:00
can1357 a5d9bbb4ca chore(coding-agent): migrated console logging to structured logger and updated import styles
- Migrated console.error() calls to structured logger.warn() and logger.error() throughout codebase.
- Updated os.tmpdir() import style in browser tool from destructured to namespace import.
2026-02-10 11:26:42 +01:00
can1357 37c74bb19d perf: migrated timing measurements to Bun.nanoseconds() for higher precision
- Migrated timing measurements from `performance.now()` to `Bun.nanoseconds()` for higher precision benchmarking across all benchmark and timing-sensitive code.
- Updated elapsed time calculations to convert nanoseconds to milliseconds using division by 1e6 to maintain consistent time units.
- Increased benchmark precision from 4 to 6 decimal places for per-operation timing measurements.
- Refactored grep benchmark to use averaged timing values instead of storing individual iteration times, reducing memory overhead.
2026-02-05 06:19:49 +01:00
can1357 a1bd76e42c refactor(natives/bench): removed worker pool benchmarking code from grep benchmark suite
- Removed worker pool benchmarking code from grep benchmark suite.
- Simplified benchmark to focus on main thread and subprocess comparisons.
2026-02-01 05:54:23 +01:00
can1357 978b93ba62 refactor: migrated native tools to WASM-based implementation
- Consolidated grep, find, and image processing into a new `@oh-my-pi/pi-natives` WASM package.
- Eliminated subprocess overhead and simplified JS tool implementations.
- Updated CI to include Rust workspace, linting, formatting, and WASM build steps.
- Documented `Promise.withResolvers()` and `using` declarations for wasm-bindgen.
2026-01-29 09:29:21 +01:00