Skip to content

feat(omp): load the concise hooks as an omp extension - #34

Merged
yannelli merged 1 commit into
mainfrom
feat/omp-support
Oct 7, 2026
Merged

yannelli merged 1 commit into
mainfrom
feat/omp-support

Conversation

@yannelli

@yannelli yannelli commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • omp installs the plugin from the existing Claude Code marketplace, but omp does not run hooks/hooks.json. The plugin now has plugins/concise/package.json with an omp.extensions entry for omp/extension.mjs.
  • The extension builds the hook input that Claude Code sends and runs the same hook scripts with node.
  • Tool calls: write goes to Write. Each edit mode (hashline, apply_patch, replace, patch, sloppy) goes to the apply_patch text that check-edit reads. bash goes to check-bash, the test filter, and the patch check.
  • Events: session_stop goes to the reply check. before_agent_start adds the rules as a hidden message. session_shutdown clears the session state.
  • A deny blocks the call with its reason. A filter rewrite replaces the command. A flag becomes additionalContext. ask opens the omp confirmation dialog, or denies the call when no UI is attached.
  • A hook failure allows the call, because omp blocks a call when its handler throws.
  • Release automation now bumps plugins/concise/package.json with the other manifests.
  • The docs add the omp install steps and an omp section in host-features.md with the event mapping and sources.

Checks run

  • node scripts/check.mjs, node --test test/*.test.mjs (199 pass), and node plugins/concise/test/run-tests.mjs (1874 pass), with line coverage at 100% (6110/6110).
  • Marketplace install from the local worktree path into a temporary omp profile: omp plugin marketplace add, omp plugin install concise@be-concise, and omp plugin doctor. A session in that profile ran session-context and session-end from the installed copy.
  • Live omp -p runs with omp 18.7.0 and the extension: a write and a hashline edit with a 5-line comment were denied, npm test ran through the filter in the omp shell, the model read the rules, and a reply with an em dash was held and then rewritten.
  • Not yet tested: an install from the GitHub source. I will check it after the release.

Known gaps

  • omp has no subagent stop event, so subagent replies are not checked.
  • omp loads extensions at session start, so start a new session after an install or update.

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.
@yannelli
yannelli merged commit 2a6e725 into main Oct 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant