Commit Graph

119 Commits

Author SHA1 Message Date
rtk-release-bot[bot] f1dc9f0558 chore(master): release 0.42.4 2026-06-12 15:19:00 +00:00
rtk-release-bot[bot] 6d89cb8baa chore(master): release 0.42.3 2026-06-05 16:14:46 +00:00
Adrien Eppling a1ef0ef036 chore: merge master into develop (security port + release bump) 2026-06-05 17:13:31 +02:00
rtk-release-bot[bot] 4be04e0bdc chore(master): release 0.42.2 2026-06-05 10:48:27 +00:00
rtk-release-bot[bot] 9664e27038 chore(master): release 0.42.1 2026-06-03 12:37:40 +00:00
patrick szymkowiak 4c278d18c8 Merge pull request #2002 from YOMXXX/feat/msrv-1.91
chore(cargo): declare MSRV via rust-version = "1.91"
2026-06-01 18:44:39 +02:00
aesoft 1875945bf3 fix(pkg): rtk is Apache 2.0 and no MIT 2026-05-25 09:42:06 +02:00
rtk-release-bot[bot] 415fab0611 chore(master): release 0.42.0 2026-05-24 15:34:31 +00:00
rtk-release-bot[bot] 02f76972b4 chore(master): release 0.41.0 2026-05-22 15:57:54 +00:00
李冠辰 6f4519a183 chore(cargo): declare MSRV via rust-version = "1.91"
rtk uses `str::floor_char_boundary()` (src/cmds/system/pipe_cmd.rs:140)
which was stabilized in Rust 1.91.0. Without `rust-version` in
Cargo.toml, packagers on older toolchains hit a confusing
`use of unstable library feature` error from rustc.

With this declaration, cargo gives the expected friendly diagnostic
up-front:

    error: rustc 1.88.0 is not supported by the following packages:
      rtk@0.34.3 requires rustc 1.91

Verified locally by switching toolchains:
- cargo +1.88 check → fails with the new clear MSRV error (intended)
- cargo +1.93 fmt/clippy/test → 1909 passed, zero warnings

Fixes #1402
2026-05-21 08:25:59 +08:00
rtk-release-bot[bot] 120d99fc91 chore(master): release 0.40.0 2026-05-13 19:40:00 +00:00
aesoft 90525ac688 Merge pull request #1747 from rtk-ai/develop
Next Release
2026-05-13 20:54:02 +02:00
Nicolas Le Cam 70b9f385c7 chore(ci): deny warnings and make clippy pass mandatory in ci 2026-05-10 12:44:38 +02:00
rtk-release-bot[bot] dad9f16e44 chore(master): release 0.39.0 2026-05-06 15:40:49 +00:00
rtk-release-bot[bot] 6759e015a2 chore(master): release 0.38.0 2026-04-29 18:32:56 +00:00
github-actions[bot] 0907b998fc chore(master): release 0.37.2 2026-04-20 17:52:14 +00:00
github-actions[bot] 92823bf21d chore(master): release 0.37.1 2026-04-18 13:46:53 +00:00
github-actions[bot] 75bcf9dec6 chore(master): release 0.37.0 2026-04-17 07:45:25 +00: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
aesoft 906dedd75a Merge remote-tracking branch 'origin/develop' into feat-hook-engine 2026-04-13 21:14:55 +02:00
aesoft 8156081261 fix(telemetry): clean code 2026-04-12 15:28:25 +02:00
aesoft b3936b8e5d fix(stream): stream engine & template + BlockHandler, RegexBlockFilter, signal guard, pipe rewrite 2026-04-09 20:39:30 +02:00
aesoft aa6317fb83 Merge pull request #990 from TropicalDog17/fix/issue-948
fix(ls): filter quality wrong truncation
2026-04-06 16:38:12 +02:00
Adrien Eppling 12e57e870f merge: resolve CHANGELOG.md conflict (develop ← master)
Keep develop's [Unreleased] section on top, followed by master's
released versions (0.34.3, 0.34.2).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 12:36:55 +02:00
Adrien Eppling 33185101fc fix(proxy): kill child process on SIGINT/SIGTERM to prevent orphans
Drop-based ChildGuard doesn't run on signals with panic=abort (release
profile). Register a signal handler that stores the child PID in an
AtomicU32 and kills it on SIGINT/SIGTERM, then re-raises the signal
with default handler for correct exit status propagation.

