Files
agent-framework/dotnet/src/Microsoft.Agents.AI.Workflows/Execution/ISuperStepRunner.cs
T
Peter IbekweandGitHub 23921c0f6e .NET: Pass through external input request and handle response conversion for workflow as agent scenario (#4361)
* Handle external input request and response conversion for workflow as agent scenario

* Remove unnecessary test comment

* Fix PR comments

* Updated to fix edge cases, and add more tests.

* Update pending requests to use typed properties instead of relying on StateBag. replying to PR feedback.

* Fixed external response de-dup and updated possible brittle test.

* Address PR comments on sending turn token for normal messages and handle contentId collision by source agent

* Remove unnecessary serialization element and address pr comment on intercepted outgoing requests

* Updated MEAI changes for UserInput request and response abstractions.
2026-03-25 19:23:44 +00:00

35 lines
1.2 KiB
C#

// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Agents.AI.Workflows.Observability;
namespace Microsoft.Agents.AI.Workflows.Execution;
internal interface ISuperStepRunner
{
string SessionId { get; }
string StartExecutorId { get; }
WorkflowTelemetryContext TelemetryContext { get; }
bool HasUnservicedRequests { get; }
bool HasUnprocessedMessages { get; }
ValueTask EnqueueResponseAsync(ExternalResponse response, CancellationToken cancellationToken = default);
bool TryGetResponsePortExecutorId(string portId, out string? executorId);
ValueTask<bool> IsValidInputTypeAsync<T>(CancellationToken cancellationToken = default);
ValueTask<bool> EnqueueMessageAsync<T>(T message, CancellationToken cancellationToken = default);
ValueTask<bool> EnqueueMessageUntypedAsync(object message, Type declaredType, CancellationToken cancellationToken = default);
ConcurrentEventSink OutgoingEvents { get; }
ValueTask<bool> RunSuperStepAsync(CancellationToken cancellationToken);
// This cannot be cancelled
ValueTask RequestEndRunAsync();
}