palonexus 0.2.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.
Files changed (35) hide show
  1. palonexus-0.2.0/.gitignore +14 -0
  2. palonexus-0.2.0/LICENSE +21 -0
  3. palonexus-0.2.0/PKG-INFO +43 -0
  4. palonexus-0.2.0/pyproject.toml +89 -0
  5. palonexus-0.2.0/src/palonexus/__init__.py +111 -0
  6. palonexus-0.2.0/src/palonexus/_canonicalize.py +1797 -0
  7. palonexus-0.2.0/src/palonexus/_generated/__init__.py +4 -0
  8. palonexus-0.2.0/src/palonexus/_generated/protocol.py +2060 -0
  9. palonexus-0.2.0/src/palonexus/_version.py +24 -0
  10. palonexus-0.2.0/src/palonexus/approvals.py +315 -0
  11. palonexus-0.2.0/src/palonexus/async_client.py +489 -0
  12. palonexus-0.2.0/src/palonexus/client.py +795 -0
  13. palonexus-0.2.0/src/palonexus/context.py +234 -0
  14. palonexus-0.2.0/src/palonexus/credentials.py +549 -0
  15. palonexus-0.2.0/src/palonexus/errors.py +287 -0
  16. palonexus-0.2.0/src/palonexus/identity/__init__.py +62 -0
  17. palonexus-0.2.0/src/palonexus/identity/did.py +419 -0
  18. palonexus-0.2.0/src/palonexus/identity/oidc.py +1483 -0
  19. palonexus-0.2.0/src/palonexus/identity/vc.py +1335 -0
  20. palonexus-0.2.0/src/palonexus/integrations/__init__.py +85 -0
  21. palonexus-0.2.0/src/palonexus/integrations/deepagents.py +562 -0
  22. palonexus-0.2.0/src/palonexus/integrations/langchain.py +869 -0
  23. palonexus-0.2.0/src/palonexus/integrations/langgraph.py +1368 -0
  24. palonexus-0.2.0/src/palonexus/keystore.py +1033 -0
  25. palonexus-0.2.0/src/palonexus/models.py +472 -0
  26. palonexus-0.2.0/src/palonexus/protocol.py +987 -0
  27. palonexus-0.2.0/src/palonexus/py.typed +1 -0
  28. palonexus-0.2.0/src/palonexus/redaction.py +666 -0
  29. palonexus-0.2.0/src/palonexus/retry.py +526 -0
  30. palonexus-0.2.0/src/palonexus/testing/__init__.py +20 -0
  31. palonexus-0.2.0/src/palonexus/testing/fake_transport.py +1375 -0
  32. palonexus-0.2.0/src/palonexus/testing/mock_server.py +318 -0
  33. palonexus-0.2.0/src/palonexus/transports/__init__.py +19 -0
  34. palonexus-0.2.0/src/palonexus/transports/base.py +52 -0
  35. palonexus-0.2.0/src/palonexus/transports/http.py +1653 -0
