Skip to main content

Sovereign SDK for the Starlight Protocol

Project description

🛰️ Starlight Protocol

Starlight Protocol

An Open Standard for Autonomous Browser Automation

Version License CI Node Python

Quick StartSpecificationBookRoadmap


What is the Starlight Protocol?

The Starlight Protocol decouples intent from environment. Your test scripts describe goals; autonomous Sentinels handle the chaos.

// Traditional: Handle EVERYTHING yourself
if (await page.$('.cookie-banner')) await page.click('.dismiss');
if (await page.$('.popup')) await page.click('.close');
await page.click('#submit');

// Starlight: Express INTENT only
await hub.send({ goal: 'Submit Form' });
// Sentinels automatically clear obstacles

🏗️ Architecture

Architecture

Component Role
Hub Central orchestrator, manages Playwright browser
Pulse Sentinel Monitors DOM/Network stability
Janitor Sentinel Clears popups, modals, banners
Vision Sentinel AI-powered obstacle detection (Moondream)
Data Sentinel Context extraction & injection

🚀 Quick Start

Prerequisites

  • Node.js 18+ & Python 3.9+
  • Ollama (optional, for Vision)

Install

git clone https://github.com/starlight-protocol/starlight.git
cd cba
npm install
pip install -r requirements.txt
npx playwright install chromium

Run

# One command launches everything
node bin/starlight.js test/intent_portfolio_v2.js --headless

Mission Control (GUI)

node launcher/server.js
# Open http://localhost:3000

🛰️ The Protocol

All communication uses JSON-RPC 2.0:

Method Purpose
starlight.intent Issue a goal or command
starlight.pre_check Hub → Sentinels handshake
starlight.clear Sentinel approves action
starlight.wait Sentinel vetoes (retry later)
starlight.hijack Sentinel takes browser control
starlight.resume Sentinel releases control

📄 Full Specification


✨ Key Features

Feature Description
Self-Healing Selectors Learns alternatives when selectors fail
Animation Tolerance Handles CSS animations without blocking
No-Code Recorder Record tests by clicking through your site
Visual Sentinel Editor Create custom Sentinels without code
Shadow DOM Support Pierces web component boundaries
Webhook Alerts Slack/Teams notifications
ROI Dashboard Quantifies time saved

🛠️ Build a Sentinel

from sdk.starlight_sdk import SentinelBase

class MySentinel(SentinelBase):
    def __init__(self):
        super().__init__("MySentinel", priority=5)
        self.selectors = [".my-obstacle"]
    
    async def on_pre_check(self, params, msg_id):
        # Your detection logic
        await self.send_clear()

if __name__ == "__main__":
    import asyncio
    asyncio.run(MySentinel().start())

📚 Documentation

Document Description
📖 Book Comprehensive guide
📄 Specification Formal protocol standard
📋 User Guide Getting started
⚙️ Technical Guide SDK & configuration
🗺️ Roadmap Future plans
📝 Changelog Version history

🐳 Docker

docker-compose up --build

📖 Blog Series


📄 License

MIT License - LICENSE


"Don't look at the ground; look at the Starlight."

Built with ❤️ by Dhiraj Das

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

starlight_protocol-1.2.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

starlight_protocol-1.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file starlight_protocol-1.2.0.tar.gz.

File metadata

  • Download URL: starlight_protocol-1.2.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for starlight_protocol-1.2.0.tar.gz
Algorithm Hash digest
SHA256 1214e624ec8830316cd8cc91ccf63c91b402b9894b528edf4937bdb93c8f4f0d
MD5 0b72ad6dfd661641606073a1cd70abd9
BLAKE2b-256 ede88f915d175fa0d2211d63301979cbc1ed79fcb5bcebac5349c6ed8df82ad6

See more details on using hashes here.

File details

Details for the file starlight_protocol-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for starlight_protocol-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 671fc6784503829973fbbaf95e134c7165415c50f6b1ce3e28e2428a9707c525
MD5 9544c7d262dadf85bb56156c5c186612
BLAKE2b-256 809f1440dfd93fa22f8f7a8c0ba4693c888b0f5eedb1994ba3b48fef4e5e9f8f

See more details on using hashes here.

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