Files
Luis Pater 538e3416db feat(plugin, api): prevent plugin recursion on host model callbacks, enable targeted interceptor skipping
- 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`.
2026-06-12 02:38:51 +08:00

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)
}