snippbot-device 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.
@@ -0,0 +1,53 @@
1
+ # macOS
2
+ .DS_Store
3
+
4
+ # Python
5
+ *.pyc
6
+ __pycache__/
7
+ *.pyo
8
+ *.pyd
9
+ .Python
10
+ venv/
11
+ .venv/
12
+
13
+ # IDE
14
+ .idea/
15
+ .vscode/
16
+ *.swp
17
+ *.swo
18
+
19
+ # Logs
20
+ *.log
21
+
22
+ # Runtime
23
+ .pids/
24
+
25
+ # Local config (if any sensitive files)
26
+ *.local.json
27
+ config/config.toml
28
+ node_modules
29
+
30
+ # TypeScript/Vite build artifacts
31
+ *.tsbuildinfo
32
+ packages/ui/dist/
33
+ vite.config.js
34
+ vite.config.d.ts
35
+ vps/agents/tal/workspace/BEHAVIORS.md
36
+ vps/agents/tal/workspace/IDLE.md
37
+ vps/agents/tal/workspace/PERSONA.md
38
+ vps/agents/tal/workspace/PROFILE.md
39
+ vps/agents/tal/workspace/SKILLS.md
40
+ vps/agents/tal/workspace/USER.md
41
+ vps/agents/tal/workspace/artifacts/index.json
42
+ vps/agents/tal/workspace/skills/artifact.md
43
+ vps/agents/tal/workspace/skills/save-session.md
44
+ vps/agents/tallan/workspace/BEHAVIORS.md
45
+ vps/agents/tallan/workspace/IDLE.md
46
+ vps/agents/tallan/workspace/PERSONA.md
47
+ vps/agents/tallan/workspace/PROFILE.md
48
+ vps/agents/tallan/workspace/SKILLS.md
49
+ vps/agents/tallan/workspace/USER.md
50
+ vps/agents/tallan/workspace/artifacts/index.json
51
+ vps/agents/tallan/workspace/skills/artifact.md
52
+ vps/agents/tallan/workspace/skills/save-session.md
53
+ packages/ui/vite.config.js
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.4
2
+ Name: snippbot-device
3
+ Version: 0.1.0
4
+ Summary: Snippbot device agent - connect any machine to Snippbot
5
+ Project-URL: Homepage, https://snippbot.com
6
+ Project-URL: Documentation, https://docs.snippbot.com
7
+ Project-URL: Repository, https://github.com/snippbot/snippbot
8
+ Author: Snippbot Team
9
+ License: Proprietary
10
+ Keywords: agents,ai,device,remote-execution,snippbot
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Libraries
20
+ Classifier: Topic :: System :: Systems Administration
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: click>=8.1
23
+ Requires-Dist: psutil>=5.9
24
+ Requires-Dist: pyotp>=2.9
25
+ Requires-Dist: rich>=13.0
26
+ Requires-Dist: websockets>=12.0
27
+ Provides-Extra: all
28
+ Requires-Dist: mss>=9.0; extra == 'all'
29
+ Requires-Dist: opencv-python-headless>=4.8; extra == 'all'
30
+ Requires-Dist: pillow>=10.0; extra == 'all'
31
+ Requires-Dist: playwright>=1.40; extra == 'all'
32
+ Provides-Extra: browser
33
+ Requires-Dist: playwright>=1.40; extra == 'browser'
34
+ Provides-Extra: camera
35
+ Requires-Dist: opencv-python-headless>=4.8; extra == 'camera'
36
+ Provides-Extra: remote
37
+ Requires-Dist: mss>=9.0; extra == 'remote'
38
+ Requires-Dist: pillow>=10.0; extra == 'remote'
39
+ Provides-Extra: screen
40
+ Requires-Dist: mss>=9.0; extra == 'screen'
41
+ Requires-Dist: pillow>=10.0; extra == 'screen'
42
+ Description-Content-Type: text/markdown
43
+
44
+ # Snippbot Device Agent
45
+
46
+ Connect any machine to [Snippbot](https://snippbot.com) as a remote execution node.
47
+
48
+ ## What It Does
49
+
50
+ The device agent runs on a remote machine and connects back to your Snippbot daemon via WebSocket. Once paired, the AI agent can route tool calls — shell commands, file operations, screenshots, browser automation — to the remote device.
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install snippbot-device
56
+ ```
57
+
58
+ With optional capabilities:
59
+
60
+ ```bash
61
+ pip install snippbot-device[screen] # Screenshots (Pillow + mss)
62
+ pip install snippbot-device[browser] # Browser automation (Playwright)
63
+ pip install snippbot-device[camera] # Camera capture (OpenCV)
64
+ pip install snippbot-device[all] # All optional capabilities
65
+ ```
66
+
67
+ Requires Python 3.11 or higher.
68
+
69
+ ## Quick Start
70
+
71
+ ### 1. Pair with your Snippbot daemon
72
+
73
+ From the Snippbot UI, click **Pair Device** to generate a 6-digit pairing code. Then on the remote machine:
74
+
75
+ ```bash
76
+ snippbot-device pair --host DAEMON_IP --port 18782 --code XXXXXX
77
+ ```
78
+
79
+ ### 2. Start the agent
80
+
81
+ ```bash
82
+ snippbot-device start # Background (daemonized)
83
+ snippbot-device start -f # Foreground (see logs)
84
+ ```
85
+
86
+ ### 3. Verify
87
+
88
+ ```bash
89
+ snippbot-device status # Check connection and resource usage
90
+ snippbot-device capabilities # List detected capabilities
91
+ ```
92
+
93
+ ## Commands
94
+
95
+ ```
96
+ snippbot-device pair Pair this device with a Snippbot daemon
97
+ snippbot-device start Start the device agent
98
+ snippbot-device stop Stop the running agent
99
+ snippbot-device status Show agent status and connection info
100
+ snippbot-device capabilities List detected capabilities
101
+ ```
102
+
103
+ ## Capabilities
104
+
105
+ The agent auto-detects what the machine can do:
106
+
107
+ | Capability | Requirement | Description |
108
+ |---|---|---|
109
+ | `execution.bash` | Built-in | Shell commands (bash, zsh, cmd) |
110
+ | `execution.python` | Built-in | Python script execution |
111
+ | `filesystem.read` | Built-in | Read files |
112
+ | `filesystem.write` | Built-in | Write files |
113
+ | `filesystem.transfer` | Built-in | Send/receive files to daemon |
114
+ | `system.info` | Built-in | OS, CPU, memory, disk info |
115
+ | `capture.screenshot` | `[screen]` extra | Take screenshots |
116
+ | `capture.camera_photo` | `[camera]` extra | Camera capture |
117
+ | `browser.navigate` | `[browser]` extra | Browser automation |
118
+ | `display.remote_view` | `[remote]` extra | Screen streaming |
119
+ | `execution.docker` | Docker CLI in PATH | Docker container management |
120
+
121
+ ## Configuration
122
+
123
+ Config is stored at `~/.snippbot-device/config.toml` after pairing.
124
+
125
+ ```toml
126
+ daemon_host = "192.168.1.100"
127
+ daemon_ws_port = 18782
128
+ device_name = "my-laptop"
129
+ device_token = "device_..."
130
+ device_id = "..."
131
+ max_concurrent_tasks = 4
132
+ heartbeat_interval = 15
133
+ auto_update = true
134
+ ```
135
+
136
+ ## How It Works
137
+
138
+ 1. The agent connects to the daemon via WebSocket (`ws://host:port/ws/device`)
139
+ 2. Authenticates using the token received during pairing
140
+ 3. Advertises its capabilities (what tools it can execute)
141
+ 4. Enters a message loop waiting for tool requests
142
+ 5. Sends heartbeats every 15 seconds with CPU/memory/disk metrics
143
+ 6. Auto-reconnects with exponential backoff if the connection drops
144
+
145
+ ## Security
146
+
147
+ - Device tokens are stored locally and validated on each connection
148
+ - Environment variables matching `*_KEY`, `*_SECRET`, `*_TOKEN`, `*_PASSWORD` are stripped from command execution
149
+ - File operations are restricted to allowed paths (configurable)
150
+ - Execution timeout: 5 minutes max per tool call
151
+ - Output limit: 1 MB per result
152
+
153
+ ## Logs
154
+
155
+ ```bash
156
+ # Foreground mode: logs to stdout
157
+ # Background mode: logs to ~/.snippbot-device/agent.log
158
+ tail -f ~/.snippbot-device/agent.log
159
+ ```
160
+
161
+ ## See Also
162
+
163
+ - [Snippbot](https://snippbot.com) - Main project
164
+ - [Snippbot Docs](https://docs.snippbot.com) - Full documentation
@@ -0,0 +1,121 @@
1
+ # Snippbot Device Agent
2
+
3
+ Connect any machine to [Snippbot](https://snippbot.com) as a remote execution node.
4
+
5
+ ## What It Does
6
+
7
+ The device agent runs on a remote machine and connects back to your Snippbot daemon via WebSocket. Once paired, the AI agent can route tool calls — shell commands, file operations, screenshots, browser automation — to the remote device.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install snippbot-device
13
+ ```
14
+
15
+ With optional capabilities:
16
+
17
+ ```bash
18
+ pip install snippbot-device[screen] # Screenshots (Pillow + mss)
19
+ pip install snippbot-device[browser] # Browser automation (Playwright)
20
+ pip install snippbot-device[camera] # Camera capture (OpenCV)
21
+ pip install snippbot-device[all] # All optional capabilities
22
+ ```
23
+
24
+ Requires Python 3.11 or higher.
25
+
26
+ ## Quick Start
27
+
28
+ ### 1. Pair with your Snippbot daemon
29
+
30
+ From the Snippbot UI, click **Pair Device** to generate a 6-digit pairing code. Then on the remote machine:
31
+
32
+ ```bash
33
+ snippbot-device pair --host DAEMON_IP --port 18782 --code XXXXXX
34
+ ```
35
+
36
+ ### 2. Start the agent
37
+
38
+ ```bash
39
+ snippbot-device start # Background (daemonized)
40
+ snippbot-device start -f # Foreground (see logs)
41
+ ```
42
+
43
+ ### 3. Verify
44
+
45
+ ```bash
46
+ snippbot-device status # Check connection and resource usage
47
+ snippbot-device capabilities # List detected capabilities
48
+ ```
49
+
50
+ ## Commands
51
+
52
+ ```
53
+ snippbot-device pair Pair this device with a Snippbot daemon
54
+ snippbot-device start Start the device agent
55
+ snippbot-device stop Stop the running agent
56
+ snippbot-device status Show agent status and connection info
57
+ snippbot-device capabilities List detected capabilities
58
+ ```
59
+
60
+ ## Capabilities
61
+
62
+ The agent auto-detects what the machine can do:
63
+
64
+ | Capability | Requirement | Description |
65
+ |---|---|---|
66
+ | `execution.bash` | Built-in | Shell commands (bash, zsh, cmd) |
67
+ | `execution.python` | Built-in | Python script execution |
68
+ | `filesystem.read` | Built-in | Read files |
69
+ | `filesystem.write` | Built-in | Write files |
70
+ | `filesystem.transfer` | Built-in | Send/receive files to daemon |
71
+ | `system.info` | Built-in | OS, CPU, memory, disk info |
72
+ | `capture.screenshot` | `[screen]` extra | Take screenshots |
73
+ | `capture.camera_photo` | `[camera]` extra | Camera capture |
74
+ | `browser.navigate` | `[browser]` extra | Browser automation |
75
+ | `display.remote_view` | `[remote]` extra | Screen streaming |
76
+ | `execution.docker` | Docker CLI in PATH | Docker container management |
77
+
78
+ ## Configuration
79
+
80
+ Config is stored at `~/.snippbot-device/config.toml` after pairing.
81
+
82
+ ```toml
83
+ daemon_host = "192.168.1.100"
84
+ daemon_ws_port = 18782
85
+ device_name = "my-laptop"
86
+ device_token = "device_..."
87
+ device_id = "..."
88
+ max_concurrent_tasks = 4
89
+ heartbeat_interval = 15
90
+ auto_update = true
91
+ ```
92
+
93
+ ## How It Works
94
+
95
+ 1. The agent connects to the daemon via WebSocket (`ws://host:port/ws/device`)
96
+ 2. Authenticates using the token received during pairing
97
+ 3. Advertises its capabilities (what tools it can execute)
98
+ 4. Enters a message loop waiting for tool requests
99
+ 5. Sends heartbeats every 15 seconds with CPU/memory/disk metrics
100
+ 6. Auto-reconnects with exponential backoff if the connection drops
101
+
102
+ ## Security
103
+
104
+ - Device tokens are stored locally and validated on each connection
105
+ - Environment variables matching `*_KEY`, `*_SECRET`, `*_TOKEN`, `*_PASSWORD` are stripped from command execution
106
+ - File operations are restricted to allowed paths (configurable)
107
+ - Execution timeout: 5 minutes max per tool call
108
+ - Output limit: 1 MB per result
109
+
110
+ ## Logs
111
+
112
+ ```bash
113
+ # Foreground mode: logs to stdout
114
+ # Background mode: logs to ~/.snippbot-device/agent.log
115
+ tail -f ~/.snippbot-device/agent.log
116
+ ```
117
+
118
+ ## See Also
119
+
120
+ - [Snippbot](https://snippbot.com) - Main project
121
+ - [Snippbot Docs](https://docs.snippbot.com) - Full documentation
@@ -0,0 +1,52 @@
1
+ [project]
2
+ name = "snippbot-device"
3
+ version = "0.1.0"
4
+ description = "Snippbot device agent - connect any machine to Snippbot"
5
+ readme = "README.md"
6
+ license = { text = "Proprietary" }
7
+ requires-python = ">=3.11"
8
+ authors = [
9
+ { name = "Snippbot Team" }
10
+ ]
11
+ keywords = ["ai", "agents", "snippbot", "device", "remote-execution"]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Environment :: Console",
15
+ "Intended Audience :: Developers",
16
+ "Intended Audience :: System Administrators",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Topic :: System :: Systems Administration",
22
+ "Topic :: Software Development :: Libraries",
23
+ ]
24
+ dependencies = [
25
+ "websockets>=12.0",
26
+ "click>=8.1",
27
+ "psutil>=5.9",
28
+ "rich>=13.0",
29
+ "pyotp>=2.9",
30
+ ]
31
+
32
+ [project.urls]
33
+ Homepage = "https://snippbot.com"
34
+ Documentation = "https://docs.snippbot.com"
35
+ Repository = "https://github.com/snippbot/snippbot"
36
+
37
+ [project.optional-dependencies]
38
+ screen = ["pillow>=10.0", "mss>=9.0"]
39
+ camera = ["opencv-python-headless>=4.8"]
40
+ browser = ["playwright>=1.40"]
41
+ remote = ["pillow>=10.0", "mss>=9.0"]
42
+ all = ["snippbot-device[screen,camera,browser,remote]"]
43
+
44
+ [project.scripts]
45
+ snippbot-device = "snippbot_device.cli:main"
46
+
47
+ [build-system]
48
+ requires = ["hatchling"]
49
+ build-backend = "hatchling.build"
50
+
51
+ [tool.hatch.build.targets.wheel]
52
+ packages = ["src/snippbot_device"]
@@ -0,0 +1,3 @@
1
+ """Snippbot Device Agent - connect any machine to Snippbot."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,6 @@
1
+ """Entry point for python -m snippbot_device."""
2
+
3
+ from snippbot_device.cli import main
4
+
5
+ if __name__ == "__main__":
6
+ main()