
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@delve.sh/plugin-sdk
Advanced tools
Utilities for building Delve plugins. This repository ships two packages that work together:
github.com/PortableSheep/delve-sdk for authoring plugin backends@delve/plugin-sdk for frontend command bridgingThe sections below describe what each package provides today.
sdk.Version (e.g. v0.5.0).
Plugins should include this value in their registration payloads so the host
can reject incompatible builds early.sdk.CompatibleHostRange documents the Delve host versions the SDK is
tested with. Future releases will expand this range; treat it as the source of
truth when shipping plugins.sdk.PluginManifestSchema() and sdk.LayoutSchema() are
available for validating plugin.json manifests and persisted docking layout
state. These are the same schemas the Delve host enforces at runtime.customTemplate := &sdk.PluginTemplate{
Name: "custom-api",
Description: "Custom API integration template",
Type: "integration",
Language: "go",
Files: []sdk.TemplateFile{
{
Path: "main.go",
Template: true,
Content: "// Custom template content with {{.Variables}}",
},
},
Variables: map[string]interface{}{
"APIVersion": "v1",
},
}
enhancedSDK.Generator().RegisterTemplate(customTemplate)
config := sdk.SDKConfig{
RegistryURL: "https://registry.delve.sh",
SecurityLevel: sdk.SecurityLevelMedium,
CacheEnabled: true,
DevMode: false,
LogLevel: sdk.LogLevelInfo,
CustomTemplates: map[string]*sdk.PluginTemplate{
"my-template": customTemplate,
},
}
sdk := sdk.NewEnhancedSDK(config)
EnhancedSDK - Main SDK interfaceEnhancedPlugin - Enhanced plugin interface with lifecycle methodsSecurityManager - Handles security policies and sandboxingEnhancedRegistry - Advanced plugin registry with search and metadataSchemaValidator - Plugin configuration validationPluginGenerator - Template-based plugin generationDevTools - Development and build toolsSecurityLevel - Security level enumerationSecurityPolicy - Security policy configurationPermission - Permission request structureSandbox - Isolated execution environmentEnhancedPluginInfo - Complete plugin metadataRegistrySearchFilter - Advanced search filteringPluginMetrics - Usage and performance metricsgit checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.
Plugin.SetItem(key, value string) errorStore a key-value pair in plugin storage.
Plugin.GetItem(key string) (string, error)Retrieve a value from plugin storage.
Plugin.DeleteItem(key string) errorDelete a key from plugin storage.
Plugin.ListItems() ([]string, error)List all keys in plugin storage.
Plugin.ClearStorage() errorClear all plugin storage.
The heartbeat system provides robust connection monitoring:
interval secondstimeoutStateManager.SaveState() if configuredplugin, err := sdk.Start(pluginInfo)
if err != nil {
log.Printf("Failed to connect: %v", err)
// Handle connection failure
}
err := plugin.SetItem("key", "value")
if err != nil {
log.Printf("Storage error: %v", err)
// Handle storage failure
}
// Recommended for all production plugins
plugin.StartHeartbeat(30*time.Second, 60*time.Second)
type MyPlugin struct {
importantData map[string]interface{}
configPath string
}
func (p *MyPlugin) SaveState() error {
// Save critical state that should survive restarts
return saveToFile(p.configPath, p.importantData)
}
import (
"os"
"os/signal"
"syscall"
)
// Listen for OS signals
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
go func() {
<-sigChan
log.Println("Shutting down gracefully...")
plugin.Close()
os.Exit(0)
}()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go func() {
ticker := time.NewTicker(10 * time.Second)
defer ticker.Stop()
for {
select {
case <-ctx.Done():
return
case <-ticker.C:
// Do background work
}
}
}()
plugin.Listen(func(messageType int, data []byte) {
log.Printf("Received message type %d: %s", messageType, string(data))
// Process message
})
Plugins can extend the Delve UI with sidebar items and footer widgets, and update them live at runtime.
Helpers on Plugin:
SetUIContributions(c UIContributions) – replace all sidebar/footer entriesUpsertSidebarItem(item SidebarItem) – insert or replace a sidebar item and emit an updateUpsertFooterWidget(w FooterWidget) – insert or replace a footer widget and emit an updateSetFooterBadgeCount(identifier string, count int) – update a footer widget badge by ElementTag or TitleMinimal usage:
// During registration
pluginInfo := &sdk.RegisterRequest{
Name: "my-plugin",
Description: "Demo",
CustomElementTag: "my-plugin",
UiComponentPath: "frontend/component.js",
}
plugin, _ := sdk.Start(pluginInfo)
// Contribute a sidebar item and a footer icon
_ = plugin.SetUIContributions(sdk.UIContributions{
Sidebar: []sdk.SidebarItem{
{ Title: "My Plugin", ElementTag: "my-plugin", ComponentPath: "frontend/component.js", OnClickCommand: &sdk.CommandRef{ID: "my-plugin.open"} },
},
Footer: []sdk.FooterWidget{
{ Title: "My Plugin", Icon: "mdi:rocket", OnClickCommand: &sdk.CommandRef{ID: "my-plugin.open"} },
},
})
// Update badge later (e.g., unread count)
_ = plugin.SetFooterBadgeCount("My Plugin", 5)
// Default click handler returns an activation hint for the frontend
plugin.OnCommand("my-plugin.open", func(ctx context.Context, args []any) (any, error) {
return map[string]any{"activateUI": map[string]any{"plugin": "my-plugin", "tag": "my-plugin"}}, nil
})
To make your plugin available through the Delve Plugin Registry:
screenshots/ directory in your repositoryDirectory Structure:
my-plugin/
├── plugin.json # Plugin metadata
├── main.go # Plugin source code
├── frontend/
│ └── component.js # Frontend component
├── screenshots/ # Plugin screenshots
├── overview.png
├── settings.png
└── features.png
Your plugin's frontend component should match the CustomElementTag:
// If CustomElementTag is "my-plugin"
class MyPlugin extends HTMLElement {
connectedCallback() {
this.innerHTML = '<h1>My Plugin UI</h1>';
}
}
customElements.define('my-plugin', MyPlugin);
See example.go for a complete plugin implementation with:
FAQs
Delve Plugin SDK for creating custom plugins
We found that @delve.sh/plugin-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.