Commit Graph

410 Commits

Author SHA1 Message Date
aesoft da3c432201 Merge pull request #1399 from rtk-ai/fix/windows-go-binary-hook
fix(hooks): windows use 'rtk hook claude' no fallback
2026-04-19 20:50:02 +02:00
aesoft 13a73ddfd7 fix(tests): windows regression test fix path 2026-04-19 20:34:18 +02:00
aesoft 115e44853b fix(hooks): add regression test for windows native 2026-04-19 20:17:44 +02:00
aesoft 0e29650e11 fix(hooks): windows use 'rtk hook claude' no fallback
Removing old guards, windows can now just use the binary hook engine from 0.37

Related issues:
- Fixes #502 : rtk init --global falls back to --claude-md on Windows
- Fixes #1353 : Feature request: hook-based mode on Windows
- Partially addresses #330 : Add hooks support for Windows
- Partially addresses #913 :  Persistent "No hook installed" warning on Windows
- Partially addresses #1373 : Suppress "No hook installed" warning on Windows
- Partially addresses #682 : Config to suppress hook warning
- Related to #1248 : Windows PowerShell compatibility gaps

Supersedes community PRs:
- #1123 fix(init): enable hook installation on Windows
- #1027 fix(init): enable hook-based mode on Windows
- #809 feat: enable hook-based mode on Windows
- #452 feat: add Windows hook support for rtk init --global
- #551 feat: native cross-platform hook for Windows support
- #150 feat(hook): native cross-platform hook-rewrite command
- #1063 Feat/windows hooks
2026-04-19 15:31:52 +02:00
aesoft 0ea115bca5 fix(discover): word boundary in exclude_commands
Replace \b with ($|\s) to only match end-of-string or whitespace.

Empty string and bare "^" patterns produce regexes that match all commands, silently disabling all rewrites on a config typo. Skip
  trivial patterns with an eprintln warning.
2026-04-19 14:35:04 +02:00
aesoft 42d3161872 fix(discover): exclude_commands bypass for env-prefix, sub cmd + regex
Strip env prefix (sudo, VAR=val) before exclude check so PGPASSWORD=x psql matches ["psql"]. Match against full command instead of first token so ["git push"] matches "git push origin main".

Compile exclude entries as regex so ["^curl"] works as pattern.

