mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
32e7ff00b5
* 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
45 lines
1.8 KiB
C#
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; }
|
|
}
|