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
Upload Automation Native file upload support (selector & semantic)
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.2.tar.gz (11.4 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.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: starlight_protocol-1.2.2.tar.gz
  • Upload date:
  • Size: 11.4 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.2.tar.gz
Algorithm Hash digest
SHA256 5280096f2fbbd3536dd811eb362a3d049a9fc67a8444773d0523eaf276d47064
MD5 beee1d09f2a6a022cbff6fda2a873aa1
BLAKE2b-256 ed4354942f2f9af71b605fd2c98ef133d72ba6ebb8b5682dc121541fc78ca64b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for starlight_protocol-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9a4a71d16cbc7b89b8ae9201ff0b4d0106b110ead4237e01857fa638cb969be3
MD5 22b1d838007818937e011bfd09f84b85
BLAKE2b-256 d41ff35a276462a238d861d24382af236232516dac43107cc64bad8babd163b5

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