Skip to content

HarnessArtifactDiagnostics

NexusLabs.Foundry.MicrosoftAgentFramework

NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics

HarnessArtifactDiagnostics Class

Privacy-safe, structured evidence for one artifact offload or rehydration decision. Carries only categorical classifications, byte counts, and a bounded reference identity — never an artifact body, a serialized raw result, a workspace path, an owner user/orchestration/session identity, or a raw exception message. Every instance is produced by NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactDiagnostics.ForOffload(NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactOutcomeCategory,NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactContentCategory,NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactDecisionReason,System.Int32,System.Int32,System.String) or NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactDiagnostics.ForRehydration(NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactOutcomeCategory,NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactDecisionReason,System.Nullable{System.Int32},System.Int32,System.String), each of which only accepts the outcome and reason values valid for that operation, so a snapshot can never mix the two decisions' state machines.

public sealed record HarnessArtifactDiagnostics : System.IEquatable<NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactDiagnostics>

Inheritance System.Object 🡒 HarnessArtifactDiagnostics

Implements System.IEquatable<HarnessArtifactDiagnostics>

Remarks

The same instance attached to an internal offload outcome or rehydration result is also the instance carried by the corresponding progress event, so inspecting either surface observes identical data.

Properties

HarnessArtifactDiagnostics.Attribution Property

The privacy-safe UTF-8 byte attribution for this decision — how many bytes were observed coming in, and how many bytes actually became model/history-facing context as a result. The identical instance is also carried by the progress event and internal outcome/result this snapshot is attached to, since it rides along on this shared HarnessArtifactDiagnostics.

public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextAttribution Attribution { get; }

Property Value

HarnessContextAttribution

HarnessArtifactDiagnostics.ConfiguredThresholdOrBudget Property

The configured inline byte threshold (offload) or maximum byte budget (rehydration) this decision was evaluated against. Always known regardless of outcome, because it is a caller-supplied input rather than an observation.

public int ConfiguredThresholdOrBudget { get; }

Property Value

System.Int32

HarnessArtifactDiagnostics.Content Property

The kind of content the decision was made about.

public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactContentCategory Content { get; }

Property Value

HarnessArtifactContentCategory

HarnessArtifactDiagnostics.ObservedUtf8ByteSize Property

The UTF-8 byte size actually observed/measured for this decision, or null when no content was ever measured (for example a rehydration Missing or Unauthorized outcome, where the workspace was never — or could never be — read).

public System.Nullable<int> ObservedUtf8ByteSize { get; }

Property Value

System.Nullable<System.Int32>

HarnessArtifactDiagnostics.Operation Property

Whether this snapshot describes an offload decision or a rehydration decision.

public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactOperationCategory Operation { get; }

Property Value

HarnessArtifactOperationCategory

HarnessArtifactDiagnostics.Outcome Property

The explicit outcome of the decision.

public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactOutcomeCategory Outcome { get; }

Property Value

HarnessArtifactOutcomeCategory

HarnessArtifactDiagnostics.Reason Property

The stable, explicit reason category behind Outcome.

public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactDecisionReason Reason { get; }

Property Value

HarnessArtifactDecisionReason

HarnessArtifactDiagnostics.ReferenceId Property

The bounded, model/history-facing artifact reference identity (artifact://sha256/...) this decision concerns, when one is available. Always available for a rehydration decision (the reference being resolved is always known upfront). Only available for an offload decision whose outcome committed or reused a reference (Offloaded or ExistingReference); null for every other offload outcome.

public string? ReferenceId { get; }

Property Value

System.String