Commit Graph

402 Commits

Author SHA1 Message Date
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 dc02697097 chore: bump version to 14.4.1 2026-04-26 07:24:08 +02:00
can1357 3a20aca826 chore: bump version to 14.4.0 2026-04-26 05:34:02 +02:00
can1357 d1da849b71 chore: bump version to 14.3.0 2026-04-25 19:12:49 +02:00
can1357 b3515410f7 fix(chunk): corrected batch edit checksum remap and stale-target errors
- Tracked batch edit targets across operations to remap reused checksums to the current chunk path.
- Ensured later batch operations fail with clearer diagnostics when a previous target was removed.
2026-04-24 15:34:13 +02:00
can1357 ec8405bb2c fix(pi-natives/shell): resolved shell minimizer bypass for compound/piped
- Updated minimizer mode selection so `Compound`, `Piped`, and `Unsupported` plans now skip minimization.
- Removed `MarkedCommands` mode and marker-stripping paths from shell minimizer and buffering flow.
- Updated minimizer tests and changelog to document compound/piped commands bypassing minimization.
- Deleted marker metadata and helper infrastructure (`markers.rs` types/helpers) and related imports.
2026-04-24 14:00:04 +02:00
can1357 c61a5b9a56 feat(config): added minimizer output fields and compact shell summaries
- Added minimizer API fields (`MinimizerResult.text`, `settingsHash`) and shell options for minimized output behavior.
- Changed bash execution to print minimized text output and append artifact footers only after minimized output is saved.
- Added UTF-8-safe shell streaming with `on_chunk` callback routing and `replace()` output sink updates.
- Added core filter enhancements for git, cargo, go, and listing/python outputs to produce compact summaries.
- Added RTK command filters and fixtures to strip noise, truncate output, and normalize success fallbacks.
2026-04-24 11:13:43 +02:00
can1357 78b02385ec refactor(natives): removed PI_DEV native diagnostics and dev-mode documentation
- Removed `process.env.PI_DEV` checks from `packages/natives/native/index.js`, dropping per-candidate debug load logging and load-error reporting from the native addon loader.
- Pruned `PI_DEV` and `--dev` usage from native build/run and runtime docs, including setup, variant, and troubleshooting guidance.
- Updated `packages/natives/CHANGELOG.md` to note removal of the `PI_DEV` loader diagnostic environment variable and associated console logging.
2026-04-24 09:27:37 +02:00
can1357 084ffd2058 feat(cross-cutting): added shell minimizer planning from AST command parsing
- Added AST-based minimizer planning with brush-parser to classify commands before minimization.
- Added original text capture and byte-metric `minimized` telemetry to shell execution results.
- Added minimizer configuration controls, including trust-gated loading via `settingsHash` and limits.
- Added `onMinimizedSave` callback wiring to persist minimized outputs and annotate Bash sinks with artifact IDs.
2026-04-24 09:15:18 +02:00
can1357 4940961e01 feat: added shell minimizer settings and dispatch by program
- Added configurable minimizer settings to native and coding-agent APIs, including shellMinimizer options.
- Added minimizer execution plumbing through shell config, session-key generation, and buffered output capture.
- Added command identity detection and dispatching by program/subcommand with safe fallback to passthrough output.
- Added filter suites for git, docker, go, bun, cloud, and system commands to strip ANSI and compact noisy output.
- Added unit tests for detection and minimizer behavior across command support, failures, and passthrough paths.
2026-04-24 08:00:04 +02:00
can1357 1fb22e1e9a chore: bump version to 14.2.1 2026-04-24 05:55:59 +02:00
can1357 06697b3f28 chore: bump version to 14.2.0 2026-04-24 01:05:06 +02:00
can1357 7a857d44b3 docs(natives): add Dart AST tools changelog entry 2026-04-23 23:04:30 +02:00
can1357 e952773e24 chore: bump version to 14.1.4 2026-04-17 18:50:13 +02:00
can1357 397617e1c3 chore: bump version to 14.1.3 2026-04-17 18:07:35 +02:00
can1357 028f8c5436 chore: bump version to 14.1.2 2026-04-14 19:29:04 +02:00
can1357 bae191227d chore: bump version to 14.1.1 2026-04-14 10:53: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 5caddcebd6 feat(cross-cutting): added fd crate export and moved fuzzy-find bindings
- Removed `SearchDb` APIs and `searchDb` fields, dropping db-backed state from native and agent sessions.
- Replaced crate export `fff` with `fd`, moving fuzzy-find bindings into `fd.rs`.
- Removed `SearchDb`/picker fast-path logic from `glob` and `grep`, simplifying scan flow and dropping db args.
- Removed `SearchDb`/`getSearchDb` wiring from extension, tool, and task context constructors across coding-agent.
- Added over-indentation validation warnings in chunk-edit normalization for suspicious `~` body line formatting.
- Removed `bytes`, `fff-grep`, `fff-search`, and `blake3` deps, adding `grep-searcher = "0.1"`.
2026-04-13 21:25:50 +02:00
can1357 6b96198a5f feat(pi-natives/brush-core): added chunk put op for scoped replacement
- Added `ChunkEditOp::Put` as a native operation and exported it via generated Rust/JS bindings.
- Separated replace semantics so `replace` now performs scoped literal `find` replacement and `put` handles full-target replacement.
- Added indentation-aware matching and replacement in `apply_find_replace` to preserve matched block indentation.
- Removed runtime controls `PI_CHUNK_ALWAYS_RECURSE` and `PI_HIDE_CLOSING_TAGS`, making chunk recursion and anchors deterministic.
- Refactored async execution in `interp.rs` to spawn eligible pipelines as explicit jobs via `spawn_ao_list_as_job`.
- Changed chunk anchor rendering to `@`-style markers with depth dashes and removed emitted closing chunk tags.
2026-04-13 12:26:29 +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 debb76723d chore: catalog imports 2026-04-13 01:06:01 +02:00
can1357 1d1d341dc0 fix(natives/scripts): fixed Linux host Zig target detection when report header is absent
- Stored the process report in a local variable before reading the header for host detection.
- Updated the type assertion so the header path is optional and guarded.
- Kept the Linux zig target selection logic unchanged while fixing the runtime check.
2026-04-13 00:59:48 +02:00
can1357 b4887e37b7 fix: address PR regression follow-ups 2026-04-13 00:48:13 +02:00
can1357 5989fbf0d3 merge: PR #669 2026-04-13 00:31:38 +02:00
can1357 f96422d911 chore: bump version to 14.1.0 2026-04-11 13:22:08 +02:00
can1357 1bb5234477 chore: bump version to 14.0.5 2026-04-11 06:39:46 +02:00
Bonobo 27549a18a8 fix(natives): isolate concurrent napi build outputs 2026-04-11 02:20:44 +02:00
Bonobo 7c9edb610d fix(ci): tighten native x64 review guards 2026-04-11 01:46:16 +02:00
Bonobo e8255b97af Merge upstream/main into research/native-illegal-instruction 2026-04-11 01:43:07 +02:00
Bonobo 94c4c026cf fix(natives): eliminate unsafe avx512 x64 release artifacts
Fixes #601
2026-04-11 01:26:00 +02:00
can1357 fa375d6eaa refactor: restructured chunk region notation from @head/@body/@tail/@decl to ^/~ suffix format
- Simplified chunk region notation from @head/@body/@tail/@decl to ^/~ suffix format across all modules.
- Removed ChunkRegion::Tail and ChunkRegion::Decl enum variants and updated region matching logic accordingly.
- Added call-with-callback pattern detection via try_promote_call_with_callback() and trailing_callback_body() functions.
- Updated documentation and test fixtures to reflect new region selector syntax throughout codebase.
2026-04-10 17:27:49 +02:00
can1357 b60c0cc3ce refactor: migrated tab width resolution to pi-utils with EditorConfig caching
- Extracted tab width resolution from pi-natives to pi-utils with EditorConfig caching support.
- Made tabWidth parameter required in native text functions (visibleWidth, truncateToWidth, wrapTextWithAnsi, sliceWithWidth, extractSegments).
- Removed process-wide tab width state management from pi-natives text module.
- Consolidated wrapper node promotion logic in chunk classification with abbreviated string representations.
- Removed path-clean and pathdiff dependencies from pi-natives.
- Updated all consuming packages to import tab width functions from pi-utils and pass explicit tabWidth parameters.
2026-04-10 14:18:36 +02:00
can1357 0e5dfd542b chore: bump version to 14.0.4 2026-04-10 13:34:27 +02:00
can1357 6bf09bedb0 refactor(chunk): restructured language classifiers to declarative rule tables
- Migrated language classifiers from imperative methods to declarative semantic rule tables with ClassifierTables and StructuralOverrides.
- Extracted node shape analysis into dedicated shape module with field priority constants and helper functions for AST traversal.
- Added schema module with language-aware node metadata and thread-local language context management.
- Centralized environment variable parsing across codebase using $flag(), $envpos(), and isBunTestRuntime() utilities.
- Added PI_CHUNK_AUTOINDENT configuration to control indentation normalization in chunk read/edit operations.
- Enhanced system prompt with instruction priority, output contract, tool persistence, and completeness guidelines.
2026-04-10 13:33:00 +02:00
can1357 5fb98634b1 feat: implemented merge conflict detection and resolution API for chunk state
- Added merge conflict detection and resolution API with hasConflicts() and conflictCount() methods to ChunkState.
- Implemented conflict marker parsing supporting standard and diff3-style formats with accept_ours() resolution.
- Extended ChunkKind enum with Hunk, Conflict, Ours, and Theirs variants for diff and merge conflict representation.
- Added virtual_content field to ChunkNode for rendering conflict branches and improved diff parsing with block-level file chunk handling.
- Implemented conflict metadata tracking across edits with validation preventing direct modifications to virtual conflict branches.
2026-04-10 07:44:12 +02:00
can1357 fa12644267 chore: bump version to 14.0.3 2026-04-09 20:03:21 +02:00
can1357 5d48656544 revert: restructured indentation from tab-based to space-based representation
This reverts commit 29376dac2b.
2026-04-09 20:02:57 +02:00
Patrik Sundberg 852731654d fix(natives): fix const enum exports lost after module.exports reassignment
native/index.js does `module.exports = loadNative()` which replaces the
exports object. The generated const enum assignments (`exports.Ellipsis`,
etc.) wrote to the original (now disconnected) exports object, so they
were silently discarded at runtime.

