PulseContext class Advanced Advanced · Pulse Context

Represents the Causal Identity and ontological Provenance of a Pulse.

PulseContext serves as the telemetric anchor for a stimulus, tracking its historical lineage, reasoning justification, and priority as it propagates through the Switching Fabric.

When to use

How it works

  • PulseContext extends ContextBase, so it supports prototype inheritance via a parent chain.
  • It stores its dimensions in a memory‑efficient record, using the Provenance enum as keys.
  • Some dimensions are static (immutable), others are evolvable.
  • The evolve method creates a refined context, useful when a pulse passes through multiple processing stages.

Non‑obvious

  • The context is immutable – all changes create a new instance.
  • The traceId is auto‑generated if not provided, ensuring uniqueness.
  • The parentTraceId is automatically linked when you evolve a context from an existing one.
  • The integrity dimension is computed automatically by the framework and is not something you set manually.
  • The context is not the pulse – it's a separate metadata container that travels with the pulse.

Example: Creating a User Action Context

final context = PulseContext.userAction(
  actor: 'admin_01',
  reason: 'Manual price update',
  priority: 80,
);
final pulse = Pulse.governed<int>(payload: 100, context: context);

See also:

Inheritance

Constructors

PulseContext({Context? baseContext, String? actor, String? reason, String? purpose, ReasoningStrategy? strategy, double? confidence, int? priority, String? compliance, Sensitivity? sensitivity, AuditLevel? auditLevel, String? traceId, String? parentTraceId, Map<String, dynamic>? others})
Syntheses a Signal Provenance environment from discrete telemetric parameters.
PulseContext.aiInference({required Context baseContext, required String actor, required String reason, required double confidence, String? purpose, int priority = 20})
Syntheses an Autonomous Inference Blueprint for signals originating from AI‑driven reasoning, pattern recognition, or optimisation tasks.
factory
PulseContext.collaboration({required Context baseContext, required String actor, required String targetAgent, required String task})
Syntheses a Collaboration & Delegation Blueprint for signals routed between different Managed Nodes or autonomous agents.
factory
PulseContext.complianceAudit({required Context baseContext, required String actor, required String framework, required String reason, int priority = 35})
Syntheses a Forensic Blueprint for signals generated by regulatory monitors, automated auditors, or integrity scanning daemons.
factory
PulseContext.fromEntries(Iterable<GovernanceEntry<Governance, dynamic>> entries, {Map<String, dynamic>? others, Context? parent})
Syntheses a Signal Provenance Environment from a collection of strongly‑typed telemetric entries.
PulseContext.homeostasis({required String actor, String? reason, PulseContext? baseContext, int priority = 10})
Creates a PulseContext specialised for System Maintenance and Metabolic Stability (e.g., garbage collection, heartbeat, topology rebalancing).
factory
PulseContext.hypothesis({required Context baseContext, required String actor, required String theory})
Syntheses an Exploratory Hypothesis Blueprint for "What‑If" simulations or non‑committal state projections.
factory
PulseContext.inference({required Context baseContext, required String actor, required String reason, required double confidence, String? purpose, int priority = 20})
Synthesizes an Autonomous Inference Blueprint for signals originating from AI-driven reasoning, pattern recognition, or optimization tasks.
factory
PulseContext.infrastructureChange({required Context baseContext, required String actor, required String reason})
Syntheses an Infrastructure Orchestration Blueprint for signals originating from topology refactoring, resource scaling, or graph pruning.
factory
PulseContext.instruction({required Context baseContext, required String humanActor, required String directive})
Syntheses a Manual Override Blueprint for signals originating from direct administrative commands or developer‑level interventions.
factory
PulseContext.regulated({required String actor, required String framework, String? reason, PulseContext? baseContext, Sensitivity sensitivity = Sensitivity.confidential})
Creates a PulseContext anchored to a specific Regulatory Framework (e.g., GDPR, HIPAA, SOC2).
factory
PulseContext.securityIntervention({required Context baseContext, required String actor, required String reason})
Syntheses a Threat Mitigation Blueprint for signals originating from high‑priority security lock‑downs or pre‑emptive shielding operations.
factory
PulseContext.selfCorrection({required Context baseContext, required String actor, required String reason, required String targetField, double confidence = 0.9})
Syntheses a Self‑Correction Blueprint for signals originating from automated recovery, error mitigation, or state‑repair logic.
factory
PulseContext.systemInternal({required Context baseContext, String? reason, String? purpose, int priority = 35})
Syntheses a Deterministic System Blueprint for signals originating from the framework's internal maintenance and homeostasis infrastructure.
factory
PulseContext.telemetry({required Context baseContext, required String actor, required String reason, String purpose = 'METRIC_COLLECTION', int priority = 10})
Syntheses a Telemetry & Observation Blueprint for high‑frequency signals that provide visibility without driving state mutation.
factory
PulseContext.userAction({required Context baseContext, required String actor, required String reason, String? purpose, int priority = 60, Sensitivity sensitivity = Sensitivity.public})
Syntheses a User‑Initiated Blueprint for signals originating from direct human interaction or external client‑side triggers.
factory

