feat(pluginhost): refactor and enhance plugin system with new execution and thinking capabilities

- Removed `examples/plugin/main.go` and `internal/pluginhost/loader_plugin.go` after migrating to a more modular system.
- Introduced `streamBridge` in `internal/pluginhost/stream_bridge.go` for efficient stream handling and communication.
- Added examples of `thinking` plugins written in both Rust and Go under `examples/plugin/thinking`.
- Enhanced test coverage for plugin host system changes, including stream chunk translation and thinking logic.
- Improved API compatibility and ensured backward-compatible upgrades for plugin execution.
This commit is contained in:
Luis Pater
2026-06-07 03:20:04 +08:00
parent 3abfc83d96
commit 0ed85bb88b
144 changed files with 11437 additions and 1377 deletions

View File

@@ -49,8 +49,9 @@ pprof:
enable: false
addr: "127.0.0.1:8316"
# Go dynamic plugins are trusted in-process code. They are disabled by default.
# Build plugins with go build -buildmode=plugin for the target GOOS/GOARCH.
# Standard dynamic library plugins are trusted in-process code. They are disabled by default.
# Build Go examples with go build -buildmode=c-shared for the target GOOS/GOARCH.
# Other languages can implement the same C ABI and JSON method protocol.
# Plugin executors require a matching auth record with the same provider key.
# If the same provider is configured as OpenAI-compatible, the native executor wins.
# Plugin command-line flags and Management API routes are optional capabilities.