nexus-a2a-sdk 0.5.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 (50) hide show
  1. nexus_a2a_sdk-0.5.0/LICENSE +134 -0
  2. nexus_a2a_sdk-0.5.0/NOTICE +33 -0
  3. nexus_a2a_sdk-0.5.0/PKG-INFO +109 -0
  4. nexus_a2a_sdk-0.5.0/README.md +402 -0
  5. nexus_a2a_sdk-0.5.0/pyproject.toml +118 -0
  6. nexus_a2a_sdk-0.5.0/sdk/python/README.md +59 -0
  7. nexus_a2a_sdk-0.5.0/sdk/python/nexus_a2a_sdk.egg-info/PKG-INFO +109 -0
  8. nexus_a2a_sdk-0.5.0/sdk/python/nexus_a2a_sdk.egg-info/SOURCES.txt +48 -0
  9. nexus_a2a_sdk-0.5.0/sdk/python/nexus_a2a_sdk.egg-info/dependency_links.txt +1 -0
  10. nexus_a2a_sdk-0.5.0/sdk/python/nexus_a2a_sdk.egg-info/requires.txt +24 -0
  11. nexus_a2a_sdk-0.5.0/sdk/python/nexus_a2a_sdk.egg-info/top_level.txt +1 -0
  12. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/__init__.py +109 -0
  13. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/agbom.py +412 -0
  14. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/bridges/__init__.py +490 -0
  15. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/cael.py +345 -0
  16. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/guardian.py +716 -0
  17. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/memory.py +399 -0
  18. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/otel.py +394 -0
  19. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/__init__.py +342 -0
  20. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/adapters.py +596 -0
  21. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/ap2.py +322 -0
  22. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/ap4m.py +314 -0
  23. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/attestation.py +87 -0
  24. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/authority.py +552 -0
  25. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/broker.py +222 -0
  26. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/conformance.py +277 -0
  27. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/coordinator.py +288 -0
  28. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/deployment_readiness.py +490 -0
  29. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/evidence.py +382 -0
  30. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/execution_plane.py +270 -0
  31. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/firewall.py +398 -0
  32. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/gateway.py +703 -0
  33. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/human_intent.py +239 -0
  34. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/key_guardian.py +454 -0
  35. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/kyaos.py +298 -0
  36. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/mandate.py +403 -0
  37. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/objects.py +811 -0
  38. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/opa_input.py +173 -0
  39. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/policy_authority.py +171 -0
  40. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/policy_parity.py +320 -0
  41. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/reconciliation.py +302 -0
  42. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/runtime_verifier.py +151 -0
  43. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/sandbox_readiness.py +299 -0
  44. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/settlement_truth.py +221 -0
  45. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/sqlite_state.py +641 -0
  46. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/tap.py +244 -0
  47. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/user_control.py +51 -0
  48. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/payments/x402_variable.py +217 -0
  49. nexus_a2a_sdk-0.5.0/sdk/python/nexus_sdk/py.typed +0 -0
  50. nexus_a2a_sdk-0.5.0/setup.cfg +4 -0