Properties

actor → String?
no setter
auditLevel → AuditLevel?
no setter
compliance → String?
The regulatory standards or compliance frameworks (e.g., GDPR, PCI-DSS) governing this context.
no setteroverride
confidence → double?
no setter
constraints → Map<String, dynamic>?
Operational guardrails and logic parameters governing resource usage and agent behavior.
no setterinherited
dataSources → String?
The origins of information (synthetic or organic) that this context is permitted to ingest.
no setterinherited
domains → String?
The primary high-level functional areas or business namespaces this context belongs to.
no setterinherited
hashCode → int
Generates a unique hash derived from the Ontological Footprint of the context.
no setterinherited
identity → String?
The unique instance name or specific label assigned to this context.
no setterinherited
integrity → String?
no setter
isNot → String?
Explicit prohibitions defining what this context is strictly forbidden from becoming or accessing.
no setterinherited
others → Map<String, dynamic>?
no setter
parentTraceId → String?
no setter
partOf → String?
The parent system module or container that this context represents a logical slice of.
no setterinherited
priority → int?
no setter
purpose → String?
no setter
reason → String?
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sensitivity → Sensitivity?
no setter
stakeholders → String?
The entities, users, or autonomous agents responsible for or impacted by this context's execution.
no setterinherited
strategy → ReasoningStrategy?
no setter
subDomains → String?
Granular subdivisions of the primary domains, used for precise scoping of authority.
no setterinherited
taxonomy → String?
The fundamental categorical identity or functional archetype of this context.
no setterinherited
topology → String?
The structural position or network role of this context within the organizational hierarchy.
no setterinherited
traceId → String?
no setter
type → String?
The categorical archetype or "Kind" of functional operation this context represents.
no setterinherited
version → String?
The schema or ontological version used to interpret the metadata within this context.
no setterinherited

Methods

evolve(covariant GovernanceEntry<Governance, dynamic>? resolver(Governance evolvable), {Map<String, dynamic>? others}) → PulseContext
Syntheses a Structural Signal Refinement of the current provenance, producing a specialised PulseContext.
override
lineage(covariant Ontology dimension) → List<String>
Traverses the hierarchical tree to produce a Causal Trace of a specific knowledge dimension associated with this context.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
Performs Identity Synthesis by comparing the structural convergence of two Somatic Signatures.
inherited
operator [](Governance dimension) → dynamic
Accesses a specific Governance Pillar or ontological dimension by its type-level marker, supporting the Flyweight Pattern and generic reasoning.
inherited

Constants

system → const _PulseContextSystem
Accessor for the Core System Blueprint, providing a set of pre‑defined telemetric templates for standard internal operations.