From 93ff17d93c1c40296bb8726f471de7478ad0c09d Mon Sep 17 00:00:00 2001 From: David Fowler Date: Fri, 29 May 2026 10:17:09 -0700 Subject: [PATCH 1/3] Fix Foundry ATS baseline Update the generated stable ATS baseline for the hosted-agent API rename so the baseline exposes HostedAgentOptions and asHostedAgentExecutable, and drops the stale withComputeEnvironmentExecutable entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../api/Aspire.Hosting.Foundry.ats.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt b/src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt index a5500e67343..5120af20ebf 100644 --- a/src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt +++ b/src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt @@ -27,6 +27,12 @@ Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.FoundryModel # Describes a model t Format: string # The format or provider of the model (e.g., OpenAI, Microsoft, xAi, Deepseek). Name: string # The name of the model. Version: string # The version of the model. +Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentOptions # Options that control how a compute resource is deployed as a Microsoft Foundry hosted agent. All properties are optional; unset properties fall back to the Foundry hosted agent defaults. + Cpu?: number # CPU allocation for each hosted agent instance, in vCPU cores. Must be between 0.5 and 3.5 in increments of 0.25. When not set, the hosted agent default CPU allocation is used. + Description: string # Human-readable description of the hosted agent surfaced in the Microsoft Foundry portal. When not set, the hosted agent default description is used. + EnvironmentVariables?: Aspire.Hosting/Dict # Environment variables to set on the hosted agent container at runtime. Entries with the same key as an existing environment variable overwrite it. + Memory?: number # Memory allocation for each hosted agent instance, in GiB. Must be between 1 and 7 in increments of 0.5 and equal to twice the CPU value. When not set, the hosted agent default memory allocation is used. + Metadata?: Aspire.Hosting/Dict # Additional metadata key/value pairs to attach to the hosted agent definition. Entries with the same key as an existing metadata entry overwrite it. # Enum Types enum:Aspire.Hosting.FoundryRole = CognitiveServicesOpenAIContributor | CognitiveServicesOpenAIUser | CognitiveServicesUser @@ -262,6 +268,7 @@ Aspire.Hosting.Foundry/addSearchConnection(search: Aspire.Hosting.Azure.Search/A Aspire.Hosting.Foundry/addSharePointTool(name: string, projectConnectionIds: string[]) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.SharePointToolResource Aspire.Hosting.Foundry/addStorageConnection(storage: Aspire.Hosting.Azure.Storage/Aspire.Hosting.Azure.AzureStorageResource) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectConnectionResource Aspire.Hosting.Foundry/addWebSearchTool(name: string) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.WebSearchToolResource +Aspire.Hosting.Foundry/asHostedAgentExecutable(project: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource, options?: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentOptions) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints Aspire.Hosting.Foundry/AzurePromptAgentResource.connectionStringExpression(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzurePromptAgentResource) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.ReferenceExpression Aspire.Hosting.Foundry/AzurePromptAgentResource.description(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzurePromptAgentResource) -> string Aspire.Hosting.Foundry/AzurePromptAgentResource.instructions(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzurePromptAgentResource) -> string @@ -293,13 +300,10 @@ Aspire.Hosting.Foundry/HostedAgentConfiguration.metadata(context: Aspire.Hosting Aspire.Hosting.Foundry/HostedAgentConfiguration.setCpu(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentConfiguration, value: number) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentConfiguration Aspire.Hosting.Foundry/HostedAgentConfiguration.setDescription(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentConfiguration, value: string) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentConfiguration Aspire.Hosting.Foundry/HostedAgentConfiguration.setMemory(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentConfiguration, value: number) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentConfiguration -Aspire.Hosting.Foundry/asHostedAgent() -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints -Aspire.Hosting.Foundry/withComputeEnvironmentExecutable(project?: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource, configure?: callback) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints Aspire.Hosting.Foundry/runAsFoundryLocal() -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.FoundryResource Aspire.Hosting.Foundry/withAppInsights(appInsights: Aspire.Hosting.Azure.ApplicationInsights/Aspire.Hosting.Azure.AzureApplicationInsightsResource) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource Aspire.Hosting.Foundry/withBingReference(bingReference: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.BingGroundingConnectionResource|string|Aspire.Hosting/Aspire.Hosting.ApplicationModel.ParameterResource) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.BingGroundingToolResource Aspire.Hosting.Foundry/withCapabilityHost(resource: Aspire.Hosting.Azure.CosmosDB/Aspire.Hosting.AzureCosmosDBResource|Aspire.Hosting.Azure.Storage/Aspire.Hosting.Azure.AzureStorageResource|Aspire.Hosting.Azure.Search/Aspire.Hosting.Azure.AzureSearchResource|Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.FoundryResource) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource -Aspire.Hosting.Foundry/withComputeEnvironmentExecutable(project?: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource, configure?: callback) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints Aspire.Hosting.Foundry/withFoundryDeploymentProperties(configure: callback) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.FoundryDeploymentResource Aspire.Hosting.Foundry/withFoundryRoleAssignments(target: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.FoundryResource, roles: enum:Aspire.Hosting.FoundryRole[]) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResource Aspire.Hosting.Foundry/withKeyVault(keyVault: Aspire.Hosting.Azure.KeyVault/Aspire.Hosting.Azure.AzureKeyVaultResource) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource From 4a4bcb7241bb13e53d4b8d2b4b8b4b30ba8ce565 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Fri, 29 May 2026 10:39:20 -0700 Subject: [PATCH 2/3] Align Foundry hosted agent ATS export Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../HostedAgent/HostedAgentBuilderExtension.cs | 6 +++--- .../api/Aspire.Hosting.Foundry.ats.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentBuilderExtension.cs b/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentBuilderExtension.cs index 4e11d6e3099..02b43d580d1 100644 --- a/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentBuilderExtension.cs +++ b/src/Aspire.Hosting.Foundry/HostedAgent/HostedAgentBuilderExtension.cs @@ -44,8 +44,8 @@ public static IResourceBuilder AsHostedAgent(this IResourceBuilder buil } // The internal AsHostedAgentForExport overload below is the polyglot-exported version of AsHostedAgent. - // The method name differs from AsHostedAgent to avoid C# overload ambiguity with the Action-based - // overload; the polyglot-facing name is set back to "asHostedAgent" via [AspireExport(MethodName)]. + // The CLR method name differs from AsHostedAgent to avoid C# overload ambiguity with the Action-based + // overload, but the ATS capability name must stay "asHostedAgent" for compatibility. // .NET callers should keep using the Action overload above, which exposes // the full HostedAgentConfiguration surface (tools, content filters, container protocol versions, etc.). @@ -59,7 +59,7 @@ public static IResourceBuilder AsHostedAgent(this IResourceBuilder buil /// A reference to the for chaining. /// The resource builder. /// Thrown when or is . - [AspireExport("asHostedAgentExecutable", MethodName = "asHostedAgent")] + [AspireExport("asHostedAgent", MethodName = "asHostedAgent")] internal static IResourceBuilder AsHostedAgentForExport( this IResourceBuilder builder, IResourceBuilder project, diff --git a/src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt b/src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt index 5120af20ebf..d203fa14a53 100644 --- a/src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt +++ b/src/Aspire.Hosting.Foundry/api/Aspire.Hosting.Foundry.ats.txt @@ -268,7 +268,7 @@ Aspire.Hosting.Foundry/addSearchConnection(search: Aspire.Hosting.Azure.Search/A Aspire.Hosting.Foundry/addSharePointTool(name: string, projectConnectionIds: string[]) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.SharePointToolResource Aspire.Hosting.Foundry/addStorageConnection(storage: Aspire.Hosting.Azure.Storage/Aspire.Hosting.Azure.AzureStorageResource) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectConnectionResource Aspire.Hosting.Foundry/addWebSearchTool(name: string) -> Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.WebSearchToolResource -Aspire.Hosting.Foundry/asHostedAgentExecutable(project: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource, options?: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentOptions) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints +Aspire.Hosting.Foundry/asHostedAgent(project: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource, options?: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.HostedAgentOptions) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.IResourceWithEndpoints Aspire.Hosting.Foundry/AzurePromptAgentResource.connectionStringExpression(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzurePromptAgentResource) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.ReferenceExpression Aspire.Hosting.Foundry/AzurePromptAgentResource.description(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzurePromptAgentResource) -> string Aspire.Hosting.Foundry/AzurePromptAgentResource.instructions(context: Aspire.Hosting.Foundry/Aspire.Hosting.Foundry.AzurePromptAgentResource) -> string From 6790d5caf8b01f37615180715a2fe9dc9b5a17d1 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Fri, 29 May 2026 11:03:00 -0700 Subject: [PATCH 3/3] Use checked-in ATS surface for TypeScript API compat Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/typescript-api-compat.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/typescript-api-compat.yml b/.github/workflows/typescript-api-compat.yml index ee53b130575..6cf1a7500cd 100644 --- a/.github/workflows/typescript-api-compat.yml +++ b/.github/workflows/typescript-api-compat.yml @@ -25,21 +25,21 @@ jobs: test -f artifacts/bin/Aspire.Cli/Release/net10.0/aspire.dll test -f artifacts/bin/TypeScriptApiCompat/Release/net8.0/TypeScriptApiCompat.dll - - name: Prepare base ATS surface + - name: Prepare checked-in ATS surface shell: bash env: BASE_BRANCH: ${{ github.base_ref }} run: | set -euo pipefail - BASELINE_DIR="${RUNNER_TEMP}/ats-baseline" + CHECKED_IN_DIR="${RUNNER_TEMP}/ats-checked-in" BASE_SUPPRESSIONS_ROOT="${RUNNER_TEMP}/ats-baseline-suppressions" EXCLUDED_PACKAGES_FILE="${RUNNER_TEMP}/typescript-api-compat-excluded-packages.txt" : > "$EXCLUDED_PACKAGES_FILE" git fetch --no-tags --depth=1 origin "+refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH}" - echo "::group::Copy checked-in ATS release baselines" + echo "::group::Copy checked-in ATS surfaces from PR branch" while IFS= read -r file; do [ -n "$file" ] || continue case "$file" in @@ -48,10 +48,10 @@ jobs: ;; esac - mkdir -p "$BASELINE_DIR/$(dirname "$file")" - git show "origin/${BASE_BRANCH}:$file" > "$BASELINE_DIR/$file" + mkdir -p "$CHECKED_IN_DIR/$(dirname "$file")" + cp "$file" "$CHECKED_IN_DIR/$file" echo "$file" - done < <(git ls-tree -r --name-only "origin/${BASE_BRANCH}" -- src | grep -E '^src/.+/api/.+\.ats\.txt$' || true) + done < <(git ls-files src | grep -E '^src/.+/api/.+\.ats\.txt$' || true) echo "::endgroup::" echo "::group::Copy base TypeScript API compatibility suppressions" @@ -63,7 +63,7 @@ jobs: done < <(git ls-tree -r --name-only "origin/${BASE_BRANCH}" -- src eng/TypeScriptApiCompat | grep -E '(\.tscompat\.suppression\.txt|(^|/)global\.suppression\.txt)$' || true) echo "::endgroup::" - echo "BASELINE_DIR=$BASELINE_DIR" >> "$GITHUB_ENV" + echo "CHECKED_IN_DIR=$CHECKED_IN_DIR" >> "$GITHUB_ENV" echo "BASE_SUPPRESSIONS_ROOT=$BASE_SUPPRESSIONS_ROOT" >> "$GITHUB_ENV" echo "TYPESCRIPT_API_COMPAT_EXCLUDED_PACKAGES_FILE=$EXCLUDED_PACKAGES_FILE" >> "$GITHUB_ENV" @@ -146,7 +146,7 @@ jobs: ./dotnet.sh exec \ artifacts/bin/TypeScriptApiCompat/Release/net8.0/TypeScriptApiCompat.dll \ - --baseline "$BASELINE_DIR" \ + --baseline "$CHECKED_IN_DIR" \ --current "$CURRENT_DIR" \ --suppressions-root "${{ github.workspace }}" \ --baseline-suppressions-root "$BASE_SUPPRESSIONS_ROOT" \