dominus-sdk-python 4.0.1__tar.gz → 4.0.2__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.
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/PKG-INFO +3 -2
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/README.md +2 -1
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/logs.py +3 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/start.py +11 -3
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus_sdk_python.egg-info/PKG-INFO +3 -2
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/pyproject.toml +1 -1
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_logs.py +2 -1
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_transport_compat.py +42 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/__init__.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/config/__init__.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/config/endpoints.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/errors.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/helpers/__init__.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/helpers/auth.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/helpers/cache.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/helpers/console_capture.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/helpers/core.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/helpers/crypto.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/helpers/sse.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/helpers/trace.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/__init__.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/admin.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/ai.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/artifacts.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/auth.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/authority.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/courier.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/db.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/ddl.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/deployer.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/fastapi.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/files.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/health.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/jobs.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/portal.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/processor.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/redis.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/secrets.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/secure.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/sync.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/warden.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/namespaces/workflow.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus/services/__init__.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus_sdk_python.egg-info/SOURCES.txt +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus_sdk_python.egg-info/dependency_links.txt +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus_sdk_python.egg-info/requires.txt +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus_sdk_python.egg-info/top_level.txt +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/setup.cfg +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_auth.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_authority_public_vocabulary.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_control_plane_namespaces.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_errors.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_flat_commands.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_health.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_provisioning_parity.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_public_exports.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_workflow_lifecycle.py +0 -0
- {dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_workflow_refs.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dominus-sdk-python
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.2
|
|
4
4
|
Summary: Python SDK for the Dominus gateway-first platform
|
|
5
5
|
Author-email: CareBridge Systems <dev@carebridge.io>
|
|
6
6
|
License: Proprietary
|
|
@@ -40,8 +40,9 @@ Async Python SDK for the Dominus gateway-first service plane.
|
|
|
40
40
|
- Python 3.9+ asyncio client for Dominus services
|
|
41
41
|
- Namespace-first API with a small root shortcut surface
|
|
42
42
|
- Gateway-scoped client mode for MCP and other user-JWT sessions
|
|
43
|
+
- Transport compatibility for wrapped `{success,data}` responses and unwrapped Warden/control-plane success objects
|
|
43
44
|
- Local helpers for JWT verification, trace propagation, retries, and console capture
|
|
44
|
-
- Current package version: `4.0.
|
|
45
|
+
- Current package version: `4.0.2`
|
|
45
46
|
|
|
46
47
|
## Install
|
|
47
48
|
|
|
@@ -7,8 +7,9 @@ Async Python SDK for the Dominus gateway-first service plane.
|
|
|
7
7
|
- Python 3.9+ asyncio client for Dominus services
|
|
8
8
|
- Namespace-first API with a small root shortcut surface
|
|
9
9
|
- Gateway-scoped client mode for MCP and other user-JWT sessions
|
|
10
|
+
- Transport compatibility for wrapped `{success,data}` responses and unwrapped Warden/control-plane success objects
|
|
10
11
|
- Local helpers for JWT verification, trace propagation, retries, and console capture
|
|
11
|
-
- Current package version: `4.0.
|
|
12
|
+
- Current package version: `4.0.2`
|
|
12
13
|
|
|
13
14
|
## Install
|
|
14
15
|
|
|
@@ -407,6 +407,7 @@ class LogsNamespace:
|
|
|
407
407
|
target_org_id: Optional[str] = None,
|
|
408
408
|
target_env: Optional[str] = None,
|
|
409
409
|
use_shared: Optional[bool] = None,
|
|
410
|
+
include_buffer: Optional[bool] = None,
|
|
410
411
|
limit: Optional[int] = None,
|
|
411
412
|
) -> Dict[str, Any]:
|
|
412
413
|
"""Get Logs Worker archive backlog state. ``GET /api/logs/archive-status``."""
|
|
@@ -419,6 +420,8 @@ class LogsNamespace:
|
|
|
419
420
|
params["target_env"] = target_env
|
|
420
421
|
if use_shared is True:
|
|
421
422
|
params["use_shared"] = "true"
|
|
423
|
+
if include_buffer is not None:
|
|
424
|
+
params["include_buffer"] = "true" if include_buffer else "false"
|
|
422
425
|
if limit is not None:
|
|
423
426
|
params["limit"] = limit
|
|
424
427
|
qs = urlencode(params)
|
|
@@ -468,8 +468,12 @@ class Dominus:
|
|
|
468
468
|
|
|
469
469
|
result = _decode_json_or_b64_json(response.text)
|
|
470
470
|
|
|
471
|
-
|
|
472
|
-
|
|
471
|
+
if not isinstance(result, dict):
|
|
472
|
+
return {"result": result}
|
|
473
|
+
|
|
474
|
+
# Kernel routes historically returned {success,data}; some modern
|
|
475
|
+
# Warden control-plane routes return a decoded domain object directly.
|
|
476
|
+
if result.get("success") is False:
|
|
473
477
|
error_msg = result.get("error") or result.get("message") or "Unknown error"
|
|
474
478
|
error_details = result.get("details")
|
|
475
479
|
if not isinstance(error_details, dict):
|
|
@@ -479,7 +483,11 @@ class Dominus:
|
|
|
479
483
|
error_details[key] = result[key]
|
|
480
484
|
raise DominusError(str(error_msg), details=error_details, endpoint=endpoint)
|
|
481
485
|
|
|
482
|
-
|
|
486
|
+
if result.get("success") is True:
|
|
487
|
+
return result.get("data", {})
|
|
488
|
+
if "data" in result and len(result) <= 3:
|
|
489
|
+
return result.get("data", {})
|
|
490
|
+
return result
|
|
483
491
|
|
|
484
492
|
async def gateway_fetch(
|
|
485
493
|
self,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dominus-sdk-python
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.2
|
|
4
4
|
Summary: Python SDK for the Dominus gateway-first platform
|
|
5
5
|
Author-email: CareBridge Systems <dev@carebridge.io>
|
|
6
6
|
License: Proprietary
|
|
@@ -40,8 +40,9 @@ Async Python SDK for the Dominus gateway-first service plane.
|
|
|
40
40
|
- Python 3.9+ asyncio client for Dominus services
|
|
41
41
|
- Namespace-first API with a small root shortcut surface
|
|
42
42
|
- Gateway-scoped client mode for MCP and other user-JWT sessions
|
|
43
|
+
- Transport compatibility for wrapped `{success,data}` responses and unwrapped Warden/control-plane success objects
|
|
43
44
|
- Local helpers for JWT verification, trace propagation, retries, and console capture
|
|
44
|
-
- Current package version: `4.0.
|
|
45
|
+
- Current package version: `4.0.2`
|
|
45
46
|
|
|
46
47
|
## Install
|
|
47
48
|
|
|
@@ -81,13 +81,14 @@ async def test_logs_get_archive_status_forwards_filters():
|
|
|
81
81
|
target_org_id="org-123",
|
|
82
82
|
target_env="production",
|
|
83
83
|
use_shared=True,
|
|
84
|
+
include_buffer=True,
|
|
84
85
|
limit=5,
|
|
85
86
|
)
|
|
86
87
|
|
|
87
88
|
assert payload["events"][0]["event_id"] == "log-1"
|
|
88
89
|
assert client.calls[0]["endpoint"] == (
|
|
89
90
|
"/api/logs/archive-status?"
|
|
90
|
-
"all_scopes=true&target_org_id=org-123&target_env=production&use_shared=true&limit=5"
|
|
91
|
+
"all_scopes=true&target_org_id=org-123&target_env=production&use_shared=true&include_buffer=true&limit=5"
|
|
91
92
|
)
|
|
92
93
|
assert client.calls[0]["method"] == "GET"
|
|
93
94
|
assert client.calls[0]["use_gateway"] is True
|
|
@@ -55,6 +55,32 @@ class RequestClient:
|
|
|
55
55
|
return FakeResponse(json.dumps({"success": True, "data": {"ok": True}}))
|
|
56
56
|
|
|
57
57
|
|
|
58
|
+
class UnwrappedRequestClient:
|
|
59
|
+
calls = []
|
|
60
|
+
|
|
61
|
+
def __init__(self, *, base_url, headers, timeout):
|
|
62
|
+
self.base_url = base_url
|
|
63
|
+
self.headers = headers
|
|
64
|
+
self.timeout = timeout
|
|
65
|
+
|
|
66
|
+
async def __aenter__(self):
|
|
67
|
+
return self
|
|
68
|
+
|
|
69
|
+
async def __aexit__(self, exc_type, exc, tb):
|
|
70
|
+
return False
|
|
71
|
+
|
|
72
|
+
async def get(self, endpoint):
|
|
73
|
+
self.calls.append(
|
|
74
|
+
{
|
|
75
|
+
"endpoint": endpoint,
|
|
76
|
+
"base_url": self.base_url,
|
|
77
|
+
"headers": self.headers,
|
|
78
|
+
"timeout": self.timeout,
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
return FakeResponse(json.dumps({"secret": {"key": "PROVISION_REDIS_URL_REST", "value": "redis-url"}}))
|
|
82
|
+
|
|
83
|
+
|
|
58
84
|
class ServiceJwtClient:
|
|
59
85
|
def __init__(self, *, base_url, headers, timeout, proxy):
|
|
60
86
|
self.base_url = base_url
|
|
@@ -132,6 +158,22 @@ async def test_request_accepts_raw_json_success_envelope(monkeypatch, sdk):
|
|
|
132
158
|
assert RequestClient.calls[0]["endpoint"] == "/svc/health"
|
|
133
159
|
|
|
134
160
|
|
|
161
|
+
@pytest.mark.asyncio
|
|
162
|
+
async def test_request_accepts_unwrapped_control_plane_success(monkeypatch, sdk):
|
|
163
|
+
UnwrappedRequestClient.calls = []
|
|
164
|
+
|
|
165
|
+
async def fake_ensure_valid_jwt(psk_token, base_url):
|
|
166
|
+
return "jwt-abc"
|
|
167
|
+
|
|
168
|
+
monkeypatch.setattr(core_module, "_ensure_valid_jwt", fake_ensure_valid_jwt)
|
|
169
|
+
monkeypatch.setattr(start_module.httpx, "AsyncClient", UnwrappedRequestClient)
|
|
170
|
+
|
|
171
|
+
result = await sdk._request("/api/warden/secrets/PROVISION_REDIS_URL_REST", method="GET", use_gateway=True)
|
|
172
|
+
|
|
173
|
+
assert result == {"secret": {"key": "PROVISION_REDIS_URL_REST", "value": "redis-url"}}
|
|
174
|
+
assert UnwrappedRequestClient.calls[0]["endpoint"] == "/svc/warden/secrets/PROVISION_REDIS_URL_REST"
|
|
175
|
+
|
|
176
|
+
|
|
135
177
|
def test_dominus_constructor_accepts_gateway_context_keywords():
|
|
136
178
|
sdk = start_module.Dominus(
|
|
137
179
|
gateway_user_token="user-jwt",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus_sdk_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus_sdk_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/dominus_sdk_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_authority_public_vocabulary.py
RENAMED
|
File without changes
|
{dominus_sdk_python-4.0.1 → dominus_sdk_python-4.0.2}/tests/test_control_plane_namespaces.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|