Fix gen-enums.ts to emit `module.exports.X` instead of `exports.X`.
Also remove "type": "module" since the package only has CJS output.
2026-04-09 08:23:55 +01:00
can1357 d93a941870 fix(ci): accept napi plain platform filename and pass TARGET_VARIANTS
- resolveBuiltAddonPath: napi-rs 3.x emits pi_natives.<platformArchABI>.node
  where platformArchABI is e.g. darwin-x64 (no ABI). The previous filter
  excluded the plain <platform>-<arch>.node form because it was in the
  canonicalFilenames set, breaking darwin-x64 tag builds. Only exclude
  sibling variant-tagged files (modern/baseline) that do not match our
  target canonical name.
- ci.yml: pass matrix.variants as TARGET_VARIANTS so ci-build-native.ts
  actually builds both baseline+modern on x64 platforms in tag releases.
2026-04-09 03:33:11 +02:00
can1357 a4e44208da chore: bump version to 14.0.2 2026-04-09 02:35:59 +02:00
can1357 fd57247a6d fix(chunk): corrected markdown spacing to preserve blank lines between sections
- Corrected markdown section spacing logic to preserve blank lines between inserted sections and following headings.
- Added markdown-aware spacing detection to handle FirstChild, LastChild, Before, and After insert positions correctly.
- Added two test cases validating blank line preservation in markdown After and Append operations.
- Reformatted doc comments in RenderParams and ReadRenderParams for line length compliance.
2026-04-08 23:26:30 +02:00
can1357 29376dac2b refactor: restructured indentation from tab-based to space-based representation
- Renamed indent normalization functions from tab-based to space-based naming (normalize_to_tabs -> compact_indent, denormalize_from_tabs -> expand_indent).
- Changed canonical indentation representation from tab characters to single leading spaces per indent level across chunk rendering and editing.
- Updated documentation and type annotations to reflect space-based indentation convention in chunk edit tool and native bindings.
- Simplified indent expansion logic to count whitespace characters instead of parsing individual characters.
2026-04-08 20:56:25 +02:00
can1357 25efae9ae9 fix natives loading in keybinding tests 2026-04-08 18:52:42 +02:00
can1357 9f9e0938e5 feat: introduced @decl chunk region selector for semantic declarations
- Added `@decl` chunk region selector for targeting semantic declarations without leading trivia.
- Updated chunk edit documentation with visual region boundary diagram and critical narrowest-region requirement warning.
- Implemented `Decl` variant across Rust types, NAPI bindings, and TypeScript definitions with full region range logic.
- Added inline hunks emission for effectively-leaf chunks to preserve hunks when children are filtered by focus.
- Improved type safety in LSP startup test by replacing truthy check with explicit function type check.
2026-04-08 17:49:39 +02:00
can1357 52719d1a7c refactor: restructured monorepo TypeScript config and build tasks for unified setup
- Migrated all package tsconfig files to extend tsconfig.workspace.json for unified TypeScript configuration across monorepo.
- Consolidated build and check scripts across 10+ packages to use biome for linting/formatting with separate type checking via tsgo.
- Renamed build scripts from build:native and build:binary to build for simplified command naming across packages/natives and packages/coding-agent.
- Refactored CI workflow to invoke bun tasks instead of inline shell scripts, reducing workflow complexity by 40+ lines.
- Removed sync-exports.ts and repro-stuck.ts scripts; deleted path aliases from tsconfig.base.json in favor of workspace-based configuration.
- Updated turbo.json with new task definitions (check:types, lint, fmt, fix) and removed build:native/embed:native tasks.
2026-04-08 17:05:20 +02:00
can1357 f2fceb27ad chore: bump version to 14.0.1 2026-04-08 15:07:01 +02:00
can1357 003eccce52 fix: remove unused type alias and fix test compatibility with Bun 1.3.11
- Remove unused ParsedChunkTarget type alias (lint error)
- Increase setImmediate timing in history storage compat test
- Mock warmPythonEnvironment in python tool tests
- Fix tlaplus LSP test to spy on $which instead of Bun.which
2026-04-08 12:17:37 +02:00