@zeroseed/rtk
v0.1.1
Published
RTK command rewrite integration for ZeroSeed
Maintainers
Readme
@zeroseed/rtk
Thin ZeroSeed integration for RTK. It rewrites Agent-initiated
bash and powershell commands through RTK before execution, so supported commands return RTK's
compact output without teaching the Agent a second tool interface.
The thin entry package selects one optional platform package containing a verified official RTK
v0.49.0 executable where upstream provides it, or a pinned-source build for a missing target.
Installation downloads only the current platform binary, does not compile anything, and ZeroSeed
registers the plugin-owned rtk launcher after authorization. A user-installed rtk is not
required.
Install
From npm:
zeroseed plugin install @zeroseed/rtk
zeroseed plugin authorize rtkFrom a ZeroSeed source checkout, download the release assets first as described below, then run:
zeroseed plugin install ./plugins/rtkInteractive installation requests the plugin's process:exec capability. If the plugin was
placed manually or installed non-interactively, authorize and enable it explicitly:
zeroseed plugin authorize rtk
zeroseed plugin enable rtkThe capability is high risk because it permits processes to run with the current user's host
permissions. This plugin uses it only for rtk rewrite.
Configuration
[plugins.settings.rtk]
enabled = true
exclude_commands = ["playwright", "git rebase"]
ultra_compact = falseenabled: disable all RTK probing and rewriting while leaving the plugin installed.exclude_commands: case-sensitive literal substrings. A match leaves the complete command unchanged. Global and project lists are merged without duplicates.ultra_compact: add RTK's global--ultra-compactoption when the rewritten command has a simple, unambiguous RTK entry.
The adapter does not read or modify RTK configuration, tracking, tee files, or filters.
Failure behavior and scope
Each eligible command performs one rtk rewrite call through the same Session tool-approval
boundary as other process Host Functions. A successful, validated rewrite also serves as the
compatibility check, avoiding a separate rtk --version approval for every command. Missing,
broken, or incompatible RTK leaves the original command unchanged and emits a verbose diagnostic.
Rewritten commands still pass through ZeroSeed's normal validation and approval.
Only Agent bash and powershell tool calls are considered. Direct REPL !command input, MCP,
resource tools, and other tool types are unchanged. Actual output and token reduction depend on RTK
and the command; this plugin does not promise a fixed saving percentage.
Supported platforms
- macOS arm64 and x64
- Linux x64 with glibc or musl (the bundled executable is static musl)
- Linux arm64 with glibc or musl
- OpenHarmony arm64
- Windows arm64 and x64
Upstream does not publish RTK v0.49.0 executables for Linux arm64 musl or Windows arm64. ZeroSeed
builds those two targets from the exact upstream tag and locked dependency graph. The OpenHarmony
artifact starts from the same static arm64 musl build, is signed with ZeroSeed's existing
OpenHarmony release tool, and is packaged only after its checksum, architecture, and .codesign
section pass verification. Unsupported platform/architecture pairs fail explicitly instead of
falling back to a user PATH binary.
Local packaging and publishing
Download and verify the five official v0.49.0 GitHub Release archives:
./scripts/download-release.sh v0.49.0
node scripts/verify-package.mjsThe downloader verifies every archive against the upstream checksums.txt, then extracts the
executables under bin/native/. On native Linux arm64 and Windows arm64 release runners, clone RTK
at commit b1c0dc00649c50fbe8930f849c800d4d6ca12091 and add the two missing targets:
./scripts/build-release.sh aarch64-unknown-linux-musl /path/to/verified/rtk
./scripts/build-release.sh aarch64-pc-windows-msvc /path/to/verified/rtk
node ../../scripts/prepare-harmonyos-artifact.mjs \
--binary bin/native/rtk-linux-arm64-musl \
--name rtk-openharmony-arm64 \
--output rtk-openharmony-signed
cp rtk-openharmony-signed/rtk-openharmony-arm64 bin/native/
ZEROSEED_RTK_REQUIRE_ALL_NATIVE=1 node scripts/verify-package.mjsThe stable bin/rtk.cjs launcher resolves the matching @zeroseed/rtk-* optional package at run
time. It does not depend on lifecycle scripts, runtime network access, or a user-installed RTK
binary. Platform packages must be published before the entry package of the same version.
The npm package redistributes upstream binaries under Apache-2.0; see LICENSE.rtk and
THIRD_PARTY_NOTICES.md. The plugin integration itself remains MIT licensed.
