Repository navigation
feat(omp): load the concise hooks as an omp extension - #34
Merged
Merged
Conversation
omp installs the plugin from the Claude Code marketplace catalog but does not run hooks.json. The plugin now ships package.json with an omp.extensions entry. The extension builds the hook input that Claude Code would send and runs the existing hook scripts with node. It maps omp write, every edit mode, and bash calls to check-edit, check-bash, and the test filter. It maps session_stop to the reply check and before_agent_start to the rules context. Hook failures allow the call.
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
hooks/hooks.json. The plugin now hasplugins/concise/package.jsonwith anomp.extensionsentry foromp/extension.mjs.node.writegoes toWrite. Eacheditmode (hashline, apply_patch, replace, patch, sloppy) goes to theapply_patchtext thatcheck-editreads.bashgoes tocheck-bash, the test filter, and the patch check.session_stopgoes to the reply check.before_agent_startadds the rules as a hidden message.session_shutdownclears the session state.additionalContext.askopens the omp confirmation dialog, or denies the call when no UI is attached.plugins/concise/package.jsonwith the other manifests.host-features.mdwith the event mapping and sources.Checks run
node scripts/check.mjs,node --test test/*.test.mjs(199 pass), andnode plugins/concise/test/run-tests.mjs(1874 pass), with line coverage at 100% (6110/6110).omp plugin marketplace add,omp plugin install concise@be-concise, andomp plugin doctor. A session in that profile ransession-contextandsession-endfrom the installed copy.omp -pruns with omp 18.7.0 and the extension: a write and a hashline edit with a 5-line comment were denied,npm testran through the filter in the omp shell, the model read the rules, and a reply with an em dash was held and then rewritten.Known gaps