Invalid regex falls back to prefix match with eprintln warning.
Non-regex patterns auto-anchor with ^ and \b to prevent substring matches (e.g. "go" won't exclude "golangci-lint").
2026-04-19 13:47:17 +02:00
aesoft 176ceb4a7d Merge pull request #1310 from JBF1991/feat/curl-cmd-no-filter
Simplified `rtk curl` Filter
2026-04-18 18:35:39 +02:00
Joshua e8a3bca5fb adding edge case comments and a constant for max response size 2026-04-18 09:51:56 -05:00
Adrien Eppling 5cd375ec1c Reapply "fix(discover): weighted savings rate per bucket, decimal already_rtk percent"
This reverts commit ea56548009.
2026-04-18 15:50:40 +02:00
Adrien Eppling ea56548009 Revert "fix(discover): weighted savings rate per bucket, decimal already_rtk percent"
This reverts commit 82c62eb893.
2026-04-18 15:29:36 +02:00
aesoft 9673727333 Merge pull request #1304 from rtk-ai/docs/adrien-review
docs: Adrien review — hierarchy, counts, consistency, gaps
2026-04-18 15:07:43 +02:00
aesoft df8e03558d Merge pull request #1346 from rtk-ai/feat-hook-engine
fix: P0+P1 fixes from pre-merge review of hook engine
2026-04-16 21:29:35 +02:00
aesoft d8ddefe78e fix: isolate cursor hook tests from local settings (determinist) 2026-04-16 21:00:13 +02:00
aesoft a1d46f39c2 fix(stream): missing stderr fields 2026-04-16 20:39:01 +02:00
aesoft e92d0993c9 fix(runner): preserve fd separation on command failure 2026-04-16 20:27:13 +02:00
aesoft d34389c3d0 fix: P0+P1 fixes from pre-merge review of hook engine
- runner: print captured output on non-zero exit (P0.1)
- main: add hook/pipe to META_COMMANDS (P0.2)
- init: store integrity hash after Gemini script install (P0.3)
- hook_cmd: audit log + permission check for all agent paths (P1.1, P1.2)
- runner: include failure_lines in cargo test summary (P1.5)
- Cargo.toml: remove unconditional libc dep (P1.7)
- init: clean stale settings.json entries during migration (P1.8)
2026-04-16 15:41:20 +02:00
Joshua 80bc7fbd61 documentation 2026-04-15 14:45:30 -05:00
Joshua 71baf2b82d making curl_cmd use force_tee_hint 2026-04-15 14:22:56 -05:00
aesoft e7b7f9ab66 Merge pull request #956 from rtk-ai/feat-hook-engine
feat(refacto-core): binary hook w/ native cmd exec + streaming
2026-04-15 18:58:17 +02:00
aesoft 0f93f0e3e6 Merge branch 'develop' into fix/release-please-changelog 2026-04-14 20:54:08 +02:00
Florian BRUNIAUX 82c62eb893 fix(discover): weighted savings rate per bucket, decimal already_rtk percent
B6 — report.rs:already_rtk integer division truncated small ratios to 0%
(e.g. 3/1000 showed "0%" instead of "0.3%"). Now uses f64 division with
one decimal place. Three regression tests added.

B7 — mod.rs:SupportedBucket.savings_pct was set once from the first-seen
sub-command and never updated. For buckets containing multiple sub-commands
(e.g. git add + git diff + git log all under "rtk git"), the displayed
estimated_savings_pct reflected only the first classification. Fix: track
total_raw_output_tokens alongside total_output_tokens (savings). Compute
effective_savings_pct = saved / raw * 100 at entry construction, giving a
weighted average across all sub-commands in the bucket. This rate is exposed
in rtk discover --format json via estimated_savings_pct.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Florian BRUNIAUX <florian@bruniaux.com>
2026-04-14 11:51:40 +02:00
aesoft 906dedd75a Merge remote-tracking branch 'origin/develop' into feat-hook-engine 2026-04-13 21:14:55 +02:00
aesoft 9e96caa0a1 Merge pull request #355 from KuSh/pnpx+dlx
feat(discover): handle more npm/npx/pnpm/pnpx patterns
2026-04-13 20:31:12 +02:00
Florian BRUNIAUX f2985ac5b4 Merge pull request #1217 from ousamabenyounes/fix/issue-1215 2026-04-13 10:30:10 +02:00
Florian BRUNIAUX 1436c2d6bb Merge pull request #1188 from ousamabenyounes/fix/git-push-u-flag-conflict-1086 2026-04-13 10:30:07 +02:00
Florian BRUNIAUX 8126a20824 Merge pull request #1200 from ousamabenyounes/fix/issue-1105 2026-04-13 10:30:04 +02:00
Florian BRUNIAUX e3a86a463b Merge pull request #1199 from ousamabenyounes/fix/issue-1101 2026-04-13 10:30:00 +02:00
Florian BRUNIAUX 9be5cc23f3 Merge pull request #1239 from KuSh/fix-pnpm-list 2026-04-13 10:29:57 +02:00
Florian BRUNIAUX b61f672ab8 Merge pull request #1227 from davidalecrim1/fix/cc-economics-hang 2026-04-13 10:29:55 +02:00
Florian BRUNIAUX 3223c76338 Merge pull request #1172 from iRonin/fix/curl-json-schema-values 2026-04-13 10:18:44 +02:00
Florian BRUNIAUX 60c8416c9e Merge pull request #1214 from rtk-ai/fix/permission-compound-allow-escalation 2026-04-13 10:18:41 +02:00
Florian BRUNIAUX 8f28a05917 Merge pull request #1173 from iRonin/fix/hook-auto-allow-bypass 2026-04-13 10:18:38 +02:00
Florian BRUNIAUX b41be60dd7 Merge pull request #1072 from rtk-ai/fix/tee-utf8-panic 2026-04-13 10:18:35 +02:00
Florian BRUNIAUX e09a53e5f7 Merge pull request #1181 from rtk-ai/rgpd-telemetry 2026-04-13 09:26:46 +02:00
Florian BRUNIAUX 24875a2e0d Merge pull request #798 from mgierok/fix/golangci-lint-run-wrapper-develop 2026-04-13 09:26:16 +02:00
Florian BRUNIAUX a9e857e725 Merge pull request #1036 from s2005/feat/liquibase 2026-04-13 09:26:11 +02:00
Florian BRUNIAUX f86c1521cc Merge pull request #961 from chojs23/fix/invalid-gh-pr-status-json-field 2026-04-13 09:25:53 +02:00
Florian BRUNIAUX 3606bce216 Merge pull request #940 from niklasmarderx/fix/yadm-support-567 2026-04-13 09:25:41 +02:00
Florian BRUNIAUX aa54613df8 Merge pull request #935 from Bortlesboat/fix/empty-pr-issue-list-output 2026-04-13 09:25:32 +02:00
Ousama Ben Younes 6b76fdb87d fix(git): remove -u short alias from --ultra-compact to fix git push -u
The global --ultra-compact flag used -u as its short form which caused
`rtk git push -u origin <branch>` to silently consume -u as ultra-compact
mode instead of forwarding it to git as --set-upstream. The push succeeded
but the upstream tracking branch was never written to .git/config, causing
subsequent plain `git push` calls to fail with "no upstream branch".

Fixes #1086

Generated by Claude Code
Vibe coded by ousamabenyounes

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-12 21:34:52 +00:00
Ousama Ben Younes 3db8070b51 fix(permissions): glob_matches middle-wildcard matches commands without trailing args (#1105)
When glob_matches processed a pattern like "git -C * diff:*" (normalized
to "git -C * diff *"), middle segment " diff " requires a trailing space
to match. For "git -C /path diff" the remaining text is "/path diff"
which ends with " diff" — no trailing space — so .find(" diff ") returned
None and the command was incorrectly rejected.

Fix: in the middle-segment branch, if the full substring search fails,
also check if the remaining text ends with the trimmed (right-stripped)
segment. This handles commands that terminate at the middle token with
no trailing arguments.

Add regression test covering the exact reproduction case from the issue.

Closes #1105

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:33:44 +00:00
Ousama Ben Younes dbeeaed16a fix(find): include hidden files when pattern targets dotfiles (#1101)
rtk find used WalkBuilder with .hidden(true), which skips ALL hidden
files and directories. As a result, `rtk find . -name ".claude.json"`
always returned "0 for '.claude.json'" even when the files existed.

Fix: detect when the -name pattern starts with a dot and set
.hidden(false) for that walk, so hidden entries are visited.
Non-dotfile patterns keep the default .hidden(true) behaviour.

Add regression tests covering both cases.

Closes #1101

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:33:44 +00:00
mgierok 24f2adaf8f fix(golangci-lint): support inline global flags before run
Handle --flag=value forms consistently in both the runtime parser and discover rewrite logic.
Add regression coverage for classify and rewrite paths using inline global flag values before run.
2026-04-12 23:14:47 +02:00
mgierok d85303ec48 fix(discover): preserve golangci-lint flags in rewrite
Normalize golangci-lint global flags before run during classification and keep them in rewritten commands.
Add regression coverage for classify_command and rewrite_command with pre-run global flags.
2026-04-12 23:14:47 +02:00
mgierok 4f4e4d2b5a fix(golangci-lint): restore run wrapper and align guidance
Keep bare golangci-lint invocations as passthrough while preserving compact filtering for golangci-lint run.
Update discover/rewrite rules, regression tests, and docs to advertise only the supported compact run path.
2026-04-12 23:14:47 +02:00
s2005 630f0a2800 Add liquibase TOML filter 2026-04-12 22:25:04 +02:00
Nicolas Le Cam 010596c696 Revert "feat(pnpm): handle pnpm build rewrite"
This reverts commit 94a35325790a8a62715e66863ad5a6cd17417d81.
Build is no longer a pnpm command with specific handling.

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
2026-04-12 22:03:39 +02:00
Nicolas Le Cam 70610da4bb fix(vitest): rework command to handle differences between vitest and jest
Also remove duration computation as there's no endTime attribute in json output

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
2026-04-12 22:03:39 +02:00
Nicolas Le Cam 45938b2a4d feat(js): distinguish between jest and vitest and don't rewrite npm test commands as we don't know which test framework is used under the hood
Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
2026-04-12 22:03:39 +02:00
Nicolas Le Cam c47edac35d chore: fix clippy warning 2026-04-12 22:03:39 +02:00