Commit Graph

1261 Commits

Author SHA1 Message Date
aesoft c873e19b0d Merge pull request #2283 from rtk-ai/release-please--branches--master--components--rtk
chore(master): release 0.42.2
v0.42.2
2026-06-05 12:57:30 +02:00
rtk-release-bot[bot] 4be04e0bdc chore(master): release 0.42.2 2026-06-05 10:48:27 +00:00
aesoft e1bc0bd9d0 Merge commit from fork
fix(permissions): never auto-allow not evaluable cmds, defer to hosts
2026-06-05 12:47:41 +02:00
aesoft ce362970e5 fix(permissions): >&file redirect no allow + scope Gemini/Cursor config 2026-06-03 20:56:44 +02:00
aesoft 084fa84e9a fix(permissions): project-first config lookup for Gemini/Cursor 2026-06-03 18:55:00 +02:00
aesoft 86ebbb3c5e refacto(permissions): fmt 2026-06-03 18:28:20 +02:00
aesoft f181184b40 fix(permissions): add test for cursor and gemini settings perm 2026-06-03 18:20:37 +02:00
aesoft 6ab149ba3e fix(permissions): cursor and gemini use correct permissions settings file
-
2026-06-03 18:15:19 +02:00
aesoft cdcdb6863a fix(permissions): never auto-allow not evaluable + defer to the agent
- Decompose compound commands for permission checks (newline, background &, subshell `( )`) in addition to &&, ||, ;, | so hidden segments are checked.
- `contains_unattestable_construct`: flag command/process substitution and file-target redirects (fd-dup `2>&1` and /dev/null exempt) — RTK can't decompose these, so they are never auto-allowed.
- Route every host hook (Claude, VS Code, Gemini, Cursor, Copilot CLI) through a single decision flow. Precedence: Deny → (defer if unattestable) → Allow → Ask → Default. Auto-allow only on a positive Allow; otherwise defer to the host's own engine.
- Gemini: ask_user instead of hardcoded allow. Cursor: empty `{}` delegation, since permission:"ask" is not enforced on its sandboxed shell.
2026-06-03 17:57:29 +02:00
aesoft 4f4a6a02ae Merge pull request #1266 from shalk/fix/commit-multibyte-panic-rebased
fix(git): fix panic on multibyte chars in commit output
dev-0.43.0-rc.260
2026-06-03 17:20:40 +02:00
aesoft 57e935094b Merge pull request #2239 from KuSh/1669-restore_double_dash-fix
fix(grep): command token duplication in output withsame value filename or positional arg
dev-0.43.0-rc.259
2026-06-03 15:55:22 +02:00
aesoft f490ab7819 Merge pull request #2240 from rtk-ai/release-please--branches--master--components--rtk
chore(master): release 0.42.1
v0.42.1
2026-06-03 14:43:24 +02:00
rtk-release-bot[bot] 9664e27038 chore(master): release 0.42.1 2026-06-03 12:37:40 +00:00
aesoft b91541961b Merge commit from fork
patch(openclaw): no execSync to avoid async dangerous cmds
2026-06-03 14:36:43 +02:00
aesoft 1bb17f4fd1 fix(openclaw): no execSync to avoid async dangerous cmds 2026-06-03 14:32:05 +02:00
Nicolas Le Cam 89ae19b1cf fix(grep): command token duplication in output withsame value filename or positional arg 2026-06-03 14:01:32 +02:00
patrick szymkowiak 4c278d18c8 Merge pull request #2002 from YOMXXX/feat/msrv-1.91
chore(cargo): declare MSRV via rust-version = "1.91"
dev-0.43.0-rc.256
2026-06-01 18:44:39 +02:00
patrick szymkowiak 68737644b7 Merge pull request #2188 from jsiu93/fix/go-build-pattern-errors
fix(go): respect build failure exit status
dev-0.43.0-rc.255
2026-06-01 15:16:28 +02:00
xiaozh f69ad6ed6f fix(go): respect build failure exit status
Gate go build success output on the child exit code and surface unrecognized non-zero build output instead of reporting success.

Closes #2185.
2026-06-01 00:00:43 +08:00
patrick 41285725e4 fix(gh): show fallback note when PR/issue body is filtered to empty
When `filter_markdown_body()` strips a PR or issue body to empty
(body contained only badges, images, HTML comments, or horizontal
rules), `format_pr_view` and `format_issue_view` previously skipped
the body section silently. Users had no indication that body content
had been present and filtered.

