Plugin System

Extend StreamSpace without modifying core code

Plugin Types

Five powerful ways to extend StreamSpace

🔧

Extension

Add new features and UI components to the web interface. Create custom dashboards, widgets, and functionality.

🔗

Webhook

React to system events like session creation, user login, hibernation, and more. Trigger automations and workflows.

🌐

API Integration

Connect to external services like Slack, GitHub, Jira, monitoring systems, and custom APIs.

🎨

UI Theme

Customize the web interface appearance with custom colors, typography, layout, and branding.

⚙️

CLI

Add custom command-line tools and scripts for advanced automation and management tasks.

Quick Start Example

Build a simple webhook plugin in minutes

JavaScript
// plugin.js - Slack notification plugin
module.exports = {
  async onSessionCreated(session) {
    // Send notification when a session is created
    await fetch(this.config.slackWebhookUrl, {
      method: 'POST',
      body: JSON.stringify({
        text: `🚀 New session created: ${session.template} for ${session.user}`
      })
    });
  },

  async onSessionHibernated(session) {
    await fetch(this.config.slackWebhookUrl, {
      method: 'POST',
      body: JSON.stringify({
        text: `💤 Session hibernated: ${session.id}`
      })
    });
  }
};
JSON
// manifest.json
{
  "name": "slack-notifications",
  "version": "1.0.0",
  "displayName": "Slack Notifications",
  "description": "Send session events to Slack",
  "type": "webhook",
  "author": "Your Name",
  "permissions": ["read:sessions"],
  "configSchema": {
    "type": "object",
    "properties": {
      "slackWebhookUrl": {
        "type": "string",
        "title": "Slack Webhook URL",
        "description": "Your Slack webhook URL"
      }
    },
    "required": ["slackWebhookUrl"]
  }
}

Plugin Features

Everything you need to build powerful extensions

📦

Easy Installation

Browse and install plugins directly from the web UI. One-click installation from Git repositories.

🎛️

Configuration UI

Schema-based form generation for plugin configuration. No need to build admin interfaces.

🔒

Permission System

Granular permissions with risk indicators (low/medium/high). Users know what they're approving.

Event System

11+ system events to hook into: session lifecycle, user management, and more.

💾

Persistent Storage

Key-value storage API for plugin data. Store configuration, cache, and state.

📊

API Access

Full access to StreamSpace APIs: sessions, users, templates, and more.

Available Events

Hook into these system events with webhook plugins

// Session Events
onSessionCreated(session)    // Session is created
onSessionStarted(session)    // Session starts running
onSessionStopped(session)    // Session stops
onSessionHibernated(session) // Session hibernates (idle)
onSessionWoken(session)      // Session wakes from hibernation
onSessionDeleted(session)    // Session is permanently deleted

// User Events
onUserCreated(user)          // New user account created
onUserUpdated(user)          // User details updated
onUserDeleted(user)          // User account deleted
onUserLogin(user)            // User logs in
onUserLogout(user)           // User logs out

Example Use Cases

Real-world plugins you can build

Slack Integration

Send notifications to Slack channels when sessions are created, hibernated, or encounter errors.

GitHub Sync

Automatically create GitHub issues for new sessions, sync templates from repositories, track usage.

Session Analytics

Track session usage patterns, generate reports, identify popular templates, analyze user behavior.

Custom Branding

Apply company colors, logos, and styling to the web interface. White-label StreamSpace.

Backup Automation

Automatically backup user home directories, sync to S3 or remote storage, schedule snapshots.

Cost Tracking

Track resource usage per user or team, generate cost reports, set budget alerts.

Ready to Build a Plugin?

Comprehensive guides and API reference available