Open
Conversation
added 2 commits
March 29, 2026 23:26
- Add plugin architecture with gRPC process isolation (HashiCorp go-plugin) - Add PluginManager with lifecycle management (load/reload/enable/disable) - Add PermissionEnforcer with HTTP method to K8s verb mapping - Add token-bucket rate limiter (burst = 2x sustained rate) - Add topological dependency resolver with semver constraints - Add audit logging to ResourceHistory table - Add AI tool integration (plugin_name_tool naming convention) - Add ResourceHandler interface for custom resource types - Add Module Federation frontend loading with shared React 19 scope - Add Go plugin SDK (sdk.Serve, BasePlugin, NewAITool, Logger) - Add TypeScript plugin SDK (useKiteCluster, useKiteApi, usePluginApi, KitePluginPage, definePluginFederation) - Add kite-plugin CLI (init, build, validate, package) - Add plugin REST API (public + admin endpoints) - Add plugin E2E tests - Add comprehensive plugin system documentation
Contributor
Author
|
Hey Buddy @zxh326 did you check if you like this plugin system? Kind regards. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Plugin System
Summary
This PR introduces a first-class plugin system for Kite. Plugins are independent Go binaries that communicate with the host over gRPC via stdio (HashiCorp go-plugin). Each plugin can contribute:
/api/v1/plugins/<name>/ResourceHandlerEverything is hardened with per-plugin permission enforcement, rate limiting, audit logging, and dependency resolution — so plugins are safe to install and easy to trust.
Architecture
Load sequence on startup
KITE_PLUGIN_DIR(./plugins/by default)What's included
Backend (
pkg/plugin/)interface.goKitePlugininterface —RegisterRoutes,RegisterAITools,RegisterResourceHandlers,OnClusterEvent,Shutdownmanager.goloaded/failed/disabled/stopped)permission.goPermissionEnforcer— declares allowed resources+verbs per plugin, maps HTTP methods to K8s verbsratelimit.godependency.goblang/semverconstraints and cycle detectionaudit.goResourceHistory(plugin,plugin_tool,plugin_resource)proxy.goai_tool.goAIToolDefinition,AIToolExecutor,AIToolAuthorizer— tools are registered asplugin_<name>_<tool>sdk/sdk.goServe(),BasePlugin(no-op defaults),NewAITool(),NewAIToolFull(),Logger()Frontend (
ui/plugin-sdk/)useKiteCluster()useKiteApi()usePluginApi(name)/api/v1/plugins/<name>/KitePluginPagedefinePluginFederation()REST API
Public (auth required):
Admin only:
CLI (
cmd/kite-plugin)Documentation (
docs/)docs/guide/plugins.md— full guide: quick start, architecture, all API interfaces, security model, manifest schema, frontend SDK, CLI reference, REST API reference, examplesdocs/config/env.md— addedKITE_PLUGIN_DIRenv vardocs/faq.md— plugin troubleshooting section (failed state, Module Federation errors)docs/.vitepress/config.mts— added "Plugin System" to sidebar navWhy
Kite users increasingly need to add domain-specific tooling — cost analysis, backup management, custom alerting — without forking the project. Today the only option is to patch core code, which makes upgrades painful.
A plugin system solves this by giving teams a stable, versioned API surface to build against. The gRPC + stdio model means plugins can't interfere with each other or with the host even if they crash.
Validation
pkg/plugin/unit tests + integration test with a real plugin subprocesse2e/specs/plugin-system.spec.ts) — verifies list, proxy, and admin endpoints against a live clusterkite:localimage, confirmedGET /api/v1/plugins/manifests→200 [], proxy to unknown plugin →404, bad tool name →400Checklist
Related issue
Closes #