Now both views emit a fallback note when the filtered body is empty
but the raw body was not:

  PR view:    (body contained only badges/images/comments)
  Issue view: Description: (body contained only badges/images/comments)

The 4 added tests cover:
- PR body with only badges/images/comments -> fallback note appears
- PR body with real content -> no fallback note (sanity)
- PR body empty (raw) -> no fallback note (no signal to give)
- Issue body badges-only -> fallback note appears

Closes #235

Co-authored-by: polaminggkub-debug <polaminggkub-debug@users.noreply.github.com>
dev-0.43.0-rc.254
2026-05-31 17:35:20 +02:00
Christian C. Berclaz f1474b4c12 fix(init): use fs::canonicalize for symlink resolution
Simplify resolve_atomic_target() per review feedback — fs::canonicalize
handles chained symlinks, relative paths, and all edge cases.

Co-authored-by: Roopesh <roopesh1724989@gmail.com>
dev-0.43.0-rc.253
2026-05-31 17:18:06 +02:00
Christian C. Berclaz 508192dbdc fix(init): preserve settings.json symlink during atomic write
atomic_write() replaced symlinked settings.json with a regular file.
Now resolves symlink targets before the tempfile+rename so the link
itself is preserved and the real file gets updated.

Covers both absolute and relative symlink targets.

Closes #653
2026-05-31 17:18:06 +02:00
Nicolas Le Cam 83cd93e7d7 chore(args): introduce a more generic solution for restoring double dashes in args
Fixes #1669
dev-0.43.0-rc.252
2026-05-31 17:06:26 +02:00
aesoft 653a209485 Merge pull request #2172 from KuSh/2150-encode_project_path
fix(provider): sanatize more chars when encoding claude code project pathes
dev-0.43.0-rc.251
2026-05-31 16:31:08 +02:00
aesoft e9f42e5404 Merge pull request #2173 from KuSh/supported-agents-fixes
doc(init): fix documentation inconsistencies arount `rtk init`
2026-05-31 16:30:10 +02:00
patrick a2a63e15f4 fix(curl): passthrough binary downloads to prevent UTF-8 corruption
`rtk curl <binary-url>` silently corrupted any binary download
(tarballs, zip, png, pdf, ELF, ...) because the response body was
captured via `String::from_utf8_lossy` in `core::stream::exec_capture`.
Every non-UTF-8 byte got replaced with U+FFFD (3 bytes: 0xEF 0xBF 0xBD),
so gzip magic 1f 8b 08 00 arrived at downstream consumers as
1f ef bf bd 08 00 and `tar -xzf` complained "not in gzip format".

Now `rtk curl` runs `Command::output()` directly to keep stdout as
`Vec<u8>`, then checks `std::str::from_utf8(&bytes).is_err()`. If the
response is not valid UTF-8 (i.e. the lossy conversion would corrupt
it), raw bytes are written through to stdout via `write_all` and
tracking is recorded as passthrough (0% savings — token counts over
binary content have no meaning). The text/JSON code path is unchanged.

Verified live on 18 real binary formats (rtk's own release artifacts,
ripgrep, bat, fd, hyperfine, gh, tokei, kubectl ELF 51MB, rustup-init
20MB, W3C PDF, ISO 9899 PDF 4MB, GitHub avatar PNG, Wikimedia GIF,
WebP sample, MP3/MP4/WAV samples) — all byte-identical to raw curl.
10 text regression tests (JSON/HTML/Markdown/Cargo.toml/RFC) confirm
the text path keeps its existing behavior.