@@ -0,0 +1,14 @@
1
+ .DS_Store
2
+ .venv/
3
+ .pytest_cache/
4
+ .mypy_cache/
5
+ .ruff_cache/
6
+ __pycache__/
7
+ *.py[cod]
8
+ dist/
9
+ build/
10
+ coverage/
11
+ *.out
12
+ *.test
13
+ .worktrees/
14
+ /python/src/palonexus/_version.py
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PaloNexus
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,43 @@
1
+ Metadata-Version: 2.4
2
+ Name: palonexus
3
+ Version: 0.2.0
4
+ Summary: Python SDK for the PaloNexus agent control plane
5
+ Project-URL: Homepage, https://github.com/rogerchucker/palonexus-sdk
6
+ Project-URL: Repository, https://github.com/rogerchucker/palonexus-sdk
7
+ Project-URL: Documentation, https://github.com/rogerchucker/palonexus-sdk#readme
8
+ Project-URL: Issues, https://github.com/rogerchucker/palonexus-sdk/issues
9
+ Project-URL: Changelog, https://github.com/rogerchucker/palonexus-sdk/blob/main/CHANGELOG.md
10
+ Author: PaloNexus maintainers
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Classifier: Development Status :: 2 - Pre-Alpha
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Requires-Python: >=3.12
19
+ Requires-Dist: cryptography<47,>=46.0.5
20
+ Requires-Dist: httpx<0.29,>=0.28.1
21
+ Requires-Dist: idna==3.18
22
+ Requires-Dist: pydantic<3,>=2.13.4
23
+ Requires-Dist: unicodedata2==15.1.0
24
+ Provides-Extra: deepagents
25
+ Requires-Dist: deepagents<1,>=0.3; extra == 'deepagents'
26
+ Requires-Dist: langchain-core<2,>=1; extra == 'deepagents'
27
+ Requires-Dist: langchain<2,>=1; extra == 'deepagents'
28
+ Requires-Dist: langgraph<2,>=1; extra == 'deepagents'
29
+ Provides-Extra: langchain
30
+ Requires-Dist: langchain-core<2,>=1; extra == 'langchain'
31
+ Requires-Dist: langchain<2,>=1; extra == 'langchain'
32
+ Requires-Dist: langgraph<2,>=1; extra == 'langchain'
33
+ Provides-Extra: langgraph
34
+ Requires-Dist: langchain-core<2,>=1; extra == 'langgraph'
35
+ Requires-Dist: langgraph-checkpoint-sqlite<4,>=3; extra == 'langgraph'
36
+ Requires-Dist: langgraph<2,>=1; extra == 'langgraph'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # PaloNexus Python SDK
40
+
41
+ Typed, fail-closed authorization models and clients for the PaloNexus agent
42
+ control plane. Documentation and examples are maintained in the public
43
+ [PaloNexus SDK repository](https://github.com/rogerchucker/palonexus-sdk).
@@ -0,0 +1,89 @@
1
+ [build-system]
2
+ requires = [
3
+ "hatch-vcs==0.5.0",
4
+ "hatchling==1.31.0",
5
+ "packaging==26.2",
6
+ "pathspec==1.1.1",
7
+ "pluggy==1.6.0",
8
+ "setuptools==83.0.0",
9
+ "setuptools-scm==10.2.1",
10
+ "trove-classifiers==2026.6.1.19",
11
+ "vcs-versioning==2.2.2",
12
+ ]
13
+ build-backend = "hatchling.build"
14
+
15
+ [project]
16
+ name = "palonexus"
17
+ dynamic = ["version"]
18
+ description = "Python SDK for the PaloNexus agent control plane"
19
+ readme = { text = """
20
+ # PaloNexus Python SDK
21
+
22
+ Typed, fail-closed authorization models and clients for the PaloNexus agent
23
+ control plane. Documentation and examples are maintained in the public
24
+ [PaloNexus SDK repository](https://github.com/rogerchucker/palonexus-sdk).
25
+ """, content-type = "text/markdown" }
26
+ requires-python = ">=3.12"
27
+ license = "MIT"
28
+ license-files = ["LICENSE"]
29
+ authors = [
30
+ { name = "PaloNexus maintainers" },
31
+ ]
32
+ classifiers = [
33
+ "Development Status :: 2 - Pre-Alpha",
34
+ "License :: OSI Approved :: MIT License",
35
+ "Programming Language :: Python :: 3",
36
+ "Programming Language :: Python :: 3.12",
37
+ "Programming Language :: Python :: 3.13",
38
+ ]
39
+ dependencies = [
40
+ "cryptography>=46.0.5,<47",
41
+ "httpx>=0.28.1,<0.29",
42
+ "idna==3.18",
43
+ "pydantic>=2.13.4,<3",
44
+ "unicodedata2==15.1.0",
45
+ ]
46
+
47
+ [project.urls]
48
+ Homepage = "https://github.com/rogerchucker/palonexus-sdk"
49
+ Repository = "https://github.com/rogerchucker/palonexus-sdk"
50
+ Documentation = "https://github.com/rogerchucker/palonexus-sdk#readme"
51
+ Issues = "https://github.com/rogerchucker/palonexus-sdk/issues"
52
+ Changelog = "https://github.com/rogerchucker/palonexus-sdk/blob/main/CHANGELOG.md"
53
+
54
+ [project.optional-dependencies]
55
+ langchain = [
56
+ "langchain>=1,<2",
57
+ "langchain-core>=1,<2",
58
+ "langgraph>=1,<2",
59
+ ]
60
+ langgraph = [
61
+ "langchain-core>=1,<2",
62
+ "langgraph>=1,<2",
63
+ "langgraph-checkpoint-sqlite>=3,<4",
64
+ ]
65
+ deepagents = [
66
+ "deepagents>=0.3,<1",
67
+ "langchain>=1,<2",
68
+ "langchain-core>=1,<2",
69
+ "langgraph>=1,<2",
70
+ ]
71
+
72
+ [tool.hatch.version]
73
+ source = "vcs"
74
+
75
+ [tool.hatch.version.raw-options]
76
+ search_parent_directories = true
77
+
78
+ [tool.hatch.build.hooks.vcs]
79
+ version-file = "src/palonexus/_version.py"
80
+
81
+ [tool.hatch.build.targets.wheel]
82
+ packages = ["src/palonexus"]
83
+
84
+ [tool.hatch.build.targets.sdist]
85
+ include = [
86
+ "LICENSE",
87
+ "pyproject.toml",
88
+ "src/palonexus",
89
+ ]
@@ -0,0 +1,111 @@
1
+ # SPDX-License-Identifier: MIT
2
+ """Public PaloNexus Python SDK API."""
3
+
4
+ from .approvals import (
5
+ ApprovalRecord,
6
+ ApprovalStatus,
7
+ ApprovalTransport,
8
+ AsyncApprovalTransport,
9
+ )
10
+ from .async_client import AsyncAuthorizationClient
11
+ from .client import AuthorizationClient, AuthorizationDecision
12
+ from .context import atask, task
13
+ from .credentials import (
14
+ AsyncCredentialProvider,
15
+ Credential,
16
+ CredentialAcquisitionCancelled,
17
+ CredentialUnavailable,
18
+ InvalidCredentialDeadline,
19
+ SyncCredentialProvider,
20
+ )
21
+ from .errors import (
22
+ ApprovalExpired,
23
+ ApprovalRequired,
24
+ ApprovalScopeMismatch,
25
+ AuthenticationFailed,
26
+ AuthorizationUnavailable,
27
+ CredentialRevoked,
28
+ IdempotencyConflict,
29
+ InvalidDecision,
30
+ InvalidRequest,
31
+ MissingIdentity,
32
+ ModelValidationError,
33
+ PaloNexusError,
34
+ PolicyDenied,
35
+ UnsupportedProtocol,
36
+ )
37
+ from .keystore import (
38
+ EphemeralKeyStore,
39
+ InvalidKeyIdentifier,
40
+ InvalidKeyMaterial,
41
+ KeyNotFound,
42
+ KeyStore,
43
+ KeyStoreClosed,
44
+ KeyStoreCorrupt,
45
+ KeyStoreError,
46
+ KeyStoreUnavailable,
47
+ )
48
+ from .models import ActionRequest, ActionTarget, DecisionOutcome, TaskContext
49
+ from .protocol import ActionRequestBuilder
50
+ from .redaction import Redactor
51
+ from .retry import (
52
+ CompletionState,
53
+ RetryDecision,
54
+ RetryFailure,
55
+ RetryPolicy,
56
+ RetryPolicyError,
57
+ RetryReason,
58
+ )
59
+
60
+ __all__ = [
61
+ "ActionRequest",
62
+ "ActionRequestBuilder",
63
+ "ActionTarget",
64
+ "ApprovalExpired",
65
+ "ApprovalRecord",
66
+ "ApprovalRequired",
67
+ "ApprovalScopeMismatch",
68
+ "ApprovalStatus",
69
+ "ApprovalTransport",
70
+ "AsyncAuthorizationClient",
71
+ "AsyncApprovalTransport",
72
+ "AsyncCredentialProvider",
73
+ "AuthenticationFailed",
74
+ "AuthorizationClient",
75
+ "AuthorizationDecision",
76
+ "AuthorizationUnavailable",
77
+ "CompletionState",
78
+ "Credential",
79
+ "CredentialAcquisitionCancelled",
80
+ "CredentialUnavailable",
81
+ "CredentialRevoked",
82
+ "DecisionOutcome",
83
+ "EphemeralKeyStore",
84
+ "IdempotencyConflict",
85
+ "InvalidDecision",
86
+ "InvalidCredentialDeadline",
87
+ "InvalidKeyIdentifier",
88
+ "InvalidKeyMaterial",
89
+ "InvalidRequest",
90
+ "KeyNotFound",
91
+ "KeyStore",
92
+ "KeyStoreClosed",
93
+ "KeyStoreCorrupt",
94
+ "KeyStoreError",
95
+ "KeyStoreUnavailable",
96
+ "MissingIdentity",
97
+ "ModelValidationError",
98
+ "PaloNexusError",
99
+ "PolicyDenied",
100
+ "Redactor",
101
+ "RetryDecision",
102
+ "RetryFailure",
103
+ "RetryPolicy",
104
+ "RetryPolicyError",
105
+ "RetryReason",
106
+ "SyncCredentialProvider",
107
+ "TaskContext",
108
+ "UnsupportedProtocol",
109
+ "atask",
110
+ "task",
111
+ ]