Skip to content

Commit f488ec5

Browse files
authored
Merge branch 'main' into fix/filesystem-store-enametoolong-r2
2 parents b2fd616 + beba921 commit f488ec5

247 files changed

Lines changed: 6464 additions & 4778 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/issue-routing-owners.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ routes:
6565
- { path: dotnet/src/Microsoft.Agents.AI.DevUI/, owner: westey-m, labels: [devui] }
6666
- { path: dotnet/src/Microsoft.Agents.AI.Foundry/, owner: rogerbarreto, labels: [agents, foundry] }
6767
- { path: dotnet/src/Microsoft.Agents.AI.Foundry.Hosting/, owner: rogerbarreto, labels: [foundry, hosting] }
68+
- { path: dotnet/src/Microsoft.Agents.AI.Foundry.Hosting.A2A/, owner: SergeyMenshykh, labels: [a2a, foundry, hosting] }
6869
- { path: dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/, owner: rogerbarreto, labels: [agents] }
6970
- { path: dotnet/src/Microsoft.Agents.AI.Harness/, owner: westey-m, labels: [harness] }
7071
- { path: dotnet/src/Microsoft.Agents.AI.Hosting/, owner: rogerbarreto, labels: [hosting] }

‎.github/workflows/python-test-coverage.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ on:
55
branches: ["main", "feature*"]
66
paths:
77
- "python/packages/**"
8-
- "python/tests/unit/**"
98
- "python/scripts/workspace_poe_tasks.py"
109
- ".github/scripts/python_check_coverage.py"
1110
- ".github/workflows/python-test-coverage.yml"
1211
push:
1312
branches: ["main"]
1413
paths:
1514
- "python/packages/**"
16-
- "python/tests/unit/**"
1715
- "python/scripts/workspace_poe_tasks.py"
1816
- ".github/scripts/python_check_coverage.py"
1917
- ".github/workflows/python-test-coverage.yml"

‎docs/decisions/0034-hosted-platform-context-agentserver-2.0.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ informed: []
1111

1212
Supersedes [ADR-0026](0026-hosted-session-identity-context.md).
1313

14+
> **Update (2026-11-05):** `HostedFoundryMemoryProviderScopes` was removed during pre-stable
15+
> API cleanup. Hosted memory samples now read `session.GetFoundryHostedUserId()` directly when
16+
> constructing `FoundryMemoryProvider.State`, keeping the trusted identity-to-memory-scope mapping
17+
> visible without a memory-specific hosting helper.
18+
>
19+
> `HostedSessionIsolationKeyProvider` was also removed. The handler now reads
20+
> `ResponseContext.PlatformContext.UserIdKey` directly. Local requests without a user id run
21+
> unscoped, while tests or local clients that need distinct users can send `x-agent-user-id` for
22+
> AgentServer to populate `PlatformContext`.
23+
>
24+
> The public `HostedSessionContext` / `GetHostedContext()` surface was replaced by
25+
> `AgentSession.GetFoundryHostedUserId()`. The hosting layer persists the resolved user id as a plain string
26+
> in the session state bag, making clear that it is a user partition and not the Foundry hosted
27+
> session id.
28+
1429
## Context and Problem Statement
1530

1631
[ADR-0026](0026-hosted-session-identity-context.md) sourced the hosted-agent end-user identity from `ResponseContext.Isolation` (an `IsolationContext` typed `UserIsolationKey` / `ChatIsolationKey`), injected by the platform as the `x-agent-user-isolation-key` and `x-agent-chat-isolation-key` headers.

‎docs/decisions/0035-hosted-per-user-session-storage-isolation.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ Hosting adds the resolved user identity as a named partition before loading or s
110110

111111
## Update (2026-07-01): local runs no longer fail closed; sample dev provider removed
112112

113-
Superseding the ADR-0026/0030 behavior where a `null` result from `HostedSessionIsolationKeyProvider`
114-
always became a 500, `AgentFrameworkResponseHandler` now branches on `FoundryEnvironment.IsHosted`:
113+
Superseding the ADR-0026/0030 behavior where a missing resolved user identity always became a 500,
114+
`AgentFrameworkResponseHandler` now branches on `FoundryEnvironment.IsHosted`:
115115

