-
Notifications
You must be signed in to change notification settings - Fork 686
Python: .Net: Dotnet devui compatibility fixes #2026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
victordibia
wants to merge
37
commits into
microsoft:main
Choose a base branch
from
victordibia:dotnet-devui-compatibility-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+483
−159
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
cc70906
DevUI: Add OpenAI Responses API proxy support with enhanced UI features
victordibia bae374b
Merge remote-tracking branch 'origin/main' into devui_oai_responses
victordibia 6b4d188
update ui, settings modal and workflow input form, add register clean…
victordibia c6434b0
add workflow HIL support, user mode, other fixes
victordibia a4cc42a
Merge branch 'main' into devui_oai_responses
markwallace-microsoft 8cfbc1a
Merge branch 'main' into devui_oai_responses
markwallace-microsoft ea5a239
Merge branch 'main' into devui_oai_responses
victordibia c0efc00
Merge branch 'main' into devui_oai_responses
victordibia 55389da
feat(devui): add human-in-the-loop (HIL) support with dynamic respons…
victordibia 246af75
improve HIL support, improve workflow execution view
victordibia ee1f10e
Merge branch 'main' into devui_oai_responses
victordibia 512967b
ui updates
victordibia 53868a5
ui updates
victordibia 037ab69
Merge branch 'devui_oai_responses' of github.com:victordibia/agent-fr…
victordibia 695a99f
improve HIL for workflows, add auth and view modes
victordibia 41b7465
update workflow
victordibia 71e8699
Merge remote-tracking branch 'origin/main' into devui_oai_responses
victordibia 146cbad
Merge branch 'main' into devui_oai_responses
victordibia b2cc3c6
Merge remote-tracking branch 'origin/main' into devui_oai_responses
victordibia b86c8fe
security improvements , ui fixes
victordibia 39715db
Merge remote-tracking branch 'origin/main' into devui_oai_responses
victordibia 130a669
Merge branch 'devui_oai_responses' of github.com:victordibia/agent-fr…
victordibia 5cf185f
Merge branch 'main' into devui_oai_responses
victordibia bf5738c
Merge remote-tracking branch 'origin/main' into devui_oai_responses a…
victordibia a4bdd6b
fix mypy error
victordibia aecf480
update loading spinner in ui
victordibia 44a4488
Merge branch 'main' into devui_oai_responses
victordibia 05ccbce
DevUI: Serialize workflow input as string to maintain conformance wit…
ReubenBond 7dabc45
Phase 1: Add /meta endpoint and fix workflow event naming for .NET De…
victordibia 1c6aa07
Merge remote-tracking branch 'origin/main' into dotnet-devui-compatib…
victordibia bcc685c
Merge branch 'main' into fix/devui-wf-serialization
victordibia f0f5488
Merge branch 'pr-2021-workflow-fix' into dotnet-devui-compatibility-f…
victordibia 1514869
Merge remote-tracking branch 'origin/main' into dotnet-devui-compatib…
victordibia 9d5d015
additional fixes for .NET DevUI workflow visualization item ID tracking
victordibia dfec3f9
format fixes, remove cors tests
victordibia 12c65f6
Merge remote-tracking branch 'origin' into dotnet-devui-compatibility…
victordibia 451a9f2
remove unecessary attributes
victordibia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
dotnet/src/Microsoft.Agents.AI.DevUI/Entities/MetaResponse.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace Microsoft.Agents.AI.DevUI.Entities; | ||
|
|
||
| /// <summary> | ||
| /// Server metadata response for the /meta endpoint. | ||
| /// Provides information about the DevUI server configuration, capabilities, and requirements. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// This response is used by the frontend to: | ||
| /// - Determine the UI mode (developer vs user interface) | ||
| /// - Check server capabilities (tracing, OpenAI proxy support) | ||
| /// - Verify authentication requirements | ||
| /// - Display framework and version information | ||
| /// </remarks> | ||
| internal sealed record MetaResponse | ||
| { | ||
| /// <summary> | ||
| /// Gets the UI interface mode. | ||
| /// "developer" shows debug tools and advanced features, "user" shows a simplified interface. | ||
| /// </summary> | ||
| [JsonPropertyName("ui_mode")] | ||
| public string UiMode { get; init; } = "developer"; | ||
|
|
||
| /// <summary> | ||
| /// Gets the DevUI version string. | ||
| /// </summary> | ||
| [JsonPropertyName("version")] | ||
| public string Version { get; init; } = "0.1.0"; | ||
|
|
||
| /// <summary> | ||
| /// Gets the backend framework identifier. | ||
| /// Always "agent_framework" for Agent Framework implementations. | ||
| /// </summary> | ||
| [JsonPropertyName("framework")] | ||
| public string Framework { get; init; } = "agent_framework"; | ||
|
|
||
| /// <summary> | ||
| /// Gets the backend runtime/language. | ||
| /// "dotnet" for .NET implementations, "python" for Python implementations. | ||
| /// Used by frontend for deployment guides and feature availability. | ||
| /// </summary> | ||
| [JsonPropertyName("runtime")] | ||
| public string Runtime { get; init; } = "dotnet"; | ||
|
|
||
| /// <summary> | ||
| /// Gets the server capabilities dictionary. | ||
| /// Key-value pairs indicating which optional features are enabled. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Standard capability keys: | ||
| /// - "tracing": Whether trace events are emitted for debugging | ||
| /// - "openai_proxy": Whether the server can proxy requests to OpenAI | ||
| /// </remarks> | ||
| [JsonPropertyName("capabilities")] | ||
| public Dictionary<string, bool> Capabilities { get; init; } = new(); | ||
|
|
||
| /// <summary> | ||
| /// Gets a value indicating whether Bearer token authentication is required for API access. | ||
| /// When true, clients must include "Authorization: Bearer {token}" header in requests. | ||
| /// </summary> | ||
| [JsonPropertyName("auth_required")] | ||
| public bool AuthRequired { get; init; } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
|
|
||
| using Microsoft.Agents.AI.DevUI.Entities; | ||
|
|
||
| namespace Microsoft.Agents.AI.DevUI; | ||
|
|
||
| /// <summary> | ||
| /// Provides extension methods for mapping the server metadata endpoint to an <see cref="IEndpointRouteBuilder"/>. | ||
| /// </summary> | ||
| internal static class MetaApiExtensions | ||
| { | ||
| /// <summary> | ||
| /// Maps the HTTP API endpoint for retrieving server metadata. | ||
| /// </summary> | ||
| /// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/> to add the route to.</param> | ||
| /// <returns>The <see cref="IEndpointConventionBuilder"/> for method chaining.</returns> | ||
| /// <remarks> | ||
| /// This extension method registers the following endpoint: | ||
| /// <list type="bullet"> | ||
| /// <item><description>GET /meta - Retrieve server metadata including UI mode, version, capabilities, and auth requirements</description></item> | ||
| /// </list> | ||
| /// The endpoint is compatible with the Python DevUI frontend and provides essential | ||
| /// configuration information needed for proper frontend initialization. | ||
| /// </remarks> | ||
| public static IEndpointConventionBuilder MapMeta(this IEndpointRouteBuilder endpoints) | ||
| { | ||
| return endpoints.MapGet("/meta", GetMeta) | ||
| .WithName("GetMeta") | ||
| .WithSummary("Get server metadata and configuration") | ||
| .WithDescription("Returns server metadata including UI mode, version, framework identifier, capabilities, and authentication requirements. Used by the frontend for initialization and feature detection.") | ||
| .Produces<MetaResponse>(StatusCodes.Status200OK, contentType: "application/json"); | ||
| } | ||
|
|
||
| private static IResult GetMeta() | ||
| { | ||
| // TODO: Consider making these configurable via IOptions<DevUIOptions> | ||
| // For now, using sensible defaults that match Python DevUI behavior | ||
|
|
||
| var meta = new MetaResponse | ||
| { | ||
| UiMode = "developer", // Could be made configurable to support "user" mode | ||
| Version = "0.1.0", // TODO: Extract from assembly version attribute | ||
| Framework = "agent_framework", | ||
| Runtime = "dotnet", // .NET runtime for deployment guides | ||
| Capabilities = new Dictionary<string, bool> | ||
| { | ||
| // Tracing capability - will be enabled when trace event support is added | ||
| ["tracing"] = false, | ||
|
|
||
| // OpenAI proxy capability - not currently supported in .NET DevUI | ||
| ["openai_proxy"] = false, | ||
|
|
||
| // Deployment capability - not currently supported in .NET DevUI | ||
| ["deployment"] = false | ||
| }, | ||
| AuthRequired = false // Could be made configurable based on authentication middleware | ||
| }; | ||
|
|
||
| return Results.Json(meta, EntitiesJsonContext.Default.MetaResponse); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
python/packages/devui/agent_framework_devui/ui/assets/index.css
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, we should put the devui endpoints behind a common path prefix so they wont clash with other endpoints.