RTK support and provisioning policy¶
Current provisioner mapping¶
scripts/provision-rtk.mjs pins RTK v0.51.0 for automated downloads, verifies archive SHA-256 digests (RTK_CHECKSUMS), and validates version compatibility across the [>=0.50.0 <0.52.0] range (0.50.x and 0.51.x).
| OS reported by Node | Architecture | Provisioned asset | Pinned SHA-256 Checksum (v0.51.0) |
Release gate |
|---|---|---|---|---|
Windows (win32) |
x64 | rtk-x86_64-pc-windows-msvc.zip |
1623e9b45d28b15122d69e7314776e1123a804224885ce07e7182fb40080f05c |
Verified in Windows x64 CI (windows-latest, Node 22 & 24). |
macOS (darwin) |
arm64 | rtk-aarch64-apple-darwin.tar.gz |
8817d8b71afc02ac8bf06eb24bcc41c306592ab735b68e8fee9db1ba0de7cb59 |
Verified in Apple Silicon macOS CI (macos-latest, Node 22 & 24). |
macOS (darwin) |
x64 | rtk-x86_64-apple-darwin.tar.gz |
bd39c8153f4147358360c7dc51665a8131cc9ee16f81f69a9402ffa500be3cc2 |
Checksum-pinned; requires Intel macOS runner or manual 0.50.x/0.51.x install. |
Linux (linux) |
x64 | rtk-x86_64-unknown-linux-musl.tar.gz |
5028d3b19a8f0990d30fec9fbb07e32782bc5698e618fb1861aad8a9ccba4eb5 |
Verified in Ubuntu x64 CI (ubuntu-latest, Node 22 & 24). |
Linux (linux) |
arm64 | rtk-aarch64-unknown-linux-gnu.tar.gz |
8d6d1aad9e69b42481eda7039507d1f7ee93698f87713cecd873d287c1931632 |
Checksum-pinned; requires ARM64 Linux runner or manual 0.50.x/0.51.x install. |
| Any other platform/architecture | any | No provisioned asset | — | Fails closed unless a compatible RTK version (>=0.50.0 <0.52.0) is installed on PATH or --allow-degraded is passed. |
RTK release assets: https://github.com/rtk-ai/rtk/releases/tag/v0.51.0
Enforced provisioning and compatibility policy¶
- Enforced version range (
>=0.50.0 <0.52.0).findExistingRtk()andisCompatibleRtkVersion()strictly validate both plugin-local andPATHbinaries against[>=0.50.0 <0.52.0]. Incompatible binaries onPATH(e.g.,<0.50.0or>=0.52.0) emit a warning and are rejected so the installer provisions the pinnedv0.51.0binary intobin/. - Hook rewrite & execution resolution.
scripts/execution-guard-hook.mjs(resolveCompatibleRtk()) verifiesPATHbinary compatibility before invokingrtk rewrite. WhenPATHcontains an incompatible version or lacksrtk, bothrunRtkRewrite()and the resulting shell command are routed to the verified plugin-local binary. - Fail-closed SHA-256 verification.
ensureRtkInstalled()computes the SHA-256 digest of downloaded archive bytes vianode:cryptoand compares it againstRTK_CHECKSUMSbefore writing or extracting any archive. Checksum mismatches immediately abort provisioning. - Fail-closed installer preflight.
runInstall()validates configuration syntax/shape and provisions RTK before mutating user profile configurations (hooks.json,mcp_config.json, ornode.cmd). Provisioning failures abort installation unless--allow-degradedis explicitly specified. - Manual installation on unsupported architectures. Users on architectures without a prebuilt mapping (such as Windows ARM64) must install a compatible RTK version (
0.50.xor0.51.x) ontoPATHor pass--allow-degraded. Arbitrary outside-range versions onPATHare rejected.
Release smoke tests¶
Run these checks on each supported OS/architecture before changing RTK_VERSION:
- Provision to a clean temporary
bindirectory; validate the executable launches and its reported version matches[>=0.50.0 <0.52.0]. - Corrupt/truncate a downloaded archive in a test fixture and confirm SHA-256 verification prevents extraction.
- Remove
rtkfromPATHand verify the installer either provisions the pinned version or exits clearly before modifying user config. - Put an incompatible RTK version (
0.60.0) first onPATHand verifyfindExistingRtk()rejects it andexecution-guard-hook.mjsroutes rewrites to the compatible local binary. - Exercise
rtk read,rtk rg,rtk find, and command-rewrite paths with filenames containing spaces, Unicode, and shell metacharacters. - Verify re-run/idempotency and uninstall/restore using a temporary
AGY_TEST_PROFILE_DIRsandbox, never a developer's live profile.
RTK Configuration Standardization & Default Modifications¶
To prevent diagnostic noise and promotional banners from polluting model context and command execution, Agy-Context-Saver standardizes upstream RTK configuration settings during installation (scripts/provision-rtk.mjs via ensureRtkConfigured()).
Standardized Configuration Parameters¶
| Config File | Section | Parameter | Default Upstream Value | Agy-Context-Saver Standardized Value | Rationale & Forensic Justification |
|---|---|---|---|---|---|
%APPDATA%\rtk\config.toml (Win)~/.config/rtk/config.toml (POSIX) |
[hooks] |
suppress_hook_warning |
false (or unconfigured) |
true |
Context & Command Protection (RTK-01 / RTK-03): Upstream RTK emits an unsolicited promotional banner ( [rtk] /!\ No hook installed — run rtk init -g for automatic token savings) to stdout whenever Claude Code hooks are uninitialized. In autonomous agent environments, this unprompted banner pollutes context tokens and corrupts shell command rewrites ([rtk] warning ... rtk git status). Setting suppress_hook_warning = true completely silences this banner natively without requiring a fork of upstream RTK. |
Configuration Lifecycle & Preservation Guarantee¶
- Automatic Initialization: On a fresh installation, if no
config.tomlexists,ensureRtkConfigured()initializesconfig.tomlwith[hooks]\nsuppress_hook_warning = true. - Non-Destructive Update: If
config.tomlalready exists,ensureRtkConfigured()safely checks whethersuppress_hook_warningis absent or set tofalse, updating only this key while strictly preserving all existing user sections ([general],[telemetry], custom parameters, and comments). - Direct Root Resolution (Zero Brittle Output Filtering): By standardizing
suppress_hook_warning = truedirectly at the engine configuration layer, RTK suppresses banner output at the source. This eliminates the need for brittle regex or post-hoc line filtering in the execution hook, ensuring piped commands (cmd1 | cmd2), multiline scripts, and commands referencingrtkare delivered to the shell completely untouched.