feat: compose trusted policy hooks through the plugin host #93
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/composable-policy-contract"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Narrow modular policy composition
Add optional trusted PluginAPI.registerPolicy with ordered prepare/beforeTool/finish/assertAllowed hooks. No policy means pass-through; explicitly required IDs fail if missing. Clear hooks on failed activation/stop; retain class method binding. CLI routes existing turn/tool/finish calls through registry, with existing configured review default first. Review engine/history/budget/semantics unchanged, no duplicate review path. Worker/authority guards remain separate and intact.
Limits documented
Startup-only composition, NOT full review-engine extraction or runtime replacement/removal/persistent overlays. Existing configured review remains; disabled review doesn't disable other policies. No generic shell enforcement beyond existing opt-in guard.
Verification
14focused policy/plugin tests and full535/535 tests PASS; typecheck/build/diffcheck PASS. Regression tests zero-policy pass-through, hook ordering/chaining/errors, class receiver, required policy absence, activation/stop cleanup and actual review-adapter/plugin composition with origin routing. CLI integration source tested by typecheck/fullsuite, not real model/provider execution. Original architecture/recovery/deployment drafts preserved. Prior two extra independent reviews exhausted on earlier repair, no new round/reset fabricated; author-checked no demonstrated P0/P1. Operator standing delivery mandate applies. Build/merge not deployment.