Add Devin CLI hook adapter that respects defaultMode#624
Open
warelik wants to merge 1 commit into
Open
Conversation
Devin CLI installs ponytail as a skill but does not run install scripts or load hooks from the plugin directory, so the user's defaultMode in ~/.config/ponytail/config.json was ignored and the skill always fell back to full. Add hooks/ponytail-devin.js (lifecycle hook adapter) and scripts/devin-cli-setup.sh (one-time registration in ~/.config/devin/config.json). The adapter locates the plugin checkout at runtime, reads config/env for the default mode, and injects the ruleset on SessionStart, tracks /ponytail switches on UserPromptSubmit, and restores context after PostCompaction. Update README and docs/agent-portability.md with the install step; add tests for SessionStart, mode switching, reporting, and deactivation.
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
/ponytail:ponytail) but does not run plugin install scripts and does not load hooks bundled in.devin-plugin/plugin.json, so the user'sdefaultModein~/.config/ponytail/config.json(orPONYTAIL_DEFAULT_MODE) was ignored and the skill always fell back tofull.hooks/ponytail-devin.js, a lifecycle-hook adapter that locates the plugin checkout at runtime, reads the sharedponytail-config.js/ponytail-instructions.js, and:SessionStart;/ponytail [lite|full|ultra|off],/ponytail default <mode>, and/ponytailstatus queries onUserPromptSubmit;PostCompaction.scripts/devin-cli-setup.sh, which copies the adapter into~/.config/devin/hooks/and registers it under thehookskey in~/.config/devin/config.json(the supported location for user-level Devin CLI hooks).README.mdanddocs/agent-portability.mdwith the install step.package.jsonfilesso the Devin adapter ships with the npm package.tests/hooks.test.js.Test plan
node tests/hooks.test.jspasses (SessionStart readsdefaultMode: ultra, mode switching, report, deactivation).node --test tests/*.test.jspasses (82/82).node scripts/check-versions.jspasses.node scripts/check-rule-copies.jspasses.devin -pverified with~/.config/ponytail/config.jsonset toultra: the model reportsultraand the state file is updated.