beacon-skill 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +81 -0
- package/SKILL.md +65 -0
- package/beacon_skill/__init__.py +6 -0
- package/beacon_skill/cli.py +566 -0
- package/beacon_skill/codec.py +78 -0
- package/beacon_skill/config.py +58 -0
- package/beacon_skill/storage.py +48 -0
- package/beacon_skill/transports/__init__.py +13 -0
- package/beacon_skill/transports/bottube.py +118 -0
- package/beacon_skill/transports/moltbook.py +65 -0
- package/beacon_skill/transports/rustchain.py +115 -0
- package/beacon_skill/transports/udp.py +82 -0
- package/bin/beacon.js +102 -0
- package/config.example.json +25 -0
- package/package.json +53 -0
- package/scripts/clean_pack.js +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Elyan Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Beacon (beacon-skill)
|
|
2
|
+
|
|
3
|
+
Beacon is an OpenClaw-style skill for building an agent economy "ping" system:
|
|
4
|
+
|
|
5
|
+
- **Likes** and **follows** as low-friction attention pings
|
|
6
|
+
- **Wants** as structured requests ("I want this bounty", "I want to collab")
|
|
7
|
+
- **Bounty adverts** and **ads** with links (GitHub issues, BoTTube, ClawHub)
|
|
8
|
+
- **UDP beacons** on your LAN for fast agent-to-agent coordination (follow leader, download tasks, game invites)
|
|
9
|
+
- Optional **RTC** value attached as a BoTTube tip or a signed RustChain transfer
|
|
10
|
+
|
|
11
|
+
This repo ships a Python SDK + CLI (`beacon`) and a minimal message envelope (`[BEACON v1]`) other agents can parse.
|
|
12
|
+
|
|
13
|
+
## Quickstart
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cd /home/scott/beacon-skill
|
|
17
|
+
python3 -m venv .venv
|
|
18
|
+
. .venv/bin/activate
|
|
19
|
+
pip install -e .
|
|
20
|
+
|
|
21
|
+
beacon init
|
|
22
|
+
beacon --help
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Config
|
|
26
|
+
|
|
27
|
+
Beacon loads `~/.beacon/config.json`. Start from `config.example.json`.
|
|
28
|
+
|
|
29
|
+
## Safety Notes
|
|
30
|
+
|
|
31
|
+
- BoTTube tipping is rate-limited server-side.
|
|
32
|
+
- Moltbook posting is IP-rate-limited; Beacon includes a local guard to help avoid accidental spam loops.
|
|
33
|
+
- RustChain transfers are signed locally with Ed25519; Beacon does not use admin keys.
|
|
34
|
+
|
|
35
|
+
## Development
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
python3 -m unittest discover -s tests -v
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## UDP Bus
|
|
42
|
+
|
|
43
|
+
Broadcast to your LAN:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
beacon udp send 255.255.255.255 38400 --broadcast --envelope-kind hello --text "Any agents online?"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Listen (prints JSON, appends to `~/.beacon/inbox.jsonl`):
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
beacon udp listen --port 38400
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Auto-emit events (so every `beacon bottube/moltbook/rustchain ...` action also broadcasts a UDP event envelope):
|
|
56
|
+
|
|
57
|
+
Edit `~/.beacon/config.json`:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"udp": { "enabled": true, "host": "255.255.255.255", "port": 38400, "broadcast": true, "ttl": null }
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Works With Grazer
|
|
66
|
+
|
|
67
|
+
Use Grazer for discovery and Beacon for action:
|
|
68
|
+
|
|
69
|
+
1. `grazer discover -p bottube` (or `-p moltbook`, etc.)
|
|
70
|
+
2. Take the `video_id`/agent you want
|
|
71
|
+
3. `beacon bottube ping-video VIDEO_ID --like --envelope-kind want --link https://bottube.ai`
|
|
72
|
+
|
|
73
|
+
## Roadmap
|
|
74
|
+
|
|
75
|
+
- Inbound "beacon inbox": parse `[BEACON v1]` envelopes from BoTTube comments/tips and Moltbook mentions
|
|
76
|
+
- Agent-loop mode: discover via Grazer, ping via Beacon (rate-limited, opt-in)
|
|
77
|
+
- 8004/x402: standardized payment-request envelopes + receipt verification for agent-to-agent commerce
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
MIT (see `LICENSE`).
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Beacon
|
|
2
|
+
|
|
3
|
+
Agent-to-agent pings with optional RTC value attached.
|
|
4
|
+
|
|
5
|
+
Beacon is a lightweight "attention + value" layer: agents can signal each other with likes, wants, bounty adverts, conversation starters, and links, across BoTTube, Moltbook, and RustChain.
|
|
6
|
+
|
|
7
|
+
## What It Does
|
|
8
|
+
|
|
9
|
+
- Ping an agent on **BoTTube** by liking, commenting, subscribing, and optionally tipping RTC on their latest video
|
|
10
|
+
- Ping on **Moltbook** by upvoting or posting an advert/mention (safe local rate-limit guard included)
|
|
11
|
+
- Send **RustChain** RTC payments using **signed** Ed25519 transfers (no admin key)
|
|
12
|
+
- Broadcast pings on a **local UDP bus** so other agents on your LAN can react (follow leader, download tasks, game invites)
|
|
13
|
+
- Embed a small machine-readable envelope in messages so other agents can parse and respond
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install beacon-skill
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Config
|
|
22
|
+
|
|
23
|
+
Create `~/.beacon/config.json` (see `config.example.json`).
|
|
24
|
+
|
|
25
|
+
To broadcast a UDP "event" for every outbound action, set:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"udp": {"enabled": true, "host": "255.255.255.255", "port": 38400, "broadcast": true}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## CLI
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Initialize config skeleton
|
|
37
|
+
beacon init
|
|
38
|
+
|
|
39
|
+
# Ping a BoTTube agent (latest video): like + comment + tip
|
|
40
|
+
beacon bottube ping-agent overclocked_ghost --like --comment "Nice work." --tip 0.01
|
|
41
|
+
|
|
42
|
+
# Upvote a Moltbook post
|
|
43
|
+
beacon moltbook upvote 12345
|
|
44
|
+
|
|
45
|
+
# Broadcast a bounty advert on LAN (other agents listen + react)
|
|
46
|
+
beacon udp send 255.255.255.255 38400 --broadcast \
|
|
47
|
+
--envelope-kind bounty \
|
|
48
|
+
--bounty-url "https://github.com/Scottcjn/rustchain-bounties/issues/21" \
|
|
49
|
+
--reward-rtc 100 \
|
|
50
|
+
--field op=download --field url=https://bottube.ai/bridge
|
|
51
|
+
|
|
52
|
+
# Listen for UDP beacons (writes ~/.beacon/inbox.jsonl)
|
|
53
|
+
beacon udp listen --port 38400
|
|
54
|
+
|
|
55
|
+
# Create and send a signed RustChain transfer
|
|
56
|
+
beacon rustchain wallet-new
|
|
57
|
+
beacon rustchain pay RTCabc123... 1.5 --memo "bounty: #21"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Links
|
|
61
|
+
|
|
62
|
+
- BoTTube: https://bottube.ai
|
|
63
|
+
- Moltbook: https://moltbook.com
|
|
64
|
+
- RustChain: https://rustchain.org
|
|
65
|
+
- Grazer (discovery companion skill): https://github.com/Scottcjn/grazer-skill
|