dominus-sdk-python 9.0.1__tar.gz → 9.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-9.0.1 → dominus_sdk_python-9.0.2}/PKG-INFO +49 -75
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/README.md +48 -74
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/__init__.py +1 -1
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus_sdk_python.egg-info/PKG-INFO +49 -75
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus_sdk_python.egg-info/SOURCES.txt +1 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/pyproject.toml +1 -1
- dominus_sdk_python-9.0.2/tests/test_readme_quickstart_catalog.py +128 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/config/__init__.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/config/endpoints.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/errors.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/helpers/__init__.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/helpers/auth.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/helpers/cache.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/helpers/console_capture.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/helpers/core.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/helpers/crypto.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/helpers/sse.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/helpers/trace.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/__init__.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/admin.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/ai.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/artifacts.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/auth.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/authority.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/browser.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/coder.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/courier.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/db.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/ddl.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/deployer.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/fastapi.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/files.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/health.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/jobs.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/logs.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/platform.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/portal.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/processor.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/publisher.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/recipes.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/redis.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/secrets.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/secure.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/stash.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/sync.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/warden.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/namespaces/workflow.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/py.typed +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/services/__init__.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus/start.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus_sdk_python.egg-info/dependency_links.txt +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus_sdk_python.egg-info/requires.txt +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus_sdk_python.egg-info/top_level.txt +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/setup.cfg +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_auth.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_authority_public_vocabulary.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_browser_namespace.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_control_plane_namespaces.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_errors.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_flat_commands.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_health.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_logs.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_namespace_barrel_exports.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_platform_coder_namespaces.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_provisioning_parity.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_public_exports.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_publisher_namespace.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_recipes_namespace.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_recipes_stash_routing.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_secrets_presence_contract.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_stash_artifact_facade.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_stash_tables_namespace.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_transport_compat.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_workflow_lifecycle.py +0 -0
- {dominus_sdk_python-9.0.1 → dominus_sdk_python-9.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: 9.0.
|
|
3
|
+
Version: 9.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-Expression: LicenseRef-Proprietary
|
|
@@ -48,7 +48,7 @@ cleanup audit is `docs/janitor/2026-08-04-sdk-python-cleanup-audit.md`.
|
|
|
48
48
|
- Gateway-scoped client mode for MCP and other user-JWT sessions
|
|
49
49
|
- Transport compatibility for wrapped `{success,data}` responses and unwrapped Warden/control-plane success objects
|
|
50
50
|
- Local helpers for JWT verification, trace propagation, retries, and console capture
|
|
51
|
-
- Current package version: `9.0.
|
|
51
|
+
- Current package version: `9.0.2`
|
|
52
52
|
|
|
53
53
|
## Install
|
|
54
54
|
|
|
@@ -60,85 +60,59 @@ pip install dominus-sdk-python[dev]
|
|
|
60
60
|
|
|
61
61
|
## Quick Start
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
os.environ["DOMINUS_TOKEN"] = "your-psk-token"
|
|
63
|
+
Token-required hello using only the developer-stable catalog verbs. Set project
|
|
64
|
+
scope with `DOMINUS_PROJECT` or CLI `select_project`. Other SDK namespaces exist
|
|
65
|
+
for operators and advanced use; this path is the stable teaching surface.
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
users = await dominus.db.query("users", filters={"status": "active"})
|
|
71
|
-
await dominus.redis.set("session:123", {"user": "john"}, ttl=3600)
|
|
67
|
+
Set both values before the Python process imports the SDK singleton:
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)
|
|
69
|
+
```bash
|
|
70
|
+
export DOMINUS_TOKEN="your-psk-token"
|
|
71
|
+
export DOMINUS_PROJECT="your-project-slug"
|
|
72
|
+
```
|
|
78
73
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
until="2026-04-11T09:33:00Z",
|
|
83
|
-
)
|
|
74
|
+
```python
|
|
75
|
+
import asyncio
|
|
76
|
+
import base64
|
|
84
77
|
|
|
85
|
-
|
|
86
|
-
app_slug="carebridge-summit",
|
|
87
|
-
env="production",
|
|
88
|
-
)
|
|
89
|
-
archive_batch = await dominus.authority.archive_timelines(
|
|
90
|
-
max_hours=24,
|
|
91
|
-
max_runtime_ms=600000,
|
|
92
|
-
)
|
|
93
|
-
logs_archive = await dominus.logs.get_archive_status(
|
|
94
|
-
all_scopes=True,
|
|
95
|
-
include_buffer=True,
|
|
96
|
-
limit=5,
|
|
97
|
-
)
|
|
98
|
-
machine_logs = await dominus.logs.tail(
|
|
99
|
-
machine_id="mach-abc-123",
|
|
100
|
-
since="2026-04-11T08:33:00Z",
|
|
101
|
-
level="error",
|
|
102
|
-
)
|
|
103
|
-
policy = await dominus.platform.ensure_policy_decision(
|
|
104
|
-
{
|
|
105
|
-
"group": "dominus",
|
|
106
|
-
"repository": "carebridgesystems/dominus-platform-worker",
|
|
107
|
-
},
|
|
108
|
-
actor_context={"type": "user", "id": "operator-1"},
|
|
109
|
-
)
|
|
110
|
-
coder_run = await dominus.coder.ensure_run(
|
|
111
|
-
policy_decision_id=policy["data"]["policy_decision"]["decision_id"],
|
|
112
|
-
workflow_recipe_ref="recipe://workflow-recipe-v1/coder-feature@head",
|
|
113
|
-
repository="carebridgesystems/dominus-platform-worker",
|
|
114
|
-
executor="managed_anthropic",
|
|
115
|
-
instructions="Fix failing tests",
|
|
116
|
-
actor_context={"type": "user", "id": "operator-1"},
|
|
117
|
-
)
|
|
78
|
+
from dominus import dominus
|
|
118
79
|
|
|
119
|
-
# Archive maintenance is explicit and dry-run first.
|
|
120
|
-
verify = await dominus.authority.verify_timeline_archive_manifests(
|
|
121
|
-
since="2026-04-01T00:00:00Z",
|
|
122
|
-
until="2026-04-02T00:00:00Z",
|
|
123
|
-
)
|
|
124
|
-
prune = await dominus.logs.prune_archive_retention(
|
|
125
|
-
retention_days=90,
|
|
126
|
-
dry_run=True,
|
|
127
|
-
)
|
|
128
|
-
buffer_proof = await dominus.logs.dry_run_archive_buffer_maintenance(
|
|
129
|
-
sample_limit=100,
|
|
130
|
-
)
|
|
131
|
-
buffer_cleanup = await dominus.logs.run_archive_buffer_maintenance(
|
|
132
|
-
dry_run=False,
|
|
133
|
-
confirm="DELETE_ARCHIVE_BUFFER_RESIDUE",
|
|
134
|
-
salvage_missing_archive=True,
|
|
135
|
-
sample_limit=500,
|
|
136
|
-
max_archive_buckets=24,
|
|
137
|
-
batch_runs=5,
|
|
138
|
-
max_runtime_ms=8000,
|
|
139
|
-
)
|
|
140
80
|
|
|
141
|
-
|
|
81
|
+
async def main() -> None:
|
|
82
|
+
run = await dominus.workflow.ensure(
|
|
83
|
+
workflow_recipe_ref="recipe://workflow-recipe-v1/hello@v1",
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
await dominus.artifacts.store_v2(
|
|
87
|
+
group="your-group",
|
|
88
|
+
owner="your-project-slug",
|
|
89
|
+
environment="production",
|
|
90
|
+
kind="blob",
|
|
91
|
+
artifact_key="hello",
|
|
92
|
+
data=base64.b64encode(b"hello dominus").decode("ascii"),
|
|
93
|
+
)
|
|
94
|
+
artifact = await dominus.artifacts.retrieve_v2(
|
|
95
|
+
group="your-group",
|
|
96
|
+
owner="your-project-slug",
|
|
97
|
+
environment="production",
|
|
98
|
+
kind="blob",
|
|
99
|
+
artifact_key="hello",
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
stash_result = await dominus.stash.upsert(
|
|
103
|
+
kind="config",
|
|
104
|
+
scope={"env": "production"},
|
|
105
|
+
value={"greeting": "hello"},
|
|
106
|
+
item_key="hello",
|
|
107
|
+
)
|
|
108
|
+
await dominus.stash.get(stash_result["item"]["id"])
|
|
109
|
+
|
|
110
|
+
timeline = await dominus.authority.get_run_timeline(run["run_id"])
|
|
111
|
+
verdict = await dominus.authority.get_run_verdict(run["run_id"])
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
if __name__ == "__main__":
|
|
115
|
+
asyncio.run(main())
|
|
142
116
|
```
|
|
143
117
|
|
|
144
118
|
## Stash Managed Tables
|
|
@@ -15,7 +15,7 @@ cleanup audit is `docs/janitor/2026-08-04-sdk-python-cleanup-audit.md`.
|
|
|
15
15
|
- Gateway-scoped client mode for MCP and other user-JWT sessions
|
|
16
16
|
- Transport compatibility for wrapped `{success,data}` responses and unwrapped Warden/control-plane success objects
|
|
17
17
|
- Local helpers for JWT verification, trace propagation, retries, and console capture
|
|
18
|
-
- Current package version: `9.0.
|
|
18
|
+
- Current package version: `9.0.2`
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
@@ -27,85 +27,59 @@ pip install dominus-sdk-python[dev]
|
|
|
27
27
|
|
|
28
28
|
## Quick Start
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
os.environ["DOMINUS_TOKEN"] = "your-psk-token"
|
|
30
|
+
Token-required hello using only the developer-stable catalog verbs. Set project
|
|
31
|
+
scope with `DOMINUS_PROJECT` or CLI `select_project`. Other SDK namespaces exist
|
|
32
|
+
for operators and advanced use; this path is the stable teaching surface.
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
users = await dominus.db.query("users", filters={"status": "active"})
|
|
38
|
-
await dominus.redis.set("session:123", {"user": "john"}, ttl=3600)
|
|
34
|
+
Set both values before the Python process imports the SDK singleton:
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
)
|
|
36
|
+
```bash
|
|
37
|
+
export DOMINUS_TOKEN="your-psk-token"
|
|
38
|
+
export DOMINUS_PROJECT="your-project-slug"
|
|
39
|
+
```
|
|
45
40
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
until="2026-04-11T09:33:00Z",
|
|
50
|
-
)
|
|
41
|
+
```python
|
|
42
|
+
import asyncio
|
|
43
|
+
import base64
|
|
51
44
|
|
|
52
|
-
|
|
53
|
-
app_slug="carebridge-summit",
|
|
54
|
-
env="production",
|
|
55
|
-
)
|
|
56
|
-
archive_batch = await dominus.authority.archive_timelines(
|
|
57
|
-
max_hours=24,
|
|
58
|
-
max_runtime_ms=600000,
|
|
59
|
-
)
|
|
60
|
-
logs_archive = await dominus.logs.get_archive_status(
|
|
61
|
-
all_scopes=True,
|
|
62
|
-
include_buffer=True,
|
|
63
|
-
limit=5,
|
|
64
|
-
)
|
|
65
|
-
machine_logs = await dominus.logs.tail(
|
|
66
|
-
machine_id="mach-abc-123",
|
|
67
|
-
since="2026-04-11T08:33:00Z",
|
|
68
|
-
level="error",
|
|
69
|
-
)
|
|
70
|
-
policy = await dominus.platform.ensure_policy_decision(
|
|
71
|
-
{
|
|
72
|
-
"group": "dominus",
|
|
73
|
-
"repository": "carebridgesystems/dominus-platform-worker",
|
|
74
|
-
},
|
|
75
|
-
actor_context={"type": "user", "id": "operator-1"},
|
|
76
|
-
)
|
|
77
|
-
coder_run = await dominus.coder.ensure_run(
|
|
78
|
-
policy_decision_id=policy["data"]["policy_decision"]["decision_id"],
|
|
79
|
-
workflow_recipe_ref="recipe://workflow-recipe-v1/coder-feature@head",
|
|
80
|
-
repository="carebridgesystems/dominus-platform-worker",
|
|
81
|
-
executor="managed_anthropic",
|
|
82
|
-
instructions="Fix failing tests",
|
|
83
|
-
actor_context={"type": "user", "id": "operator-1"},
|
|
84
|
-
)
|
|
45
|
+
from dominus import dominus
|
|
85
46
|
|
|
86
|
-
# Archive maintenance is explicit and dry-run first.
|
|
87
|
-
verify = await dominus.authority.verify_timeline_archive_manifests(
|
|
88
|
-
since="2026-04-01T00:00:00Z",
|
|
89
|
-
until="2026-04-02T00:00:00Z",
|
|
90
|
-
)
|
|
91
|
-
prune = await dominus.logs.prune_archive_retention(
|
|
92
|
-
retention_days=90,
|
|
93
|
-
dry_run=True,
|
|
94
|
-
)
|
|
95
|
-
buffer_proof = await dominus.logs.dry_run_archive_buffer_maintenance(
|
|
96
|
-
sample_limit=100,
|
|
97
|
-
)
|
|
98
|
-
buffer_cleanup = await dominus.logs.run_archive_buffer_maintenance(
|
|
99
|
-
dry_run=False,
|
|
100
|
-
confirm="DELETE_ARCHIVE_BUFFER_RESIDUE",
|
|
101
|
-
salvage_missing_archive=True,
|
|
102
|
-
sample_limit=500,
|
|
103
|
-
max_archive_buckets=24,
|
|
104
|
-
batch_runs=5,
|
|
105
|
-
max_runtime_ms=8000,
|
|
106
|
-
)
|
|
107
47
|
|
|
108
|
-
|
|
48
|
+
async def main() -> None:
|
|
49
|
+
run = await dominus.workflow.ensure(
|
|
50
|
+
workflow_recipe_ref="recipe://workflow-recipe-v1/hello@v1",
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
await dominus.artifacts.store_v2(
|
|
54
|
+
group="your-group",
|
|
55
|
+
owner="your-project-slug",
|
|
56
|
+
environment="production",
|
|
57
|
+
kind="blob",
|
|
58
|
+
artifact_key="hello",
|
|
59
|
+
data=base64.b64encode(b"hello dominus").decode("ascii"),
|
|
60
|
+
)
|
|
61
|
+
artifact = await dominus.artifacts.retrieve_v2(
|
|
62
|
+
group="your-group",
|
|
63
|
+
owner="your-project-slug",
|
|
64
|
+
environment="production",
|
|
65
|
+
kind="blob",
|
|
66
|
+
artifact_key="hello",
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
stash_result = await dominus.stash.upsert(
|
|
70
|
+
kind="config",
|
|
71
|
+
scope={"env": "production"},
|
|
72
|
+
value={"greeting": "hello"},
|
|
73
|
+
item_key="hello",
|
|
74
|
+
)
|
|
75
|
+
await dominus.stash.get(stash_result["item"]["id"])
|
|
76
|
+
|
|
77
|
+
timeline = await dominus.authority.get_run_timeline(run["run_id"])
|
|
78
|
+
verdict = await dominus.authority.get_run_verdict(run["run_id"])
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
if __name__ == "__main__":
|
|
82
|
+
asyncio.run(main())
|
|
109
83
|
```
|
|
110
84
|
|
|
111
85
|
## Stash Managed Tables
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dominus-sdk-python
|
|
3
|
-
Version: 9.0.
|
|
3
|
+
Version: 9.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-Expression: LicenseRef-Proprietary
|
|
@@ -48,7 +48,7 @@ cleanup audit is `docs/janitor/2026-08-04-sdk-python-cleanup-audit.md`.
|
|
|
48
48
|
- Gateway-scoped client mode for MCP and other user-JWT sessions
|
|
49
49
|
- Transport compatibility for wrapped `{success,data}` responses and unwrapped Warden/control-plane success objects
|
|
50
50
|
- Local helpers for JWT verification, trace propagation, retries, and console capture
|
|
51
|
-
- Current package version: `9.0.
|
|
51
|
+
- Current package version: `9.0.2`
|
|
52
52
|
|
|
53
53
|
## Install
|
|
54
54
|
|
|
@@ -60,85 +60,59 @@ pip install dominus-sdk-python[dev]
|
|
|
60
60
|
|
|
61
61
|
## Quick Start
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
os.environ["DOMINUS_TOKEN"] = "your-psk-token"
|
|
63
|
+
Token-required hello using only the developer-stable catalog verbs. Set project
|
|
64
|
+
scope with `DOMINUS_PROJECT` or CLI `select_project`. Other SDK namespaces exist
|
|
65
|
+
for operators and advanced use; this path is the stable teaching surface.
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
users = await dominus.db.query("users", filters={"status": "active"})
|
|
71
|
-
await dominus.redis.set("session:123", {"user": "john"}, ttl=3600)
|
|
67
|
+
Set both values before the Python process imports the SDK singleton:
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)
|
|
69
|
+
```bash
|
|
70
|
+
export DOMINUS_TOKEN="your-psk-token"
|
|
71
|
+
export DOMINUS_PROJECT="your-project-slug"
|
|
72
|
+
```
|
|
78
73
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
until="2026-04-11T09:33:00Z",
|
|
83
|
-
)
|
|
74
|
+
```python
|
|
75
|
+
import asyncio
|
|
76
|
+
import base64
|
|
84
77
|
|
|
85
|
-
|
|
86
|
-
app_slug="carebridge-summit",
|
|
87
|
-
env="production",
|
|
88
|
-
)
|
|
89
|
-
archive_batch = await dominus.authority.archive_timelines(
|
|
90
|
-
max_hours=24,
|
|
91
|
-
max_runtime_ms=600000,
|
|
92
|
-
)
|
|
93
|
-
logs_archive = await dominus.logs.get_archive_status(
|
|
94
|
-
all_scopes=True,
|
|
95
|
-
include_buffer=True,
|
|
96
|
-
limit=5,
|
|
97
|
-
)
|
|
98
|
-
machine_logs = await dominus.logs.tail(
|
|
99
|
-
machine_id="mach-abc-123",
|
|
100
|
-
since="2026-04-11T08:33:00Z",
|
|
101
|
-
level="error",
|
|
102
|
-
)
|
|
103
|
-
policy = await dominus.platform.ensure_policy_decision(
|
|
104
|
-
{
|
|
105
|
-
"group": "dominus",
|
|
106
|
-
"repository": "carebridgesystems/dominus-platform-worker",
|
|
107
|
-
},
|
|
108
|
-
actor_context={"type": "user", "id": "operator-1"},
|
|
109
|
-
)
|
|
110
|
-
coder_run = await dominus.coder.ensure_run(
|
|
111
|
-
policy_decision_id=policy["data"]["policy_decision"]["decision_id"],
|
|
112
|
-
workflow_recipe_ref="recipe://workflow-recipe-v1/coder-feature@head",
|
|
113
|
-
repository="carebridgesystems/dominus-platform-worker",
|
|
114
|
-
executor="managed_anthropic",
|
|
115
|
-
instructions="Fix failing tests",
|
|
116
|
-
actor_context={"type": "user", "id": "operator-1"},
|
|
117
|
-
)
|
|
78
|
+
from dominus import dominus
|
|
118
79
|
|
|
119
|
-
# Archive maintenance is explicit and dry-run first.
|
|
120
|
-
verify = await dominus.authority.verify_timeline_archive_manifests(
|
|
121
|
-
since="2026-04-01T00:00:00Z",
|
|
122
|
-
until="2026-04-02T00:00:00Z",
|
|
123
|
-
)
|
|
124
|
-
prune = await dominus.logs.prune_archive_retention(
|
|
125
|
-
retention_days=90,
|
|
126
|
-
dry_run=True,
|
|
127
|
-
)
|
|
128
|
-
buffer_proof = await dominus.logs.dry_run_archive_buffer_maintenance(
|
|
129
|
-
sample_limit=100,
|
|
130
|
-
)
|
|
131
|
-
buffer_cleanup = await dominus.logs.run_archive_buffer_maintenance(
|
|
132
|
-
dry_run=False,
|
|
133
|
-
confirm="DELETE_ARCHIVE_BUFFER_RESIDUE",
|
|
134
|
-
salvage_missing_archive=True,
|
|
135
|
-
sample_limit=500,
|
|
136
|
-
max_archive_buckets=24,
|
|
137
|
-
batch_runs=5,
|
|
138
|
-
max_runtime_ms=8000,
|
|
139
|
-
)
|
|
140
80
|
|
|
141
|
-
|
|
81
|
+
async def main() -> None:
|
|
82
|
+
run = await dominus.workflow.ensure(
|
|
83
|
+
workflow_recipe_ref="recipe://workflow-recipe-v1/hello@v1",
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
await dominus.artifacts.store_v2(
|
|
87
|
+
group="your-group",
|
|
88
|
+
owner="your-project-slug",
|
|
89
|
+
environment="production",
|
|
90
|
+
kind="blob",
|
|
91
|
+
artifact_key="hello",
|
|
92
|
+
data=base64.b64encode(b"hello dominus").decode("ascii"),
|
|
93
|
+
)
|
|
94
|
+
artifact = await dominus.artifacts.retrieve_v2(
|
|
95
|
+
group="your-group",
|
|
96
|
+
owner="your-project-slug",
|
|
97
|
+
environment="production",
|
|
98
|
+
kind="blob",
|
|
99
|
+
artifact_key="hello",
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
stash_result = await dominus.stash.upsert(
|
|
103
|
+
kind="config",
|
|
104
|
+
scope={"env": "production"},
|
|
105
|
+
value={"greeting": "hello"},
|
|
106
|
+
item_key="hello",
|
|
107
|
+
)
|
|
108
|
+
await dominus.stash.get(stash_result["item"]["id"])
|
|
109
|
+
|
|
110
|
+
timeline = await dominus.authority.get_run_timeline(run["run_id"])
|
|
111
|
+
verdict = await dominus.authority.get_run_verdict(run["run_id"])
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
if __name__ == "__main__":
|
|
115
|
+
asyncio.run(main())
|
|
142
116
|
```
|
|
143
117
|
|
|
144
118
|
## Stash Managed Tables
|
{dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus_sdk_python.egg-info/SOURCES.txt
RENAMED
|
@@ -62,6 +62,7 @@ tests/test_platform_coder_namespaces.py
|
|
|
62
62
|
tests/test_provisioning_parity.py
|
|
63
63
|
tests/test_public_exports.py
|
|
64
64
|
tests/test_publisher_namespace.py
|
|
65
|
+
tests/test_readme_quickstart_catalog.py
|
|
65
66
|
tests/test_recipes_namespace.py
|
|
66
67
|
tests/test_recipes_stash_routing.py
|
|
67
68
|
tests/test_secrets_presence_contract.py
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""Executable contract for the README developer-stable Quick Start."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import re
|
|
7
|
+
import subprocess
|
|
8
|
+
import sys
|
|
9
|
+
import textwrap
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
ROOT = Path(__file__).resolve().parents[1]
|
|
13
|
+
README = ROOT / "README.md"
|
|
14
|
+
|
|
15
|
+
SDK_PYTHON_CATALOG = frozenset(
|
|
16
|
+
{
|
|
17
|
+
"workflow.ensure",
|
|
18
|
+
"artifacts.store_v2",
|
|
19
|
+
"artifacts.retrieve_v2",
|
|
20
|
+
"stash.upsert",
|
|
21
|
+
"stash.get",
|
|
22
|
+
"authority.get_run_timeline",
|
|
23
|
+
"authority.get_run_verdict",
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
FORBIDDEN = re.compile(r"summit|carebridge|PCM47474562|report-cycle", re.IGNORECASE)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _quick_start_section(readme: str) -> str:
|
|
31
|
+
start = readme.index("## Quick Start")
|
|
32
|
+
rest = readme[start:]
|
|
33
|
+
next_heading = rest.find("\n## ", len("## Quick Start"))
|
|
34
|
+
return rest if next_heading < 0 else rest[:next_heading]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _fenced(section: str, language: str) -> tuple[int, str]:
|
|
38
|
+
marker = f"```{language}\n"
|
|
39
|
+
start = section.index(marker)
|
|
40
|
+
body_start = start + len(marker)
|
|
41
|
+
end = section.index("```", body_start)
|
|
42
|
+
return start, section[body_start:end]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def test_quick_start_scope_precedes_import_and_methods_match_catalog() -> None:
|
|
46
|
+
section = _quick_start_section(README.read_text(encoding="utf-8"))
|
|
47
|
+
shell_index, shell = _fenced(section, "bash")
|
|
48
|
+
python_index, body = _fenced(section, "python")
|
|
49
|
+
|
|
50
|
+
assert shell_index < python_index
|
|
51
|
+
assert 'export DOMINUS_TOKEN="your-psk-token"' in shell
|
|
52
|
+
assert 'export DOMINUS_PROJECT="your-project-slug"' in shell
|
|
53
|
+
assert "os.environ" not in body
|
|
54
|
+
assert "from dominus import dominus" in body
|
|
55
|
+
assert not FORBIDDEN.search(body), "Quick Start still has CareBridge-shaped nouns"
|
|
56
|
+
|
|
57
|
+
found = set(re.findall(r"\bdominus\.([a-z0-9_]+)\.([a-z0-9_]+)\b", body))
|
|
58
|
+
identifiers = {f"{namespace}.{method}" for namespace, method in found}
|
|
59
|
+
assert identifiers == SDK_PYTHON_CATALOG
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def test_quick_start_executes_in_fresh_process_with_live_transport_shapes() -> None:
|
|
63
|
+
child = textwrap.dedent(
|
|
64
|
+
r'''
|
|
65
|
+
import asyncio
|
|
66
|
+
import base64
|
|
67
|
+
import sys
|
|
68
|
+
from pathlib import Path
|
|
69
|
+
|
|
70
|
+
readme = Path(sys.argv[1]).read_text(encoding="utf-8")
|
|
71
|
+
section = readme[readme.index("## Quick Start"):]
|
|
72
|
+
marker = "```python\n"
|
|
73
|
+
start = section.index(marker) + len(marker)
|
|
74
|
+
body = section[start:section.index("```", start)]
|
|
75
|
+
|
|
76
|
+
from dominus import dominus
|
|
77
|
+
|
|
78
|
+
asyncio.run(dominus._ensure_ready())
|
|
79
|
+
calls = []
|
|
80
|
+
|
|
81
|
+
async def fake_request(**kwargs):
|
|
82
|
+
calls.append(kwargs)
|
|
83
|
+
endpoint = kwargs["endpoint"]
|
|
84
|
+
if endpoint == "/api/authority/runs/ensure":
|
|
85
|
+
return {"run_id": "run-1"}
|
|
86
|
+
if endpoint == "/svc/stash/items/upsert":
|
|
87
|
+
return {"item": {"id": "stash-1"}, "scope_origin": "own"}
|
|
88
|
+
if endpoint == "/svc/stash/items/get":
|
|
89
|
+
return {"item": {"id": "stash-1"}}
|
|
90
|
+
return {}
|
|
91
|
+
|
|
92
|
+
dominus._request = fake_request
|
|
93
|
+
exec(compile(body, "README.md#quick-start", "exec"), {"__name__": "__main__"})
|
|
94
|
+
|
|
95
|
+
endpoints = [call["endpoint"] for call in calls]
|
|
96
|
+
assert endpoints == [
|
|
97
|
+
"/api/authority/runs/ensure",
|
|
98
|
+
"/api/artifact/v2/store",
|
|
99
|
+
"/api/artifact/v2/retrieve",
|
|
100
|
+
"/svc/stash/items/upsert",
|
|
101
|
+
"/svc/stash/items/get",
|
|
102
|
+
"/api/authority/runs/run-1/timeline",
|
|
103
|
+
"/api/authority/runs/run-1/verdict",
|
|
104
|
+
], endpoints
|
|
105
|
+
assert calls[0]["body"]["workflow_recipe_ref"] == "recipe://workflow-recipe-v1/hello@v1"
|
|
106
|
+
assert calls[1]["body"]["data"] == base64.b64encode(b"hello dominus").decode("ascii")
|
|
107
|
+
assert base64.b64decode(calls[1]["body"]["data"], validate=True) == b"hello dominus"
|
|
108
|
+
assert calls[3]["body"] == {
|
|
109
|
+
"kind": "config",
|
|
110
|
+
"scope": {"env": "production"},
|
|
111
|
+
"value": {"greeting": "hello"},
|
|
112
|
+
"item_key": "hello",
|
|
113
|
+
}
|
|
114
|
+
assert calls[4]["body"] == {"id": "stash-1"}
|
|
115
|
+
'''
|
|
116
|
+
)
|
|
117
|
+
env = os.environ.copy()
|
|
118
|
+
env["DOMINUS_TOKEN"] = "a" * 64
|
|
119
|
+
env["DOMINUS_PROJECT"] = "your-project-slug"
|
|
120
|
+
result = subprocess.run(
|
|
121
|
+
[sys.executable, "-c", child, str(README)],
|
|
122
|
+
cwd=ROOT,
|
|
123
|
+
env=env,
|
|
124
|
+
text=True,
|
|
125
|
+
capture_output=True,
|
|
126
|
+
check=False,
|
|
127
|
+
)
|
|
128
|
+
assert result.returncode == 0, f"stdout={result.stdout}\nstderr={result.stderr}"
|
|
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
|
|
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-9.0.1 → dominus_sdk_python-9.0.2}/dominus_sdk_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/dominus_sdk_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_authority_public_vocabulary.py
RENAMED
|
File without changes
|
|
File without changes
|
{dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_control_plane_namespaces.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_namespace_barrel_exports.py
RENAMED
|
File without changes
|
{dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_platform_coder_namespaces.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dominus_sdk_python-9.0.1 → dominus_sdk_python-9.0.2}/tests/test_secrets_presence_contract.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|