koi_net.components.knowledge_handlers.edge_negotiation_handler
Classes
|
- class koi_net.components.knowledge_handlers.edge_negotiation_handler.EdgeNegotiationHandler(log, pipeline, identity, cache, event_queue, kobj_queue)[source]
Bases:
KnowledgeHandler- Parameters:
log (Logger)
pipeline (KnowledgePipeline)
identity (NodeIdentity)
cache (Cache)
event_queue (EventQueue)
kobj_queue (KobjQueue)
- event_queue: EventQueue
- handle(kobj)[source]
Handles edge negotiation process.
Automatically approves proposed edges if they request RID types this node can provide (or KOI node, edge RIDs). Validates the edge type is allowed for the node type (partial nodes cannot use webhooks). If edge is invalid, a FORGET event is sent to the other node.
- Parameters:
kobj (KnowledgeObject)
- handler_type: HandlerType = 'bundle'
- identity: NodeIdentity
- rid_types: tuple[RIDType] = (<RIDType 'orn:koi-net.edge'>,)