Relationship-Based Access Control (ReBAC) graph engine.
Wraps the C++ tw_rebac.hpp via Fine NIF. The graph is passed as a JSON
string (wire format: {"edges":[{"subject","object","rel"}],"definitions":{}}).
Relation expressions (RelExpr) are also JSON maps:
{"type":"base","rel":"OWNS"}
{"type":"union","a":{...},"b":{...}}
{"type":"intersection","a":{...},"b":{...}}
{"type":"difference","a":{...},"b":{...}}
{"type":"tuple_to_userset","pivot_rel":"IS_MEMBER_OF","inner":{...}}Valid relation names: HAS_CAPABILITY, CONTROLS, OWNS, IS_MEMBER_OF, DELEGATED_TO, SUPERVISOR_OF, PARTNER_OF, CAN_ENTER, CAN_INSTANCE.
Summary
Functions
Add a directed edge (subj)-[rel]->(obj) to the graph.
Check whether subj satisfies expr_json with respect to obj.
Convenience helper for a simple base relation check.
Expand rel → all subjects that hold rel to obj.
Return an empty graph JSON string.
Parse relation edges from a list of memory facts.
Functions
Add a directed edge (subj)-[rel]->(obj) to the graph.
Check whether subj satisfies expr_json with respect to obj.
fuel limits recursive expansion depth (default 8).
Returns true or false.
Convenience helper for a simple base relation check.
check_rel(graph, "alice", "OWNS", "resource_x")
Expand rel → all subjects that hold rel to obj.
Follows IS_MEMBER_OF transitive chains up to fuel hops.
Returns a list of subject strings.
Return an empty graph JSON string.
Parse relation edges from a list of memory facts.
facts_json is a JSON array of {content, trust_score?, ...} objects.
Sentences matching known verb phrases (owns, controls, delegates to, etc.)
become edges. Returns a graph JSON string.