Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e09d131
fix(build): send the MinGW linker --stack, not MSVC's /STACK:
rhishi99 Aug 20, 2026
89d73d5
test(hook): pin exit codes across rtk rewrite (#3492)
Protocol-zero-0 Sep 22, 2026
2b410b2
fix(cli): hand -h, --help and help to the tool each subcommand wraps
Sep 29, 2026
1edb820
refactor(cli): narrow the help-flag fix to code, and read -h per tool
Sep 29, 2026
d0a129a
refactor(core): read the help request once, in runner::run
Sep 29, 2026
ebcf8c0
refactor: drop comments the code already says
Sep 29, 2026
0f293e9
test(cli): fuzz the meta-flag contract over the whole command surface
Sep 29, 2026
fb18174
test: make the help fuzz portable and keep Command::new off variables
Sep 29, 2026
338affa
fix(hook): skip background checks in hook commands
tayfuryldz Sep 27, 2026
cd92862
fix(hook): preserve telemetry on parse fallback
tayfuryldz Sep 27, 2026
9a1dac0
test(hook): cover startup background-work gating
tayfuryldz Oct 2, 2026
2e6cb8e
Merge branch 'develop' into fix/helper-flags
Oct 5, 2026
6c56121
fix(core): read a usage request through the tokenizer, and catch it i…
Oct 5, 2026
dd6532e
fix(core): read -h only when it is the whole argument
Oct 5, 2026
51b5517
test: compare a tool's own first line without its argv[0] spelling
Oct 5, 2026
362c6f7
fix(git): only announce the log cap on a walk git ran, and count it r…
KuSh Sep 20, 2026
62becfe
test(hook): require compound Python rewrite coverage
Protocol-zero-0 Oct 9, 2026
4dfb168
Merge remote-tracking branch 'upstream/develop' into chore/rewrite-ex…
Protocol-zero-0 Oct 9, 2026
7087fe9
test(hook): isolate rewrite cases and pin failing tool statuses
Protocol-zero-0 Oct 9, 2026
dbf0813
fix(core): keep the usage guard off RTK's own probes and argv
Oct 12, 2026
5f95337
Merge branch 'develop' into fix/helper-flags
Oct 12, 2026
1b896c6
test: assert err and summary filtered, not that the output got smaller
Oct 12, 2026
4ef06a6
test: probe the filter guard with output that is large on every machine
Oct 12, 2026
7bf595f
fix(build): special-case msvc for the stack flag and test the reserva…
KuSh Oct 12, 2026
a18bea5
ci: run the Windows tests on the gnu target too
KuSh Oct 12, 2026
8850505
Merge branch 'develop' into fix/build-mingw-stack-arg
KuSh Oct 12, 2026
4f51c44
fix: read `cargo install --version=X` as a version, and pin three hel…
KuSh Oct 12, 2026
4790d64
chore(deps): bump encoding_rs from 0.8.35 to 0.8.42
dependabot[bot] Oct 13, 2026
1d2a6ba
chore(deps): bump ignore from 0.4.25 to 0.4.32
dependabot[bot] Oct 13, 2026
11d0c4d
chore(deps): bump serde from 1.0.228 to 1.0.229
dependabot[bot] Oct 13, 2026
151c759
Merge branch 'develop' into fix/helper-flags
Oct 14, 2026
51a659a
Merge remote-tracking branch 'origin/fix/helper-flags' into fix/helpe…
Oct 14, 2026
07b5c1f
chore(deps): bump actions/upload-artifact from 4 to 7
dependabot[bot] Oct 14, 2026
51547ba
chore(deps): bump actions/checkout from 4 to 7
dependabot[bot] Oct 14, 2026
01af0d9
chore(deps): bump googleapis/release-please-action from 4.4.1 to 5.0.0
dependabot[bot] Oct 14, 2026
5db646b
Merge pull request #4148 from KuSh/fix/4117-followup-log-probe
KuSh Oct 14, 2026
b465def
fix(permissions): match deny and ask rules past assignments and wrapp…
KuSh Sep 26, 2026
4d239eb
Merge pull request #4472 from rtk-ai/dependabot/cargo/develop/serde-1…
KuSh Oct 14, 2026
8cc08be
Merge pull request #4473 from rtk-ai/dependabot/cargo/develop/ignore-…
KuSh Oct 14, 2026
26fc9f2
Merge pull request #4474 from rtk-ai/dependabot/cargo/develop/encodin…
KuSh Oct 14, 2026
17cf0cd
chore(deps): bump windows-sys from 0.59.0 to 0.61.2
dependabot[bot] Oct 14, 2026
2bcc599
Merge pull request #4284 from rtk-ai/fix/4281-gate-peel
KuSh Oct 14, 2026
263cb43
Merge pull request #4475 from rtk-ai/dependabot/cargo/develop/windows…
KuSh Oct 14, 2026
25cc7c7
chore(deps): bump which from 8.0.1 to 8.0.6
dependabot[bot] Oct 14, 2026
4f12b01
Merge pull request #4348 from rtk-ai/fix/helper-flags
KuSh Oct 14, 2026
4701ff7
Merge pull request #4476 from rtk-ai/dependabot/cargo/develop/which-8…
KuSh Oct 14, 2026
18c0492
Merge pull request #4573 from rtk-ai/dependabot/github_actions/develo…
KuSh Oct 14, 2026
780151e
Merge pull request #4574 from rtk-ai/dependabot/github_actions/develo…
KuSh Oct 14, 2026
0508e11
Merge pull request #4575 from rtk-ai/dependabot/github_actions/develo…
KuSh Oct 14, 2026
5eb0509
Merge pull request #3613 from rhishi99/fix/build-mingw-stack-arg
KuSh Oct 14, 2026
b7d9f5d
test(hook): probe the ls exit code, cover a clean git diff, isolate t…
KuSh Oct 15, 2026
dcebf50
fix(git): no log cap notice under git's usage on git 2.56
KuSh Oct 15, 2026
f16beca
Merge pull request #4203 from Protocol-zero-0/chore/rewrite-exit-code…
KuSh Oct 15, 2026
16a20a2
Merge pull request #4578 from rtk-ai/fix/git-log-usage-exit-zero
KuSh Oct 16, 2026
ffdde91
Merge upstream/develop into fix/4297-hook-background-work
KuSh Oct 16, 2026
b925ff9
test(cli): pin which invocations run the telemetry ping
KuSh Oct 16, 2026
7bff768
Merge pull request #4308 from tayfuryldz/fix/4297-hook-background-work
KuSh Oct 17, 2026
2fdcaa7
fix(hooks): leave git unrewritten in Claude Code managed worktrees
b3hz4d Sep 5, 2026
ee2af0d
test(hooks): pin the Claude Code worktree git exclusion
KuSh Oct 17, 2026
e542dca
Merge pull request #3879 from b3hz4d/fix/worktree-git-rewrite-3864
KuSh Oct 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
private-key: ${{ secrets.APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
with:
token: ${{ steps.app-token.outputs.token }}
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
needs: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo doc --no-deps
Expand All @@ -73,7 +73,7 @@ jobs:
runs-on: ubuntu-latest
needs: clippy
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
Expand All @@ -91,7 +91,7 @@ jobs:
runs-on: ubuntu-latest
needs: clippy
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand All @@ -112,18 +112,31 @@ jobs:
echo "Apache-2.0 edition links no BUSL crate."

test:
name: test (${{ matrix.os }})
name: test (${{ matrix.os }}${{ matrix.target && format(', {0}', matrix.target) || '' }})
needs: clippy
runs-on: ${{ matrix.os }}
env:
# An explicit target on every leg keeps the run command the same. It also puts
# each leg in cross mode, where RUSTFLAGS no longer reach build scripts or proc-macros.
CARGO_BUILD_TARGET: ${{ matrix.target || 'host-tuple' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
- os: windows-latest
# Links with MinGW's ld, which link.exe's `/STACK:` spelling breaks (see build.rs).
# The runner's host stays msvc, so build.rs also runs with host != target.
- os: windows-latest
target: x86_64-pc-windows-gnu
- os: macos-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
# `--all` is `--workspace`: `rtk` + `engine`. `proxy/` is tested in
# its own job, since it is not a member.
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
cd ../../..

- name: Upload rtk-oss artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: rtk-oss-${{ matrix.target }}
path: rtk-oss-${{ matrix.target }}.${{ matrix.archive }}
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
cd ../../..

- name: Upload rtk-proxy artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: rtk-proxy-${{ matrix.target }}
path: rtk-proxy-${{ matrix.target }}.${{ matrix.archive }}
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -232,7 +232,7 @@ jobs:
RTK_TELEMETRY_TOKEN: ${{ secrets.RTK_TELEMETRY_TOKEN }}

- name: Upload DEB
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: rtk-oss-deb
path: target/debian/*.deb
Expand All @@ -243,7 +243,7 @@ jobs:
container: fedora:latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Install dependencies
run: |
Expand All @@ -262,7 +262,7 @@ jobs:
run: cargo generate-rpm --variant oss

- name: Upload RPM
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: rtk-oss-rpm
path: target/generate-rpm/*.rpm
Expand Down
78 changes: 39 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ crossterm = "0.28"
libc = "0.2"

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = [
windows-sys = { version = "0.61", features = [
"Win32_System_Console",
"Win32_Globalization",
] }
Expand Down
36 changes: 28 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,35 @@ use std::collections::HashSet;
use std::fs;
use std::path::Path;

fn main() {
#[cfg(windows)]
{
// Clap + the full command graph can exceed the default 1 MiB Windows
// main-thread stack during process startup. Reserve a larger stack for
// the CLI binary so `rtk.exe --version`, `--help`, and hook entry
// points start reliably without requiring ad-hoc RUSTFLAGS.
println!("cargo:rustc-link-arg=/STACK:8388608");
/// Reserve a larger main-thread stack for Windows targets.
///
/// Clap + the full command graph can exceed the default 1 MiB Windows stack
/// during process startup, so `rtk.exe --version`, `--help`, and the hook entry
/// points need the headroom to start reliably without ad-hoc RUSTFLAGS.
///
/// Two things here are deliberately keyed off the **target**, not the host:
/// `CARGO_CFG_TARGET_OS` (a `#[cfg(windows)]` here would describe the machine
/// running the build, so cross-compiling to Windows from Linux would silently
/// skip the flag), and the flag syntax itself — `link.exe` takes `/STACK:`
/// while the MinGW `ld` behind `x86_64-pc-windows-gnu` only understands
/// `--stack`, and feeding it `/STACK:` makes it look for a file by that name.
/// Only `msvc` needs its own spelling: `gnu` (gnullvm reports it too) links
/// through a gcc or clang driver that takes `-Wl,--stack`, and that is also what
/// an environment the match does not name gets.
fn set_windows_stack_size() {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") {
return;
}
const STACK_BYTES: usize = 8 * 1024 * 1024;
let arg = match std::env::var("CARGO_CFG_TARGET_ENV").as_deref() {
Ok("msvc") => format!("/STACK:{STACK_BYTES}"),
_ => format!("-Wl,--stack,{STACK_BYTES}"),
};
println!("cargo:rustc-link-arg={arg}");
}

fn main() {
set_windows_stack_size();

check_cmds_modules_declared();

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started/supported-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Plugin in the `openclaw/` directory. Uses the `before_tool_call` hook, delegates

**Permissions.** RTK keeps the deny gate; OpenClaw owns approval. The plugin runs `rtk rewrite` with `RTK_REWRITE_HOST=openclaw`, which tells RTK that this host applies its own exec policy (`tools.exec.mode`, `security`, `ask`) to whatever the hook returns. RTK therefore does not prompt for a command that matched **no** rule, instead of raising a second approval derived from Claude Code's `settings.json` on a runtime that never opted into it ([#3908](https://github.com/rtk-ai/rtk/issues/3908)).

A command matching a `permissions.deny` rule in those same Claude Code settings files is still refused, and the plugin blocks the tool call — naming the host only relaxes a *default* ask. As in Claude Code, a rule matches the command as written rather than every way of invoking the program (`Bash(git push *)` does not stop `git -C . push`), so a deny rule is not a security boundary. A command matching a `permissions.ask` rule you wrote still prompts when RTK rewrites it, because RTK keeps returning exit 3 for it. Commands containing a command substitution or a redirect to a file are never rewritten, on any host.
A command matching a `permissions.deny` rule in those same Claude Code settings files is still refused, and the plugin blocks the tool call — naming the host only relaxes a *default* ask. As in Claude Code, a deny or ask rule matches the command as written and the command behind any leading assignment or wrapper (`HUSKY=0`, `timeout 30`, `nohup`, `command`, ...), each layer in turn, but not every way of invoking the program (`Bash(git push *)` does not stop `git -C . push` or `env -i git push`), so a deny rule is not a security boundary. Allow rules match the command as written. A command matching a `permissions.ask` rule you wrote still prompts when RTK rewrites it, because RTK keeps returning exit 3 for it. Commands containing a command substitution or a redirect to a file are never rewritten, on any host.

The exec tool's own checks see the rewritten command. OpenClaw carries hook adjustments forward into the parameters passed to the exec tool, so `tools.exec.mode`, `tools.exec.security`, `tools.exec.ask` and the exec-approvals allowlist are all matched against `rtk git push`, not `git push`; write those rules against the `rtk` form. That was already true before the permission change. A trusted tool policy (`api.registerTrustedToolPolicy(...)`) is the exception: OpenClaw runs trusted policies before ordinary `before_tool_call` hooks, so one of those still sees the original command.

Expand Down
Loading
Loading