Commit Graph

118 Commits

Author SHA1 Message Date
can1357 af07faec11 feat: Bun 1.3.14
- Raised the Bun minimum version to >=1.3.14 across package metadata, install scripts, and changelog notes.
- Removed the Photon native image pipeline and added SIXEL-based `sixel` support in pi-natives.
- Migrated coding-agent image handling and resizing to `Bun.Image`, including updated tests and a JPEG quality bump to 80.
- Added HTTP/2 fetch bootstrap with HTTPS-only fallback and updated Bun build flags for autoload suppression/`--keep-names`.
2026-05-13 13:21:59 +02:00
can1357 9828764cb4 feat(scripts-session-stats): added session-stats search relevance plotting
- Changed multi-file search paging to skip whole files and page results in file windows.
- Added per-file match caps, round-robin file selection, and new file-limit truncation reporting.
- Replaced match/result limit metadata with fileLimitReached and perFileLimitReached.
- Lowered read.defaultLimit default to 300 with 1 lead and 3 trailing context lines.
- Replaced the search skip test with file-pagination coverage and added per-file cap tests.
- Added session-stats analytics tooling to classify searches, detect repeats, and render relevance plots.
2026-05-13 11:38:09 +02:00
can1357 a541a63547 feat: added read-selector analyzers and coverage plotting tools
- Updated read range expansion to use 1 leading and 3 trailing context lines.
- Changed read.defaultLimit from 500 to 300 in settings defaults.
- Updated read docs and tests to reflect the asymmetric context line behavior.
- Added read-selector analyzers and replay simulators to evaluate coverage and savings.
- Added plotting tools that output new session-stats PNG dashboards from local usage data.
2026-05-13 11:33:42 +02:00
can1357 e2af4db461 ci(scripts/run-rs-task): prepended toolchain bin to PATH for cargo subprocesses 2026-05-13 06:32:36 +02:00
can1357 9418a3a8be ci(scripts/run-rs-task): resolved cargo via rustup which to dodge homebrew rustup-init shadow on macos 2026-05-13 06:29:18 +02:00
can1357 1cb451a071 fix(workers): replaced file-URL import pattern with compiled-binary-aware spawn
- Replaced `with { type: "file" }` worker imports with `isCompiledBinary()` hybrid: literal string for `--compile` static analysis, `new URL(import.meta.url)` for dev portability.
- Added worker entrypoints as explicit `--compile` args in `build-binary.ts` so Bun emits them into bunfs.
- Added `smokeTestSyncWorker` and `omp --smoke-test` to catch silent worker-load failures in compiled binaries (fixes #1011, #1027).
- Added `isCompiledBinary()` utility to `@oh-my-pi/pi-utils` detecting bunfs path markers.
2026-05-12 16:40:15 +02:00
can1357 8b92ec937e feat: gpt-5 harmony errata fixes
- Replaced `===== ... =====` eval cell headers with `*** Begin ` / `*** End ` markers; legacy format remains renderable in HTML exports.
- Replaced hashline patch grammar with `*** Begin Patch` / `*** End Patch` envelope; old inputs without the envelope are still accepted.
- Extracted `sniffEvalLanguage` into a shared `sniff.ts` module reused by the parser and tool.
- Added `docs/ERRATA-GPT5-HARMONY.md` and `scripts/session-stats/harmony_backtest.py` documenting and backtesting the GPT-5 Harmony-header leak defect.
2026-05-10 19:52:44 +02:00
can1357 78b795ad80 feat(session-stats): added Python session-stats analyze/sync commands
- Added a Python `analyze.py` CLI with `tools`, `edits`, and `followups` session-stats subcommands.
- Added `sync.py` ingestion with `~/.omp/stats.db`, migration SQL, and incremental JSONL resume logic.
- Replaced `stats:run` in `package.json` with `stats:sync` and new `stats:edits`, `stats:tools`, and `stats:followups` scripts.
- Removed the Rust session-stats crate files (`Cargo.toml`, `main.rs`, `common.rs`, `cmd_*.rs`) and their old command logic.
- Removed `.gitignore` ignores for `scripts/session-stats/Cargo.lock` and `scripts/session-stats/edit-analysis.csv`.
- Updated eval tool guidance to show Python `asyncio.run(...)` usage.
2026-05-09 04:41:41 +02:00
can1357 0319aae382 feat(session-stats): added session-stats followups CLI for hashline edits
- Added a `followups` CLI command in `scripts/session-stats` for hashline edit follow-up analysis.
- Added `--max-fix`, `--max-gap`, `--min-dup`, `--pattern`, and `--show` options in `cmd_followups.rs`.
- Added follow-up heuristics for small fixes, tool self-corrections, overlapping re-edits, and payload/anchor duplications.
2026-05-09 02:34:31 +02:00
can1357 2693ac926d deps(deps): bumped cross-platform dependencies across Rust and Node lockfiles
- Updated Rust dependency manifests in `pi-natives` and `session-stats` to newer versions of rayon, tiktoken-rs, tree-sitter grammars, and supporting crates.
- Synchronized `Cargo.lock` with the manifest updates, including package bumps for fancy-regex, serde_spanned, toml components, and winnow.
- Refreshed `package.json` and `bun.lock` catalog and lock entries for newer Bun, AWS SDK, AI, and tooling package versions.
2026-05-06 17:00:02 +02:00
can1357 27430f1768 feat(session-stats): added session-stats rolling buckets and csv export
- Added timestamp and model fields to message and tool-call structs with serde defaults.
- Added timestamp parsing and bucket-format helpers, including clamped percentile calculation.
- Added rolling-window call grouping and CSV export via new `--by`, `--top`, `--tool`, and `--calls-csv` options.
- Added `TOOL_CALLS_CSV` env fallback and help text updates describing new bucketed percentile output.
2026-05-04 02:29:49 +02:00
can1357 378c757571 fix(coding-agent/edit): changed default edit separator to '~' for better reliability
- Switched HL_EDIT_SEP initialization to read from process.env, trimming the value and defaulting to "~" when missing or invalid.
- Expanded the separator documentation with benchmark data and reliability notes explaining why "~" was selected as the fallback over other candidates.
2026-05-03 08:53:31 +02:00
can1357 084791dade chore(scripts): removed todo workflow from scripts/rate-edit-tool
- Removed todo workflow event handling from `scripts/rate-edit-tool.py` by deleting `Todo*` event plumbing and ops.
- Pruned Go/Markdown fixture coverage from prompts and fixture maps, keeping TypeScript/Rust/Python only.
- Dropped todo-based completion gating in `is_effectively_complete` and removed todo columns from progress output.
2026-05-02 06:59:01 +02:00
can1357 2826ec2ea0 refactor(scripts): restructured edit-mode fallbacks to ignore strict mode
- Removed PI_STRICT_EDIT_MODE gating from edit-mode resolution so model fallbacks now always apply.
- Stopped injecting PI_STRICT_EDIT_MODE in edit-benchmark.py and rate-edit-tool.py execution environments.
- Removed PI_STRICT_EDIT_MODE from environment-variable documentation and strict-mode test coverage.
2026-05-02 04:34:39 +02:00
can1357 a5a06c1be8 ci: drop x86-64-v3 native variants for win32/darwin-x64 and clean up release flow
- Drop the modern (x86-64-v3) native build matrix entries for darwin-x64 and
  win32-x64. Linux x64 still ships both variants. Loader fallback chain
  (modern -> baseline -> default) means hosts on those platforms now load
  baseline; npm install via @oh-my-pi/pi-natives and the embedded standalone
  binary both keep working unchanged.
- Stop downloading .node files in scripts/install.sh and scripts/install.ps1.
  The standalone omp binary embeds the native at compile time, so the
  separate downloads were redundant and were going to 404 on platforms with
  no modern variant.
- Stop publishing standalone .node files to GitHub Releases. The npm
  registry is the only consumer that needs them.
- Drop the release-archives build entirely (omp-*.tar.gz). Nothing
  consumed them. Deleted scripts/ci-release-build-archives.ts and the
  ci:release:build-archives package script.
- Split the monolithic release job into release-github (download omp-*
  binaries, upload to GitHub Release) and release-npm (download natives,
  bun publish). Each job's steps now obviously serve its single output.
2026-04-30 14:42:24 +02:00
can1357 7015f6dfd2 ci: drop zig 2026-04-30 14:25:01 +02:00
can1357 5ecd041bfe fix: patched bash interceptor, LSP shutdown, and concurrent command tracking
- Fixed bash interceptor to check both raw and cwd-normalized commands, catching commands hidden behind leading `cd ... &&` wrappers.
- Fixed LSP client shutdown to await graceful shutdown with a 5s timeout before killing the process, and parallelized `shutdownAll` via `Promise.allSettled`.
- Fixed concurrent bash command tracking by replacing a single abort controller with a Set, preventing premature cancellation of parallel commands.
- Removed `./hooks` and `./hooks/*` export entries from the coding-agent package exports map.
- Updated pinned Rust nightly toolchain from `nightly-2026-03-27` to `nightly-2026-04-29` in `rust-toolchain.toml` and CI workflow.
- Replaced custom already-published detection in `ci-release-publish.ts` with `bun publish --tolerate-republish` flag.
2026-04-30 05:51:01 +02:00
can1357 e39d3d9c76 fix(natives): detect compiled-binary mode via embedded-addon presence
Standalone Bun binaries on WSL (and any host where the user moves the
binary away from the build-host's checkout) failed to load
pi_natives.<platform>-<arch>*.node. The loader's isCompiledBinary
detection relied on two signals that are both false in shipped binaries:
process.env.PI_COMPILED (bun --define PI_COMPILED=true substitutes the
bare identifier, not property accesses on process.env) and
__filename.includes("$bunfs") (Bun retains the build-host absolute path
in __filename for required CJS modules — only import.meta.url is
rewritten). Detection therefore returned false, embedded-addon
extraction was skipped, and the only candidates probed were the
build-host nativeDir and execDir.

Make embedded-addon presence the authoritative compiled-mode signal
(it is null in the post-build --reset stub, populated when embed:native
ran for the standalone build), eagerly require the manifest, and
extract candidate-path computation into a pure helper covered by a
host-platform-agnostic unit test. Also fix the build-time --define so
process.env.PI_COMPILED is genuinely set at runtime as a defensive
fallback.

Fixes #823
2026-04-30 04:51:23 +02:00
can1357 0c8d52950f refactor(scripts/session-stats): adjusted session-stats defaults and dynamic output formatting
- Lowered the default session scan limit for edits and tools from 100000 to 1000 and updated usage text to match.
- Reworked grand-total and per-tool table rendering in session-stats to compute aligned column widths and include an aggregated "(N others)" row.
- Tuned the session-stats release profile by replacing full stripping with line-tables-only debug symbols and disabled split debuginfo stripping.
2026-04-30 02:34:26 +02:00
can1357 c39f7e0e20 feat(scripts/session-stats): added session-stats edit/tools subcommands 2026-04-30 02:13:15 +02:00
can1357 a188651f63 fix(coding-agent/session): skipped empty thinking entries when formatting session dumps
- Updated `formatSessionDumpText` to skip `thinking` entries with empty or whitespace-only content.
- Prevented empty `<thinking>` sections from being emitted in session dump output.
2026-04-29 20:43:29 +02:00
can1357 5944fe34c0 feat(coding-agent): implemented shared single-path edit request handling
- Required top-level `path` in edit requests, removed per-entry `path` fields, and updated docs/tests to match.
- Updated patch/hashline/atom streaming preview generation to return a single request-level path diff preview.
- Changed edit execution to route patch/replace/atom/hashline through single-path handlers sharing `path`.
- Added `scripts/analyze-edit-formats` Go CLI with reports to audit edit-tool usage from session JSONL logs.
2026-04-28 05:21:24 +02:00
can1357 5ea1d55e56 feat: removed chunk-mode modules and read/edit entrypoints from pi-natives
- Removed `pi-natives` chunk language classifier modules and all core chunk subsystems (kind, state, render, edit, resolve).
- Removed chunk-mode CLI/read/edit entrypoints, including `read` command and chunk mode registration/prompt tooling.
- Removed chunk selectors from `read` and `grep` tools, switching behavior to raw/L-range handling.
- Fixed poll wait parsing to keep defaulting to `30s` when the provided value is empty.
2026-04-26 08:19:02 +02:00
can1357 6bd4cf24fd chore(scripts): updated tooling scripts and benchmark workflow configuration
- Enabled Biome VCS settings and expanded fix scripts with new `fix:all` and `fix:tools:all` commands.
- Updated `fix:ts` and `fix:tools` to separate changed-only checks from full-run formatting and generation tasks.
- Simplified edit-benchmark variant parsing by removing hardcoded validation logic, and removed deprecated flags from `run-rs-task.ts`.
2026-04-26 00:29:18 +02:00
can1357 60b2fbf1f9 chore(benchmark): cleaned benchmark edit parsing and token accounting
- Relaxed `--edit-variant` parsing in `packages/typescript-edit-benchmark/src/index.ts` to accept any string.
- Adjusted token delta calculation in `runner.ts` to subtract estimated system-prompt overhead per assistant turn.
- Captured initial system-prompt tokens in `runSingleTask` and added rough `estimateTokens` helper for corrected accounting.
- Reframed `scripts/rate-edit-tool.py` prompts to target edit-tool behavior and constraints for each fixture type.
2026-04-26 00:29:17 +02:00
can1357 d82377cda8 revert: "read-to-open"
This reverts commit c48d2e6080.
2026-04-24 22:36:44 +02:00
can1357 326169f0f0 feat(scripts): added unified edit benchmark runner with variant selection
- Replaced the standalone chunk and vim benchmark scripts with a unified `scripts/edit-benchmark.py` entrypoint.
- Added `--variant` and `PI_EDIT_VARIANT` handling with validation for supported edit modes.
- Generated benchmark specs dynamically per variant with mode-specific prompts and retry instructions.
2026-04-24 20:00:20 +02:00
can1357 66a89b343c feat(scripts): expanded rate-edit suite with Go and all-fixture sessions
- Added a Go fixture and registered it as `main.go` in the reference files, fixture list, and descriptions.
- Changed prompt construction and workspace setup to exercise every fixture in a single session instead of one file at a time.
- Updated run identifiers and output filenames, and set run results to report a fixture scope of `all`.
2026-04-24 19:32:39 +02:00
can1357 ed241ab698 feat(scripts): added oracle rerun mode and persisted synthesis artifacts
- Added a rerun flow that synthesizes oracle findings from existing `review_*.md` files without re-running fixtures.
- Refactored oracle input handling to source `(model, fixture, path)` tuples, and persisted oracle prompt and synthesis outputs in the results directory.
- Removed `OPENROUTER_API_KEY` bootstrapping and passed environment, and now write oracle errors to `oracle_error.txt` on failure.
2026-04-24 19:28:31 +02:00
can1357 5544db9759 fix(release): package compatible native addons
Fixes #634

Fixes #684

Fixes #727

Fixes #754
2026-04-24 01:02:50 +02:00
can1357 2e6dac791d Merged PR #761 2026-04-24 00:04:27 +02:00
fettpl 14b08f89d4 fix: restore runnable darwin compiled binaries
fixes #754
2026-04-23 22:59:27 +02:00
fcremo (Filippo Cremonese) 17df89086b fix: disable bunfig.toml and .env autoloading in compiled binary
Compiled Bun binaries unconditionally load bunfig.toml and .env from
the current working directory at runtime, before any application code
runs. Since omp is a coding agent that runs from arbitrary project
directories, it picks up foreign project configs -- most critically
preload directives that cause immediate crashes, but also a potential
security issue since preloads execute arbitrary code.

Add --no-compile-autoload-bunfig and --no-compile-autoload-dotenv to
the bun build --compile invocations (available since Bun v1.3.3).

Note: source installs via 'bun install -g' are still affected because
'bun run' has no equivalent flag. That remains an open issue.
2026-04-23 22:51:25 +02:00
can1357 7313b68f79 deps(deps): updated @oh-my-pi catalog versions in root package
- Updated root package.json @oh-my-pi entries from workspace:* to pinned 14.1.1 versioned dependencies.
- Modified the release script to automatically rewrite @oh-my-pi/* catalog versions in package.json using the release version.
- Kept the update operation before Rust workspace version bump in the release workflow.
2026-04-14 19:25:44 +02:00
can1357 ed2fd6e3f3 feat(coding-agent): added edit tool consolidation via vim handlers
- Removed the standalone vim tool and normalized built-in/requested tooling to edit.
- Updated session and SDK tool activation to dedupe lowercase names and track edit state via the edit key.
- Added vim-mode argument detection and delegated edit rendering/execution into Vim handlers under edit.
- Updated Vim step handling to auto-reorder numeric-positioned commands, including cc/C/S/s/i/I/A cases.
- Renamed prompt/changelog text and test expectations to reflect edit-only tool naming and usage.
2026-04-14 10:49:53 +02:00
can1357 9324fc4432 fix(scripts): resolved chunk-edit benchmark prompts to read test.rs
- Fixed Vim path normalization to allow colon-prefixed targets without raising ToolError.
- Documented the new Vim path behavior in the package changelog.
- Updated chunk-edit benchmark prompts to read `test.rs` for edit and retry operations.
- Updated vim benchmark flow to use `vim`+`read`, import expected content, and display final expected output.
- Expanded benchmark fixtures to generate Rust `test.rs`, compute unified diffs, and add richer pool logic.
2026-04-14 07:37:26 +02:00
can1357 9f9433c5ca feat(coding-agent): added contextual vim ex parsing for .,$,+,- addresses
- Added contextual Vim ex parsing for `.,$`, `+/-` addresses, copy/move destinations, and `del/ya` aliases.
- Added Vim engine handling for clamped ranges, no-op `update`, and register-aware `yank`/`put` command execution.
- Added regression tests for explicit ranges, yank/put, inline-cursor rendering, and `message_update` ordering.
- Updated session event flow by queuing `message_update` events, changed websocket default to `off`, and documented Unreleased notes.
2026-04-13 22:52:26 +02:00
can1357 10ba6bff89 fix(coding-agent): fixed vim command parsing and chunk edit fallback behavior
- Changed chunk edit normalization to prefer write operations, then replace, insert, then delete, with empty write values now treated as clear-content writes.
- Allowed space motions in vim input as `<Space>`, handled them as movement and rendered in error output via token display.
- Adjusted benchmark retry flow to reset files on each retry, reduced per-run call limits, and lowered the default per-turn timeout.
2026-04-13 21:14:35 +02:00
can1357 550efebbcc fix(vim): prevented partial-insert corruption in vim tool execution
- Added rollback handling for pending INSERT-mode changes whenever a non-final kbd sequence leaves insert mode, and updated the resulting VimInputError with guidance for using `insert` and escaping insert transitions.
- Hardened VimTool execution by resetting stale insert state before processing commands and by only applying empty inserts when Vim remains in INSERT mode.
- Adjusted Vim search handling to mimic Vim magic escaping and taught `o`/`O` numeric prefixes to act like `Go`/`GO` line inserts, then updated the expected error message test.
2026-04-13 20:23:43 +02:00
can1357 212d56bc11 feat: added strict-mode fallback for OpenAI tool calls with all_strict
- Added `toolStrictMode` support with `all_strict`/`none`/`mixed` options to OpenAI compatibility.
- Fixed OpenAI-completion strict-mode flows by capturing failed HTTP responses and retrying once as non-strict.
- Fixed completion error reporting by surfacing captured status, headers, and JSON `type`/`param`/`code` details.
- Improved strict-schema enforcement with WeakMap memoization and circular-schema detection in sanitization.
- Fixed OpenRouter provider lookup by resolving fallback model IDs for suffix and date variants in registry resolution.
- Refactored benchmark tooling and added async RPC error-window tracking for scheduled run execution.
2026-04-13 15:46:06 +02:00
can1357 779cf2eb4a feat(coding-agent-vim-tooling): added vim tooling special-key aliases
- Added `<escape>` and `<return>` as special-key aliases in `parser.ts`, mapping to `Esc` and `CR`.
- Clarified Vim tool behavior so `open` replaces the active buffer and non-paused `kbd` calls auto-save.
- Updated the Vim prompt contract to treat `insert` as raw text entered only after entering INSERT mode.
- Increased `scripts/vim-edit-benchmark.py` `request_timeout` from 60s to 120s for longer edit runs.
2026-04-13 13:04:07 +02:00
can1357 c62ab2d53e chore(benchmarks-misc-fixes): cleaned benchmark task/pid validation
- Added `vim` as an edit variant in benchmark CLI/config and rating script coverage.
- Expanded benchmark execution so `vim` is treated as a mutation tool for retries, stats, and edit intent checks.
- Adjusted `TaskTool` output schema precedence so explicit params override agent frontmatter.
- Fixed `TaskTool` success counting by excluding aborted tasks from success totals.
- Improved validation guidance in `SubmitResultTool`/`TodoWriteTool` for clearer recovery when payloads are missing or invalid.
- Added background command PID regression coverage in `executeBash` to confirm a real, terminateable PID is returned.
2026-04-13 12:27:10 +02:00
can1357 dd023eb4de feat(coding-agent-vim-tool): added vim editing tool stack with parser, engine, and renderer wiring
- Added `VimTool` in `src/tools/vim.ts` with `open`, `kbd`, `insert`, and `pause` actions.
- Implemented `src/vim/{buffer,engine,parser,commands,render,types}.ts` for interactive Vim modes and operators.
- Updated `src/tools/index.ts` to normalize `edit`/`vim` tool selection and skip the inactive edit variant.
- Added `vim` registration in `BUILTIN_TOOLS` and `toolRenderers` for discoverability and output formatting.
- Added streaming renderer snapshots with viewport, caret focus, and diff output for `vim` calls.
- Added `test/tools/vim.test.ts` and `scripts/vim-edit-benchmark.py` coverage for the new editor stack.
2026-04-13 12:26:59 +02:00
can1357 afa4eb71f1 refactor(deps): removed turbo-based workspace pipeline in favor of bun workspaces
- Removed Turborepo cache steps from CI and dropped .turbo from gitignore.
- Migrated root scripts from turbo commands to bun workspace execution for build, test, lint, check, format, and fix.
- Removed turbo dependencies and deleted turbo.json task configuration files from the repository.
2026-04-13 06:19:12 +02:00
can1357 4bc79b9a67 fix: fixed session naming context and native import paths
- Passed the user context when setting the session name during subprocess execution.
- Updated native build scripts to import detectHostAvx2Support from the correct shared module paths.
2026-04-13 01:12:15 +02:00
can1357 d2caf2770c feat: added /rename command to set session titles for status/header/tab display
- Added `/rename <title>` slash command to set explicit session names and update header/tab titles.
- Added `session_name` status segment with hash-derived accent color for session titles.
- Fixed shell execution failure sanitization to preserve all `execResult` fields after redacting stderr.
- Fixed tool execution completion output to pass original `toolResult` text instead of sanitized `content`.
2026-04-13 01:09:38 +02:00
can1357 5989fbf0d3 merge: PR #669 2026-04-13 00:31:38 +02:00
can1357 90f1672b2b fix(coding-agent): resolved duplicate -c in coding-agent git commands
- Added SHORT_LIVED_GIT_CONFIG constants and withShortLivedGitConfig helper for short-lived overrides.
- Updated runCommand to route git args through short-lived config normalization and avoid duplicate -c entries.
- Added scripts/release git() helper and replaced raw release git invocations with config-safe calls.
- Added git-process-config tests asserting status and stage spawn git with disabled core.fsmonitor/untrackedCache.
2026-04-11 08:54:27 +02:00
Bonobo 7c9edb610d fix(ci): tighten native x64 review guards 2026-04-11 01:46:16 +02:00
Bonobo 94c4c026cf fix(natives): eliminate unsafe avx512 x64 release artifacts
Fixes #601
2026-04-11 01:26:00 +02:00