116116
- **Hosted** (`IsHosted == true`, production): a `null` identity is still a hard error (500). Isolation
117117
stays strict; the platform always injects `x-agent-user-id`.
118118
- **Not hosted** (local `docker run` / `dotnet run`): a `null` identity is tolerated. Per-user isolation
119119
is simply not triggered — the handler passes `userId == null` to the store (the documented "no user
120-
partition", `{root}/a-{agent}/c-{conv}.json`), stamps no `HostedSessionContext`, and runs no
120+
partition", `{root}/a-{agent}/c-{conv}.json`), stores no hosted user id, and runs no
121121
strict-resume check. Contributors can run a hosted image locally with zero extra setup.
122122

123123
Consequently the sample-side `DevTemporaryLocalUserIdProvider` and `AddDevTemporaryLocalContributorSetup`
124-
were removed. To simulate distinct users locally, send an `x-agent-user-id` request header; the default
125-
`PlatformHostedSessionIsolationKeyProvider` reads it via `ResponseContext.PlatformContext.UserIdKey`
126-
(the SDK's `PlatformContext.FromRequest` populates it from the header unconditionally, hosted or not).
124+
were removed. To simulate distinct users locally, send an `x-agent-user-id` request header; the handler
125+
reads it from `ResponseContext.PlatformContext.UserIdKey` (the SDK's `PlatformContext.FromRequest`
126+
populates it from the header unconditionally, hosted or not).

‎docs/decisions/0041-foundry-hosting-resilient-long-running-agents.md‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ and checkpoint storage introduced for Foundry state stores (PR #7649).
3333
- Pair each persisted workflow response snapshot with the exact workflow checkpoint it represents.
3434
- Opt-in and off by default; non-resilient hosts pay nothing.
3535
- Prefer workflows: they already checkpoint between supersteps.
36-
- Keep a lean API on `FoundryResponsesOptions`, forwarded to `ResponsesServerOptions`.
36+
- Keep a lean API on `FoundryResponsesServerOptions`, forwarded to `ResponsesServerOptions`.
3737
- Persist agent sessions through the Foundry state store (or its local fallback), not a second disk layout.
3838

3939
## Decision Outcome
@@ -42,7 +42,7 @@ Chosen option: **turn resilience on through the existing handler and registratio
4242

4343
### Public surface
4444

45-
`FoundryResponsesOptions.ResilientBackground` and `FoundryResponsesOptions.SteerableConversations`
45+
`FoundryResponsesServerOptions.ResilientBackground` and `FoundryResponsesServerOptions.SteerableConversations`
4646
are forwarded to `ResponsesServerOptions` so the AgentServer SDK enables recovery and steering.
4747
This forwarding must happen in the callback passed directly to `AddResponsesServer`. The SDK makes
4848
two process-level choices during that registration call: whether local SSE replay uses durable
@@ -147,7 +147,7 @@ paired recovery boundary. The superseded response still reaches a terminal `comp
147147
|---|---|---|
148148
| Resilient task, SSE events, `ResponseObject` snapshots, `_last_checkpoint_id` | AgentServer | Re-invoke the handler and identify the workflow checkpoint represented by each response snapshot |
149149
| Serialized `AgentSession` | Foundry Hosting | Restore agent-owned state and the workflow checkpoint reference |
150-
| Workflow execution checkpoints | Workflow runtime through `FoundryJsonCheckpointStore` | Restore executors, queued messages, pending requests, and workflow state |
150+
| Workflow execution checkpoints | Workflow runtime through Foundry state-store-backed checkpoint storage | Restore executors, queued messages, pending requests, and workflow state |
151151

152152
The handler calls `ResponseEventStream.Checkpoint()` only after a workflow superstep supplies a new
153153
checkpoint ID and the matching `AgentSession` save succeeds. `PersistedResponse.Output.Count` is not
@@ -156,10 +156,9 @@ workflow storage.
156156

157157
### Relationship to durable storage (PR #7649)
158158

159-
Sessions and workflow checkpoints already go through `FoundryAgentSessionStore` /
160-
`FoundryJsonCheckpointStore`. AgentServer separately owns resilient task records, response snapshots,
161-
and SSE event replay. Resilience does not invent another store; it coordinates handler re-entry with
162-
the existing session and workflow stores.
159+
Sessions and workflow checkpoints already go through Foundry state-store-backed storage. AgentServer
160+
separately owns resilient task records, response snapshots, and SSE event replay. Resilience does not
161+
invent another store; it coordinates handler re-entry with the existing session and workflow stores.
163162

164163
## Consequences
165164

@@ -186,6 +185,5 @@ the existing session and workflow stores.
186185
termination through `Environment.Exit`, recovery in a different process incarnation, transient
187186
`404`/`424` polling responses during replacement, and long-running steering on the same
188187
conversation.
189-
- The checkpoint-index optimistic-concurrency retry count is configurable through
190-
`FoundryJsonCheckpointStore`, with a default of eight attempts.
188+
- The internal checkpoint-index optimistic-concurrency retry count defaults to eight attempts.
191189
- Package floor: Azure.AI.AgentServer Core beta.28, Invocations beta.6, Responses beta.8.

‎docs/specs/004-python-function-calling-loop.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ that manually replay messages own the equivalent rule: do not resend an approval
548548
approval continuation. Interactive, delayed, or durable approval belongs in a workflow. When
549549
`propagate_session=True`, child application-state changes merge back into the parent while framework approval and
550550
invocation-budget state remain isolated, including approval queues stored under custom child middleware
551-
`source_id` values. Parent and child `ToolApprovalMiddleware` instances must use distinct `source_id` values; an
551+
`source_id` values. Parent and child `ToolApprovalMiddleware` instances must use distinct `source_id` values, whether
552+
the parent middleware is configured on the agent or passed to a single run; an
552553
overlap fails before the child runs. The automatic function loop also supplies the parent agent/client's declared
553554
provider-owned state keys. A custom loop that directly invokes the agent tool must set
554555
`FunctionInvocationContext.parent_service_session_state_keys` explicitly; when that ownership is unavailable, a
@@ -640,7 +641,7 @@ that manually replay messages own the equivalent rule: do not resend an approval
640641
| Mixed approved/rejected batch | Every call gets one correctly correlated terminal result. | `packages/core/tests/core/test_function_invocation_logic.py::test_rejected_approval` |
641642
| Persisted approval replay | Resume executes with the prior call available. | `test_persisted_approval_messages_replay_correctly` |
642643
| Hosted approval pass-through | Hosted requests/responses are bound to the recorded provider request and are not processed as local calls. | `test_hosted_tool_approval_response`, `test_hosted_mcp_approval_response_passthrough`, `test_session_approval_binding_reconstructs_hosted_response`, `test_mixed_local_and_hosted_approval_flow` |
643-
| Agent-tool child approval | A child `ToolApprovalMiddleware` can auto-approve runtime tool requests inside one delegated invocation; unresolved child approvals execute nothing and do not enter the caller's approval state or dispatch a same-named parent tool, including with propagated application state. Mixed batches preserve non-approval user-input requests. Shared parent and child state rejects overlapping `ToolApprovalMiddleware.source_id` values before running the child; parent approval state is neither visible nor mutable inside the child, and custom child approval queues do not leak into later delegations. | `packages/core/tests/core/test_agents.py::test_chat_agent_as_tool_auto_approves_child_tool_with_middleware`, `test_chat_agent_as_tool_fails_closed_for_unresolved_child_approval`, `test_chat_agent_as_tool_child_approval_does_not_dispatch_same_named_parent_tool`, `test_chat_agent_as_tool_preserves_non_approval_requests_from_mixed_child_batch`, `test_chat_agent_as_tool_shared_session_requires_distinct_tool_approval_source_ids`, `test_chat_agent_as_tool_isolates_custom_parent_approval_state`, `test_chat_agent_as_tool_approved_delegation_does_not_confuse_framework_approval_state`, `test_chat_agent_as_tool_does_not_restore_custom_approval_queue_on_fresh_delegation` |
644+
| Agent-tool child approval | A child `ToolApprovalMiddleware` can auto-approve runtime tool requests inside one delegated invocation; unresolved child approvals execute nothing and do not enter the caller's approval state or dispatch a same-named parent tool, including with propagated application state. Mixed batches preserve non-approval user-input requests. Shared parent and child state rejects overlapping `ToolApprovalMiddleware.source_id` values before running the child; parent approval state, including state of middleware passed to a single parent run, is neither visible nor mutable inside the child (a child cannot add standing rules or forge a decision for a pending request), and custom child approval queues do not leak into later delegations. | `packages/core/tests/core/test_agents.py::test_chat_agent_as_tool_auto_approves_child_tool_with_middleware`, `test_chat_agent_as_tool_fails_closed_for_unresolved_child_approval`, `test_chat_agent_as_tool_child_approval_does_not_dispatch_same_named_parent_tool`, `test_chat_agent_as_tool_preserves_non_approval_requests_from_mixed_child_batch`, `test_chat_agent_as_tool_shared_session_requires_distinct_tool_approval_source_ids`, `test_chat_agent_as_tool_isolates_custom_parent_approval_state`, `test_chat_agent_as_tool_isolates_run_level_parent_approval_state`, `test_chat_agent_as_tool_run_level_approval_state_cannot_authorize_pending_request`, `test_chat_agent_as_tool_run_level_approval_ownership_is_per_invocation`, `test_chat_agent_as_tool_approved_delegation_does_not_confuse_framework_approval_state`, `test_chat_agent_as_tool_does_not_restore_custom_approval_queue_on_fresh_delegation` |
644645
| Approval-time user input | Every user-input request from one approved execution returns in order with assistant role and no extra model call; the execution consumes one call-budget unit. | `packages/core/tests/core/test_harness_tool_approval.py::test_approval_resume_returns_all_user_input_requests_without_another_model_call`, `packages/core/tests/core/test_function_invocation_logic.py::test_approval_resume_user_input_counts_toward_function_call_budget` |
645646
| Mixed terminal result and follow-up input | Completed siblings remain tool-role while only follow-up input requests use assistant-role messages/updates. | `packages/core/tests/core/test_function_invocation_logic.py::test_approval_resume_separates_terminal_results_from_follow_up_requests`, `packages/openai/tests/openai/test_openai_chat_completion_client.py::test_mixed_approval_resume_roles_serialize_function_result_as_tool`, `packages/core/tests/core/test_harness_tool_approval.py::test_dynamic_policy_approval_partitions_safe_sibling_result_roles` |
646647
| Approval-time middleware termination | Terminal result returns with no extra model call in either response mode. | `packages/core/tests/core/test_function_invocation_logic.py::test_approval_resume_honors_middleware_termination` |

‎docs/specs/feature-usage-bit-registry.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ only to approved first-party endpoints.
226226
| 49 | `foundry.agent` | Foundry agent | `Microsoft.Agents.AI.Foundry.FoundryAgent` |
227227
| 50 | `foundry.memory` | Foundry memory provider | `Microsoft.Agents.AI.Foundry.FoundryMemoryProvider` |
228228
| 51 | `foundry.evals` | Foundry evaluations | `Microsoft.Agents.AI.Foundry.FoundryEvals` |
229-
| 52 | `foundry.toolbox` | Foundry Toolbox MCP tool | `Microsoft.Agents.AI.Foundry.HostedMcpToolboxAITool` |
230-
| 53 | `foundry_hosting` | Foundry hosting layer | `Microsoft.Agents.AI.Foundry.Hosting.FoundryHostingExtensions.AddFoundryResponses` |
229+
| 52 | `foundry.toolbox` | Foundry Toolbox MCP integration | `Microsoft.Agents.AI.Foundry.Hosting.ServiceCollectionExtensions.AddFoundryToolboxes` |
230+
| 53 | `foundry_hosting` | Foundry hosting layer | `Microsoft.Agents.AI.Foundry.Hosting.ServiceCollectionExtensions.AddFoundryResponses` |
231231
| 54 | `openai` | OpenAI integration | `Microsoft.Agents.AI.OpenAI` |
232232
| 55 | `anthropic` | Anthropic integration | `Microsoft.Agents.AI.Anthropic` |
233233
| 56 | `copilotstudio` | Copilot Studio agent | `Microsoft.Agents.AI.CopilotStudio.CopilotStudioAgent` |

‎dotnet/Directory.Packages.props‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88
<PropertyGroup>
99
<!-- Aspire -->
10-
<AspireAppHostSdkVersion>13.6.3</AspireAppHostSdkVersion>
10+
<AspireAppHostSdkVersion>13.6.4</AspireAppHostSdkVersion>
1111
</PropertyGroup>
1212
<ItemGroup>
1313
<!-- Aspire.* -->
@@ -21,7 +21,7 @@
2121
<PackageVersion Include="Aspire.Hosting.AppHost" Version="$(AspireAppHostSdkVersion)" />
2222
<PackageVersion Include="Aspire.Hosting.Azure.CognitiveServices" Version="$(AspireAppHostSdkVersion)" />
2323
<PackageVersion Include="Aspire.Microsoft.Azure.Cosmos" Version="$(AspireAppHostSdkVersion)" />
24-
<PackageVersion Include="CommunityToolkit.Aspire.OllamaSharp" Version="13.6.0" />
24+
<PackageVersion Include="CommunityToolkit.Aspire.OllamaSharp" Version="13.6.1" />
2525
<PackageVersion Include="MessagePack" Version="3.1.12" /> <!-- Transitive dependency of Aspire pinned to newer version due to vulnerability in 2.5.192 -->
2626
<!-- Azure.* -->
2727
<PackageVersion Include="Azure.AI.AgentServer.Core" Version="1.0.0-beta.30" />
@@ -128,8 +128,8 @@
128128
<PackageVersion Include="ModelContextProtocol" Version="2.2.0" />
129129
<PackageVersion Include="ModelContextProtocol.Extensions.Tasks" Version="2.2.0" />
130130
<!-- Hyperlight -->
131-
<PackageVersion Include="Hyperlight.HyperlightSandbox.Api" Version="0.6.0" />
132-
<PackageVersion Include="Hyperlight.HyperlightSandbox.Guest.Python" Version="0.6.0" />
131+
<PackageVersion Include="Hyperlight.HyperlightSandbox.Api" Version="0.9.0" />
132+
<PackageVersion Include="Hyperlight.HyperlightSandbox.Guest.Python" Version="0.9.0" />
133133
<!-- Inference SDKs -->
134134
<PackageVersion Include="Dapr.AI.Microsoft.Extensions" Version="1.18.5" />
135135
<PackageVersion Include="Microsoft.ML.OnnxRuntimeGenAI" Version="0.15.2" />

‎dotnet/agent-framework-dotnet.slnx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@
620620
<Project Path="src/Microsoft.Agents.AI.CosmosNoSql/Microsoft.Agents.AI.CosmosNoSql.csproj" />
621621
<Project Path="src/Microsoft.Agents.AI.Declarative/Microsoft.Agents.AI.Declarative.csproj" />
622622
<Project Path="src/Microsoft.Agents.AI.DevUI/Microsoft.Agents.AI.DevUI.csproj" />
623+
<Project Path="src/Microsoft.Agents.AI.Foundry.Hosting.A2A/Microsoft.Agents.AI.Foundry.Hosting.A2A.csproj" />
623624
<Project Path="src/Microsoft.Agents.AI.Foundry.Hosting/Microsoft.Agents.AI.Foundry.Hosting.csproj" />
624625
<Project Path="src/Microsoft.Agents.AI.Foundry/Microsoft.Agents.AI.Foundry.csproj" />
625626
<Project Path="src/Microsoft.Agents.AI.GitHub.Copilot/Microsoft.Agents.AI.GitHub.Copilot.csproj" />

‎dotnet/agent-framework-src-and-tests.slnf‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"src\\Microsoft.Agents.AI.AzureAI.Persistent\\Microsoft.Agents.AI.AzureAI.Persistent.csproj",
1212
"src\\Microsoft.Agents.AI.Foundry\\Microsoft.Agents.AI.Foundry.csproj",
1313
"src\\Microsoft.Agents.AI.Foundry.Hosting\\Microsoft.Agents.AI.Foundry.Hosting.csproj",
14+
"src\\Microsoft.Agents.AI.Foundry.Hosting.A2A\\Microsoft.Agents.AI.Foundry.Hosting.A2A.csproj",
1415
"src\\Microsoft.Agents.AI.CopilotStudio\\Microsoft.Agents.AI.CopilotStudio.csproj",
1516
"src\\Microsoft.Agents.AI.CosmosNoSql\\Microsoft.Agents.AI.CosmosNoSql.csproj",
1617
"src\\Microsoft.Agents.AI.Declarative\\Microsoft.Agents.AI.Declarative.csproj",

0 commit comments

Comments
 (0)