Skip to main content

Intent-based discovery and communication protocol with TIBET provenance and built-in transport layer (UDP, LAN discovery, mesh relay).

Project description

tibet-ping

Intent-based discovery and communication protocol with TIBET provenance.

PyPI

ICMP ping is dumb: "are you there?" → "yes". No identity, no intent, no trust.

tibet-ping replaces this with a TIBET token as handshake. Every ping carries identity (JIS), intent, context, and purpose. Responses are trust-gated through Airlock zones.

How It Fits Together

tibet-core          tibet-ping           tibet-iot
(provenance)        (protocol)           (transport)
 Token, Chain  ───►  PingPacket    ───►  UDP, multicast
 Store, HMAC        Airlock, Trust       LAN discovery
 NetworkBridge      Vouching, Beacon     Mesh relay
  • tibet-core stores every action as an immutable token
  • tibet-ping defines the protocol — packets, trust zones, vouching (this package)
  • tibet-iot sends them over the wire — UDP, multicast discovery, mesh relay

Install

pip install tibet-ping

Quick Start

from tibet_ping import PingNode, PingDecision

# Create nodes
hub = PingNode("jis:home:hub")
sensor = PingNode("jis:home:sensor_temp")

# Hub trusts sensor
hub.set_trust("jis:home:sensor_temp", 0.9)

# Sensor pings hub
packet = sensor.ping(
    target="jis:home:hub",
    intent="temperature.report",
    purpose="Periodic temperature reading",
    payload={"celsius": 21.5},
)

# Hub receives and processes
response = hub.receive(packet)
assert response.decision == PingDecision.ACCEPT
assert response.airlock_zone == "GROEN"

Airlock Zones

Three-zone trust model. No configuration needed — just set trust scores.

Zone Trust Action
GROEN >= 0.7 Auto-allow
GEEL 0.3 - 0.7 Pending (rules or HITL)
ROOD < 0.3 Silent drop

ROOD doesn't reject — it stays silent. Unknown devices get no signal at all.

Features

PingPacket

TIBET-backed ping with identity, intent, context, purpose. Every field maps to TIBET provenance:

Packet field TIBET dimension
intent, purpose, payload ERIN (content)
source_did, target_did ERAAN (references)
routing_mode, hop_count, pod_id EROMHEEN (context)
purpose ERACHTER (intent)

NonceTracker

Replay protection with 30-second time window. Same nonce twice → rejected.

Vouching (HITL Scaling)

Trust 1 device manually, let it vouch for 50 more:

# Hub vouches for 50 sensors at once
hub.vouch(
    vouched_dids=["jis:home:s1", "jis:home:s2", ...],
    my_trust=0.9,
    vouch_factor=0.7,  # Vouched trust = 0.9 * 0.7 = 0.63 (GEEL)
)

Beacon Bootstrap

New device joins network without pre-shared secrets:

# New device broadcasts beacon (no secrets!)
beacon = new_device.broadcast_beacon(
    capabilities=["temperature"],
    device_type="sensor",
)

# Hub auto-vouches or escalates to HITL
response = hub.handle_beacon(beacon)

Topology

Network modeling with roles:

Role Description
Hub Central node, high trust
Hubby Backup hub, fails over
Pod Logical group of devices
Station Edge device, leaf node

CLI

# Ping a device
tibet-ping jis:home:sensor --intent temperature.read

# Short alias
tping jis:home:sensor --intent temperature.read

Sending Over the Network

tibet-ping is the protocol layer — it creates packets but doesn't send them. For actual UDP transport, LAN discovery, and mesh relay, use tibet-iot:

pip install tibet-iot
from tibet_iot import IoTNode

async def main():
    node = IoTNode("jis:home:hub")
    node.set_trust("jis:home:sensor", 0.9)
    await node.start()

    # Send a real ping over UDP
    response = await node.send_ping(
        target="jis:home:sensor",
        addr=("192.168.1.42", 7150),
        intent="temperature.read",
    )
    await node.stop()

Recording Provenance

Every ping can become an immutable audit token via tibet-core NetworkBridge:

from tibet_core import Provider, NetworkBridge

tibet = Provider(actor="jis:home:hub")
bridge = NetworkBridge(tibet)

# PingPacket → Token (automatic provenance mapping)
token = bridge.record_ping(packet, response)
assert token.verify()

License

MIT — Humotica

Links

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

tibet_ping-0.2.0.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tibet_ping-0.2.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file tibet_ping-0.2.0.tar.gz.

File metadata

  • Download URL: tibet_ping-0.2.0.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_ping-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1ab9519fce351421066210cb08168bc4e1227caceca10e97f11873d92cb4c9ae
MD5 0befaa2118c5d0337dba62fd446d3230
BLAKE2b-256 1e356f835927d973d044bef58ef847e54276ca6c3822c827b93a150300e7fd1b

See more details on using hashes here.

File details

Details for the file tibet_ping-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tibet_ping-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_ping-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0679c39f796056ece7e8f35b26a52e6ac12c6cf437e409016aac09889c5cf869
MD5 8a0893736e81852ea6e55bf24495dcfc
BLAKE2b-256 a438f07c8d5f2def63e3fdb1b27327b5b8d14d2bed9b09085faca9f6162bbc87

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page