mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
* feat: Implement Checkpointing API * refactor: Normalzie Namespaces and break out multi-class files * feat: Support checkpointing in AIAgentHostExecutor * test: Representation tests * feat: Add Step-level Tracing and WorkflowEvents * feat: Add Checkpointing Sample and Smoke Test * Fixes an issue where StateManager was not properly clearing the incoming queued updates. * Fixes order of checkpointing and in-step event publication * Adds import of RunContext state on LoadCheckpoint * Add re-firing of events for unserviced ExternalRequests on Checkpoint load * docs: Add documentation to publics * Also adds documentation to ICheckpointManager which may go public * refactor: Fix Union Aggregators and add Tests * fix: Fix issues raised in PR comments and remove dead code
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.Workflows;
|
|
|
|
/// <summary>
|
|
/// Debug information about the SuperStep that finished running.
|
|
/// </summary>
|
|
public sealed class SuperStepCompletionInfo(HashSet<string> activatedExecutors, HashSet<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; } = null;
|
|
}
|