refactor(core): remove dead AISDK hook domain - #41200
Open
kitlangton wants to merge 1 commit into
Open
Conversation
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.
What
Remove the unused
aisdkmember from Core's genericPluginHooks.Domainstype map.The active AISDK plugin API is a separate path:
PluginHostmapsctx.aisdkhooks directly toAISDK.Service. This change removes only generic registry typing that has no registrations or triggers.Before / After
Before:
PluginHooks.Domainsadvertised anaisdkdomain even though no repository caller registered or triggered an AISDK hook through the genericPluginHooksservice.After:
PluginHooks.Domainsdescribes only its usedsession,shell, andtooldomains. Live Promise and Effect AISDK plugin hooks continue throughPluginHostandAISDK.Serviceunchanged.How
AISDKHooksimport frompackages/core/src/plugin/hooks.ts.readonly aisdk: AISDKHooksmember fromPluginHooks.Domains.register("aisdk", ...)ortrigger("aisdk", ...)consumers exist.Flow
flowchart LR subgraph removed["Removed: dead generic typing"] domain["PluginHooks.Domains.aisdk<br/>(type only)"] -. "no register/trigger callers" .-> registry["Generic PluginHooks registry"] end subgraph live["Unchanged: live AISDK hooks"] host["PluginHost<br/>ctx.aisdk adapter"] --> service["AISDK.Service"] --> provider["Provider hook callback"] endScope
This deliberately does not change
AISDK.Service, plugin host adapters, Promise or Effect plugin contracts, provider registrations, AISDK documentation, or tests for active AISDK behavior.Testing
bun run test test/plugin-hooks.test.tsfrompackages/core(2 passed)bun typecheckfrompackages/corebunx oxlint packages/core/src/plugin/hooks.tsbunx prettier --check packages/core/src/plugin/hooks.tsbun turbo typecheck --concurrency=3(33 tasks successful)register("aisdk")ortrigger("aisdk")consumers