syryn 0.1.0__tar.gz

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.
syryn-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: syryn
3
+ Version: 0.1.0
4
+ Summary: Bluetooth identity beacon for headless Linux devices — returns hostname, mDNS, and active network interfaces over RFCOMM.
5
+ Project-URL: Homepage, https://github.com/szholobetsky/syryn
6
+ Project-URL: Repository, https://github.com/szholobetsky/syryn
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: PyBluez2>=0.46
10
+ Requires-Dist: psutil>=5.9
11
+ Requires-Dist: requests>=2.28
12
+
13
+ ![syryn](https://raw.githubusercontent.com/szholobetsky/simrgl/main/images/logo/syryn.png)
14
+
15
+ # syryn
16
+
17
+ Bluetooth identity beacon for headless Linux devices.
18
+
19
+ The name comes from *Сирин* — a bird from Slavic mythology known for its voice. Syryn speaks when asked: it listens on a Bluetooth RFCOMM channel and responds with the device's hostname, mDNS address, and active network interfaces.
20
+
21
+ ---
22
+
23
+ ## What it does
24
+
25
+ Run `syryn` on a headless mini-PC. From any nearby Bluetooth device, send `STATUS` — and get back:
26
+
27
+ ```
28
+ hostname: panteon-john
29
+ mdns: panteon-john.local
30
+ eth0: 192.168.0.131
31
+ wlan0: 192.168.1.44
32
+ external_ip: 93.12.34.56
33
+ ```
34
+
35
+ No display needed. No SSH session. No prior knowledge of the IP address.
36
+
37
+ ---
38
+
39
+ ## Install & quick start
40
+
41
+ ### 1. System packages (one-time)
42
+
43
+ Debian / Ubuntu:
44
+ ```bash
45
+ sudo apt install bluez python3-dev libbluetooth-dev python3-pip
46
+ ```
47
+
48
+ Fedora / RHEL:
49
+ ```bash
50
+ sudo dnf install bluez bluez-libs-devel python3-devel python3-pip
51
+ ```
52
+
53
+ ### 2. Enable Bluetooth
54
+
55
+ ```bash
56
+ systemctl status bluetooth # check if bluetoothd is running
57
+ sudo systemctl enable bluetooth --now # start and enable on boot
58
+
59
+ rfkill list # check if adapter is blocked
60
+ sudo rfkill unblock bluetooth # unblock if needed
61
+ ```
62
+
63
+ ### 3. Install syryn
64
+
65
+ ```bash
66
+ pip install syryn
67
+ ```
68
+
69
+ ### 4. Run
70
+
71
+ ```bash
72
+ syryn # start beacon, prints port and hostname
73
+ syryn -q # quiet mode, no output
74
+ ```
75
+
76
+ Syryn starts a Bluetooth RFCOMM server and waits for connections.
77
+ The Bluetooth device name visible to other devices is the system hostname
78
+ (set via `hostnamectl set-hostname <name>`).
79
+
80
+ ### 5. Connect from another device
81
+
82
+ From any device with a Bluetooth terminal app (e.g. **Serial Bluetooth Terminal** on Android):
83
+
84
+ 1. Pair with the headless device
85
+ 2. Connect to the **Syryn** service
86
+ 3. Send `STATUS` — receive hostname, mDNS, interfaces, external IP
87
+
88
+ ---
89
+
90
+ ## Requirements
91
+
92
+ - Linux with BlueZ (`bluetoothd` running)
93
+ - Python 3.10+
94
+ - `PyBluez2`, `psutil`, `requests`
95
+
96
+ ---
97
+
98
+ ## Part of the SIMARGL toolkit
99
+
100
+ syryn is one of seven tools that together form an **intellectual development support system**:
101
+
102
+ | Tool | Role |
103
+ |---|---|
104
+ | **[simargl](https://github.com/szholobetsky/simargl)** | Task-to-code retrieval — given a task description, finds which files and modules are likely affected, using semantic similarity over git history |
105
+ | **[svitovyd](https://github.com/szholobetsky/svitovyd)** | Project map — scans any codebase and produces a structural map of definitions and cross-file dependencies; exposes it as an MCP server |
106
+ | **[1bcoder](https://github.com/szholobetsky/1bcoder)** | AI coding assistant for small local models — surgical context management, agents, parallel inference, proc scripts |
107
+ | **[yasna](https://github.com/szholobetsky/yasna)** | Session memory — indexes conversations from all AI agents so you can find what was discussed, when, and where |
108
+ | **[radogast](https://github.com/szholobetsky/radogast)** | Context drift monitor — measures how far an AI agent's conversation has drifted from the original task |
109
+ | **[vyrii](https://github.com/szholobetsky/vyrii)** | Local AI web UI — chat, translate, web research, RAG, and file management via Gradio; powered by Ollama or any OpenAI-compatible backend |
110
+ | **[syryn](https://github.com/szholobetsky/syryn)** | Bluetooth identity beacon — returns hostname, mDNS, and active network interfaces for headless devices |
111
+
112
+ ---
113
+
114
+ **(c) 2026 Stanislav Zholobetskyi, Oleh Andriichuk**
115
+ Institute for Information Recording, National Academy of Sciences of Ukraine, Kyiv
116
+ *PhD research: «Intelligent Technology for Software Development and Maintenance Support»*
syryn-0.1.0/README.md ADDED
@@ -0,0 +1,104 @@
1
+ ![syryn](https://raw.githubusercontent.com/szholobetsky/simrgl/main/images/logo/syryn.png)
2
+
3
+ # syryn
4
+
5
+ Bluetooth identity beacon for headless Linux devices.
6
+
7
+ The name comes from *Сирин* — a bird from Slavic mythology known for its voice. Syryn speaks when asked: it listens on a Bluetooth RFCOMM channel and responds with the device's hostname, mDNS address, and active network interfaces.
8
+
9
+ ---
10
+
11
+ ## What it does
12
+
13
+ Run `syryn` on a headless mini-PC. From any nearby Bluetooth device, send `STATUS` — and get back:
14
+
15
+ ```
16
+ hostname: panteon-john
17
+ mdns: panteon-john.local
18
+ eth0: 192.168.0.131
19
+ wlan0: 192.168.1.44
20
+ external_ip: 93.12.34.56
21
+ ```
22
+
23
+ No display needed. No SSH session. No prior knowledge of the IP address.
24
+
25
+ ---
26
+
27
+ ## Install & quick start
28
+
29
+ ### 1. System packages (one-time)
30
+
31
+ Debian / Ubuntu:
32
+ ```bash
33
+ sudo apt install bluez python3-dev libbluetooth-dev python3-pip
34
+ ```
35
+
36
+ Fedora / RHEL:
37
+ ```bash
38
+ sudo dnf install bluez bluez-libs-devel python3-devel python3-pip
39
+ ```
40
+
41
+ ### 2. Enable Bluetooth
42
+
43
+ ```bash
44
+ systemctl status bluetooth # check if bluetoothd is running
45
+ sudo systemctl enable bluetooth --now # start and enable on boot
46
+
47
+ rfkill list # check if adapter is blocked
48
+ sudo rfkill unblock bluetooth # unblock if needed
49
+ ```
50
+
51
+ ### 3. Install syryn
52
+
53
+ ```bash
54
+ pip install syryn
55
+ ```
56
+
57
+ ### 4. Run
58
+
59
+ ```bash
60
+ syryn # start beacon, prints port and hostname
61
+ syryn -q # quiet mode, no output
62
+ ```
63
+
64
+ Syryn starts a Bluetooth RFCOMM server and waits for connections.
65
+ The Bluetooth device name visible to other devices is the system hostname
66
+ (set via `hostnamectl set-hostname <name>`).
67
+
68
+ ### 5. Connect from another device
69
+
70
+ From any device with a Bluetooth terminal app (e.g. **Serial Bluetooth Terminal** on Android):
71
+
72
+ 1. Pair with the headless device
73
+ 2. Connect to the **Syryn** service
74
+ 3. Send `STATUS` — receive hostname, mDNS, interfaces, external IP
75
+
76
+ ---
77
+
78
+ ## Requirements
79
+
80
+ - Linux with BlueZ (`bluetoothd` running)
81
+ - Python 3.10+
82
+ - `PyBluez2`, `psutil`, `requests`
83
+
84
+ ---
85
+
86
+ ## Part of the SIMARGL toolkit
87
+
88
+ syryn is one of seven tools that together form an **intellectual development support system**:
89
+
90
+ | Tool | Role |
91
+ |---|---|
92
+ | **[simargl](https://github.com/szholobetsky/simargl)** | Task-to-code retrieval — given a task description, finds which files and modules are likely affected, using semantic similarity over git history |
93
+ | **[svitovyd](https://github.com/szholobetsky/svitovyd)** | Project map — scans any codebase and produces a structural map of definitions and cross-file dependencies; exposes it as an MCP server |
94
+ | **[1bcoder](https://github.com/szholobetsky/1bcoder)** | AI coding assistant for small local models — surgical context management, agents, parallel inference, proc scripts |
95
+ | **[yasna](https://github.com/szholobetsky/yasna)** | Session memory — indexes conversations from all AI agents so you can find what was discussed, when, and where |
96
+ | **[radogast](https://github.com/szholobetsky/radogast)** | Context drift monitor — measures how far an AI agent's conversation has drifted from the original task |
97
+ | **[vyrii](https://github.com/szholobetsky/vyrii)** | Local AI web UI — chat, translate, web research, RAG, and file management via Gradio; powered by Ollama or any OpenAI-compatible backend |
98
+ | **[syryn](https://github.com/szholobetsky/syryn)** | Bluetooth identity beacon — returns hostname, mDNS, and active network interfaces for headless devices |
99
+
100
+ ---
101
+
102
+ **(c) 2026 Stanislav Zholobetskyi, Oleh Andriichuk**
103
+ Institute for Information Recording, National Academy of Sciences of Ukraine, Kyiv
104
+ *PhD research: «Intelligent Technology for Software Development and Maintenance Support»*
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "syryn"
7
+ version = "0.1.0"
8
+ description = "Bluetooth identity beacon for headless Linux devices — returns hostname, mDNS, and active network interfaces over RFCOMM."
9
+ requires-python = ">=3.10"
10
+ readme = {file = "README.md", content-type = "text/markdown"}
11
+ dependencies = [
12
+ "PyBluez2>=0.46",
13
+ "psutil>=5.9",
14
+ "requests>=2.28",
15
+ ]
16
+
17
+ [project.urls]
18
+ Homepage = "https://github.com/szholobetsky/syryn"
19
+ Repository = "https://github.com/szholobetsky/syryn"
20
+
21
+ [project.scripts]
22
+ syryn = "syryn.__main__:main"
23
+
24
+ [tool.setuptools.packages.find]
25
+ where = ["."]
26
+ include = ["syryn*"]
27
+
28
+ [tool.setuptools.package-data]
29
+ "syryn" = ["**/*"]
syryn-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"
@@ -0,0 +1,16 @@
1
+ import argparse
2
+ from .syryn import serve
3
+
4
+
5
+ def main() -> None:
6
+ p = argparse.ArgumentParser(
7
+ prog="syryn",
8
+ description="Bluetooth identity beacon — responds to STATUS over RFCOMM",
9
+ )
10
+ p.add_argument("-q", "--quiet", action="store_true", help="suppress log output")
11
+ args = p.parse_args()
12
+ serve(verbose=not args.quiet)
13
+
14
+
15
+ if __name__ == "__main__":
16
+ main()
@@ -0,0 +1,112 @@
1
+ """RFCOMM server: listens for Bluetooth connections, responds to STATUS command."""
2
+ from __future__ import annotations
3
+
4
+ import datetime
5
+ import socket
6
+ import sys
7
+
8
+ try:
9
+ import bluetooth
10
+ except ModuleNotFoundError:
11
+ sys.exit(
12
+ "syryn requires PyBluez2 and Linux BlueZ.\n"
13
+ "Debian/Ubuntu: sudo apt install bluez python3-dev libbluetooth-dev\n"
14
+ "Fedora/RHEL: sudo dnf install bluez bluez-libs-devel python3-devel\n"
15
+ "Then: pip install PyBluez2"
16
+ )
17
+
18
+ import psutil
19
+ import requests
20
+
21
+ CACHE_TTL = 300
22
+
23
+ _ip_cache: dict = {}
24
+
25
+
26
+ def get_hostname() -> str:
27
+ return socket.gethostname()
28
+
29
+
30
+ def get_interfaces() -> list[tuple[str, str]]:
31
+ stats = psutil.net_if_stats()
32
+ result = []
33
+ for name, addr_list in psutil.net_if_addrs().items():
34
+ if not stats.get(name) or not stats[name].isup:
35
+ continue
36
+ for addr in addr_list:
37
+ if addr.family == socket.AF_INET and not addr.address.startswith("127."):
38
+ result.append((name, addr.address))
39
+ return result
40
+
41
+
42
+ def get_external_ip() -> str:
43
+ now = datetime.datetime.now()
44
+ if "ip" in _ip_cache and (now - _ip_cache["ts"]).total_seconds() < CACHE_TTL:
45
+ return _ip_cache["ip"]
46
+ try:
47
+ ip = requests.get("https://api.ipify.org", timeout=5).text.strip()
48
+ _ip_cache.update({"ip": ip, "ts": now})
49
+ return ip
50
+ except Exception:
51
+ return _ip_cache.get("ip", "unknown")
52
+
53
+
54
+ def build_status() -> str:
55
+ hostname = get_hostname()
56
+ lines = [f"hostname: {hostname}", f"mdns: {hostname}.local"]
57
+ for name, ip in get_interfaces():
58
+ lines.append(f"{name}: {ip}")
59
+ lines.append(f"external_ip: {get_external_ip()}")
60
+ return "\n".join(lines)
61
+
62
+
63
+ def _handle_client(client_sock: bluetooth.BluetoothSocket) -> None:
64
+ try:
65
+ while True:
66
+ data = client_sock.recv(1024)
67
+ if not data:
68
+ break
69
+ cmd = data.decode("utf-8", errors="ignore").strip()
70
+ if not cmd or cmd.upper() == "STATUS":
71
+ client_sock.sendall((build_status() + "\n").encode("utf-8"))
72
+ except OSError:
73
+ pass
74
+ finally:
75
+ client_sock.close()
76
+
77
+
78
+ def serve(verbose: bool = True) -> None:
79
+ server_sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
80
+ server_sock.bind(("", bluetooth.PORT_ANY))
81
+ server_sock.listen(1)
82
+ port = server_sock.getsockname()[1]
83
+
84
+ try:
85
+ bluetooth.advertise_service(
86
+ server_sock,
87
+ "Syryn",
88
+ service_classes=[bluetooth.SERIAL_PORT_CLASS],
89
+ profiles=[bluetooth.SERIAL_PORT_PROFILE],
90
+ )
91
+ except Exception as e:
92
+ if verbose:
93
+ print(f"[syryn] SDP advertise skipped: {e}")
94
+
95
+ if verbose:
96
+ print(f"[syryn] RFCOMM port {port} | hostname: {get_hostname()}")
97
+ print("[syryn] waiting for connections (Ctrl+C to stop)")
98
+
99
+ try:
100
+ while True:
101
+ client_sock, addr = server_sock.accept()
102
+ if verbose:
103
+ print(f"[syryn] connected: {addr}")
104
+ _handle_client(client_sock)
105
+ if verbose:
106
+ print(f"[syryn] disconnected: {addr}")
107
+ except KeyboardInterrupt:
108
+ pass
109
+ finally:
110
+ server_sock.close()
111
+ if verbose:
112
+ print("[syryn] stopped")
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: syryn
3
+ Version: 0.1.0
4
+ Summary: Bluetooth identity beacon for headless Linux devices — returns hostname, mDNS, and active network interfaces over RFCOMM.
5
+ Project-URL: Homepage, https://github.com/szholobetsky/syryn
6
+ Project-URL: Repository, https://github.com/szholobetsky/syryn
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: PyBluez2>=0.46
10
+ Requires-Dist: psutil>=5.9
11
+ Requires-Dist: requests>=2.28
12
+
13
+ ![syryn](https://raw.githubusercontent.com/szholobetsky/simrgl/main/images/logo/syryn.png)
14
+
15
+ # syryn
16
+
17
+ Bluetooth identity beacon for headless Linux devices.
18
+
19
+ The name comes from *Сирин* — a bird from Slavic mythology known for its voice. Syryn speaks when asked: it listens on a Bluetooth RFCOMM channel and responds with the device's hostname, mDNS address, and active network interfaces.
20
+
21
+ ---
22
+
23
+ ## What it does
24
+
25
+ Run `syryn` on a headless mini-PC. From any nearby Bluetooth device, send `STATUS` — and get back:
26
+
27
+ ```
28
+ hostname: panteon-john
29
+ mdns: panteon-john.local
30
+ eth0: 192.168.0.131
31
+ wlan0: 192.168.1.44
32
+ external_ip: 93.12.34.56
33
+ ```
34
+
35
+ No display needed. No SSH session. No prior knowledge of the IP address.
36
+
37
+ ---
38
+
39
+ ## Install & quick start
40
+
41
+ ### 1. System packages (one-time)
42
+
43
+ Debian / Ubuntu:
44
+ ```bash
45
+ sudo apt install bluez python3-dev libbluetooth-dev python3-pip
46
+ ```
47
+
48
+ Fedora / RHEL:
49
+ ```bash
50
+ sudo dnf install bluez bluez-libs-devel python3-devel python3-pip
51
+ ```
52
+
53
+ ### 2. Enable Bluetooth
54
+
55
+ ```bash
56
+ systemctl status bluetooth # check if bluetoothd is running
57
+ sudo systemctl enable bluetooth --now # start and enable on boot
58
+
59
+ rfkill list # check if adapter is blocked
60
+ sudo rfkill unblock bluetooth # unblock if needed
61
+ ```
62
+
63
+ ### 3. Install syryn
64
+
65
+ ```bash
66
+ pip install syryn
67
+ ```
68
+
69
+ ### 4. Run
70
+
71
+ ```bash
72
+ syryn # start beacon, prints port and hostname
73
+ syryn -q # quiet mode, no output
74
+ ```
75
+
76
+ Syryn starts a Bluetooth RFCOMM server and waits for connections.
77
+ The Bluetooth device name visible to other devices is the system hostname
78
+ (set via `hostnamectl set-hostname <name>`).
79
+
80
+ ### 5. Connect from another device
81
+
82
+ From any device with a Bluetooth terminal app (e.g. **Serial Bluetooth Terminal** on Android):
83
+
84
+ 1. Pair with the headless device
85
+ 2. Connect to the **Syryn** service
86
+ 3. Send `STATUS` — receive hostname, mDNS, interfaces, external IP
87
+
88
+ ---
89
+
90
+ ## Requirements
91
+
92
+ - Linux with BlueZ (`bluetoothd` running)
93
+ - Python 3.10+
94
+ - `PyBluez2`, `psutil`, `requests`
95
+
96
+ ---
97
+
98
+ ## Part of the SIMARGL toolkit
99
+
100
+ syryn is one of seven tools that together form an **intellectual development support system**:
101
+
102
+ | Tool | Role |
103
+ |---|---|
104
+ | **[simargl](https://github.com/szholobetsky/simargl)** | Task-to-code retrieval — given a task description, finds which files and modules are likely affected, using semantic similarity over git history |
105
+ | **[svitovyd](https://github.com/szholobetsky/svitovyd)** | Project map — scans any codebase and produces a structural map of definitions and cross-file dependencies; exposes it as an MCP server |
106
+ | **[1bcoder](https://github.com/szholobetsky/1bcoder)** | AI coding assistant for small local models — surgical context management, agents, parallel inference, proc scripts |
107
+ | **[yasna](https://github.com/szholobetsky/yasna)** | Session memory — indexes conversations from all AI agents so you can find what was discussed, when, and where |
108
+ | **[radogast](https://github.com/szholobetsky/radogast)** | Context drift monitor — measures how far an AI agent's conversation has drifted from the original task |
109
+ | **[vyrii](https://github.com/szholobetsky/vyrii)** | Local AI web UI — chat, translate, web research, RAG, and file management via Gradio; powered by Ollama or any OpenAI-compatible backend |
110
+ | **[syryn](https://github.com/szholobetsky/syryn)** | Bluetooth identity beacon — returns hostname, mDNS, and active network interfaces for headless devices |
111
+
112
+ ---
113
+
114
+ **(c) 2026 Stanislav Zholobetskyi, Oleh Andriichuk**
115
+ Institute for Information Recording, National Academy of Sciences of Ukraine, Kyiv
116
+ *PhD research: «Intelligent Technology for Software Development and Maintenance Support»*
@@ -0,0 +1,11 @@
1
+ README.md
2
+ pyproject.toml
3
+ syryn/__init__.py
4
+ syryn/__main__.py
5
+ syryn/syryn.py
6
+ syryn.egg-info/PKG-INFO
7
+ syryn.egg-info/SOURCES.txt
8
+ syryn.egg-info/dependency_links.txt
9
+ syryn.egg-info/entry_points.txt
10
+ syryn.egg-info/requires.txt
11
+ syryn.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ syryn = syryn.__main__:main
@@ -0,0 +1,3 @@
1
+ PyBluez2>=0.46
2
+ psutil>=5.9
3
+ requests>=2.28
@@ -0,0 +1 @@
1
+ syryn