feat(extensions): add static external Hook catalog - #1716
Merged
Conversation
limityan
force-pushed
the
yanzhn/external-hook-catalog
branch
from
July 23, 2026 10:10
c2dd31c to
8ab5f14
Compare
Add runtime-free OpenCode, Claude Code, and Codex discovery behind shared contracts and bounded parsers. Expose the read-only catalog through TUI and Desktop settings with explicit remote gating.
limityan
force-pushed
the
yanzhn/external-hook-catalog
branch
from
July 23, 2026 13:35
8ab5f14 to
d33f62b
Compare
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
/hooksflowArchitecture and ownership
product-domainsstatic-hook-supportassembly/external-sourcesassembly/coreThe catalog does not share DTOs with executable Hook or SDK work. It contains no handler body, command, prompt, URL, environment value, credential, or other executable payload. Only semantically equivalent tool-before/tool-after events map to reviewed BitFun Hook points; other native events stay
native_only, and computed or unresolved registrations stayopaque.OpenCode inspection uses OXC only as a syntax parser. It never imports JS/TS. Named, destructured, specifier, value re-export, type-only, ambient, and declaration-file cases have explicit behavior;
.d.tsfiles are not runtime plugin sources. Claude Code appliesdisableAllHooksonly after observed settings layers are combined. Codex linked-worktree project Hook declarations resolve to the primary checkout, honor persisted project-root markers, and keep effective command activation unknown because session flags and trust are not observable statically.Product behavior
/hooks,/help hooks,/hooks -h, and/hooks --helpfollow the existing slash-command/help conventions; no Hook-specific namespace or shortcut is addedConcurrency, safety, and limits
Repeated refreshes reuse the existing in-flight discovery instead of queuing successor generations. Initial cache-only access starts discovery, deferred timeout completion is finalized under the existing publication gate, and provider failures cannot overwrite healthy providers.
Unknown enum values, duplicate identities, malformed source references, invalid status sets, and executable fields fail closed at the Web boundary.
Independent review
Three isolated reviews covered architecture/ownership, product behavior, and implementation/concurrency. Findings were fixed before this update, including discovery coalescing, initial/failed/stale UX, strict DTO validation, Codex worktree/root/activation semantics, Claude layered disable behavior, stable OpenCode export identities, type-only/ambient/
.d.tshandling, bounded output, and stale owner comments. Final reviewers reported no remaining actionable findings.Verification
cargo check --workspacepnpm run type-check:webpnpm run lint:webpnpm run i18n:auditnode scripts/check-core-boundaries.mjspnpm run check:repo-hygienepnpm run check:github-configgit diff --checkKnown output is limited to pre-existing dependency deprecation and Windows linker messages; this PR adds no new warning class.