PulseContext.collaboration constructor
PulseContext.collaboration({})
Syntheses a Collaboration & Delegation Blueprint for signals routed between different Managed Nodes or autonomous agents.
This factory facilitates the handover of operational intent between agents, ensuring that the Causal Trace explicitly documents the transfer of responsibility.
When to use
Use this when one agent decomposes a high‑level goal and delegates sub‑tasks to specialised residents.
How it works
- Sets
purposetoCOLLABORATIVE_TASK. - Sets
priorityto 60 (high, for coordination). - Sets
sensitivitytoprivate(inter‑agent metadata). - The
reasonincludes the target agent and task description.
Non‑obvious
- The
auditLevelisfullto track delegation chains. - The
strategyisdeterministic– delegation is a formal handoff.
Example
final context = PulseContext.collaboration(
baseContext: currentPulse.context,
actor: 'Orchestrator_Agent',
targetAgent: 'Database_Resident',
task: 'Fetch user transaction history (2023)',
);
Parameters:
baseContext: Ancestral Context for lineage.actor: The delegating agent.targetAgent: The agent receiving the mandate.task: Semantic description of the delegated responsibility.
Implementation
factory PulseContext.collaboration({
required Context baseContext,
required String actor,
required String targetAgent,
required String task,
}) {
return PulseContext.fromEntries([
// --- Static Pillars (Non-Evolvable Identity) ---
Provenance.actor.entry(actor),
Provenance.traceId.entry(Identity.next()),
if (baseContext is PulseContext)
Provenance.parentTraceId.entry(baseContext.traceId!),
Provenance.sensitivity.entry(Sensitivity.private),
// --- Fluid Boundaries (Evolvable Intent) ---
Provenance.strategy.entry(ReasoningStrategy.deterministic),
Provenance.confidence.entry(1.0),
Provenance.auditLevel.entry(AuditLevel.full),
Provenance.priority.entry(60),
Provenance.purpose.entry('COLLABORATIVE_TASK'),
Provenance.reason.entry('DELEGATION: Assigning $task to $targetAgent'),
]);
}