Commit Graph

28 Commits

Author SHA1 Message Date
can1357 34e88b344b refactor: adopted idiomatic combinators and updated the rust toolchain
- Updated the nightly rust toolchain channel in rust-toolchain.toml to nightly-2026-07-28.
- Adopted slice chunking and multiple-of helper methods across native and vendor crates.
- Replaced option map adapters and conditional patterns with idiomatic combinators.
2026-07-28 10:01:56 +02:00
can1357 8facd237d5 feat(build): migrated native pipeline to bazel with remote caching
- Replaced the napi-cli/cargo-zigbuild/cargo-xwin/sccache build path with
  Bazel: rules_rust + crate_universe over Cargo.lock, hermetic zig cc
  toolchains (linux-gnu pinned to glibc 2.17, linux-musl), host Xcode for
  darwin, and a repo-local hermetic clang-cl + llvm-ml + xwin toolchain for
  windows-msvc (bazel/toolchains/msvc).
- All eight shipped addons build as //:natives-<target> via the release
  transition in bazel/defs.bzl (opt, thin LTO, cgu=16, stripped, canonical
  .node naming); scripts/bazel-natives.ts is the single driver for local
  dev and CI.
- Rust validation moved to bazel test + clippy aspects (strict workspace
  policy for opted-in crates, default lints elsewhere, mirroring cargo
  semantics) and the rustfmt aspect; cargo stays as the dev-iteration
  surface, with brush-core/brush-builtins promoted to workspace members
  and excluded from cargo dev tasks to keep their historical scope.
- CI caches through an in-cluster bazel-remote action cache (TLS + basic
  auth, cluster-internal only); GitHub-hosted runners never touch the
  infrastructure and use an actions/cache-backed disk cache instead.
- Deleted the hand-rolled caching machinery: ci-target-cache,
  ci-native-artifact-cache, ci-build-native, native-source-hash,
  find-native-artifacts, restore-linux-native, native-prewarm workflow,
  ensure-* toolchain actions, and all sccache/Swatinem wiring.
- Warm native rebuilds drop from ~20 minutes to seconds; a cold client
  with a warm remote cache rebuilds the linux x64 pair in ~2.5 minutes.
2026-07-27 12:22:19 +02:00
can1357 fc35e17cb9 fix(pi-ast): satisfied rustfmt and clippy const-fn lint in ops.rs
- Reflowed compile_pattern/wrapper_template comments and while-condition to rustfmt's preferred layout.
- Made wrapper_template a const fn to satisfy clippy::missing_const_for_fn under -D warnings.
2026-07-12 20:46:29 +02:00
can1357 bb35e79189 fix(ast): auto-wrap multi-node patterns instead of erroring
A pattern like `"@types/bun": $V` parses to multiple root AST nodes and was
rejected with "Multiple AST nodes are detected". When no explicit selector is
given, retry the fragment wrapped in a minimal single-node context (JSON: `{ <frag> }`
selecting `pair`), quoting bare metavars so JSON parses. Falls back to the
original error if the wrapped form still fails, so bad patterns are unchanged.
Applies to both ast_edit (compile_pattern) and ast_grep (compile_search_patterns).
2026-07-12 13:40:43 +02:00
can1357 a9adf20af2 fix: prevented false overlap errors by deduplicating identical edits
- Enabled deduplication of byte-identical edits in `apply_edits` to prevent false overlap errors.
- Added logic in `ast_edit_blocking` to filter out duplicate rewrite matches before staging.
- Updated `apply_edits` to collapse multiple identical replacements into a single deterministic operation.
- Added regression tests for both `apply_edits` and `ast_edit_blocking` to ensure identical matches resolve cleanly.
2026-07-12 00:16:09 +02:00
can1357 48c53f8c56 chore: since perl crate decided to yank valid dists breaking my ci, im yanking it in return
who even uses perl?
2026-07-06 17:48:28 +02:00
metaphorics 9e8f115d4f refactor(pi-ast): behavior-preserving cleanup\n\nOp: compress 2026-07-03 09:31:43 +09:00
can1357 02f870fb20 feat: supported markdown section operations for block edits
- 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.
2026-06-26 16:14:23 +02:00
can1357 667aee7ec6 chore: update changelogs 2026-06-18 16:37:45 +02:00
Tobias Linn 0142dd7e2c $ is not a valid identifier in fortran 2026-06-18 15:09:32 +02:00
Tobias Linn d19cd172d0 do not replace $ by µ for ast_grep, as its grammar allows $ 2026-06-18 14:11:12 +02:00
Tobias Linn ef8f6c0204 added fortran program summary test 2026-06-18 12:47:46 +02:00
Tobias Linn 9c970dfe60 removed older fortran extensions for fixed-form 2026-06-18 12:27:41 +02:00
Tobias Linn 98306f25a5 formatting 2026-06-18 12:10:12 +02:00
Tobias Linn 10f5d86143 feat(coding-agent): add support for Fortran language 2026-06-18 11:54:04 +02:00
can1357 2ccbd0bbea fix: skipped oversized spans while continuing BFS summary unfolding
- Changed `select_folded_spans` to skip an unfold candidate that exceeded `unfold_limit` and continue processing the remaining BFS queue instead of breaking.
- Added a regression test in `summary.rs` proving a large `<style>` raw-text span no longer starves sibling HTML sections from unfolding.
- Updated the summary unfold-ceiling setting description to document that overflowed candidates stay folded while BFS continues.
2026-06-17 09:24:19 +02:00
ryjm c2a14a0afc fix(ast): infer extensionless Emacs init files 2026-06-15 18:58:55 -07:00
ryjm 18f11f5bfc feat(ast): add Emacs Lisp tree-sitter support
Register tree-sitter-elisp in the shared AST language registry so
.el files infer the emacs-lisp grammar across blockRangeAt,
summarizeCode, astGrep/astEdit, and native aliases.

