Skip to main content

Real-time visualization dashboard for Lodestar-managed repositories

Project description

lsspy

Real-time visualization dashboard for Lodestar-managed repositories.

PyPI version Python 3.12+ License: MIT

Overview

lsspy provides a web-based dashboard for monitoring and visualizing Lodestar-managed repositories in real-time. It offers live updates on tasks, agents, leases, messages, and events through a modern, interactive UI.

Features

  • ๐Ÿ“Š Real-time Monitoring: Live updates of tasks, agents, leases, and events
  • ๐Ÿ”Œ WebSocket Support: Instant notifications of state changes
  • ๐ŸŒ REST API: Full API access for programmatic integration
  • ๐Ÿ’ป Interactive Dashboard: Modern UI built with React and TypeScript
  • ๐Ÿ“ˆ Statistics & Analytics: Task completion rates, agent activity, and more
  • ๐Ÿ” Dependency Visualization: Interactive graph of task dependencies

Installation

pip install lsspy-cli

Quick Start

Navigate to your Lodestar-managed project and start the dashboard:

cd /path/to/your/project
lsspy start

The dashboard will automatically detect the .lodestar directory and open in your browser at http://localhost:8000.

CLI Reference

start

Start the LSSPY dashboard server.

lsspy start [PATH] [OPTIONS]

Arguments:

  • PATH (optional): Path to the .lodestar directory or parent directory. If not provided, auto-detects .lodestar in the current directory.

Options:

  • -p, --port INTEGER: Port to run the web server on (default: 8000)
  • -h, --host TEXT: Host address to bind to (default: 127.0.0.1)
  • --no-open: Don't automatically open browser
  • --poll-interval INTEGER: File polling interval in seconds (default: 1)
  • --debug: Enable debug logging
  • -v, --version: Show version and exit

Examples:

# Start with auto-detection
lsspy start

# Specify .lodestar directory
lsspy start /path/to/.lodestar

# Specify parent directory (will find .lodestar inside)
lsspy start /path/to/project

# Custom port and host
lsspy start --port 9000 --host 0.0.0.0

# Don't open browser automatically
lsspy start --no-open

# Enable debug logging
lsspy start --debug

Architecture

Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     Browser / Client                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚  React UI      โ”‚  โ”‚  WebSocket     โ”‚  โ”‚  REST API      โ”‚ โ”‚
โ”‚  โ”‚  Components    โ”‚  โ”‚  Client        โ”‚  โ”‚  Client        โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚                  โ”‚                  โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   FastAPI Server  โ”‚
                    โ”‚   (lsspy.server)  โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ”‚                 โ”‚                 โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  RuntimeReader โ”‚ โ”‚  SpecReader โ”‚ โ”‚ ConnectionMgr  โ”‚
    โ”‚   (SQLite)     โ”‚ โ”‚   (YAML)    โ”‚ โ”‚  (WebSocket)   โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚                 โ”‚                 โ”‚
            โ”‚                 โ”‚                 โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚          .lodestar/ Directory                       โ”‚
    โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
    โ”‚  โ”‚  runtime.sqlite  โ”‚  โ”‚    spec.yaml     โ”‚        โ”‚
    โ”‚  โ”‚  (runtime state) โ”‚  โ”‚  (task specs)    โ”‚        โ”‚
    โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Components

Frontend (React + TypeScript + Vite)

  • Modern, responsive UI components
  • Real-time updates via WebSocket
  • Task board, agent panel, event timeline
  • Dependency graph visualization

Backend (FastAPI + Python)

  • RESTful API endpoints for data access
  • WebSocket server for real-time notifications
  • File watching for automatic updates
  • SQLite and YAML readers for Lodestar data

Data Sources

  • runtime.sqlite: Dynamic state (agents, leases, messages, events)
  • spec.yaml: Static task specifications and dependencies

Data Flow

  1. Initial Load: Client requests dashboard data via REST API
  2. WebSocket Connection: Client establishes WebSocket connection
  3. Subscriptions: Client subscribes to specific data scopes (tasks, agents, etc.)
  4. File Watching: Server monitors .lodestar directory for changes
  5. Change Detection: File changes trigger data refresh
  6. Broadcast: Server broadcasts updates to subscribed WebSocket clients
  7. UI Update: Client receives updates and refreshes UI components

Configuration

Environment Variables

  • LSSPY_HOST: Default host address (default: 127.0.0.1)
  • LSSPY_PORT: Default port number (default: 8000)
  • LSSPY_DEBUG: Enable debug mode (true or false)

Specify Lodestar Directory

lsspy start --port 9000 --host 0.0.0.0

Specify Lodestar Directory

lsspy start /path/to/.lodestar --port 8080

Requirements

  • Python 3.12 or higher
  • A Lodestar-managed repository with .lodestar directory

Development

Setup

# Clone the repository
git clone https://github.com/ThomasRohde/lsspy.git
cd lsspy

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

Frontend Development

The frontend is built with Vite + React + TypeScript:

cd frontend
npm install
npm run dev      # Development server
npm run build    # Production build

API Endpoints

  • GET /api/health - Server health check
  • GET /api/dashboard - Complete dashboard data
  • GET /api/tasks - List all tasks
  • GET /api/agents - List all agents
  • GET /api/leases - List active leases
  • GET /api/messages - List recent messages
  • GET /api/events - List recent events
  • WS /ws - WebSocket connection for real-time updates

WebSocket Subscriptions

Connect to /ws and subscribe to specific data streams:

{
  "type": "subscribe",
  "scopes": ["tasks", "agents", "events"]
}

Available scopes: tasks, agents, leases, messages, events, all

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsspy_cli-0.1.1.tar.gz (343.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lsspy_cli-0.1.1-py3-none-any.whl (282.1 kB view details)

Uploaded Python 3

File details

Details for the file lsspy_cli-0.1.1.tar.gz.

File metadata

  • Download URL: lsspy_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 343.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lsspy_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 05160a5b9cbdfdba7ff3c65f6a1e10afc17992669b2c489d51d893e1f8e97e9d
MD5 2546be942aca3c63a2a7e910e480263f
BLAKE2b-256 3f18802744080006f61e246b680f3c3ad6d9a1ea5fa3d437a8c54d0e2d9a16c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for lsspy_cli-0.1.1.tar.gz:

Publisher: publish.yml on ThomasRohde/lsspy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lsspy_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: lsspy_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 282.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lsspy_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af6cde3b775009f7f7c3bca9a7e456cbebbf417ff19a5586508b3481a2739c9d
MD5 439230be88df9ba8e6e716edc19e062d
BLAKE2b-256 5302f312ad95466bc0983dc523b2f3b73ac3644de96e68941705baef63375d02

See more details on using hashes here.

Provenance

The following attestation bundles were made for lsspy_cli-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ThomasRohde/lsspy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page