HarnessContextAttribution
NexusLabs.Foundry.MicrosoftAgentFramework¶
NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics¶
HarnessContextAttribution Class¶
Privacy-safe UTF-8 byte attribution for one artifact offload or rehydration decision: how many bytes were observed coming in, and how many artifact-derived bytes actually resulted from the decision. Always measured in UTF-8 bytes regardless of the operation, so an offload's "shrink to a reference" and a rehydration's "expand from a reference" are reported through the same two-number shape. Never carries the artifact body itself — only byte counts and, transitively via ReferenceId on the snapshot this attribution rides along with, a bounded reference identity. OutputUtf8Bytes is null for failure and recovery-required outcomes; the caller may still emit a separate bounded error string for those outcomes, but that string is not part of the artifact-derived output counted here.
public sealed record HarnessContextAttribution : System.IEquatable<NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextAttribution>
Inheritance System.Object 🡒 HarnessContextAttribution
Implements System.IEquatable<HarnessContextAttribution>
Properties¶
HarnessContextAttribution.InputUtf8Bytes Property¶
The UTF-8 byte size observed on input: for an offload, the serialized content's observed size; for a rehydration, the fixed size of the canonical reference identity being resolved.
Property Value¶
HarnessContextAttribution.Operation Property¶
Whether this attribution describes an offload decision or a rehydration decision.
public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessArtifactOperationCategory Operation { get; }
Property Value¶
HarnessArtifactOperationCategory
HarnessContextAttribution.OutputUtf8Bytes Property¶
The UTF-8 byte size of the artifact-derived output produced by this decision — the reference
identity's byte length when an artifact reference was written to or reused from context, or the
resolved body's byte length when a body was successfully rehydrated — or null
when this decision committed no artifact-derived output to context (for example, a failed or
recovery-required offload, or a non-Resolved rehydration outcome). This is the size of
the artifact reference or body specifically; the caller may still emit a bounded error or
status string for failure outcomes, but those are not part of the artifact-derived output and
are not counted here. Measured in UTF-8 bytes, consistent with InputUtf8Bytes.