This fixes edit-tool block operations on top-level Emacs Lisp forms
instead of returning unsupported-language block errors.

- Add canonical emacs-lisp aliases and .el extension inference.
- Teach summaries to fold Lisp forms without grouping arbitrary lists.
- Map .el rendering and highlighting aliases through coding-agent/native.
- Cover defun, ERT, use-package, with-eval-after-load, pcase,
  summary, astMatch, astEdit, and edit-tool insertion paths.
- Document the language and update package changelogs.
2026-06-15 18:41:24 -07:00
can1357 2ef7b7929b fix(pi-ast): fixed block range resolution for blank-line-starting declarations
- Updated `block_range_at` to query a one-column span from `col` to `col + 1` instead of a zero-width point, preventing zero-width separator nodes from trapping resolution to enclosing scopes.
- Added regression tests for Swift computed properties and top-level declarations after blank lines so the resolver now returns the expected block boundaries.
- Documented the fix in the package changelog under the `Fixed` section for native tooling block-range operations.
2026-06-14 08:06:48 +02:00
can1357 cfeaee0105 feat(coding-agent): add shimmer to running jobs and refine ID display
- Running job labels now shimmer in the TUI to provide a dynamic visual indicator of activity.
- Adjusted cache key to account for shimmer animation, ensuring it updates at 30fps instead of the 12.5fps spinner cadence.
- Suppressed job ID display when the job label is identical to its ID, avoiding redundant information.
2026-06-12 04:01:10 +02:00
bling 79fe2134e9 fix(natives): resolved bash for extensionless shell rc files
blockRangeAt inferred no language for files like `zshrc`/`.zshrc`/`.bashrc`
because `Path::extension` returns `None` for bare and dotfile names alike,
so the edit tool's `replace block` / `insert after block` ops were
permanently unresolvable on them — an agent retrying the block op would
loop on the same "could not resolve a syntactic block" error.

from_extension now maps known shell rc/profile basenames (zshrc, zshenv,
zprofile, zlogin, zlogout, zsh_aliases, bashrc, bash_profile, bash_login,
bash_logout, bash_aliases, profile, kshrc, mkshrc, shrc; with or without a
leading dot) to the bash grammar, alongside the existing Makefile/Dockerfile
basename handling. Adds a block-resolution regression test over a zsh
`if [[ … ]]; then … fi` block in `zshrc`/`.zshrc`/`.bashrc`.
2026-06-11 20:36:54 -04:00
can1357 1e5017bf7d feat: enabled block-boundary context support across read and diff previews
- Added tree-sitter `enclosing_block_boundaries` API with line range models.
- Added N-API `enclosingBlockBoundaries` bridge and exported JS declarations.
- Replaced matching-bracket context resolution with source-aware block context in read and diff flows.
- Passed source path through diff/read generators to surface native block boundary previews.
2026-06-08 14:29:59 +02:00
can1357 cb00a07203 feat: added block replace syntax with block edits in hashline parser
- Added `replace block N:` syntax in grammar/parser/tokenizer/types, emitting `kind: "block"` edits with empty-body checks.
- Added block-resolution in hashline apply/recovery, wiring `BlockResolver` to resolve edits with throw/drop unresolved behavior.
- Added native `blockRangeAt` support and exported block range/options types through pi-ast, pi-natives, and JS bindings.
- Added coding-agent resolver wiring plus internal visibility/exports updates and new parser, patcher, and setup-wizard tests.
2026-05-31 00:46:03 +02:00
can1357 77b852a1ad chore: reformat 2026-05-27 10:27:15 +02:00
can1357 3b37ffe22f chore: reformat 2026-05-27 04:10:23 +02:00
can1357 56c34a0d13 feat(summary): added BFS unfold and file-scoped line ranges to search
- Added `unfoldUntilLines`/`unfoldLimitLines` options to progressively reveal nested elidable spans breadth-first instead of collapsing everything behind the outermost elision.
- Added `minTotalLines` setting to skip summarization for short files, returning verbatim content instead.
- Added `:` selector support to `search` paths for constraining matches to specific line ranges.
- Extracted `parseLineRanges`/`parseLineRangeChunk`/`isLineInRanges` from `read.ts` into shared `path-utils.ts`.
2026-05-27 03:55:04 +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 41710a0a5f feat(cross-cutting): added pi-ast/pi-shell crates and rewired pi-natives
- Added `pi-ast` as a new crate with public `language`, `ops`, and `summary` modules and exported `SupportLang`.
- Added AST summary and rewrite APIs in `pi-ast`, including language inference, overlap-safe edits, and span normalization.
- Added `pi-shell` crate with new `Shell` and cross-platform `Process` APIs, session execution, and cancellation-aware runs.
- Updated `pi-natives` to use shared `pi_ast`/`pi_shell` APIs, switched to local path deps, and moved minimizer assets to `pi-shell`.
2026-05-11 03:43:58 +02:00