geyser-sdk 0.1.0b4__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,24 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .pytest_cache/
6
+ .mypy_cache/
7
+ .ruff_cache/
8
+ .coverage
9
+ htmlcov/
10
+ dist/
11
+ build/
12
+ .geyser/
13
+ .release-build/
14
+ .release-python/
15
+ release-standalone/
16
+ release-assets/
17
+ *.tar.gz
18
+ *.whl
19
+ *.sig
20
+ *.crt
21
+ *.pem
22
+ *.key
23
+ coverage.xml
24
+ site/
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.5
2
+ Name: geyser-sdk
3
+ Version: 0.1.0b4
4
+ Summary: Typed Python SDK and deterministic emulator for the public Geyser developer API
5
+ Project-URL: Homepage, https://geyserlabs.ai/developers
6
+ Project-URL: Documentation, https://docs.geyserlabs.ai
7
+ Project-URL: Repository, https://github.com/geyserlabs/geyser-open
8
+ Project-URL: Issues, https://github.com/geyserlabs/geyser-open/issues
9
+ Project-URL: Security, https://github.com/geyserlabs/geyser-open/security/policy
10
+ Author-email: Geyser Labs <security@geyserlabs.ai>
11
+ License-Expression: MIT
12
+ Keywords: agents,durable,emulator,geyser,sdk
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: License :: OSI Approved :: MIT License
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: Typing :: Typed
20
+ Requires-Python: >=3.11
21
+ Requires-Dist: httpx<1,>=0.28
22
+ Requires-Dist: jsonschema<5,>=4.23
23
+ Requires-Dist: pydantic<3,>=2.10
24
+ Provides-Extra: test
25
+ Requires-Dist: pytest-asyncio<2,>=0.24; extra == 'test'
26
+ Requires-Dist: pytest<10,>=8; extra == 'test'
27
+ Requires-Dist: respx<1,>=0.22; extra == 'test'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # geyser-sdk
31
+
32
+ Typed sync/async clients and a deterministic, credential-free local emulator
33
+ for Geyser's public `/api/v1` developer contract.
34
+
35
+ ```python
36
+ from geyser_sdk import GeyserClient
37
+
38
+ with GeyserClient("https://api.geyserlabs.ai", access_token="...") as geyser:
39
+ for run in geyser.runs.iter():
40
+ print(run.id, run.state)
41
+ ```
42
+
43
+ Tokens are always explicit. The package never reads an ambient Agent key,
44
+ provider credential, or browser session.
@@ -0,0 +1,15 @@
1
+ # geyser-sdk
2
+
3
+ Typed sync/async clients and a deterministic, credential-free local emulator
4
+ for Geyser's public `/api/v1` developer contract.
5
+
6
+ ```python
7
+ from geyser_sdk import GeyserClient
8
+
9
+ with GeyserClient("https://api.geyserlabs.ai", access_token="...") as geyser:
10
+ for run in geyser.runs.iter():
11
+ print(run.id, run.state)
12
+ ```
13
+
14
+ Tokens are always explicit. The package never reads an ambient Agent key,
15
+ provider credential, or browser session.
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27,<2"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "geyser-sdk"
7
+ version = "0.1.0b4"
8
+ description = "Typed Python SDK and deterministic emulator for the public Geyser developer API"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.11"
12
+ authors = [{ name = "Geyser Labs", email = "security@geyserlabs.ai" }]
13
+ keywords = ["agents", "durable", "sdk", "emulator", "geyser"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Typing :: Typed",
22
+ ]
23
+ dependencies = [
24
+ "httpx>=0.28,<1",
25
+ "jsonschema>=4.23,<5",
26
+ "pydantic>=2.10,<3",
27
+ ]
28
+
29
+ [project.optional-dependencies]
30
+ test = [
31
+ "pytest>=8,<10",
32
+ "pytest-asyncio>=0.24,<2",
33
+ "respx>=0.22,<1",
34
+ ]
35
+
36
+ [project.urls]
37
+ Homepage = "https://geyserlabs.ai/developers"
38
+ Documentation = "https://docs.geyserlabs.ai"
39
+ Repository = "https://github.com/geyserlabs/geyser-open"
40
+ Issues = "https://github.com/geyserlabs/geyser-open/issues"
41
+ Security = "https://github.com/geyserlabs/geyser-open/security/policy"
42
+
43
+ [tool.hatch.build.targets.wheel]
44
+ packages = ["src/geyser_sdk"]
45
+
46
+ [tool.hatch.build.targets.sdist]
47
+ include = ["src/geyser_sdk", "tests", "README.md", "pyproject.toml"]
@@ -0,0 +1,49 @@
1
+ """Public, framework-neutral Geyser SDK."""
2
+
3
+ from ._json import bytes_digest, canonical_bytes, digest
4
+ from .client import AsyncGeyserClient, GeyserClient, TokenProvider
5
+ from .emulator import EmulatorError, LocalEmulator
6
+ from .errors import (
7
+ GeyserError,
8
+ Problem,
9
+ ProblemError,
10
+ ResponseValidationError,
11
+ TransportError,
12
+ )
13
+ from .models import * # noqa: F403 - typed contract is the intentional public surface
14
+ from .structured_outcomes import (
15
+ OutcomeContractError,
16
+ OutcomeValidationError,
17
+ checkpoint_value,
18
+ evidence_refs,
19
+ normalize_contract,
20
+ parse_candidate,
21
+ pydantic_output_type,
22
+ validate_outcome,
23
+ )
24
+
25
+ __version__ = "0.1.0b4"
26
+
27
+ __all__ = [
28
+ "AsyncGeyserClient",
29
+ "EmulatorError",
30
+ "GeyserClient",
31
+ "GeyserError",
32
+ "LocalEmulator",
33
+ "OutcomeContractError",
34
+ "OutcomeValidationError",
35
+ "Problem",
36
+ "ProblemError",
37
+ "ResponseValidationError",
38
+ "TokenProvider",
39
+ "TransportError",
40
+ "bytes_digest",
41
+ "canonical_bytes",
42
+ "checkpoint_value",
43
+ "digest",
44
+ "evidence_refs",
45
+ "normalize_contract",
46
+ "parse_candidate",
47
+ "pydantic_output_type",
48
+ "validate_outcome",
49
+ ]
@@ -0,0 +1,26 @@
1
+ from __future__ import annotations
2
+
3
+ import hashlib
4
+ import json
5
+ from typing import Any
6
+
7
+
8
+ def canonical_bytes(value: Any) -> bytes:
9
+ try:
10
+ return json.dumps(
11
+ value,
12
+ sort_keys=True,
13
+ separators=(",", ":"),
14
+ ensure_ascii=False,
15
+ allow_nan=False,
16
+ ).encode("utf-8")
17
+ except (TypeError, ValueError) as exc:
18
+ raise ValueError("value must be finite JSON") from exc
19
+
20
+
21
+ def digest(value: Any) -> str:
22
+ return "sha256:" + hashlib.sha256(canonical_bytes(value)).hexdigest()
23
+
24
+
25
+ def bytes_digest(value: bytes) -> str:
26
+ return "sha256:" + hashlib.sha256(value).hexdigest()