mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-26 12:53:59 +02:00
feat: add ask_user support to sidecar
Implement the Copilot SDK user input round-trip in the backend: - add user-input-requested and resolve-user-input protocol DTOs - add a CopilotUserInputCoordinator that mirrors approval flow with pending TaskCompletionSource state and explicit resolution - wire SessionConfig.OnUserInputRequest through CopilotAgentBundle and CopilotWorkflowRunner - extend SidecarProtocolHost to emit user input events, accept resolve-user-input commands, and filter ask_user from runtime approval tools - add regression tests for the new coordinator and protocol flow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -177,6 +177,13 @@ public sealed class ResolveApprovalCommandDto : SidecarCommandEnvelope
|
||||
public string Decision { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class ResolveUserInputCommandDto : SidecarCommandEnvelope
|
||||
{
|
||||
public string UserInputId { get; init; } = string.Empty;
|
||||
public string Answer { get; init; } = string.Empty;
|
||||
public bool WasFreeform { get; init; }
|
||||
}
|
||||
|
||||
public sealed class RunTurnToolingConfigDto
|
||||
{
|
||||
public IReadOnlyList<RunTurnMcpServerConfigDto> McpServers { get; init; } = [];
|
||||
@@ -290,6 +297,17 @@ public sealed class ApprovalRequestedEventDto : SidecarEventDto
|
||||
public PermissionDetailDto? PermissionDetail { get; init; }
|
||||
}
|
||||
|
||||
public sealed class UserInputRequestedEventDto : SidecarEventDto
|
||||
{
|
||||
public string SessionId { get; init; } = string.Empty;
|
||||
public string UserInputId { get; init; } = string.Empty;
|
||||
public string? AgentId { get; init; }
|
||||
public string? AgentName { get; init; }
|
||||
public string Question { get; init; } = string.Empty;
|
||||
public IReadOnlyList<string>? Choices { get; init; }
|
||||
public bool? AllowFreeform { get; init; }
|
||||
}
|
||||
|
||||
public sealed class CommandErrorEventDto : SidecarEventDto
|
||||
{
|
||||
public string Message { get; init; } = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user