feat: extract shared hook types into tokf-hook-types crate#314
Merged
Conversation
…link - Clarify that without an external engine, tokf does NO permission checking -- the AI tool handles its own rules natively - Add hook JSON reference section for engine developers with concrete request/response examples for Claude Code, Gemini CLI, and Cursor - Document non-zero exit code + valid JSON behaviour (Dippy compat) - Add permission engines section to integrations.md with Dippy link - Document tokf hook handle --format command and its values - Regenerate README.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract ExternalEngineConfig, ErrorFallback, HookFormat, PermissionVerdict, RewriteConfig, PermissionsConfig, and related types into a new tokf-hook-types crate so external tools (like rippy) can share the config format without duplicating type definitions. - Add Serialize derives to all extracted types for round-trip TOML support - Add skip_serializing_if for empty default fields (args, format_map, rewrite) - Add Default impl for ExternalEngineConfig with correct timeout_ms - tokf-cli re-exports from tokf-hook-types for backward compatibility Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bump version to 0.2.38 to match linked workspace versions, add the crate to release-please config/manifest, and insert a publish step in release.yml between tokf-common and tokf-filter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Filter Verification ReportChanged FiltersNo filter files changed in this PR. All Filters Summary✅ 132/132 test cases passed across 49 filters Generated by |
Merged
mpecan
pushed a commit
that referenced
this pull request
Mar 26, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>e2e-tests: 0.1.27</summary> ### Dependencies </details> <details><summary>tokf-common: 0.2.39</summary> ## [0.2.39](tokf-common-v0.2.38...tokf-common-v0.2.39) (2026-03-26) ### Miscellaneous * **tokf-common:** Synchronize workspace versions </details> <details><summary>tokf-filter: 0.2.39</summary> ## [0.2.39](tokf-filter-v0.2.38...tokf-filter-v0.2.39) (2026-03-26) ### Miscellaneous * **tokf-filter:** Synchronize workspace versions ### Dependencies * The following workspace dependencies were updated * dependencies * tokf-common bumped from 0.2.38 to 0.2.39 </details> <details><summary>tokf-hook-types: 0.2.39</summary> ## [0.2.39](tokf-hook-types-v0.2.38...tokf-hook-types-v0.2.39) (2026-03-26) ### Features * extract shared hook types into tokf-hook-types crate ([#314](#314)) ([40148bf](40148bf)) </details> <details><summary>tokf-server: 0.2.39</summary> ## [0.2.39](tokf-server-v0.2.38...tokf-server-v0.2.39) (2026-03-26) ### Miscellaneous * **tokf-server:** Synchronize workspace versions ### Dependencies * The following workspace dependencies were updated * dependencies * tokf-common bumped from 0.2.38 to 0.2.39 * tokf-filter bumped from 0.2.38 to 0.2.39 </details> <details><summary>catalog-types: 0.2.39</summary> ## [0.2.39](catalog-types-v0.2.38...catalog-types-v0.2.39) (2026-03-26) ### Miscellaneous * **catalog-types:** Synchronize workspace versions </details> <details><summary>tokf: 0.2.39</summary> ## [0.2.39](tokf-v0.2.38...tokf-v0.2.39) (2026-03-26) ### Features * extract shared hook types into tokf-hook-types crate ([#314](#314)) ([40148bf](40148bf)) ### Dependencies * The following workspace dependencies were updated * dependencies * tokf-common bumped from 0.2.38 to 0.2.39 * tokf-filter bumped from 0.2.38 to 0.2.39 * tokf-hook-types bumped from 0.2.38 to 0.2.39 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: repository-butler[bot] <166800726+repository-butler[bot]@users.noreply.github.com>
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
ExternalEngineConfig,ErrorFallback,HookFormat,PermissionVerdict,RewriteConfig,PermissionsConfig, and related types into a newtokf-hook-typescrateSerializederives for round-trip TOML support,skip_serializing_iffor clean output, andDefaultimpl forExternalEngineConfigtokf-clire-exports all types from the new crate for full backward compatibilityTest plan
cargo fmt && cargo clippy --all-targets -- -D warningspassestokf-hook-typesbuilds with onlyserdedependency🤖 Generated with Claude Code