libnode-side implementation of octomy::activity::ActivityContext. More...
| Header: | #include <NodeActivityContext> |
| Inherits: | octomy::activity::ActivityContext |
The concrete ActivityContext that NodeWindow constructs and hands to the ActivityLoader. Wraps a QSharedPointer<Node> and an ActivityStack pointer; activities reach the rest of the application by calling context()->facility("name") / context()->stack().
Phase J of the Activity Stack Policy (§AS-A-2) introduces this so activity subclasses can stop holding a typed QSharedPointer<Node> and stop calling configure(node). Once migrated, they take an ActivityContext pointer in their constructor and pull facilities by string key.
Each built-in facility forwards to the Node accessor of the same meaning. Without a Node, no built-in facility resolves.
"node": the Node itself, as a QSharedPointer<QObject>. A transition aid; prefer the typed entries below."session": the active HiveSession."settings": Settings (key/value persistence)."addressBook": AddressBook (associates registry)."keyStore": KeyStore (asymmetric crypto)."hiveRegistry": HiveRegistry."comms": Comms (transport layer)."sentientRegistry": SentientRegistry."sentientMetadataCache": SentientMetadataCache."directorateBook" and "planBook": the directives and plans stores (§ACM row 23)."batchQueue": batch::BatchQueue, the same name the standalone provider publishes (§SAA-1.3)."directorateService": DirectorateService (§ACM row 23)."troveSupervisor": TroveSupervisorService (§ACM row 30)."logStorage": the node's log storage."entropyAccumulator": the node's entropy accumulator."serialSessions": the serial session manager."nodeIdentity": NodeIdentity (§ACM D1, row 15)."reachableState": ReachableState."nodeAssociate": an octomy::pair::AssociateFacility bridge, not an Associate, because Associate is not a QObject (§ACF-6). The bridge has application lifetime and may be cached. The associate inside it may be replaced by an identity switch, so ask the bridge each time."llmManager": the node's LLM manager."discoveryClient": the node's discovery client."syntheticLoads": the always-on synthetic load service (§CU-S.1.5).A new entry is one forwarder line in facility().
The context is owned by NodeWindow (std::unique_ptr) and outlives every activity it hands out facilities to. Facilities returned by facility() have application lifetime; activities may cache the returned QSharedPointer<QObject> for as long as they live.
Tests and embedded scenarios can register ad-hoc facilities with registerFacility(name, object). A registered facility takes precedence over a built-in one of the same name, so a test can stub a production singleton that is hard to construct without subclassing NodeActivityContext.
See also Node, ActivityStack, NodeWindow, and octomy::activity::ActivityContext.