feat: add Factory Droid agent integration (rtk init -g --agent droid)#1308
Closed
ZaynJarvis wants to merge 1 commit into
Closed
feat: add Factory Droid agent integration (rtk init -g --agent droid)#1308ZaynJarvis wants to merge 1 commit into
ZaynJarvis wants to merge 1 commit into
Conversation
Add support for Factory Droid (factory.ai) as a supported agent. Droid uses the same PreToolUse hook architecture as Claude Code, with the only difference being the tool name (Execute vs Bash) and the settings file location (~/.factory/settings.json vs ~/.claude/settings.json). New files: - hooks/droid/rtk-rewrite.sh: Shell hook for Execute tool commands - hooks/droid/rtk-awareness.md: Slim awareness doc for Droid context - hooks/droid/README.md: Integration documentation Source changes: - Add Droid to AgentTarget enum in main.rs - Add install_droid_hooks/remove_droid_hooks in init.rs - Add patch_droid_settings_json for ~/.factory/settings.json - Add droid status checks to show_config - Wire up --agent droid to init and uninstall flows Documented in hooks/README.md with JSON format examples.
Author
|
not sure what's the CI error. |
|
+1 please add droid |
|
duplicate of #912 ? |
yup |
5 tasks
Collaborator
|
Hi @ZaynJarvis — thank you for this, and apologies for the overlap. Factory Droid support has since landed on Since the feature is already shipped, I'm closing this as superseded to keep the queue tidy — no reflection on your work, the timing just didn't line up (your PR predated #2267 but sat in merge conflict while the other landed). If you notice anything the merged integration is missing compared to your version, please open a follow-up PR or an issue pointing at the gap — happy to review that. Thanks again for contributing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for Factory Droid (factory.ai) as a supported agent in RTK.
Factory Droid uses the same PreToolUse hook architecture as Claude Code. The only differences are:
BashExecute~/.claude/settings.json~/.factory/settings.json~/.claude/hooks/~/.factory/hooks/@RTK.mdinCLAUDE.md~/.factory/RTK.mdThe JSON input/output format (
hookSpecificOutput,permissionDecision,updatedInput) is identical to Claude Code, so the hook script is a thin adaptation with the same delegating pattern.Changes
New files
hooks/droid/rtk-rewrite.sh— Shell hook that interceptsExecutetool commands and rewrites them viartk rewritehooks/droid/rtk-awareness.md— Slim awareness doc for Droid contexthooks/droid/README.md— Integration documentation with installation, testing, and uninstall instructionsSource changes
src/main.rs— AddDroidvariant toAgentTargetenum, wire upinstall_droidanddroid_uninstallflagssrc/hooks/init.rs— Add:install_droid_hooks()— writes hook script, RTK.md, patches settings.jsonremove_droid_hooks()— cleans up all Droid artifactspatch_droid_settings_json()— adds PreToolUse entry forExecutematcherdroid_hook_already_present()/remove_droid_hook_from_json()— idempotency helpersshow_config()rtk init -g --agent droidis global-onlyDocumentation
hooks/README.md— Add Factory Droid row in Supported Agents table, JSON format section, and directory listingUsage
Testing
Design Notes
matcher: "Execute"to match Droid shell execution tool