NRP — Node Reach Protocol. AAP for the physical world.
Project description
NRP — Node Reach Protocol
AAP for the physical world.
pip install nrprotocol
NRP implements the AAP spec for physical nodes — robots, IoT sensors, industrial machines, drones, vehicles. 4 methods. Any device.
from nrp import NRPDriver, NRPNode, NRPManifest, NRPAddress, ShieldRule, ShieldOperator
class RobotArm(NRPDriver):
def manifest(self):
return NRPManifest(
address=NRPAddress.parse("nrp://factory-3/robot/arm-7"),
description="6-DOF robot arm",
version="1.0.0",
)
def observe(self): return {"x_mm": 142, "force_n": 0}
def act(self, action, params): return {"ok": True}
def shield_rules(self):
return [
ShieldRule("force_n", ShieldOperator.MAX, max_value=50.0), # structural limit
ShieldRule("z_mm", ShieldOperator.MIN, min_value=0.0), # no floor collision
]
node = NRPNode(RobotArm())
node.execute("grip", {"force_n": 80}) # ShieldViolation: 80N > 50N
node.execute("grip", {"force_n": 25}) # OK — recorded in audit chain
Physical World Rule
Level 4 (Autonomous) is forbidden by AAP spec for physical nodes. NRP enforces this at the driver level. Not configurable. Not overridable. Returns AAP-003.
Address format
nrp://factory-3/robot/arm-7
nrp://farm/sensor/soil-north
nrp://fleet/vehicle/truck-42
nrp://hospital/device/infusion-3
AAP Spec · Halyn · nrprotocol.dev
License: MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nrprotocol-1.0.1.tar.gz.
File metadata
- Download URL: nrprotocol-1.0.1.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f59f46c49716b8cc69e397dfd4887e04104f294d6cdfe6e9a4461b4e73d75c6e
|
|
| MD5 |
fe4f8f537961942b64eb1ca628e908b7
|
|
| BLAKE2b-256 |
818162c414a0c857dbbf4d194dda34e719dfbf2531304f887f162864d08ded9f
|
File details
Details for the file nrprotocol-1.0.1-py3-none-any.whl.
File metadata
- Download URL: nrprotocol-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d3c243f53755b373c2ea1e0fd9529fcfe9b39cf031320c7910c3823a9c647cd
|
|
| MD5 |
002900c4082b5bdd6d144a0490d5bac7
|
|
| BLAKE2b-256 |
29a0b5da671d8ffabeb1a4be673c72a62c3c00d9c9f1cd92f399d4f5e72186bd
|