Commit Graph

5176 Commits

Author SHA1 Message Date
can1357 6d16e93b86 test(coding-agent): align issue-1011 test with isCompiledBinary hybrid contract
The asset-emission assertion was the false positive flagged in
tab-supervisor.ts: the new pattern intentionally does not bundle the
worker as an asset of the supervisor — it is added as a separate
`--compile` entrypoint in build-binary.ts, and runtime is covered by
`omp --smoke-test` (sync worker).

Replaces it with two cheap static checks that defend the two halves
that actually make the worker survive `bun build --compile`:
1. tab-supervisor.ts branches on `isCompiledBinary()` and uses the
   exact `--root`-relative literal at the `new Worker(...)` site
   that Bun's `--compile` analyzer can discover, while keeping the
   `new URL("./tab-worker-entry.ts", import.meta.url)` branch for
   dev/source spawns.
2. scripts/build-binary.ts lists the same worker as an explicit
   additional `--compile` entrypoint so Bun emits it into bunfs.
2026-05-13 01:56:18 +02:00
can1357 ce045f02a2 chore: bump version to 14.9.9 2026-05-12 16:42:51 +02:00
can1357 e8e2f2cd83 fix(stats): preserve pending behavior backfills 2026-05-12 16:41:28 +02:00
can1357 b468bd5abd feat(stats): show input and output token totals 2026-05-12 16:40:43 +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 ab4416f5bb fix(crates): address clippy lints surfaced on linux baseline 2026-05-12 14:55:39 +02:00
can1357 6fbb93b017 fix(coding-agent): allowed hashline parsing to accept flexible @@ section headers
- Updated hashline section parsing to accept headers with any leading `@` characters, normalizing them to the path before validation.
- Updated the hashline grammar and fallback errors to use canonical `@@ PATH` section headers.
- Added coverage for mixed `@@` and `@@@` headers across multiple file sections in hashline parsing tests.
2026-05-12 14:40:42 +02:00
can1357 1cffb3473a fix: corrected worktree baseline capture with synthetic tree diff
- Added untracked worktree baseline capture via `untrackedPatch` and synthetic tree diffing.
- Added fallback-aware backend ordering by collecting host candidates and retrying alternates on unavailable PAL.
- Hardened overlay mount lifecycle by removing stale overlays and deleting upper/work dirs after unmount.
- Refined ZFS clone deletion to validate ownership and remove dataset+origin only when checks pass.
- Updated ProjFS integration to use extended-info callbacks and symlink metadata reads.
- Updated rcopy path handling to absolutize paths, and added `writeTree` plus combined shell timeout checks.
2026-05-12 14:36:31 +02:00
can1357 f81af06a2b feat(pi-shell): add execute_shell_streams with per-stream raw byte sinks 2026-05-12 14:11:55 +02:00
can1357 900a42e8d9 deps(deps): added workspace dependency catalog and updated crate manifests
- Added a workspace dependency catalog in `Cargo.toml` for internal and external crates.
- Replaced explicit dependency specs and pinned versions with workspace references in crate manifests.
- Removed inline dependency overrides such as feature flags, renames, and package metadata.
- Consolidated platform-specific target deps (`libc`, `winreg`, `windows-sys`, `parking_lot`) to workspace entries.
2026-05-12 13:43:04 +02:00
can1357 d37d48d11d feat(pi-iso): added unified pi-iso backend resolver with auto probe
- Added unified isolation primitives (BackendKind, ProbeResult, IsoError) and resolve fallback selection logic.
- Added Diff, FileChange, and ChangeKind with default_diff choosing git mode or filesystem walk based on repository state.
- Added APFS/btrfs/zfs/reflink/overlayfs/projfs/rcopy/block-clone backends with platform-aware start, stop, and probe.
- Mapped backend operations to canonicalized paths, recursive clone helpers, rollback cleanup, and unavailable error mapping.
- Added unified native exports isoBackend/isoProbe/isoResolve/isoStart/isoStop/isoDiff and removed projfsOverlay APIs.
- Replaced task isolation resolver flow with ensureIsolation/cleanupIsolation and migrated mode handling to auto plus legacy-mode aliases.
2026-05-12 13:39:45 +02:00
can1357 edc102b825 test(tui): force hyperlinks capability for markdown OSC 8 assertions
CI runs without TERM_PROGRAM/TERM, resolving TERMINAL_ID to "base" which
has hyperlinks disabled. The Links suite asserts on OSC 8 sequences, so
flip TERMINAL.hyperlinks for the duration of that describe block. The
render cache keys on hyperlinks state, so the toggle invalidates stale
entries automatically.
2026-05-12 11:35:12 +02:00
can1357 64e89b12b5 chore: bump version to 14.9.8 2026-05-12 11:17:24 +02:00
can1357 075e2f47ad fix(coding-agent/export): prevented HTML template $ substitution expansions
- Switched template CSS/JS inlining replacements to callback form in generation scripts to avoid `$` replacement expansion semantics.
- Updated HTML export generation to use callback-based replacements for theme variables and session data injection to prevent accidental `$` substitution parsing.
- Added regression tests for the inlined script ensuring literal `$'` regex tokens remain intact, no closing HTML tags are injected, and the script parses via `new Function`.
2026-05-12 11:15:38 +02:00
can1357 c42c2313a7 feat(tools): added conflict wildcard reads and per-file write grouping
- Added `:conflicts` and `read conflict://<N>`/`read conflict://<N>/<scope>` support and rejected wildcard conflict reads.
- Added bulk conflict resolution via `write({ path: "conflict://*", ... })` across files with per-file grouping.
- Expanded conflict detection to scan files up to 10MB, track insertion-ordered history, and report full `X of Y` summaries.
- Reworked `spliceConflict` to match marker blocks by content, fixing shifted or stale block splicing.
- Added coverage for wildcard parsing, scoped reads, prepended-line splices, relocation, and warning assertions in detect/integration tests.
2026-05-12 11:15:23 +02:00
can1357 0cdd381aee feat(coding-agent/tools): added scoped conflict URI parsing in read tool
- Added `ConflictScope` parsing for `conflict://<N>/<scope>` with `ours`, `theirs`, and `base` validation.
- Added `read` support for full and scoped conflict URIs, rendering regions via `#readConflictRegion` with preserved formatting metadata.
- Added conflict-count and error handling in read results, including `Conflict #N not found` responses.
- Added `write`-path rejection for scoped conflict URIs, returning `ToolError` before lookup to enforce read-only behavior.
- Added unit and integration tests for scope parsing, conflict rendering, and read/write conflict error scenarios.
2026-05-12 11:03:26 +02:00
can1357 478db5183a feat(tools): added strict conflict parsing for read/write tools
- Added conflictCount metadata and warning badge output to read results for files with unresolved conflicts.
- Added conflict detection parsing with strict marker matching and session-scoped conflict IDs.
- Added write-path conflict resolution for `conflict://N` using token expansion and marker validation before splicing.
- Added unit and integration tests for conflict scanning, history lifecycle, URI validation, and workflows.
2026-05-12 10:55:09 +02:00
can1357 093c13877a fix(tui): normalized per-line output to prevent terminal style/link bleed
- Updated markdown cache keys with terminal capability and style-probe values so stale entries invalidated when image protocol, hyperlink mode, theme, or bgColor output changed.
- Trimmed dangling inline style prefixes in markdown rendering so trailing unmatched SGR escapes were removed before emission.
- Added per-line terminal resets and OSC8 closures in TUI output processing, including truncation, so rendered diffs match bytes actually written to the terminal.
2026-05-12 10:42:28 +02:00
can1357 b4b6536838 feat(pi-natives): added link-following control to filesystem scan options
- Added a follow_links flag to ScanOptions and build_walker so callers could control symlink traversal.
- Updated scan callsites so ast, glob, and grep continued skipping symlinks while fd's fuzzy-find enabled link following.
- Updated fd scoring to favor fuzzy basename matching for queries without '/', reducing matches based only on ancestor directory names.
2026-05-12 10:25:24 +02:00
can1357 3c246dfb11 fix(tui): fixed ctrl+alt+letter matching and render test synchronization
- Adjusted ctrl+alt+letter matching in pi-natives so legacy ESC+ctrl-char failures now fall through to CSI-u and modifyOtherKeys sequences when kitty protocol is inactive.
- Added VirtualTerminal.waitForRender() to wait for the throttled 16ms render budget before flushing.
- Reworked overlay and regression tests to await waitForRender() instead of manual sleep-and-flush synchronization.
2026-05-12 10:22:26 +02:00
can1357 718ab4e3ae feat(tui): added tui autocomplete awaitable slash cmd returns with hints
- Added promise-based slash command completions with Awaitable returns and argumentHint metadata.
- Added kitty modifier-key decoding with super-mask support and validation of Alt/Ctrl/Super printable events.
- Added kitty printable key deduplication by filtering pending unmodified follow-up codepoints in the stdin buffer.
- Added render throttling with stop-time finalization, output normalization, and OSC 9;4 progress updates.
2026-05-12 10:17:04 +02:00
can1357 cb9eef1b34 fix(tui/components): fixed editor paste decoding and autocomplete item guards
- Added pre-processing for pasted CSI-u sequences before newline cleanup, converting Ctrl+letter codes back to literal control characters.
- Added array guards before reading autocomplete suggestion lists to avoid errors when suggestion items are missing or non-array values.
2026-05-12 10:12:25 +02:00
can1357 36df8a5a49 fix(tui/components): implemented strict strikethrough tokenizer for markdown parsing
- Added a strict regex-backed strikethrough tokenizer to override the default `del` token parsing.
- Created a dedicated `Marked` parser configured with the custom tokenizer.
- Switched markdown tokenization to the configured parser so it uses the strict strikethrough rules.
2026-05-12 10:11:47 +02:00
can1357 8e1bccf97e fix(tui): normalized Thai/Lao AM output for terminal rendering
- Added normalizeTerminalOutput to convert precomposed Thai and Lao AM vowels into compatibility decompositions for terminal rendering.
- Converted ASCII classification tables to Uint8Array and updated whitespace and punctuation checks to use bounded code-point lookups.
2026-05-12 10:11:18 +02:00
can1357 6d41cdb68c feat(tui): added terminal OSC progress indicator with keepalive support
- Added OSC 9;4 terminal progress start/stop handling with periodic keepalive updates while active.
- Cleared the progress keepalive timer and sent a clear sequence when progress was stopped.
- Fell back to Bun env terminal size variables when stdout columns or rows were unavailable.
2026-05-12 10:10:16 +02:00
can1357 c2e18617b3 fix(tui): adjusted terminal fallback and hyperlink handling for tmux and screen
- Set the base and trueColor fallback terminals to disable hyperlink support.
- Reworked terminal resolution to apply forced and fallback image protocols on a single resolved TerminalInfo.
- Forced hyperlink support off when running under tmux or screen based on environment variables.
2026-05-12 10:10:01 +02:00
can1357 028a442f18 feat(coding-agent): added parser support for t/rst in Cell eval
- Introduced canonical `*** Cell` headers with `t:` and `rst` attributes in eval prompts, schema, and docs.
- Updated parser and grammar to parse `*** Cell` blocks, stop on `*** End`/next header/EOF, and handle invalid `rst` with errors.
- Added quote-aware attribute tokenizers and split HTML eval parsing into `Cell` and legacy `Begin` handlers with `py` defaults.
- Expanded parsing behavior and tests for `rst` booleans, title aliases, abort boundaries, and stray-line skips between cells.
2026-05-12 10:01:56 +02:00
can1357 c562f4dc2a fix(coding-agent/eval): hardened eval parser against stray non-marker lines
- Updated parseEvalInput to verify begin-cell markers before dereferencing regex matches.
- Skipped stray non-marker lines between and after cells, preserving valid cells when model output is noisy.
- Added eval parse regression tests for stray content and trailing chatter, and kept abort-line handling explicit.
2026-05-12 09:41:06 +02:00
can1357 2726ee03e3 chore: bump version to 14.9.7 2026-05-12 09:29:55 +02:00
can1357 510a3db05a fix(coding-agent/web): propagated abort signals through web search execution
- Extended executeSearch to accept an optional AbortSignal parameter.
- Passed the provided signal through to the search provider invocation.
- Updated execute methods to forward incoming signals into executeSearch.
2026-05-12 09:29:31 +02:00
can1357 8d144e17ec feat(coding-agent/eval): added local python-runner subprocess execution
- Replaced Python execution with a local `python -u runner.py` subprocess and NDJSON stdin/stdout framing.
- Removed shared-gateway architecture, including coordinator lifecycle APIs, `useSharedGateway` wiring, and `jupyter` CLI/actions.
- Simplified setup checks to a plain Python 3 availability probe and removed automatic dependency-install fallbacks.
- Updated kernel cancellation and display processing to use status frames, SIGINT/SIGTERM escalation, and normalized output coercion.
- Added `python-runner` integration and display tests while deleting legacy websocket and kernel lifecycle test suites.
2026-05-12 09:09:24 +02:00
can1357 dcf3f1c8a3 feat(coding-agent): added tool.<name>(args) execution in Python prelude
- Added `tool.<name>(args)` execution in Python prelude and docs, enabling direct tool call syntax.
- Added per-execution Python tool-bridge registration, env wiring, and executor lifecycle management.
- Implemented authenticated loopback `/v1/tool` handling with session/name validation and structured responses.
- Updated runtime and lint handling to permit controlled global eval usage in indirect eval paths.
- Added tests for success, failures, invalid bodies, and `emitStatus` propagation in Python tool bridges.
2026-05-12 08:43:36 +02:00
can1357 2f7b2aaccd feat(coding-agent/eval): stripped TypeScript syntax before import rewrites
- Added a stripTypeScript pass that heuristically detects TypeScript-like syntax and transpiles it with Bun's ts loader before rewriting.
- Integrated the new pass into wrapCode so import and lexical rewrites operate on transpiled input.
- Added an executeJs test that verifies interfaces, type annotations, and type assertions execute to the expected numeric result.
2026-05-12 08:42:52 +02:00
can1357 2d4d70e47e feat(coding-agent): added shared JS runtime for worker execution
- Added shared JS runtime infrastructure with RuntimeHooks, RuntimeOptions, JsRuntime, and indirectEval-based execution.
- Reworked worker execution to use runtime.run, track active runs, and clean pending tool calls on close.
- Added tool-call and tool-reply message variants and wired supervisor/worker to route run-scoped calls.
- Added shared helper globals (read, writeFile, diff, tree, env) for browser-tab JS execution.
2026-05-12 08:42:30 +02:00
can1357 efbaa59a05 fix(coding-agent): routed rewritten static imports through cwd-aware helper
- Rewrote static import lowering to emit `__omp_import__` calls instead of direct `import(...)` so rewritten code routes through worker context helpers.
- Added a `__omp_import__` runtime helper in `WorkerCore` that resolves specifiers against the session cwd via `Bun.resolveSync` while passing through URL-like modules unchanged.
- Updated static import rewrite tests to expect the new helper-based `__omp_import__` form, including import attribute cases.
2026-05-12 08:22:55 +02:00
can1357 95b29561c7 feat(history-storage): added substring fallback to search with FTS tokenization fix
- Fixed query tokenization to split on non-alphanumeric runs, aligning with FTS5 unicode61 indexer so punctuation-delimited terms like `git-commit` match correctly.
- Added LIKE-based substring fallback so infix queries FTS5 prefix matching cannot reach (e.g. `mit` matching `commit`) still return results.
- Merged FTS and substring results with deduplication, prioritizing FTS matches before substring-only matches up to the requested limit.
2026-05-12 08:22:46 +02:00
can1357 f56cbbf4c6 feat(stats): added frustration metrics to stats parser and charting
- Added new frustration and revised behavior metrics across stats types, parser mappings, and UI charts.
- Reworked session sync to fan out parsing across a capped worker pool with SyncOptions progress callbacks.
- Added worker-based parse messaging and throttled TTY progress rendering in the stats sync command.
- Updated behavior scoring to strip structured content, ignore noisy prompts, and fix profanity boundary regressions.
- Expanded user message schema and migrations, then repaired assistant model/provider links during sync backfill.
- Updated worker-import guidance in AGENTS.md and recorded sync-progress/metrics updates in package changelogs.
2026-05-12 07:55:23 +02:00
can1357 a7209c2b4f feat(coding-agent-eval): added worker-backed JS runtime with queued runs
- Added worker-backed JS runtime via Transport and WorkerCore, with queued runs, status/error output, and clean teardown.
- Refactored executeInVmContext to reuse worker sessions, route pending runs by id, and fallback inline on spawn failure.
- Added rewrite helpers to convert top-level imports and demote top-level const/let/class declarations for persistence.
- Handled aborts by canceling in-flight tool calls, hard-killing worker sessions, and dropping JS timeout enforcement.
2026-05-12 07:20:43 +02:00
can1357 e3553b3211 test(coding-agent): align kNoAuth fallback test with #1008 behavior 2026-05-12 06:56:39 +02:00
can1357 34aed93f8e fix: win deps 2026-05-12 06:35:41 +02:00
can1357 c504c2654a chore: bump version to 14.9.5 2026-05-12 06:34:13 +02:00
can1357 92ec8607ff fix(coding-agent/tools): added ts-expect-error for Bun file URL worker import
- Documented why the tab worker entry must be imported with Bun's file attribute despite tsgo limitations.
- Added a @ts-expect-error on the tabWorkerEntryUrl import to suppress tsgo TS1192/TS5097 errors.
2026-05-12 06:32:12 +02:00
Can Bölük 8a5d805c06 Merge pull request #1006 from thedavemarshall/fix/rapidly-blinking-cursor-992
fix(tui): eliminate rapidly blinking cursor during task execution
2026-05-12 06:29:13 +02:00
Can Bölük 4db85a79f2 Merge pull request #1002 from ephraimduncan/fix/plugin-directory-extensions
fix(coding-agent/plugins): resolve directory manifest extension entries to their index.{ts,js,mjs,cjs}
2026-05-12 06:28:55 +02:00
Can Bölük 5dfe593828 Merge branch 'main' into fix/plugin-directory-extensions 2026-05-12 06:28:35 +02:00
Can Bölük 84c306f658 Merge pull request #1005 from tsagi2045/feat/ask-no-timeout-default
feat(coding-agent): default ask.timeout to 0 (wait indefinitely)
2026-05-12 06:27:38 +02:00
Can Bölük 4150c96dfc chore: doesnt require a change 2026-05-12 06:27:16 +02:00
Can Bölük 48a42fed58 chore: doesnt belong here 2026-05-12 06:26:09 +02:00
Can Bölük 92499815e7 Merge pull request #999 from jiwangyihao/fix/windows-ssh-controlmaster
fix(coding-agent): avoid SSH ControlMaster on Windows
2026-05-12 06:24:30 +02:00
Can Bölük 66a9c483aa Merge branch 'main' into fix/windows-ssh-controlmaster 2026-05-12 06:24:23 +02:00