Core - Beliefs
What beliefs are in the Deva Core, how to set one, and the full list of available beliefs.
What a belief is
A belief records the outlook a Deva is working under while it does a piece of work, such as vedic, american, or other. Each time you set one, the Core records it and broadcasts a devacore:belief event. Actions say what is being done, states say what condition it is in, intents say why, and beliefs say from which frame of reference. Together they give a full record of an operation.
How to use it
this.belief(<belief>, <emit_value>)
<belief>is a key from the list below, such as'vedic'or'american'.<emit_value>is optional extra text added to the record. Use it to say what the belief applies to, such as an id.
this.belief('vedic', `init:${data.id.uid}`); // the Core sets this during init
What happens when you call it
- The Core checks that the Deva is active. If it is not, it returns the offline message.
- If the belief name is not in the list below, the call is ignored without an error. Check the spelling against the list.
- Otherwise the Core sets the current belief and builds a record with a unique id, the belief key, the label plus your extra text, the agent, the client, and a timestamp.
- The record is hashed with md5, sha256 and sha512, emitted as
devacore:belief, and returned to you.
Available beliefs
There are 3 beliefs.
-
vedic: ποΈ Vedic
-
american: πΊπΈ American
-
other: π€ Other