mirror of
https://github.com/gotempsh/temps.git
synced 2026-04-25 06:15:55 +03:00
[PR #20] [MERGED] feat(external-plugins): add external plugin system for standalone binary plugins #21
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/temps#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/gotempsh/temps/pull/20
Author: @dviejokfs
Created: 2/26/2026
Status: ✅ Merged
Merged: 2/27/2026
Merged by: @dviejokfs
Base:
main← Head:feat/external-plugins-impl📝 Commits (3)
41f11c3feat(plugins): implement external plugin system for dynamic integration7b31dadfeat(external-plugins): add external plugin management system194b79edocs(changelog): add external plugin system entries📊 Changes
39 files changed (+2683 additions, -20 deletions)
View changed files
📝
CHANGELOG.md(+7 -0)📝
Cargo.lock(+71 -0)📝
Cargo.toml(+3 -0)➕
_typos.toml(+3 -0)📝
crates/temps-cli/Cargo.toml(+1 -0)📝
crates/temps-cli/src/commands/proxy.rs(+2 -1)📝
crates/temps-cli/src/commands/serve/console.rs(+27 -3)📝
crates/temps-cli/src/commands/serve/mod.rs(+7 -5)📝
crates/temps-core/Cargo.toml(+3 -0)➕
crates/temps-core/src/external_plugin/manifest.rs(+228 -0)➕
crates/temps-core/src/external_plugin/mod.rs(+16 -0)📝
crates/temps-core/src/lib.rs(+1 -0)📝
crates/temps-deployments/src/jobs/deploy_image.rs(+15 -5)➕
crates/temps-external-plugins/Cargo.toml(+24 -0)➕
crates/temps-external-plugins/src/handler.rs(+87 -0)➕
crates/temps-external-plugins/src/lib.rs(+17 -0)➕
crates/temps-external-plugins/src/manager.rs(+456 -0)➕
crates/temps-external-plugins/src/plugin.rs(+118 -0)➕
crates/temps-external-plugins/src/proxy.rs(+155 -0)➕
crates/temps-external-plugins/src/service.rs(+83 -0)...and 19 more files
📄 Description
Summary
Implements a complete external plugin architecture for Temps where users can drop a compiled binary into
~/.temps/plugins/and have it automatically discovered, started, and integrated with both API endpoints and UI navigation.Closes #19
Changes
New Crates
temps-external-plugins— Discovery, lifecycle management, HTTP proxying, and REST API handler following the standardTempsPluginpattern. Includes service layer, handler with OpenAPI schema, and plugin registration.temps-plugin-sdk— SDK for plugin authors:ExternalPlugintrait,main!()macro,PluginContext(DB access, data dir),TempsAuthextractor, runtime with stdout handshake + hyper-over-Unix-socket serving.Core Changes
temps-core— Addedexternal_plugin::manifestmodule with shared types (PluginManifest,NavEntry,NavSection,UiManifest,UiRoute,HandshakeMessage) withSerialize/Deserialize/ToSchemaderives. Removed unused deps (reqwest,hyper,hyper-util,flate2,tar).temps-cli— RegisteredExternalPluginsPluginas plugin #15 (beforeinitialize_plugins). Added graceful shutdown that stops external plugins on Ctrl+C via service context lookup.Frontend
usePluginshook — React Query with graceful degradation (returns[]on failure, no retry)PluginsContext— Provider exposingplatformNavEntries,settingsNavEntries,projectNavEntriesPluginPagecomponent at/plugins/:pluginName/*Example
examples/example-plugin/— "Cron Jobs" plugin demonstrating full CRUD API with the SDKArchitecture
Test Results
temps-external-plugins: 7 tests passed (manager, proxy, handler, plugin)temps-coreexternal_plugin: 3 tests passed (manifest builder, serialization, roundtrip)temps-plugin-sdk: 2 tests passed (health handler, user context serialization)cargo check --lib: zero errors, zero warningsbun run build: success🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.