nest-sdk 0.1.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.
- nest_sdk-0.1.0/.gitignore +10 -0
- nest_sdk-0.1.0/PKG-INFO +31 -0
- nest_sdk-0.1.0/README.md +13 -0
- nest_sdk-0.1.0/nest_sdk/__init__.py +120 -0
- nest_sdk-0.1.0/nest_sdk/py.typed +0 -0
- nest_sdk-0.1.0/pyproject.toml +31 -0
- nest_sdk-0.1.0/tests/test_imports.py +72 -0
nest_sdk-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nest-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: NEST SDK: public API for plugin authors
|
|
5
|
+
Project-URL: Homepage, https://github.com/mariagorskikh/nest
|
|
6
|
+
Project-URL: Repository, https://github.com/mariagorskikh/nest
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
13
|
+
Classifier: Topic :: Software Development :: Testing
|
|
14
|
+
Classifier: Typing :: Typed
|
|
15
|
+
Requires-Python: >=3.12
|
|
16
|
+
Requires-Dist: nest-core
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# nest-sdk
|
|
20
|
+
|
|
21
|
+
NEST SDK: public API for plugin authors
|
|
22
|
+
|
|
23
|
+
Part of [NEST](https://github.com/mariagorskikh/nest) (Network Environment for Swarm Testing), built at MIT Media Lab.
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install nest-sdk
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
See the [main repository](https://github.com/mariagorskikh/nest) for full documentation.
|
nest_sdk-0.1.0/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# nest-sdk
|
|
2
|
+
|
|
3
|
+
NEST SDK: public API for plugin authors
|
|
4
|
+
|
|
5
|
+
Part of [NEST](https://github.com/mariagorskikh/nest) (Network Environment for Swarm Testing), built at MIT Media Lab.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install nest-sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
See the [main repository](https://github.com/mariagorskikh/nest) for full documentation.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
"""NEST SDK: public API for plugin authors.
|
|
3
|
+
|
|
4
|
+
Plugin authors should import all layer interfaces and types from this package.
|
|
5
|
+
|
|
6
|
+
Example::
|
|
7
|
+
|
|
8
|
+
from nest_sdk import Payments, AgentId, Money, Transport
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
__version__ = "0.1.0"
|
|
12
|
+
|
|
13
|
+
# -- Layer interfaces -------------------------------------------------------
|
|
14
|
+
from nest_core.layers.auth import Auth as Auth
|
|
15
|
+
from nest_core.layers.comms import CommsProtocol as CommsProtocol
|
|
16
|
+
from nest_core.layers.coordination import Coordination as Coordination
|
|
17
|
+
from nest_core.layers.datafacts import DataFacts as DataFacts
|
|
18
|
+
from nest_core.layers.identity import Identity as Identity
|
|
19
|
+
from nest_core.layers.memory import Memory as Memory
|
|
20
|
+
from nest_core.layers.negotiation import Negotiation as Negotiation
|
|
21
|
+
from nest_core.layers.payments import Payments as Payments
|
|
22
|
+
from nest_core.layers.privacy import Privacy as Privacy
|
|
23
|
+
from nest_core.layers.registry import Registry as Registry
|
|
24
|
+
from nest_core.layers.transport import Transport as Transport
|
|
25
|
+
from nest_core.layers.trust import Trust as Trust
|
|
26
|
+
|
|
27
|
+
# -- Shared types ------------------------------------------------------------
|
|
28
|
+
from nest_core.types import AccessGrant as AccessGrant
|
|
29
|
+
from nest_core.types import AgentCard as AgentCard
|
|
30
|
+
from nest_core.types import AgentId as AgentId
|
|
31
|
+
from nest_core.types import AgentIdentity as AgentIdentity
|
|
32
|
+
from nest_core.types import Agreement as Agreement
|
|
33
|
+
from nest_core.types import Attestation as Attestation
|
|
34
|
+
from nest_core.types import AuthContext as AuthContext
|
|
35
|
+
from nest_core.types import Bid as Bid
|
|
36
|
+
from nest_core.types import Claim as Claim
|
|
37
|
+
from nest_core.types import CorrelationId as CorrelationId
|
|
38
|
+
from nest_core.types import DataFactsUrl as DataFactsUrl
|
|
39
|
+
from nest_core.types import DatasetMetadata as DatasetMetadata
|
|
40
|
+
from nest_core.types import Evidence as Evidence
|
|
41
|
+
from nest_core.types import Message as Message
|
|
42
|
+
from nest_core.types import MessageId as MessageId
|
|
43
|
+
from nest_core.types import Money as Money
|
|
44
|
+
from nest_core.types import NegotiationResponse as NegotiationResponse
|
|
45
|
+
from nest_core.types import NegotiationSession as NegotiationSession
|
|
46
|
+
from nest_core.types import NegotiationStatus as NegotiationStatus
|
|
47
|
+
from nest_core.types import Outcome as Outcome
|
|
48
|
+
from nest_core.types import PaymentRef as PaymentRef
|
|
49
|
+
from nest_core.types import PaymentStatus as PaymentStatus
|
|
50
|
+
from nest_core.types import Proof as Proof
|
|
51
|
+
from nest_core.types import Query as Query
|
|
52
|
+
from nest_core.types import Quote as Quote
|
|
53
|
+
from nest_core.types import Receipt as Receipt
|
|
54
|
+
from nest_core.types import ReputationScore as ReputationScore
|
|
55
|
+
from nest_core.types import Response as Response
|
|
56
|
+
from nest_core.types import Round as Round
|
|
57
|
+
from nest_core.types import ServiceRef as ServiceRef
|
|
58
|
+
from nest_core.types import Signature as Signature
|
|
59
|
+
from nest_core.types import Statement as Statement
|
|
60
|
+
from nest_core.types import Task as Task
|
|
61
|
+
from nest_core.types import Terms as Terms
|
|
62
|
+
from nest_core.types import Token as Token
|
|
63
|
+
from nest_core.types import TransportCapabilities as TransportCapabilities
|
|
64
|
+
from nest_core.types import Vote as Vote
|
|
65
|
+
from nest_core.types import Witness as Witness
|
|
66
|
+
|
|
67
|
+
__all__ = [
|
|
68
|
+
# Layer interfaces
|
|
69
|
+
"Auth",
|
|
70
|
+
"CommsProtocol",
|
|
71
|
+
"Coordination",
|
|
72
|
+
"DataFacts",
|
|
73
|
+
"Identity",
|
|
74
|
+
"Memory",
|
|
75
|
+
"Negotiation",
|
|
76
|
+
"Payments",
|
|
77
|
+
"Privacy",
|
|
78
|
+
"Registry",
|
|
79
|
+
"Transport",
|
|
80
|
+
"Trust",
|
|
81
|
+
# Types
|
|
82
|
+
"AccessGrant",
|
|
83
|
+
"AgentCard",
|
|
84
|
+
"AgentId",
|
|
85
|
+
"AgentIdentity",
|
|
86
|
+
"Agreement",
|
|
87
|
+
"Attestation",
|
|
88
|
+
"AuthContext",
|
|
89
|
+
"Bid",
|
|
90
|
+
"Claim",
|
|
91
|
+
"CorrelationId",
|
|
92
|
+
"DataFactsUrl",
|
|
93
|
+
"DatasetMetadata",
|
|
94
|
+
"Evidence",
|
|
95
|
+
"Message",
|
|
96
|
+
"MessageId",
|
|
97
|
+
"Money",
|
|
98
|
+
"NegotiationResponse",
|
|
99
|
+
"NegotiationSession",
|
|
100
|
+
"NegotiationStatus",
|
|
101
|
+
"Outcome",
|
|
102
|
+
"PaymentRef",
|
|
103
|
+
"PaymentStatus",
|
|
104
|
+
"Proof",
|
|
105
|
+
"Query",
|
|
106
|
+
"Quote",
|
|
107
|
+
"Receipt",
|
|
108
|
+
"ReputationScore",
|
|
109
|
+
"Response",
|
|
110
|
+
"Round",
|
|
111
|
+
"ServiceRef",
|
|
112
|
+
"Signature",
|
|
113
|
+
"Statement",
|
|
114
|
+
"Task",
|
|
115
|
+
"Terms",
|
|
116
|
+
"Token",
|
|
117
|
+
"TransportCapabilities",
|
|
118
|
+
"Vote",
|
|
119
|
+
"Witness",
|
|
120
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
[project]
|
|
3
|
+
name = "nest-sdk"
|
|
4
|
+
version = "0.1.0"
|
|
5
|
+
description = "NEST SDK: public API for plugin authors"
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
requires-python = ">=3.12"
|
|
8
|
+
license = "Apache-2.0"
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 3 - Alpha",
|
|
11
|
+
"License :: OSI Approved :: Apache Software License",
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"Programming Language :: Python :: 3.12",
|
|
14
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
15
|
+
"Topic :: Software Development :: Testing",
|
|
16
|
+
"Typing :: Typed",
|
|
17
|
+
]
|
|
18
|
+
dependencies = [
|
|
19
|
+
"nest-core",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.urls]
|
|
23
|
+
Homepage = "https://github.com/mariagorskikh/nest"
|
|
24
|
+
Repository = "https://github.com/mariagorskikh/nest"
|
|
25
|
+
|
|
26
|
+
[build-system]
|
|
27
|
+
requires = ["hatchling"]
|
|
28
|
+
build-backend = "hatchling.build"
|
|
29
|
+
|
|
30
|
+
[tool.hatch.build.targets.wheel]
|
|
31
|
+
packages = ["nest_sdk"]
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
"""Smoke tests: verify that nest-sdk re-exports all interfaces and types."""
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def test_nest_sdk_imports() -> None:
|
|
6
|
+
"""Importing nest_sdk should succeed and expose a version string."""
|
|
7
|
+
import nest_sdk
|
|
8
|
+
|
|
9
|
+
assert nest_sdk.__version__ == "0.1.0"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_sdk_exports_all_layers() -> None:
|
|
13
|
+
"""All 12 layer interfaces are importable from nest_sdk."""
|
|
14
|
+
from nest_sdk import (
|
|
15
|
+
Auth,
|
|
16
|
+
CommsProtocol,
|
|
17
|
+
Coordination,
|
|
18
|
+
DataFacts,
|
|
19
|
+
Identity,
|
|
20
|
+
Memory,
|
|
21
|
+
Negotiation,
|
|
22
|
+
Payments,
|
|
23
|
+
Privacy,
|
|
24
|
+
Registry,
|
|
25
|
+
Transport,
|
|
26
|
+
Trust,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
layers = [
|
|
30
|
+
Auth,
|
|
31
|
+
CommsProtocol,
|
|
32
|
+
Coordination,
|
|
33
|
+
DataFacts,
|
|
34
|
+
Identity,
|
|
35
|
+
Memory,
|
|
36
|
+
Negotiation,
|
|
37
|
+
Payments,
|
|
38
|
+
Privacy,
|
|
39
|
+
Registry,
|
|
40
|
+
Transport,
|
|
41
|
+
Trust,
|
|
42
|
+
]
|
|
43
|
+
assert len(layers) == 12
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def test_sdk_exports_core_types() -> None:
|
|
47
|
+
"""Core types are importable from nest_sdk."""
|
|
48
|
+
from nest_sdk import (
|
|
49
|
+
AgentCard,
|
|
50
|
+
AgentId,
|
|
51
|
+
Message,
|
|
52
|
+
Money,
|
|
53
|
+
PaymentRef,
|
|
54
|
+
Query,
|
|
55
|
+
Quote,
|
|
56
|
+
Receipt,
|
|
57
|
+
Task,
|
|
58
|
+
Token,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
agent = AgentId("test")
|
|
62
|
+
assert agent == "test"
|
|
63
|
+
assert Money(amount=10).currency == "credits"
|
|
64
|
+
# Just verify they're importable; not None
|
|
65
|
+
assert AgentCard is not None
|
|
66
|
+
assert Message is not None
|
|
67
|
+
assert PaymentRef is not None
|
|
68
|
+
assert Query is not None
|
|
69
|
+
assert Quote is not None
|
|
70
|
+
assert Receipt is not None
|
|
71
|
+
assert Task is not None
|
|
72
|
+
assert Token is not None
|