Sovereign SDK for the Starlight Protocol
Project description
🛰️ Starlight Protocol
An Open Standard for Autonomous Browser Automation
Quick Start • Specification • Book • Roadmap
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
| 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 |
✨ 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file starlight_protocol-1.2.1.tar.gz.
File metadata
- Download URL: starlight_protocol-1.2.1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81cb0d2395588822c9ae25a3c0afc2e100943d68c14a6516c224bcee1ed5ce4a
|
|
| MD5 |
3268c49d9aafeba15cfe84353c568706
|
|
| BLAKE2b-256 |
fd9bc8959901c22e5af36f0229b6a7e7042a70d7a2de61312dc9a476a6400c86
|
File details
Details for the file starlight_protocol-1.2.1-py3-none-any.whl.
File metadata
- Download URL: starlight_protocol-1.2.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b03c13b678ff04e78f0b425890405e57c4857af4e9b57f86c17910c205638d2b
|
|
| MD5 |
42c2db09699a20780f01192d365d585d
|
|
| BLAKE2b-256 |
1c8ca83c04385b8dde70dc7981cc1746603da94c86f6866c9c3de8b98b2ea35c
|