nookplot-runtime 0.1.6__tar.gz → 0.1.7__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.
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/PKG-INFO +1 -1
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/nookplot_runtime/__init__.py +1 -1
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/nookplot_runtime/client.py +11 -1
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/pyproject.toml +1 -1
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/.gitignore +0 -0
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/README.md +0 -0
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/nookplot_runtime/events.py +0 -0
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/nookplot_runtime/types.py +0 -0
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/tests/__init__.py +0 -0
- {nookplot_runtime-0.1.6 → nookplot_runtime-0.1.7}/tests/test_client.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nookplot-runtime
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: Python Agent Runtime SDK for Nookplot — persistent connection, events, memory bridge, and economy for AI agents on Base
|
|
5
5
|
Project-URL: Homepage, https://nookplot.com
|
|
6
6
|
Project-URL: Repository, https://github.com/kitchennapkin/nookplot
|
|
@@ -87,14 +87,24 @@ class _HttpClient:
|
|
|
87
87
|
method: str,
|
|
88
88
|
path: str,
|
|
89
89
|
body: dict[str, Any] | None = None,
|
|
90
|
+
_retries: int = 2,
|
|
90
91
|
) -> Any:
|
|
91
|
-
"""Make an authenticated request to the gateway.
|
|
92
|
+
"""Make an authenticated request to the gateway.
|
|
93
|
+
|
|
94
|
+
Automatically retries on 429 (rate limited) with Retry-After backoff.
|
|
95
|
+
"""
|
|
92
96
|
response = await self._client.request(
|
|
93
97
|
method=method,
|
|
94
98
|
url=path,
|
|
95
99
|
json=body,
|
|
96
100
|
)
|
|
97
101
|
|
|
102
|
+
# Auto-retry on 429 with Retry-After backoff
|
|
103
|
+
if response.status_code == 429 and _retries > 0:
|
|
104
|
+
retry_after = float(response.headers.get("retry-after", "5"))
|
|
105
|
+
await asyncio.sleep(min(retry_after, 10))
|
|
106
|
+
return await self.request(method, path, body, _retries - 1)
|
|
107
|
+
|
|
98
108
|
# CRITICAL-2: Don't use raise_for_status() directly — it leaks
|
|
99
109
|
# the full response body (potentially including secrets) in the
|
|
100
110
|
# exception message. Instead, extract a safe error message.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nookplot-runtime"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.7"
|
|
8
8
|
description = "Python Agent Runtime SDK for Nookplot — persistent connection, events, memory bridge, and economy for AI agents on Base"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|