Files
agent-framework/dotnet/src/Microsoft.Agents.AI.Workflows/SuperStepCompletionInfo.cs
T
Jacob Alber 32e7ff00b5 .NET: Add support for Subworkflows and many threading fixes (#1066)
* feat: Add support for Workflow-as-Executor

* Fixes routing of 'object' compile-typed variables to properly take in type information
* Fixes a concurrency issue in StepTracer

* fix: Make Subworkflow ExternalRequests work properly

* fix: Threading and Concurrency fixes; prep for OffThread Mode

* refactor: Remove dead code around OffStreamRunEventStream

Currently not used, and will be replaced with a rewrite when brought back, so having it in the change is not valuable.

* ci: Work around issues with dotnet-format not properly analyzing the source

* fix: Fix the logic of AsyncCoordinator and AsyncBarrier

* Prevent individual wait cancellations from canceling the entire barrier
* Propagate information about whether the wait was completed or cancelled, and whether any waiters were present when released

* fix: Remove superfluous acces to .Keys in InProcStepTracer

* refactor: Clean up AsyncCoordinator's use of AsyncBarrier
2025-10-03 17:26:30 +00:00

45 lines
1.8 KiB
C#

// Copyright (c) Microsoft. All rights reserved.
using System.Collections.Generic;
using Microsoft.Shared.Diagnostics;
namespace Microsoft.Agents.AI.Workflows;
/// <summary>
/// Debug information about the SuperStep that finished running.
/// </summary>
public sealed class SuperStepCompletionInfo(IEnumerable<string> activatedExecutors, IEnumerable<string>? instantiatedExecutors = null)
{
/// <summary>
/// The unique identifiers of <see cref="Executor"/> instances that processed messages during this SuperStep
/// </summary>
public HashSet<string> ActivatedExecutors { get; } = [.. Throw.IfNull(activatedExecutors)];
/// <summary>
/// The unique identifiers of <see cref="Executor"/> instances newly created during this SuperStep
/// </summary>
public HashSet<string> InstantiatedExecutors { get; } = [.. instantiatedExecutors ?? []];
/// <summary>
/// A flag indicating whether the managed state was written to during this SuperStep. If the run was started
/// with checkpointing, any updated during the checkpointing process are also included.
/// </summary>
public bool StateUpdated { get; init; }
/// <summary>
/// A flag indicating whether there are messages pending delivery after this SuperStep.
/// </summary>
public bool HasPendingMessages { get; init; }
/// <summary>
/// A flag indicating whether there are requests pending delivery after this SuperStep.
/// </summary>
public bool HasPendingRequests { get; init; }
/// <summary>
/// Gets the <see cref="CheckpointInfo"/> corresponding to the checkpoint created at the end of this SuperStep.
/// <see langword="null"/> if checkpointing was not enabled when the run was started.
/// </summary>
public CheckpointInfo? Checkpoint { get; init; }
}