Fixes orphan processes when rtk proxy is killed by Claude Code, process
managers, or manual kill — the root cause behind issue #897.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 19:58:03 +02:00
aesoft 614c64eec2 Update Cargo.toml 2026-04-04 11:08:41 +02:00
aesoft bade4547b3 Update Cargo.toml 2026-04-04 11:07:36 +02:00
Tuan Tran d2ecbdb2ec bet 2026-04-04 01:10:31 +07:00
Tuan Tran 4cf0392777 chore: revert version bump 2026-04-04 01:07:54 +07:00
github-actions[bot] e51be7a022 chore(master): release 0.34.3 2026-04-02 09:05:03 +00:00
aesoft bff0258424 Merge pull request #934 from rtk-ai/develop
fix(refacto): wrappers for standardization, exit codes lexer tokenizer, constants, code clean
2026-04-02 11:04:16 +02:00
aesoft 5af18f87ae Merge branch 'develop' into refacto-folders-and-documentation 2026-03-30 19:29:34 +02:00
aesoft 234909d2c7 fix(automod): add auto discovery for cmds 2026-03-30 17:58:00 +02:00
github-actions[bot] 51939a50de chore(master): release 0.34.2 2026-03-30 13:13:33 +00:00
github-actions[bot] ad5a155e45 chore(master): release 0.34.1 2026-03-28 21:11:03 +00:00
aesoft 51f9c888b8 fix(security): missing toml pkg 2026-03-28 14:07:53 +01:00
aesoft eae2fee0c2 fix(security): missing toml pkg 2026-03-27 19:20:15 +01:00
github-actions[bot] 153f9e0459 chore(master): release 0.34.0 2026-03-26 18:10:56 +00:00
github-actions[bot] d6425c311d chore(master): release 0.33.1 2026-03-25 12:08:28 +00:00
Patrick szymkowiak 0649e974fb fix: hook security + stderr redirects + version bump (#807)
* fix(hook): respect Claude Code deny/ask permission rules on rewrite
* fix(permissions): check deny rules before rewrite + flush stdout
* fix(permissions): support *:* and leading/middle wildcards
* fix: strip trailing stderr redirects before rewrite matching (#530)
* chore: bump version to 0.33.0

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-03-25 11:37:02 +01:00
github-actions[bot] 248ed0906f chore(master): release 0.33.0-rc.54 2026-03-24 09:24:50 +00:00
github-actions[bot] c85e348a91 chore(master): release 0.31.0 (#719)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-19 12:14:19 +01:00
github-actions[bot] 48e53cb2c5 chore(master): release 0.30.1 (#693)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-18 14:28:49 +01:00
github-actions[bot] 55d8dc9def chore(master): release 0.30.0 2026-03-16 12:24:55 +00:00
aesoft ddf8403325 Merge branch 'master' into develop 2026-03-14 19:54:44 +01:00
github-actions[bot] 188ec996b3 chore(master): release 0.29.0 (#540)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-12 16:18:00 +01:00
Artiom Tofan 2e194efb3a fix: resolve Windows command wrapper execution (#269)
- add PATHEXT-aware command resolution via which\n- migrate affected command runners to resolved_command\n- add regression coverage for wrapper/fallback behavior
2026-03-12 15:36:19 +01:00
patrick szymkowiak d0396da1ce chore: merge develop into master (#499)
* fix: handle tail rewrites with read tail-lines

* feat: add 32 TOML-filtered commands to hook rewrite rules (#475)

Add rewrite rules for all TOML-filtered commands so the Claude Code
hook automatically rewrites them to `rtk proxy <cmd>`. This ensures
TOML filters apply transparently without manual `rtk` prefixing.

Commands added: ansible-playbook, brew, composer, df, dotnet, du,
fail2ban-client, gcloud, hadolint, helm, iptables, make,
markdownlint, mix, mvn, ping, pio, poetry, pre-commit, ps, quarto,
rsync, shellcheck, shopify, sops, swift, systemctl, terraform, tofu,
trunk, uv, yamllint.

Tests updated to use `htop` as unsupported command example since
terraform is now supported via TOML filter.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: git log --oneline no longer silently truncated to 10 entries (#461) (#478)

Only inject -10 limit when RTK applies its own compact format.
When user provides --oneline/--pretty/--format, respect git's
default behavior (no limit). Also detect -n and --max-count as
user-provided limit flags.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: gh run view --job flag loses its value (#416) (#477)

Add --job and --attempt to flags_with_value in
extract_identifier_and_extra_args() so their values are not
mistaken for the run identifier when placed before it.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: rtk read no longer corrupts JSON files with glob patterns (#464) (#479)

Add Language::Data variant for JSON, YAML, TOML, XML, Markdown, CSV
and other data formats. These files have no comment syntax, so the
MinimalFilter skips comment stripping entirely.

Previously, `packages/*` in package.json was treated as a block
comment start (`/*`), causing everything until the next `*/` to be
stripped — corrupting the JSON structure.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: npm routing, discover cat redirect, proxy quoted args (#480)

* fix: npm routing, discover cat redirect, proxy quoted args (#470, #315, #388)

#470: rtk npm now correctly routes npm subcommands (install, list,
audit, etc.) without injecting "run". Previously, `rtk npm install`
was executed as `npm run install`.

#315: discover no longer counts `cat >`, `cat >>`, `cat |` as missed
savings. These are write/pipe operations with no terminal output to
compress.

#388: rtk proxy now auto-splits a single quoted argument containing
spaces. `rtk proxy 'head -50 file.php'` now works like
`rtk proxy head -50 file.php`.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: proxy quote-aware split, redirect detection scan all tokens, npm test routing

- Proxy: replace split_whitespace with shell_split() that respects quotes (#388)
  e.g. 'git log --format="%H %s"' no longer splits on space inside quotes
- Discover: scan all tokens for redirect operators, not just nth(1) (#315)
  e.g. 'cat file.txt > output.txt' now correctly detected as write
- npm: replace tautological test with actual routing logic verification

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

---------

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* feat: add 11 new TOML built-in filters (xcodebuild, jq, basedpyright, ty, skopeo, stat, biome, oxlint, jj, ssh, gcc) (#490)

Closes #484, #483, #449, #448, #428, #283, #316, #195, #271, #333, #87, #376

Signed-off-by: Patrick <patrick@rtk.ai>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: rtk rewrite accepts multiple args without quotes (#504)

* fix: rtk rewrite accepts multiple args without quotes

`rtk rewrite ls -al` now works the same as `rtk rewrite "ls -al"`.
Previously, args after the command were rejected or caused ENOENT.

Also adds rewrite tests to benchmark.sh to prevent regression.

Signed-off-by: Patrick Szymkowiak <patrick.szymkowiak@rtk-ai.app>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* test: add Clap rewrite tests + fix benchmark false failures

- Add 2 Clap try_parse_from tests for rewrite multi-args (catches the
  KuSh bug at unit test level, not just benchmark)
- Fix git diff benchmark: use HEAD~1 on both sides for fair comparison
- Skip cargo/rustc benchmarks when tools not in PATH instead of false FAIL
- Benchmark: 0 fail, 4 skip (env-dependent), 52 green

Signed-off-by: Patrick Szymkowiak <patrick.szymkowiak@rtk-ai.app>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

---------

Signed-off-by: Patrick Szymkowiak <patrick.szymkowiak@rtk-ai.app>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: use rtk <cmd> instead of rtk proxy for TOML-filtered commands (#507)

- Replace all 32 `rtk proxy <cmd>` rules with `rtk <cmd>` so TOML filters
  actually apply (proxy bypasses filters, giving 0% real savings)
- Extract NPM_SUBCOMMANDS to module-level const to prevent test/prod drift

Reported-by: FlorianBruniaux

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: warn when no hook installed + rtk gain hook status + PR #499 fixes

- hook_check: detect missing hook (not just outdated), warn with ⚠️
  Only warns if ~/.claude/ exists (Claude Code user) — once per day
- gain: show hook status warning (missing/outdated) in rtk gain output
- ssh.toml: bump max_lines 50→200, truncate_lines_at 120→200 (Florian review)
- git.rs: mark integration test #[ignore] + assert binary exists (Florian review)
- Add HookStatus enum for reuse across gain/diagnostics

Fixes #508, Fixes #509

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: address code review — hook_check edge cases

- status() checks .claude/ existence (no false warning for non-CC users)
- Unreadable hook file returns Outdated not Missing
- Swap marker/warning order (emit warning before touching rate-limit marker)
- Rename misleading test, add end-to-end status() test

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: review iteration 2 — double-warning, case-sensitive test, ssh truncate

- Refactor check_and_warn to delegate to status() (single source of truth)
- Fix double-warning: skip maybe_warn() for `rtk gain` (has its own inline warning)
- Fix git test: case-insensitive assertion for cross-locale compatibility
- ssh.toml: keep truncate_lines_at=120 (terminal width convention)
- Robust mtime handling: unwrap_or(u64::MAX) instead of nested .ok()?
- Test handles all CI environments (no hook, no .claude, hook present)

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: detect and warn RTK_DISABLED=1 overuse (#508)

- discover: count RTK_DISABLED= bypassed commands, report top 5 examples
- gain: lightweight 7-day JSONL scan, warn if >10% commands bypassed
- registry: add has_rtk_disabled_prefix() and strip_disabled_prefix() helpers
- gitignore: add .fastembed_cache/ and .next/

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: preserve trailing newline in tail_lines + add missing test

- apply_line_window() now preserves trailing newline when input has one
- Add test for tail --lines N (space form) rewrite
- Add test for tail_lines without trailing newline

Signed-off-by: Patrick <patrick@rtk-ai.com>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: respect user-specified git log limits instead of silently truncating

RTK was silently capping git log output in two ways:
1. `--oneline` without `-N` defaulted to 10 entries (now 50)
2. `filter_log_output()` re-truncated even when user explicitly set `-N`
3. Lines >80 chars were truncated, hiding PR numbers and author names

This matters for LLM workflows: Claude needs full commit history for
rebase, squash, and changelog operations. Silent truncation caused
incomplete context and repeated re-runs.

Changes:
- User-explicit `-N` → no line cap, wider 120-char truncation
- `--oneline`/`--pretty` without `-N` → default 50 (was 10)
- No flags → unchanged (default 10)
- Extract `truncate_line()` helper for clarity

Fixes #461

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: handle -n N and --max-count=N forms in git log limit parsing

- Extract parse_user_limit() to handle all 4 forms: -20, -n 20, --max-count=20, --max-count 20
- Add token savings test for filter_log_output (≥60%)
- Add 5 tests for parse_user_limit edge cases

Signed-off-by: Patrick <patrick@rtk-ai.com>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* feat: add structured dotnet support (build/test/restore/format)

Integrate PR #172 by @danielmarbach onto develop:
- MSBuild binlog parser (binary format, gzip, 7-bit varint)
- TRX test result parser (quick-xml)
- Format report JSON parser
- Subcommand routing: build, test, restore, format + passthrough
- Sensitive env var scrubbing (GH_TOKEN, AWS_SECRET_ACCESS_KEY, etc.)
- Fallback to text parsing when binlog unavailable
- 86-93% token savings on real .NET projects

Maintainer fixes applied:
- Removed binlog temp path from output (wastes tokens)
- Dropped hook file changes (incompatible with develop architecture)
- Fixed unused variable warnings

888 tests pass.

Signed-off-by: Patrick <patrick@rtk-ai.com>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* feat: add OpenCode plugin support (#300)

* feat(opencode): add OpenCode plugin support

Add `--opencode` flag to `rtk init` for installing a global OpenCode
plugin that rewrites Bash/shell commands through `rtk rewrite`.

- New plugin: hooks/opencode-rtk.ts (thin delegator to rtk rewrite)
- New init modes: --opencode (OpenCode only), combinable with Claude modes
- Plugin install/update/remove lifecycle with idempotent writes
- Uninstall cleans up OpenCode plugin alongside Claude Code artifacts
- `rtk init --show` reports OpenCode plugin status
- Replace unreachable!() with bail!() in match exhaustiveness guard

* docs: add OpenCode plugin documentation

- README: OpenCode plugin section, install flags, troubleshooting
- TROUBLESHOOTING: OpenCode-specific checklist
- Update init mode table to reflect Claude Code default

---------

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
Signed-off-by: Patrick <patrick@rtk.ai>
Signed-off-by: Patrick Szymkowiak <patrick.szymkowiak@rtk-ai.app>
Signed-off-by: Patrick <patrick@rtk-ai.com>
Co-authored-by: Qingyu Li <2310301201@stu.pku.edu.cn>
Co-authored-by: Ousama Ben Younes <benyounes.ousama@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: José Almeida <57680069+zeval@users.noreply.github.com>
2026-03-12 13:49:08 +01:00
Patrick szymkowiak a8dbe33b84 feat: add structured dotnet support (build/test/restore/format)
Integrate PR #172 by @danielmarbach onto develop:
- MSBuild binlog parser (binary format, gzip, 7-bit varint)
- TRX test result parser (quick-xml)
- Format report JSON parser
- Subcommand routing: build, test, restore, format + passthrough
- Sensitive env var scrubbing (GH_TOKEN, AWS_SECRET_ACCESS_KEY, etc.)
- Fallback to text parsing when binlog unavailable
- 86-93% token savings on real .NET projects

Maintainer fixes applied:
- Removed binlog temp path from output (wastes tokens)
- Dropped hook file changes (incompatible with develop architecture)
- Fixed unused variable warnings

888 tests pass.

Signed-off-by: Patrick <patrick@rtk-ai.com>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-03-11 21:19:40 +01:00
github-actions[bot] cc93afc954 chore(master): release 0.28.2 (#473)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-10 20:26:41 +01:00