mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-06-12 09:13:03 +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`.
19 lines
360 B
Go
19 lines
360 B
Go
package pluginhost
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/router-for-me/CLIProxyAPI/v7/sdk/pluginabi"
|
|
)
|
|
|
|
const pluginHostABIVersion = pluginabi.ABIVersion
|
|
|
|
type pluginClient interface {
|
|
Call(ctx context.Context, method string, request []byte) ([]byte, error)
|
|
Shutdown()
|
|
}
|
|
|
|
type pluginLoader interface {
|
|
Open(file pluginFile, host *Host) (pluginClient, error)
|
|
}
|