API Reference
AgentWorkWatcher
Watches recent local work with incremental parsing and an independent, slower GitHub refresh.
Inheritance
- Object
- AgentWorkWatcher
Remarks
Owns its watchers and workers. Caller-supplied cache and GitHub service remain caller-owned. Use DisposeAsync to await shutdown. No provider clients, authentication or hooks are launched.
Constructors
public AgentWorkWatcher(IEnumerable<SourceRootRecord>? roots = null, AgentWorkOptions? options = null, Func<CancellationToken, Task<IReadOnlyList<AgentSessionState>>>? readMetadataAsync = null, GitHubDashboardService? github = null, String? gitHubLogin = null) #Creates a recent-work watcher. Null roots reuse telemetry discovery; an empty list watches nothing.
Parameters
- roots System.Collections.Generic.IEnumerable<IntelligenceX.Telemetry.Usage.SourceRootRecord>? = null
- Local or recovered telemetry roots.
- options IntelligenceX.Telemetry.Agents.AgentWorkOptions? = null
- Defaults to a two-day window and an in-memory incremental cache.
- readMetadataAsync System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<IntelligenceX.Telemetry.Agents.AgentSessionState>>>? = null
- Optional Desktop metadata callback, refreshed independently from local logs.
- github IntelligenceX.Telemetry.GitHub.GitHubDashboardService? = null
- Optional caller-owned GitHub service; network refreshes never block local collection.
- gitHubLogin System.String? = null
- Optional selected GitHub login.
Methods
public Void Dispose() #VoidRequests shutdown without blocking the caller. Use DisposeAsync when workers must be fully stopped.
public ValueTask DisposeAsync() #ValueTaskCancels outstanding work, releases filesystem handles and awaits all owned workers.
public Task StartAsync(CancellationToken cancellationToken = default) #TaskStarts observation and awaits the first local snapshot, without awaiting optional network or Desktop metadata.
Parameters
- cancellationToken System.Threading.CancellationToken = default
- Cancels startup; disposal stops the subsequent watcher lifetime.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public AgentWorkSnapshot CurrentSnapshot { get; } #Last immutable snapshot. Before StartAsync completes it is empty.
Events
public event EventHandler<AgentWorkSnapshotChangedEventArgs>? SnapshotChanged #Raised when sessions, attention, remote state or diagnostics change; capture times and scan counters alone do not raise it.