Files
deepseek-harness/docs/graphs/hot-reload-disposal.md
2026-07-03 01:13:52 +08:00

1.0 KiB

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.

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.