Closes #1087
2026-05-31 11:06:53 +02:00
Nicolas Le Cam 67a5958459 doc(init): fix documentation inconsistencies arount rtk init
Fixes #213
2026-05-30 18:16:41 +02:00
Nicolas Le Cam 5989ac91b0 fix(provider): sanatize more chars when encoding claude code project pathes
Fixes #2150
2026-05-30 17:19:13 +02:00
aesoft 3c8d29a57d Merge pull request #2123 from B-Galati/fix/optional-gh-glab-id
fix(gh,glab): don't pre-reject view/checks/run subcommands missing the id
dev-0.43.0-rc.249
2026-05-29 18:04:02 +02:00
aesoft a9a978c10a Merge pull request #2101 from rtk-ai/fix/copilot-cli-hook-config-schema
feat(copilot): CLI native integration
dev-0.43.0-rc.248
2026-05-29 16:53:41 +02:00
aesoft acfd6c5889 Merge pull request #1048 from ashwingopalsamy/master
fix: prevent crashes when output is piped
dev-0.43.0-rc.247
2026-05-29 13:22:09 +02:00
aesoft 26ff547c25 Update main.rs 2026-05-29 13:15:24 +02:00
aesoft dd5362fd54 Update main.rs 2026-05-29 13:03:02 +02:00
aesoft b11f82751d allow unsafe code clippy + semgrep 2026-05-29 12:57:03 +02:00
aesoft 7853819fe0 Update main.rs 2026-05-29 12:51:04 +02:00
aesoft bcee6cc2ea fix: fmt 2026-05-29 09:26:32 +02:00
aesoft e3ad973617 fix(copilot-cli): use user-level instruction for -g
-g was missing user level instructions which are available for copilot
2026-05-29 09:16:22 +02:00
aesoft b6ecf965a4 missing test tag 2026-05-28 16:50:18 +02:00
aesoft 207c82a585 missing bracket 2026-05-28 16:44:06 +02:00
aesoft 852bcda7ae Merge branch 'develop' into master 2026-05-28 16:42:18 +02:00
Bartlomiej Kaluza ad2bfd3225 fix(aws): preserve values in JSON output for unsupported subcommands
The generic AWS handler (used for subcommands outside the hardcoded
specialized list) called json_cmd::filter_json_string, which extracts
a type-only schema and discards every value.

    $ rtk aws backup describe-global-settings --output json
    {
      GlobalSettings:
      {
        isCrossAccountBackupEnabled: string,
        isDelegatedAdministratorEnabled: string,
        isMpaEnabled: string
      }
      LastUpdateTime: string
    }

Callers got the schema instead of the data they asked for.

Swap to json_cmd::filter_json_compact, which preserves values while
still applying depth, string-length, and array-size truncation:

    $ rtk aws backup describe-global-settings --output json
    {
      GlobalSettings:
      {
        isCrossAccountBackupEnabled: "false",
        isDelegatedAdministratorEnabled: "false",
        isMpaEnabled: "false"
      }
      LastUpdateTime: "2026-05-28T09:52:17.525000+02:00"
    }

Affects every AWS subcommand not on the hardcoded list (backup,
route53, kms, ssm, apigateway, ...) when output is valid JSON
(explicit `--output json` or auto-injected for describe-/list-/get-/scan).
2026-05-28 11:44:21 +02:00
aesoft 878af7de99 Merge pull request #2128 from LaraGb/develop
docs(readme): add Portuguese translation
dev-0.43.0-rc.246
2026-05-28 09:00:11 +02:00
Lara f2a2e01e7a docs(readme): add Portuguese translation 2026-05-27 16:00:32 -03:00
Benoit Galati e1bb17f85d fix(gh,glab): don't pre-reject view/checks/run subcommands missing the id
gh and glab both accept several subcommands without an explicit id and
resolve it from the current branch (gh pr view, gh pr checks, glab mr
view) or open an interactive picker (gh run view). RTK was pre-rejecting
with "X number required" before the underlying tool ever ran.

Six call sites now treat the identifier as optional and forward the
request unchanged, letting gh/glab decide:

- gh pr view, gh pr checks, gh issue view, gh run view
- glab mr view, glab issue view

A new `parse_optional_identifier` helper in each file captures the
"(Option<id>, Vec<extra>)" parse so the no-id branch is unit-testable.
format_run_view also drops the dangling `#` from its header when the
run id is empty (interactive-picker passthrough).
2026-05-27 17:47:32 +02:00
Adrien Eppling db483e6c58 fix(hook): omit permissionDecision so Copilot prompts for the rewritten command 2026-05-26 21:26:33 +02:00
Adrien Eppling 6c5e440d83 fix(hook): preserve Copilot CLI toolArgs metadata when rewriting command 2026-05-26 20:50:06 +02:00
Adrien Eppling 69c10b6588 fix(hook): default Copilot CLI rewrite to 'ask' to preserve permission prompts 2026-05-26 20:41:03 +02:00
Adrien Eppling 4b0bbf269b feat(hook): --global Copilot install + transparent rewrite via modifiedArgs 2026-05-26 19:56:04 +02:00
Adrien Eppling 557e57c9f9 fix(hook): semgrep marker + regression tests for Copilot hook isolation 2026-05-26 13:31:20 +02:00
Adrien Eppling 84b703d7d0 feat(hook): wire Copilot into uninstall, telemetry, and discover 2026-05-25 22:19:58 +02:00