fix: comprehensive dispatch fixes

- go_core_dispatch case 1: tool handler now calls back to plugin via invokeTool
- go_core_dispatch case 2: stage handler sends full StageContext (11 fields)
- New dispatch methods 26-31: Settings.GetCore/SetCore/ListCore/GetPlugin/SetPlugin/ListPlugin
- Remove dlclose (plugin goroutines may still be running after Stop)
- invokeTool/invokeOutput/invokeStage callbacks with proper error handling
- Fix n2 unused variable
This commit is contained in:
root
2026-07-17 09:33:53 +08:00
parent f9fe852ded
commit babef149b5
2 changed files with 98 additions and 18 deletions

View File

@ -72,8 +72,9 @@ func (p *cabiPlugin) Start(s *sdk.PluginSDK) error {
func (p *cabiPlugin) Stop() error {
_ = p.handle.Stop()
p.handle.FreeCoreAPI()
p.handle.Close()
// Note: intentionally NOT calling p.handle.Close() (dlclose).
// The .so stays loaded because plugin goroutines (HTTP server, tickers)
// may still be running. dlclose would unmap their code and cause SIGSEGV.
return nil
}