orchestra-mcp/desktop

Orchestra MCP Desktop — the NativePHP infrastructure layer for desktop features. Provides the coordination point for feature packages (tray, panels, notifications, widgets) to register their NativePHP boot logic.

Fund package maintenance!
fadymondy

Installs: 81

Dependents: 4

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/orchestra-mcp/desktop

v0.0.1 2026-02-11 12:29 UTC

This package is auto-updated.

Last update: 2026-02-11 12:32:01 UTC


README

Screenshot

Desktop

Orchestra MCP Desktop — the NativePHP infrastructure layer for desktop features. Provides the coordination point for feature packages (tray, panels, notifications, widgets) to register their NativePHP boot logic.

Features

  • Boot Callback System — Feature packages implement HasNativeBootCallbacks to register closures executed during NativeAppServiceProvider::boot()
  • Priority-Based Execution — Boot callbacks sorted by priority (lower values execute first)
  • NativePHP Detection — Centralized NativePhpDetector service replaces scattered class_exists() checks
  • Hook-Based ProviderNativeAppServiceProvider calls Desktop::executeBootCallbacks() — no hardcoded feature logic
  • DesktopBooted Event — Dispatched after all boot callbacks complete
  • 2 Commandsorchestra:desktop-install for setup, orchestra:desktop-status for diagnostics

Installation

composer require orchestra-mcp/desktop
php artisan orchestra:desktop-install

The service provider is auto-discovered. The install command publishes the config and creates the NativeAppServiceProvider.

Run the Desktop App

php artisan native:serve
# or
composer native

Quick Start

Register Boot Callbacks from a Feature Package

Implement HasNativeBootCallbacks on your plugin:

use OrchestraMcp\Desktop\Contracts\HasNativeBootCallbacks;
use OrchestraMcp\Plugins\Plugin\Plugin;

class TrayPlugin extends Plugin implements HasNativeBootCallbacks
{
    public function nativeBootCallbacks(): array
    {
        return [
            static function (): void {
                Tray::create();
                Tray::rebuildMenu();
            },
        ];
    }

    public function nativeBootPriority(): int
    {
        return 50;
    }
}

Check NativePHP Availability

use OrchestraMcp\Desktop\Facades\Desktop;

if (Desktop::isNativePhpAvailable()) {
    // NativePHP is installed
}

if (Desktop::isRunningNative()) {
    // Running inside Electron
}

Configuration

Publish the config:

php artisan vendor:publish --tag=orchestra-desktop-config
Key Default Env Variable Description
enabled true ORCHESTRA_DESKTOP_ENABLED Enable/disable the desktop plugin
marketplace false Marketplace visibility (infrastructure, always false)

Artisan Commands

Command Description
orchestra:desktop-install Publish config, create NativeAppServiceProvider
orchestra:desktop-status Show NativePHP availability and desktop status

Package Relationships

desktop (NativePHP infrastructure)
├── tray (system tray — priority 50)
├── panel (future — window/panel management)
├── notification (future — native notifications)
└── widget (future — desktop widgets/overlays)

All feature packages depend on orchestra-mcp/desktop and get nativephp/electron transitively.

Documentation

Full documentation is available in the docs/ directory:

Development

# Install dependencies
composer install

# Run tests
composer test

# Format code
composer format

# Static analysis
composer check

# Lint
composer lint

License

MIT