devops-bot-sdk 1.0.0__tar.gz → 1.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.
- {devops_bot_sdk-1.0.0 → devops_bot_sdk-1.1.0}/PKG-INFO +10 -9
- {devops_bot_sdk-1.0.0 → devops_bot_sdk-1.1.0}/README.md +7 -6
- devops_bot_sdk-1.1.0/devops_bot_sdk.egg-info/PKG-INFO +179 -0
- devops_bot_sdk-1.1.0/devops_bot_sdk.egg-info/SOURCES.txt +27 -0
- devops_bot_sdk-1.1.0/devops_bot_sdk.egg-info/dependency_links.txt +1 -0
- devops_bot_sdk-1.1.0/devops_bot_sdk.egg-info/entry_points.txt +2 -0
- devops_bot_sdk-1.1.0/devops_bot_sdk.egg-info/requires.txt +13 -0
- devops_bot_sdk-1.1.0/devops_bot_sdk.egg-info/top_level.txt +1 -0
- {devops_bot_sdk-1.0.0 → devops_bot_sdk-1.1.0}/pyproject.toml +5 -5
- devops_bot_sdk-1.1.0/sdk/__init__.py +54 -0
- devops_bot_sdk-1.1.0/sdk/client.py +344 -0
- devops_bot_sdk-1.1.0/sdk/collectors/__init__.py +9 -0
- devops_bot_sdk-1.1.0/sdk/collectors/files.py +102 -0
- devops_bot_sdk-1.1.0/sdk/collectors/process.py +89 -0
- devops_bot_sdk-1.1.0/sdk/collectors/screenshot.py +82 -0
- devops_bot_sdk-1.1.0/sdk/config.py +165 -0
- devops_bot_sdk-1.1.0/sdk/exceptions.py +58 -0
- devops_bot_sdk-1.1.0/sdk/ipc/__init__.py +1 -0
- devops_bot_sdk-1.1.0/sdk/ipc/electron_bridge.py +139 -0
- devops_bot_sdk-1.1.0/sdk/ipc/handlers.py +199 -0
- devops_bot_sdk-1.1.0/sdk/models/__init__.py +1 -0
- devops_bot_sdk-1.1.0/sdk/models/envelope.py +45 -0
- devops_bot_sdk-1.1.0/sdk/models/requests.py +39 -0
- devops_bot_sdk-1.1.0/sdk/models/responses.py +47 -0
- devops_bot_sdk-1.1.0/sdk/models/snapshots.py +21 -0
- devops_bot_sdk-1.1.0/sdk/py.typed +0 -0
- devops_bot_sdk-1.1.0/sdk/sse.py +112 -0
- devops_bot_sdk-1.1.0/sdk/test.py +12 -0
- {devops_bot_sdk-1.0.0 → devops_bot_sdk-1.1.0}/setup.cfg +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devops-bot-sdk
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: DevOps Bot Desktop SDK — thin client for the AgentOS Electron desktop app
|
|
5
5
|
Author: noumanaziz2128
|
|
6
|
-
License: Proprietary
|
|
6
|
+
License-Expression: LicenseRef-Proprietary
|
|
7
7
|
Project-URL: Homepage, https://agentos.io
|
|
8
|
-
Project-URL: Repository, https://github.com/consultancy-outfit/
|
|
8
|
+
Project-URL: Repository, https://github.com/consultancy-outfit/DevOpsBot-SDK
|
|
9
9
|
Requires-Python: >=3.11
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
Requires-Dist: httpx>=0.27
|
|
@@ -24,32 +24,33 @@ Requires-Dist: psutil>=5.9; extra == "all"
|
|
|
24
24
|
Thin Python client for the AgentOS desktop app (Electron). Wraps the backend
|
|
25
25
|
`/api/v1/*` endpoints. No orchestration logic — agents run server-side.
|
|
26
26
|
|
|
27
|
+
**Private package** — install from the GitHub repository (requires access).
|
|
28
|
+
|
|
27
29
|
## Requirements
|
|
28
30
|
|
|
29
31
|
- Python 3.11+
|
|
30
|
-
-
|
|
31
|
-
- An API token from the AgentOS web app (Settings → API Tokens)
|
|
32
|
+
- An API token from the AgentOS platform
|
|
32
33
|
|
|
33
34
|
## Installation
|
|
34
35
|
|
|
35
36
|
### Basic (chat + pipeline + webhooks)
|
|
36
37
|
```bash
|
|
37
|
-
pip install
|
|
38
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk"
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
### With screenshot collector
|
|
41
42
|
```bash
|
|
42
|
-
pip install "
|
|
43
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[screenshot]"
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
### With process collector
|
|
46
47
|
```bash
|
|
47
|
-
pip install "
|
|
48
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[process]"
|
|
48
49
|
```
|
|
49
50
|
|
|
50
51
|
### Everything
|
|
51
52
|
```bash
|
|
52
|
-
pip install "
|
|
53
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[all]"
|
|
53
54
|
```
|
|
54
55
|
|
|
55
56
|
### From source (development)
|
|
@@ -3,32 +3,33 @@
|
|
|
3
3
|
Thin Python client for the AgentOS desktop app (Electron). Wraps the backend
|
|
4
4
|
`/api/v1/*` endpoints. No orchestration logic — agents run server-side.
|
|
5
5
|
|
|
6
|
+
**Private package** — install from the GitHub repository (requires access).
|
|
7
|
+
|
|
6
8
|
## Requirements
|
|
7
9
|
|
|
8
10
|
- Python 3.11+
|
|
9
|
-
-
|
|
10
|
-
- An API token from the AgentOS web app (Settings → API Tokens)
|
|
11
|
+
- An API token from the AgentOS platform
|
|
11
12
|
|
|
12
13
|
## Installation
|
|
13
14
|
|
|
14
15
|
### Basic (chat + pipeline + webhooks)
|
|
15
16
|
```bash
|
|
16
|
-
pip install
|
|
17
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk"
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
### With screenshot collector
|
|
20
21
|
```bash
|
|
21
|
-
pip install "
|
|
22
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[screenshot]"
|
|
22
23
|
```
|
|
23
24
|
|
|
24
25
|
### With process collector
|
|
25
26
|
```bash
|
|
26
|
-
pip install "
|
|
27
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[process]"
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
### Everything
|
|
30
31
|
```bash
|
|
31
|
-
pip install "
|
|
32
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[all]"
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
### From source (development)
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devops-bot-sdk
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: DevOps Bot Desktop SDK — thin client for the AgentOS Electron desktop app
|
|
5
|
+
Author: noumanaziz2128
|
|
6
|
+
License-Expression: LicenseRef-Proprietary
|
|
7
|
+
Project-URL: Homepage, https://agentos.io
|
|
8
|
+
Project-URL: Repository, https://github.com/consultancy-outfit/DevOpsBot-SDK
|
|
9
|
+
Requires-Python: >=3.11
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: httpx>=0.27
|
|
12
|
+
Requires-Dist: pydantic>=2.0
|
|
13
|
+
Requires-Dist: cryptography>=42
|
|
14
|
+
Provides-Extra: screenshot
|
|
15
|
+
Requires-Dist: Pillow>=10.0; extra == "screenshot"
|
|
16
|
+
Provides-Extra: process
|
|
17
|
+
Requires-Dist: psutil>=5.9; extra == "process"
|
|
18
|
+
Provides-Extra: all
|
|
19
|
+
Requires-Dist: Pillow>=10.0; extra == "all"
|
|
20
|
+
Requires-Dist: psutil>=5.9; extra == "all"
|
|
21
|
+
|
|
22
|
+
# AgentOS SDK
|
|
23
|
+
|
|
24
|
+
Thin Python client for the AgentOS desktop app (Electron). Wraps the backend
|
|
25
|
+
`/api/v1/*` endpoints. No orchestration logic — agents run server-side.
|
|
26
|
+
|
|
27
|
+
**Private package** — install from the GitHub repository (requires access).
|
|
28
|
+
|
|
29
|
+
## Requirements
|
|
30
|
+
|
|
31
|
+
- Python 3.11+
|
|
32
|
+
- An API token from the AgentOS platform
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
### Basic (chat + pipeline + webhooks)
|
|
37
|
+
```bash
|
|
38
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With screenshot collector
|
|
42
|
+
```bash
|
|
43
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[screenshot]"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### With process collector
|
|
47
|
+
```bash
|
|
48
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[process]"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Everything
|
|
52
|
+
```bash
|
|
53
|
+
pip install "git+https://github.com/consultancy-outfit/devops-bot-ai.git#subdirectory=sdk[all]"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### From source (development)
|
|
57
|
+
```bash
|
|
58
|
+
# From the repo root
|
|
59
|
+
pip install -e sdk/ # installs sdk/ as editable package
|
|
60
|
+
# OR
|
|
61
|
+
pip install -e "sdk/[all]" # with all optional extras
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Setup
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
agentos configure
|
|
68
|
+
# Backend URL [http://localhost:8000]: https://your-backend.example.com
|
|
69
|
+
# Paste your token (format: aeos_<64-char-hex>): aeos_...
|
|
70
|
+
# ✓ Configuration saved to ~/.agentos/config.toml
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Replace a token:
|
|
74
|
+
```bash
|
|
75
|
+
agentos configure --rotate
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Quick start
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
import asyncio
|
|
82
|
+
from sdk import BackendClient
|
|
83
|
+
|
|
84
|
+
async def main():
|
|
85
|
+
client = BackendClient.from_config() # reads ~/.agentos/config.toml
|
|
86
|
+
|
|
87
|
+
# Bootstrap — load your persona + active model
|
|
88
|
+
profile = await client.bootstrap()
|
|
89
|
+
print(f"Logged in as tier={profile.tier}")
|
|
90
|
+
|
|
91
|
+
# Chat (SSE stream)
|
|
92
|
+
async for envelope in client.chat("my-thread", "What tasks are open?"):
|
|
93
|
+
if envelope.type == "delta":
|
|
94
|
+
print(envelope.data["text"], end="", flush=True)
|
|
95
|
+
elif envelope.type == "done":
|
|
96
|
+
break
|
|
97
|
+
|
|
98
|
+
asyncio.run(main())
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Run as Electron sidecar
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
python -m sdk.ipc.electron_bridge
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Wire protocol (newline-delimited JSON on stdin/stdout):
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
# Electron → Python (stdin)
|
|
111
|
+
{"channel": "chat:send", "payload": {"thread_id": "t1", "message": "Hello"}}
|
|
112
|
+
|
|
113
|
+
# Python → Electron (stdout)
|
|
114
|
+
{"type": "delta", "thread_id": "t1", "data": {"text": "Hi there"}}
|
|
115
|
+
{"type": "done", "thread_id": "t1", "data": {"text": "Hi there", "usage": {...}}}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Available channels
|
|
119
|
+
|
|
120
|
+
| Channel | Payload | What it does |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| `chat:send` | `{thread_id, message, role_slug?, model_id?}` | Stream chat response |
|
|
123
|
+
| `orchestrator:run` | `{task_input, intent?, task_id?}` | Start pipeline + poll status |
|
|
124
|
+
| `collectors:upload` | `{type, token, paths?, project}` | Upload local data |
|
|
125
|
+
| `auth:oauth_start` | `{service}` | Get OAuth URL (browser opens it) |
|
|
126
|
+
| `auth:oauth_complete` | `{service, code}` | Signal OAuth done |
|
|
127
|
+
| `onboarding:step` | `{step, input}` | Onboarding step |
|
|
128
|
+
|
|
129
|
+
## Collectors
|
|
130
|
+
|
|
131
|
+
All collector data is sent through `BackendClient.submit_webhook` — no other egress.
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
from sdk.collectors import files, screenshot, process
|
|
135
|
+
|
|
136
|
+
# Upload a file
|
|
137
|
+
payload = files.build_webhook_payload(token, ["./notes.md"], project="my-project")
|
|
138
|
+
await client.submit_webhook("local_files", payload)
|
|
139
|
+
|
|
140
|
+
# Screenshot
|
|
141
|
+
payload = screenshot.build_webhook_payload(token, project="my-project")
|
|
142
|
+
await client.submit_webhook("local_screenshot", payload)
|
|
143
|
+
|
|
144
|
+
# Process snapshot
|
|
145
|
+
payload = process.build_webhook_payload(token, project="my-project")
|
|
146
|
+
await client.submit_webhook("local_process", payload)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Size limits
|
|
150
|
+
|
|
151
|
+
| Collector | Limit |
|
|
152
|
+
|---|---|
|
|
153
|
+
| Single file | 50 MB |
|
|
154
|
+
| File batch | 200 MB |
|
|
155
|
+
| Screenshot | 10 MB (auto-recompressed) |
|
|
156
|
+
|
|
157
|
+
## Error handling
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
from sdk import BackendUnreachable, BackendAuthFailed, BackendVersionTooOld, TokenNotConfigured
|
|
161
|
+
|
|
162
|
+
try:
|
|
163
|
+
client = BackendClient.from_config()
|
|
164
|
+
await client.ping()
|
|
165
|
+
except TokenNotConfigured:
|
|
166
|
+
print("Run: agentos configure")
|
|
167
|
+
except BackendAuthFailed:
|
|
168
|
+
print("Token expired — run: agentos configure --rotate")
|
|
169
|
+
except BackendVersionTooOld as e:
|
|
170
|
+
print(f"Upgrade required: {e}")
|
|
171
|
+
except BackendUnreachable as e:
|
|
172
|
+
print(f"Backend down: {e}")
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Versioning
|
|
176
|
+
|
|
177
|
+
The SDK is versioned independently from the backend. Every request carries
|
|
178
|
+
`X-SDK-Version: 1.0.0`. The backend may return HTTP 426 if the SDK is too
|
|
179
|
+
old to safely communicate — upgrade with `pip install --upgrade agentos-sdk`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
devops_bot_sdk.egg-info/PKG-INFO
|
|
4
|
+
devops_bot_sdk.egg-info/SOURCES.txt
|
|
5
|
+
devops_bot_sdk.egg-info/dependency_links.txt
|
|
6
|
+
devops_bot_sdk.egg-info/entry_points.txt
|
|
7
|
+
devops_bot_sdk.egg-info/requires.txt
|
|
8
|
+
devops_bot_sdk.egg-info/top_level.txt
|
|
9
|
+
sdk/__init__.py
|
|
10
|
+
sdk/client.py
|
|
11
|
+
sdk/config.py
|
|
12
|
+
sdk/exceptions.py
|
|
13
|
+
sdk/py.typed
|
|
14
|
+
sdk/sse.py
|
|
15
|
+
sdk/test.py
|
|
16
|
+
sdk/collectors/__init__.py
|
|
17
|
+
sdk/collectors/files.py
|
|
18
|
+
sdk/collectors/process.py
|
|
19
|
+
sdk/collectors/screenshot.py
|
|
20
|
+
sdk/ipc/__init__.py
|
|
21
|
+
sdk/ipc/electron_bridge.py
|
|
22
|
+
sdk/ipc/handlers.py
|
|
23
|
+
sdk/models/__init__.py
|
|
24
|
+
sdk/models/envelope.py
|
|
25
|
+
sdk/models/requests.py
|
|
26
|
+
sdk/models/responses.py
|
|
27
|
+
sdk/models/snapshots.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sdk
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "devops-bot-sdk"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.1.0"
|
|
8
8
|
description = "DevOps Bot Desktop SDK — thin client for the AgentOS Electron desktop app"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
license =
|
|
10
|
+
license = "LicenseRef-Proprietary"
|
|
11
11
|
requires-python = ">=3.11"
|
|
12
12
|
authors = [{ name = "noumanaziz2128" }]
|
|
13
13
|
|
|
@@ -36,11 +36,11 @@ agentos = "sdk.config:configure_cli" # `agentos configure [--rotate]`
|
|
|
36
36
|
|
|
37
37
|
[project.urls]
|
|
38
38
|
Homepage = "https://agentos.io"
|
|
39
|
-
Repository = "https://github.com/consultancy-outfit/
|
|
39
|
+
Repository = "https://github.com/consultancy-outfit/DevOpsBot-SDK"
|
|
40
40
|
|
|
41
41
|
[tool.setuptools.packages.find]
|
|
42
|
-
where = ["
|
|
43
|
-
include = ["sdk*"]
|
|
42
|
+
where = ["."]
|
|
43
|
+
include = ["sdk*"]
|
|
44
44
|
|
|
45
45
|
[tool.setuptools.package-data]
|
|
46
46
|
sdk = ["py.typed"]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""AgentOS Desktop SDK — thin HTTPS/SSE client for the Electron app.
|
|
2
|
+
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
|
|
5
|
+
Public surface:
|
|
6
|
+
BackendClient.from_config() — create client from ~/.agentos/config.toml
|
|
7
|
+
BackendClient.chat(...) — stream chat response
|
|
8
|
+
BackendClient.orchestrator_run(...)— start pipeline, stream status envelopes
|
|
9
|
+
BackendClient.submit_webhook(...) — ONLY egress for local collector data
|
|
10
|
+
BackendClient.oauth_flow_start(...)— get OAuth URL (browser opens it)
|
|
11
|
+
BackendClient.bootstrap() — load user profile + persona + model
|
|
12
|
+
BackendClient.list_tasks(...) — list open Jira tasks
|
|
13
|
+
BackendClient.insights(...) — read insight metrics
|
|
14
|
+
BackendClient.insight_search(...) — RBAC-filtered RAG search
|
|
15
|
+
|
|
16
|
+
Collectors (payload producers — submit via BackendClient.submit_webhook):
|
|
17
|
+
collectors.files.build_webhook_payload(token, paths, project)
|
|
18
|
+
collectors.screenshot.build_webhook_payload(token, project)
|
|
19
|
+
collectors.process.build_webhook_payload(token, project)
|
|
20
|
+
|
|
21
|
+
IPC entry point (Electron main process):
|
|
22
|
+
python -m sdk.ipc.electron_bridge (stdio newline-delimited JSON)
|
|
23
|
+
|
|
24
|
+
Rules:
|
|
25
|
+
- NO imports from modules.*, shared.*, routes.*, config.*
|
|
26
|
+
- stdlib + httpx + pydantic only
|
|
27
|
+
- Envelope shape: {type, thread_id, data} — matches backend exactly
|
|
28
|
+
- Unknown envelope types: silently dropped (forward-compat)
|
|
29
|
+
- All data egress through submit_webhook only
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
__version__ = "1.0.0"
|
|
33
|
+
__author__ = "AgentOS"
|
|
34
|
+
|
|
35
|
+
from sdk.client import BackendClient
|
|
36
|
+
from sdk.exceptions import (
|
|
37
|
+
BackendAuthFailed,
|
|
38
|
+
BackendUnreachable,
|
|
39
|
+
BackendVersionTooOld,
|
|
40
|
+
CollectorError,
|
|
41
|
+
TokenNotConfigured,
|
|
42
|
+
)
|
|
43
|
+
from sdk.models.envelope import Envelope
|
|
44
|
+
|
|
45
|
+
__all__ = [
|
|
46
|
+
"__version__",
|
|
47
|
+
"BackendClient",
|
|
48
|
+
"Envelope",
|
|
49
|
+
"BackendAuthFailed",
|
|
50
|
+
"BackendUnreachable",
|
|
51
|
+
"BackendVersionTooOld",
|
|
52
|
+
"CollectorError",
|
|
53
|
+
"TokenNotConfigured",
|
|
54
|
+
]
|