mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-06-15 04:45:38 +08:00
- Updated host model callback logic to skip originating plugin's interceptors during nested model executions. - Added `SkipInterceptorPluginID` field to plugin API structs for controlling interceptor bypass behavior. - Introduced supporting logic in host API handlers, plugin host registry, and callback contexts to identify and skip specific plugins. - Enhanced unit tests across plugin host, API handlers, and execution paths to verify interceptor skipping behavior and plugin isolation. - Revised documentation to clarify non-recursive behavior of host model callbacks and the use of `SkipInterceptorPluginID`.
16 lines
366 B
Go
16 lines
366 B
Go
//go:build !cgo && !windows
|
|
|
|
package pluginhost
|
|
|
|
import "fmt"
|
|
|
|
type unsupportedLoader struct{}
|
|
|
|
func (unsupportedLoader) Open(file pluginFile, host *Host) (pluginClient, error) {
|
|
return nil, fmt.Errorf("standard dynamic library plugin loading requires cgo on this platform: %s", file.Path)
|
|
}
|
|
|
|
func defaultPluginLoader() pluginLoader {
|
|
return unsupportedLoader{}
|
|
}
|