tmux observer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Rename remote to observer to match solstone core

API endpoints, CLI references, and stream_name parameter updated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+22 -22
+3 -3
INSTALL.md
··· 12 12 13 13 ``` 14 14 systemctl --user status solstone-tmux 15 - sol remote list 15 + sol observer list 16 16 ``` 17 17 18 18 if it's already active and connected, you're done. ··· 33 33 34 34 2. register the observer with solstone and save the API key: 35 35 ``` 36 - sol remote create solstone-tmux 36 + sol observer create solstone-tmux 37 37 ``` 38 38 39 39 3. write the config to `~/.local/share/solstone-tmux/config/config.json`: ··· 53 53 5. verify it's running and connected: 54 54 ``` 55 55 systemctl --user status solstone-tmux 56 - sol remote list 56 + sol observer list 57 57 ``` 58 58 59 59 ## notes
+4 -4
README.md
··· 14 14 15 15 ## Setup 16 16 17 - ### 1. Register a remote observer on the solstone server 17 + ### 1. Register an observer on the solstone server 18 18 19 19 ```bash 20 - sol remote create solstone-tmux 20 + sol observer create solstone-tmux 21 21 ``` 22 22 23 23 This prints the server URL and API key. You'll need both for the next step. ··· 29 29 ```json 30 30 { 31 31 "server_url": "http://localhost:8000", 32 - "key": "<api-key-from-sol-remote-create>", 32 + "key": "<api-key-from-sol-observer-create>", 33 33 "stream": "<hostname>.tmux", 34 34 "capture_interval": 5, 35 35 "segment_interval": 300 ··· 53 53 ```bash 54 54 systemctl --user status solstone-tmux 55 55 solstone-tmux status 56 - sol remote list # should show the new remote as "connected" 56 + sol observer list # should show the observer as "connected" 57 57 ``` 58 58 59 59 ## Manual run
+1 -1
src/solstone_tmux/cli.py
··· 104 104 print("Registering via sol CLI...") 105 105 try: 106 106 result = subprocess.run( 107 - [sol, "remote", "--json", "create", config.stream], 107 + [sol, "observer", "--json", "create", config.stream], 108 108 capture_output=True, text=True, timeout=10, 109 109 ) 110 110 if result.returncode == 0:
+7 -7
src/solstone_tmux/streams.py
··· 8 8 9 9 Naming convention (separator is '.'): 10 10 Local tmux: {hostname}.tmux e.g. "archon.tmux" 11 - Remote: {remote_name} e.g. "laptop" 11 + Observer: {observer_name} e.g. "laptop" 12 12 """ 13 13 14 14 from __future__ import annotations ··· 40 40 def stream_name( 41 41 *, 42 42 host: str | None = None, 43 - remote: str | None = None, 43 + observer: str | None = None, 44 44 qualifier: str | None = None, 45 45 ) -> str: 46 46 """Derive canonical stream name from source characteristics. ··· 49 49 ---------- 50 50 host : str, optional 51 51 Local hostname (e.g., "archon"). 52 - remote : str, optional 53 - Remote observer name (e.g., "laptop"). 52 + observer : str, optional 53 + Observer name (e.g., "laptop"). 54 54 qualifier : str, optional 55 55 Sub-stream qualifier (e.g., "tmux"). Appended with dot separator. 56 56 ··· 66 66 """ 67 67 if host: 68 68 base = _strip_hostname(host) 69 - elif remote: 70 - base = _strip_hostname(remote) 69 + elif observer: 70 + base = _strip_hostname(observer) 71 71 else: 72 - raise ValueError("stream_name requires host or remote") 72 + raise ValueError("stream_name requires host or observer") 73 73 74 74 name = base.lower().strip() 75 75 name = re.sub(r"[\s/\\]+", "-", name)
+5 -5
src/solstone_tmux/upload.py
··· 70 70 if sol: 71 71 try: 72 72 result = subprocess.run( 73 - [sol, "remote", "--json", "create", name], 73 + [sol, "observer", "--json", "create", name], 74 74 capture_output=True, text=True, timeout=10, 75 75 ) 76 76 if result.returncode == 0: ··· 85 85 if not self._url: 86 86 return False 87 87 88 - url = f"{self._url}/app/remote/api/create" 88 + url = f"{self._url}/app/observer/api/create" 89 89 90 90 for attempt, delay in enumerate(self._retry_backoff): 91 91 try: ··· 125 125 if self._revoked or not self._key or not self._url: 126 126 return UploadResult(False) 127 127 128 - url = f"{self._url}/app/remote/ingest/{self._key}" 128 + url = f"{self._url}/app/observer/ingest/{self._key}" 129 129 130 130 for attempt, delay in enumerate(self._retry_backoff): 131 131 file_handles = [] ··· 191 191 if self._revoked or not self._key or not self._url: 192 192 return None 193 193 194 - url = f"{self._url}/app/remote/ingest/{self._key}/segments/{day}" 194 + url = f"{self._url}/app/observer/ingest/{self._key}/segments/{day}" 195 195 params = {} 196 196 if self._stream: 197 197 params["stream"] = self._stream ··· 216 216 if self._revoked or not self._key or not self._url: 217 217 return False 218 218 219 - url = f"{self._url}/app/remote/ingest/{self._key}/event" 219 + url = f"{self._url}/app/observer/ingest/{self._key}/event" 220 220 payload = {"tract": tract, "event": event, **fields} 221 221 try: 222 222 resp = self._session.post(url, json=payload, timeout=EVENT_TIMEOUT)
+2 -2
tests/test_streams.py
··· 33 33 def test_host_with_qualifier(self): 34 34 assert stream_name(host="archon", qualifier="tmux") == "archon.tmux" 35 35 36 - def test_remote(self): 37 - assert stream_name(remote="laptop") == "laptop" 36 + def test_observer(self): 37 + assert stream_name(observer="laptop") == "laptop" 38 38 39 39 def test_host_domain_stripped(self): 40 40 assert stream_name(host="ja1r.local", qualifier="tmux") == "ja1r.tmux"