HarnessContextCompactionCompletedEvent
NexusLabs.Foundry.MicrosoftAgentFramework¶
NexusLabs.Foundry.MicrosoftAgentFramework.Progress¶
HarnessContextCompactionCompletedEvent Class¶
One hybrid context compaction/assembly attempt completed successfully — Diagnostics's
outcome is WithinLimit, Reduced, or PreservationFallback. Emitted at most once
per assembly attempt that reached the started state, as one of exactly two mutually exclusive
terminal events alongside HarnessContextCompactionTerminatedEvent — never both for
the same attempt. Never emitted for an attempt whose classifier or snapshot-construction phase
threw before the HarnessContextCompactionStartedEvent was emitted. Emitted
immediately once the decision is known, before the outer execution-binding revalidation that
precedes dispatch, so an already-successful compaction decision remains observable even if that
later revalidation itself fails.
public sealed record HarnessContextCompactionCompletedEvent : NexusLabs.Foundry.MicrosoftAgentFramework.Progress.IProgressEvent, System.IEquatable<NexusLabs.Foundry.MicrosoftAgentFramework.Progress.HarnessContextCompactionCompletedEvent>
Inheritance System.Object 🡒 HarnessContextCompactionCompletedEvent
Implements IProgressEvent, System.IEquatable<HarnessContextCompactionCompletedEvent>
Constructors¶
HarnessContextCompactionCompletedEvent(DateTimeOffset, string, string, string, int, long, Guid, HarnessContextDiagnostics) Constructor¶
One hybrid context compaction/assembly attempt completed successfully — Diagnostics's
outcome is WithinLimit, Reduced, or PreservationFallback. Emitted at most once
per assembly attempt that reached the started state, as one of exactly two mutually exclusive
terminal events alongside HarnessContextCompactionTerminatedEvent — never both for
the same attempt. Never emitted for an attempt whose classifier or snapshot-construction phase
threw before the HarnessContextCompactionStartedEvent was emitted. Emitted
immediately once the decision is known, before the outer execution-binding revalidation that
precedes dispatch, so an already-successful compaction decision remains observable even if that
later revalidation itself fails.
public HarnessContextCompactionCompletedEvent(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 decision was reached.
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 the preceding HarnessContextCompactionStartedEvent for this same attempt (and, subsequently, by HarnessContextComposedEvent), so this Completed event is pairable with its Started event 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. The identical instance is also carried by HarnessContextComposedEvent when this same attempt subsequently reaches dispatch.
Properties¶
HarnessContextCompactionCompletedEvent.AgentId Property¶
Which agent emitted this event, or null for workflow-level events.
Implements AgentId
Property Value¶
HarnessContextCompactionCompletedEvent.AssemblyId Property¶
The identical opaque per-assembly correlation ID carried by the preceding HarnessContextCompactionStartedEvent for this same attempt (and, subsequently, by HarnessContextComposedEvent), so this Completed event is pairable with its Started event even when other concurrently-running assemblies on the same agent interleave their own events' SequenceNumbers in between.
Property Value¶
HarnessContextCompactionCompletedEvent.Depth Property¶
Nesting depth: 0 = workflow, 1 = agent, 2 = sub-agent, etc.
Implements Depth
Property Value¶
HarnessContextCompactionCompletedEvent.Diagnostics Property¶
The privacy-safe, structured evidence for this decision. The identical instance is also carried by HarnessContextComposedEvent when this same attempt subsequently reaches dispatch.
public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextDiagnostics Diagnostics { get; init; }
Property Value¶
HarnessContextCompactionCompletedEvent.ParentAgentId Property¶
Parent agent ID for sub-agent runs, enabling tree reconstruction.
Implements ParentAgentId
Property Value¶
HarnessContextCompactionCompletedEvent.SequenceNumber Property¶
Globally ordered sequence number for event ordering.
Implements SequenceNumber
Property Value¶
HarnessContextCompactionCompletedEvent.Timestamp Property¶
When the decision was reached.
Implements Timestamp
Property Value¶
HarnessContextCompactionCompletedEvent.WorkflowId Property¶
Top-level workflow correlation ID.
Implements WorkflowId