25 lines
1.0 KiB
Markdown
25 lines
1.0 KiB
Markdown
<!-- Generated by scripts/gen-doc-graphs.ts - do not edit by hand.
|
|
Run `pnpm run gen-doc-graphs` to regenerate. -->
|
|
|
|
# Plugin Disposal And Hot Reload Ownership
|
|
|
|
Maintenance mode: curated Mermaid flow based on Cordis fiber/effect conventions.
|
|
|
|
This graph is a maintainer checklist for plugin authors: registrations are effects, service injection gates activation, and owned handles must be disposed by their owner.
|
|
|
|
```mermaid
|
|
flowchart TD
|
|
plugin["ctx.plugin(plugin) creates fiber"]
|
|
inject["static inject gates activation"]
|
|
service["ctx.provide / Service constructor"]
|
|
effects["ctx.effect registrations<br/>events, tools, adapters, timers"]
|
|
reload["HMR / fiber.dispose()"]
|
|
disposers["Run disposers in owner fiber"]
|
|
quiescence["Owned AgentHandle.dispose()<br/>or service teardown awaits quiescence"]
|
|
plugin --> inject --> service
|
|
inject --> effects
|
|
reload --> disposers --> quiescence
|
|
```
|
|
|
|
Hook bridges and SDK plugins increase the number of long-lived listeners, so this ownership graph should stay small and visible.
|