Repository navigation
Conversation
Every row in the supported-agents table assumes rtk init has something to patch: a PreToolUse hook, a plugin event, or a settings file. A host that exposes the shell to plugins instead has no row and no guidance, even though the page already says the hooks are thin delegates over rtk rewrite. Adds a short section for that shape: read stdout on 0 and 3 only, treat 2 as the host's own deny, fall back to the original command on anything else, and check that the only change is an inserted rtk token.
📊 Automated PR Analysis
SummaryAdds a new 'Hosts without a tool hook' section to the supported-agents docs, explaining how a host that can intercept shell commands via a plugin (but has no PreToolUse-style hook) can delegate to Review Checklist
Analyzed automatically by wshm · This is an automated analysis, not a human review. |
|
I have read the CLA Document and I hereby sign the CLA |
|
Thanks for writing this up. Closing in favour of #3918, which documents the same rtk rewrite contract for hosts without a hook as a full guide (exit codes, where the call goes, fail-open rules, accounting) and already has green CI. Your check that only the inserted rtk tokens differ is not in it, so a suggestion on #3918 would be welcome there; if your section targets a different case, reply here. |
What
docs/guide/getting-started/supported-agents.mdgains a short "Hosts without a tool hook" section: what such a host has to do to use RTK, which exit codes it may act on, and the safety rules that make the result trustworthy.Why
Every row in the supported-agents table assumes
rtk inithas something to patch — aPreToolUsehook, a plugin event, or a settings file. A host whose plugin can see and replace the shell command, but exposes no pre-tool event, is not in the table and gets no guidance. The page already states that agent hooks are thin delegates overrtk rewrite; the missing piece is only how to be one without a hook.I wrote such a delegate for DeepSeek Harness (ismoss/dsh-rtk, MIT), which has exactly this shape (no pre-tool rewrite, but a plugin can wrap the shell service), and tested it end to end on Windows against rtk 1.1.0:
git status --porcelainexecutes asrtk git status --porcelain, andrtk gaincounts the run;2leaves the command untouched — the host's own permission system still owns the decision;rtktokens leaves the original tokens untouched.Those are the rules already implied by the source comments (
2= "hook defers to the host's native deny") and by the exit-code table indocs/usage/FEATURES.md; this section just writes them where someone implementing a host will look.Scope
Docs only: one file, +35 lines, no code and no behaviour change. No new agent is claimed as supported — a host-side delegate never touches
rtk init, so it needs no row in the table.Related: #4809 adds the instructions-only path for DSH's
rtk init; this covers the other half, for a host that would rather rewrite than instruct.