@@ -0,0 +1,134 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other transformations
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner.
50
+
51
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
52
+ whom a Contribution has been received by the Licensor and included
53
+ within the Work.
54
+
55
+ 2. Grant of Copyright License. Subject to the terms and conditions of
56
+ this License, each Contributor hereby grants to You a perpetual,
57
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
58
+ copyright license to reproduce, prepare Derivative Works of,
59
+ publicly display, publicly perform, sublicense, and distribute the
60
+ Work and such Derivative Works in Source or Object form.
61
+
62
+ 3. Grant of Patent License. Subject to the terms and conditions of
63
+ this License, each Contributor hereby grants to You a perpetual,
64
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
65
+ (except as stated in this section) patent license to make, have made,
66
+ use, offer to sell, sell, import, and otherwise transfer the Work.
67
+
68
+ 4. Redistribution. You may reproduce and distribute copies of the
69
+ Work or Derivative Works thereof in any medium, with or without
70
+ modifications, and in Source or Object form, provided that You
71
+ meet the following conditions:
72
+
73
+ (a) You must give any other recipients of the Work or Derivative
74
+ Works a copy of this License; and
75
+
76
+ (b) You must cause any modified files to carry prominent notices
77
+ stating that You changed the files; and
78
+
79
+ (c) You must retain, in the Source form of any Derivative Works
80
+ that You distribute, all copyright, patent, trademark, and
81
+ attribution notices from the Source form of the Work; and
82
+
83
+ (d) If the Work includes a "NOTICE" text file, you must include a
84
+ readable copy of the attribution notices contained within such
85
+ NOTICE file.
86
+
87
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
88
+ any Contribution intentionally submitted for inclusion in the Work
89
+ shall be under the terms and conditions of this License, without
90
+ any additional terms or conditions.
91
+
92
+ 6. Trademarks. This License does not grant permission to use the trade
93
+ names, trademarks, service marks, or product names of the Licensor.
94
+
95
+ 7. Disclaimer of Warranty. Unless required by applicable law or
96
+ agreed to in writing, Licensor provides the Work on an "AS IS"
97
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
98
+ or implied, including, without limitation, any warranties or
99
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS
100
+ FOR A PARTICULAR PURPOSE. You are solely responsible for determining
101
+ the appropriateness of using or reproducing the Work.
102
+
103
+ 8. Limitation of Liability. In no event and under no legal theory,
104
+ whether in tort (including negligence), contract, or otherwise,
105
+ unless required by applicable law (such as deliberate and grossly
106
+ negligent acts) or agreed to in writing, shall any Contributor be
107
+ liable to You for damages, including any direct, indirect, special,
108
+ incidental, or exemplary damages of any character arising as a
109
+ result of this License or out of the use or inability to use the
110
+ Work (even if such Contributor has been advised of the possibility
111
+ of such damages).
112
+
113
+ 9. Accepting Warranty or Additional Liability. While redistributing
114
+ the Work or Derivative Works thereof, You may offer, and charge a
115
+ fee for, acceptance of support, warranty, indemnity, or other
116
+ liability obligations consistent with this License. However, in
117
+ accepting such obligations, You may offer such obligations only
118
+ on Your own behalf and on Your sole responsibility.
119
+
120
+ END OF TERMS AND CONDITIONS
121
+
122
+ Copyright 2026 Cyber Strategy Institute
123
+
124
+ Licensed under the Apache License, Version 2.0 (the "License");
125
+ you may not use this file except in compliance with the License.
126
+ You may obtain a copy of the License at
127
+
128
+ http://www.apache.org/licenses/LICENSE-2.0
129
+
130
+ Unless required by applicable law or agreed to in writing, software
131
+ distributed under the License is distributed on an "AS IS" BASIS,
132
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
133
+ See the License for the specific language governing permissions and
134
+ limitations under the License.
@@ -0,0 +1,33 @@
1
+ NEXUS-A2A
2
+ Copyright 2026 Cyber Strategy Institute
3
+
4
+ This product includes software developed by Cyber Strategy Institute
5
+ (https://cyberstrategyinstitute.com).
6
+
7
+ ---
8
+
9
+ Licensed under the Apache License, Version 2.0 (the "License").
10
+ You may not use this software except in compliance with the License.
11
+ You may obtain a copy of the License at:
12
+
13
+ http://www.apache.org/licenses/LICENSE-2.0
14
+
15
+ ---
16
+
17
+ NEXUS-A2A incorporates design patterns from or is intended to interoperate with:
18
+
19
+ - SPIFFE/SPIRE (Apache 2.0) -- https://github.com/spiffe/spire
20
+ - Open Policy Agent (Apache 2.0) -- https://github.com/open-policy-agent/opa
21
+ - OpenTelemetry (Apache 2.0) -- https://github.com/open-telemetry
22
+ - CycloneDX (Apache 2.0) -- https://cyclonedx.org
23
+ - W3C Decentralized Identifiers (W3C Document License) -- https://www.w3.org/TR/did-core/
24
+ - OWASP Agentic AI Security Top 10 -- https://owasp.org
25
+
26
+ NEXUS-A2A complies with and maps to the following standards and frameworks.
27
+ No rights in those standards are granted by this license:
28
+
29
+ - NIST AI Risk Management Framework (AI RMF)
30
+ - ISO/IEC 42001:2023
31
+ - EU AI Act
32
+ - NIST FIPS 203 (ML-KEM) and FIPS 204 (ML-DSA)
33
+ - OCSF (Open Cybersecurity Schema Framework)
@@ -0,0 +1,109 @@
1
+ Metadata-Version: 2.4
2
+ Name: nexus-a2a-sdk
3
+ Version: 0.5.0
4
+ Summary: NEXUS SDK: deterministic governance for agent, tool, and payment execution
5
+ Author-email: Cyber Strategy Institute <sdk@cyberstrategyinstitute.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/CyberStrategyInstitute/ai-safe2-framework/tree/main/NEXUS
8
+ Project-URL: Repository, https://github.com/CyberStrategyInstitute/ai-safe2-framework
9
+ Project-URL: Documentation, https://github.com/CyberStrategyInstitute/ai-safe2-framework/blob/main/NEXUS/README.md
10
+ Project-URL: Security Policy, https://github.com/CyberStrategyInstitute/ai-safe2-framework/blob/main/NEXUS/SECURITY.md
11
+ Project-URL: Issue Tracker, https://github.com/CyberStrategyInstitute/ai-safe2-framework/issues
12
+ Project-URL: Changelog, https://github.com/CyberStrategyInstitute/ai-safe2-framework/blob/main/NEXUS/CHANGELOG.md
13
+ Keywords: ai-agents,agent-security,agentic-ai,mcp,a2a,ai-governance,zero-trust,safe2,opa,spiffe,guardian,memory-vaccine,nexus
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Information Technology
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Security
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.10
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ License-File: NOTICE
30
+ Provides-Extra: embeddings
31
+ Requires-Dist: sentence-transformers>=2.7.0; extra == "embeddings"
32
+ Provides-Extra: opa
33
+ Requires-Dist: httpx>=0.27.0; extra == "opa"
34
+ Provides-Extra: otel
35
+ Requires-Dist: opentelemetry-api>=1.24.0; extra == "otel"
36
+ Requires-Dist: opentelemetry-sdk>=1.24.0; extra == "otel"
37
+ Requires-Dist: opentelemetry-exporter-otlp>=1.24.0; extra == "otel"
38
+ Provides-Extra: full
39
+ Requires-Dist: sentence-transformers>=2.7.0; extra == "full"
40
+ Requires-Dist: httpx>=0.27.0; extra == "full"
41
+ Requires-Dist: opentelemetry-api>=1.24.0; extra == "full"
42
+ Requires-Dist: opentelemetry-sdk>=1.24.0; extra == "full"
43
+ Requires-Dist: opentelemetry-exporter-otlp>=1.24.0; extra == "full"
44
+ Provides-Extra: dev
45
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
46
+ Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
47
+ Requires-Dist: ruff>=0.4.0; extra == "dev"
48
+ Requires-Dist: mypy>=1.10.0; extra == "dev"
49
+ Dynamic: license-file
50
+
51
+ # nexus-a2a-sdk
52
+
53
+ **NEXUS Python SDK**: deterministic governance for agent, tool, and payment execution.
54
+
55
+ [![Version](https://img.shields.io/pypi/v/nexus-a2a-sdk)](https://pypi.org/project/nexus-a2a-sdk/)
56
+ [![License](https://img.shields.io/pypi/l/nexus-a2a-sdk)](https://github.com/CyberStrategyInstitute/ai-safe2-framework/blob/main/NEXUS/LICENSE)
57
+ [![Python](https://img.shields.io/pypi/pyversions/nexus-a2a-sdk)](https://pypi.org/project/nexus-a2a-sdk/)
58
+
59
+ The Python SDK for [NEXUS](https://github.com/CyberStrategyInstitute/ai-safe2-framework/tree/main/NEXUS), an optional AI SAFE² reference implementation for governed agent actions.
60
+
61
+ ## Install
62
+
63
+ ```bash
64
+ pip install nexus-a2a-sdk
65
+
66
+ # Full production stack (embeddings + OPA client + OpenTelemetry)
67
+ pip install "nexus-a2a-sdk[full]"
68
+ ```
69
+
70
+ ## What's Included
71
+
72
+ | Module | What it does |
73
+ |:-------|:-------------|
74
+ | `nexus_sdk.cael` | CAEL envelope, APEM message types, JouleWork economic accounting |
75
+ | `nexus_sdk.memory` | Memory Vaccine: injection detection, drift scoring, provenance |
76
+ | `nexus_sdk.guardian` | Guardian Integration Profile: per-call argument inspection |
77
+ | `nexus_sdk.otel` | NOR output receipts, OpenTelemetry/OCSF audit export |
78
+ | `nexus_sdk.agbom` | Dynamic Agent Bill of Materials: real-time, hash-chained |
79
+ | `nexus_sdk.bridges` | Protocol bridges: MCP, ACS, A2A, LangChain, CrewAI, n8n, REST |
80
+ | `nexus_sdk.payments` | Sovereign Payment Gateway contracts, deterministic controls, evidence, and readiness gates |
81
+
82
+ ## Quick Example
83
+
84
+ ```python
85
+ from nexus_sdk.guardian import GuardianPolicy, NEXUSGuardianClient, build_tool_call_step
86
+
87
+ policy = GuardianPolicy(blocked_argument_patterns=["../"])
88
+ guardian = NEXUSGuardianClient(inline_policy=policy,
89
+ fail_mode=NEXUSGuardianClient.FAIL_CLOSED)
90
+
91
+ step = build_tool_call_step(
92
+ agent_did="did:nexus:agent:my-agent",
93
+ spiffe_id="spiffe://nexus.local/agent/my-agent",
94
+ tool_name="read_file",
95
+ tool_arguments={"path": "../../etc/passwd"},
96
+ act_tier=2,
97
+ )
98
+ verdict = guardian.evaluate(step)
99
+ print(verdict.decision) # deny
100
+ ```
101
+
102
+ ## Documentation
103
+
104
+ Full documentation, reference deployment, OPA policies, JSON schemas, and the IETF draft:
105
+ [github.com/CyberStrategyInstitute/ai-safe2-framework/NEXUS](https://github.com/CyberStrategyInstitute/ai-safe2-framework/tree/main/NEXUS)
106
+
107
+ ## License
108
+
109
+ Apache 2.0. See [LICENSE](https://github.com/CyberStrategyInstitute/ai-safe2-framework/blob/main/NEXUS/LICENSE).