Skip to content

IProgressReporterAccessor

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework.Progress

IProgressReporterAccessor Interface

Provides ambient access to the IProgressReporter for the current async flow. Follows the IHttpContextAccessor pattern — backed by System.Threading.AsyncLocal<> so concurrent orchestrations see their own reporters.

public interface IProgressReporterAccessor

Remarks

Orchestrators set the reporter via BeginScope(IProgressReporter) before running a workflow. Middleware (chat client, function calling) reads Current to emit events in real-time without needing the reporter passed as a parameter.

Properties

IProgressReporterAccessor.Current Property

Gets the progress reporter for the current async flow, or NexusLabs.Needlr.AgentFramework.Progress.NullProgressReporter.Instance if no scope is active.

NexusLabs.Needlr.AgentFramework.Progress.IProgressReporter Current { get; }

Property Value

IProgressReporter

Methods

IProgressReporterAccessor.BeginScope(IProgressReporter) Method

Sets the progress reporter for the current async flow. Disposing the returned handle restores the previous reporter.

System.IDisposable BeginScope(NexusLabs.Needlr.AgentFramework.Progress.IProgressReporter reporter);

Parameters

reporter IProgressReporter

Returns

System.IDisposable