Skip to content

HarnessContextComposedEvent

NexusLabs.Foundry.MicrosoftAgentFramework

NexusLabs.Foundry.MicrosoftAgentFramework.Progress

HarnessContextComposedEvent Class

The final bounded context for one provider call is composed and ready for dispatch. Emitted only on success — immediately after HarnessContextCompactionCompletedEvent for the same attempt, once execution-binding revalidation has also passed and the bounded messages are about to be handed to the real provider client — never emitted for a terminated attempt. Carries the exact same Diagnostics instance as the preceding HarnessContextCompactionCompletedEvent, so its final category attribution and FinalSequenceValid flag are inspectable at the ready-for-dispatch point without a second, independently-built snapshot.

public sealed record HarnessContextComposedEvent : NexusLabs.Foundry.MicrosoftAgentFramework.Progress.IProgressEvent, System.IEquatable<NexusLabs.Foundry.MicrosoftAgentFramework.Progress.HarnessContextComposedEvent>

Inheritance System.Object 🡒 HarnessContextComposedEvent

Implements IProgressEvent, System.IEquatable<HarnessContextComposedEvent>

Constructors

HarnessContextComposedEvent(DateTimeOffset, string, string, string, int, long, Guid, HarnessContextDiagnostics) Constructor

The final bounded context for one provider call is composed and ready for dispatch. Emitted only on success — immediately after HarnessContextCompactionCompletedEvent for the same attempt, once execution-binding revalidation has also passed and the bounded messages are about to be handed to the real provider client — never emitted for a terminated attempt. Carries the exact same Diagnostics instance as the preceding HarnessContextCompactionCompletedEvent, so its final category attribution and FinalSequenceValid flag are inspectable at the ready-for-dispatch point without a second, independently-built snapshot.

public HarnessContextComposedEvent(System.DateTimeOffset Timestamp, string WorkflowId, string? AgentId, string? ParentAgentId, int Depth, long SequenceNumber, System.Guid AssemblyId, NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextDiagnostics Diagnostics);

Parameters

Timestamp System.DateTimeOffset

When the context was composed and ready for dispatch.

WorkflowId System.String

Top-level workflow correlation ID.

AgentId System.String

Which agent emitted this event, or null for workflow-level events.

ParentAgentId System.String

Parent agent ID for sub-agent runs, enabling tree reconstruction.

Depth System.Int32

Nesting depth: 0 = workflow, 1 = agent, 2 = sub-agent, etc.

SequenceNumber System.Int64

Globally ordered sequence number for event ordering.

AssemblyId System.Guid

The identical opaque per-assembly correlation ID carried by both the HarnessContextCompactionStartedEvent and the preceding HarnessContextCompactionCompletedEvent for this same attempt, so this Composed event remains pairable with the rest of its lifecycle even when other concurrently-running assemblies on the same agent interleave their own events' SequenceNumbers in between.

Diagnostics HarnessContextDiagnostics

The privacy-safe, structured evidence for this decision, identical to the instance carried by the preceding HarnessContextCompactionCompletedEvent for the same attempt.

Properties

HarnessContextComposedEvent.AgentId Property

Which agent emitted this event, or null for workflow-level events.

public string? AgentId { get; init; }

Implements AgentId

Property Value

System.String

HarnessContextComposedEvent.AssemblyId Property

The identical opaque per-assembly correlation ID carried by both the HarnessContextCompactionStartedEvent and the preceding HarnessContextCompactionCompletedEvent for this same attempt, so this Composed event remains pairable with the rest of its lifecycle even when other concurrently-running assemblies on the same agent interleave their own events' SequenceNumbers in between.

public System.Guid AssemblyId { get; init; }

Property Value

System.Guid

HarnessContextComposedEvent.Depth Property

Nesting depth: 0 = workflow, 1 = agent, 2 = sub-agent, etc.

public int Depth { get; init; }

Implements Depth

Property Value

System.Int32

HarnessContextComposedEvent.Diagnostics Property

The privacy-safe, structured evidence for this decision, identical to the instance carried by the preceding HarnessContextCompactionCompletedEvent for the same attempt.

public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextDiagnostics Diagnostics { get; init; }

Property Value

HarnessContextDiagnostics

HarnessContextComposedEvent.ParentAgentId Property

Parent agent ID for sub-agent runs, enabling tree reconstruction.

public string? ParentAgentId { get; init; }

Implements ParentAgentId

Property Value

System.String

HarnessContextComposedEvent.SequenceNumber Property

Globally ordered sequence number for event ordering.

public long SequenceNumber { get; init; }

Implements SequenceNumber

Property Value

System.Int64

HarnessContextComposedEvent.Timestamp Property

When the context was composed and ready for dispatch.

public System.DateTimeOffset Timestamp { get; init; }

Implements Timestamp

Property Value

System.DateTimeOffset

HarnessContextComposedEvent.WorkflowId Property

Top-level workflow correlation ID.

public string WorkflowId { get; init; }

Implements WorkflowId

Property Value

System.String