samples/python-agui-single-agent
1089 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0661c69b78 |
fix(ag-ui): preserve streamed text message id (#6269)
Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com> Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com> |
||
|
|
339bbeb881 |
Fix DevUI deployment Dockerfile auth args (#6150)
Co-authored-by: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com> |
||
|
|
5e0793542d |
Python (anthropic): Migrate structured outputs to GA output_config.format (#5884)
Bug
---
`RawAnthropicClient._prepare_options` forwards `response_format` as the
**deprecated** beta parameter `output_format={"type": "json_schema", "schema":
{...}}` plus the beta flag `structured-outputs-2025-11-13`. When the same
request also includes `tools`, Claude emits concatenated / malformed JSON —
e.g. three copies of the schema's empty default like
`{"matches":[]}{"matches":[]}{"matches":[]}` — instead of populating the
schema. Anthropic's GA shape — `output_config={"format": {"type":
"json_schema", "schema": {...}}}` — works correctly with tools.
Verified empirically on `agent-framework-anthropic` against
`claude-sonnet-4-6` for a structured-output workload that combined
`response_format` with a tool (`run_shell`); the deprecated path produced
the malformed concatenated output, the GA path did not.
Changes
-------
- Move `response_format` into `run_options["output_config"]["format"]` and
stop adding the `structured-outputs-2025-11-13` beta flag (the GA path
doesn't need it).
- Merge the format into any caller-supplied `output_config` so e.g.
`output_config["effort"]` (adaptive-thinking effort level) survives the
transformation.
- Drop the now-unused `STRUCTURED_OUTPUTS_BETA_FLAG` constant (private to
this module — no external callers).
- `_prepare_response_format` keeps the same `{"type": "json_schema",
"schema": ...}` return shape; the docstring is updated to point at the
GA target.
Test plan
---------
- `uv run pytest packages/anthropic/tests` → 130 passed.
- New tests:
- `test_prepare_options_uses_output_config_for_response_format` — the
GA `output_config.format` shape is emitted, the deprecated
`output_format` key is not, and the `structured-outputs-2025-11-13`
beta flag is not added.
- `test_prepare_options_preserves_caller_supplied_output_config_effort`
— a caller-supplied `output_config["effort"]` survives the merge.
- `test_prepare_options_no_response_format_omits_output_config` — no
`output_config` is added implicitly when `response_format` is absent.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
de39be9e58 |
Python: Improve error message when TypeVar is used in handler registration (#4553)
* Python: Improve error message when TypeVar is used in handler registration Fixes #4547. Adds early detection of unresolved TypeVar instances in: - @handler decorator (both explicit and introspected type paths) - @executor decorator (both explicit and introspected type paths) - WorkflowContext type argument validation (direct and union members) When a TypeVar is detected, a clear ValueError is raised with actionable guidance to use concrete types via @handler(input=ConcreteType, output=ConcreteType). * Address PR review: runtime-safe TypeVar detection and unit tests - Add shared is_typevar() helper in _typing_utils.py that safely detects TypeVar from both typing and typing_extensions modules - Replace all isinstance(x, TypeVar) calls with is_typevar() in _executor.py, _function_executor.py, and _workflow_context.py - Add 18 unit tests covering TypeVar validation for @handler, @executor, and WorkflowContext[T] (explicit params, introspection, union members) * Fix pyright error: add type annotation to _TYPEVAR_TYPES Pyright's reportUnknownVariableType flagged the inferred type as partially unknown. Adding an explicit `tuple[type, ...]` annotation resolves the strict-mode check. * Suppress pyright reportUnknownVariableType for _TYPEVAR_TYPES Pyright cannot infer the runtime type of TypeVar constructors, so the tuple elements resolve to type[Unknown]. A type annotation alone does not satisfy strict mode — add an inline suppression for this specific diagnostic since the unknown types are intentional (runtime TypeVar class detection). * Reject nested TypeVars in workflow annotations --------- Co-authored-by: Kranthi Kumar Manchikanti <kmanchikanti@microsoft.com> Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com> Co-authored-by: Evan Mattson <evan.mattson@microsoft.com> |
||
|
|
fb4be3bb1f |
Python: request reference source data in agentic search (#5095) (#5100)
Pass knowledge_source_params with include_reference_source_data=True for each resolved knowledge source on the KnowledgeBaseRetrievalRequest, so ref.source_data is populated when the source has source_data_fields configured. Uses SearchIndexKnowledgeSourceParams (azure-search-documents 12.0.0) and resolves real source names for both created and existing knowledge bases (avoids the prior 'None-source' name). Fixes #5095 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> |
||
|
|
96e009f87a |
Python: Forward skill_directories and disabled_skills to Copilot session (#6937)
GitHubCopilotAgent never forwarded the Copilot SDK's skill_directories (and disabled_skills) parameters to create_session/resume_session, so native Copilot CLI skills could not be configured through the agent. Add both as fields on GitHubCopilotOptions and forward them (with runtime-override and empty-list-clears-defaults semantics matching instruction_directories) in _create_session and _resume_session. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
07981847ed |
Add chat client Agent typing tests (#6950)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
81e425b44f |
Python: [BREAKING] Durable Task multi-workflow hosting and sub-workflows (#6696)
* feat(durabletask): add workflow naming helpers (multi-workflow phase 0)
Foundation for hosting multiple workflows (and later sub-workflows) on one
durable task host. Adds a host-agnostic naming module that derives the stable
durable names a hosted workflow registers under.
- New `_workflows/naming.py`:
- `workflow_orchestrator_name(name)` -> `dafx-{name}` (orchestration name,
aligned byte-for-byte with .NET `WorkflowNamingHelper`).
- `workflow_name_from_orchestrator(name)` -> reverse, `None` when not prefixed.
- `validate_workflow_name(name)` -> rejects empty / malformed / auto-generated
`WorkflowBuilder-<uuid>` names (validate-and-reject rather than silently
sanitize, since the name becomes a durable identity and an HTTP route segment).
- `is_auto_generated_workflow_name(name)`, `DURABLE_NAME_PREFIX`.
- Export the helpers from the package public API.
- Mark `WORKFLOW_ORCHESTRATOR_NAME` deprecated in favor of per-workflow names
(kept functional; the single-workflow path still uses it until phase 1).
- 39 unit tests covering round-trips and validation.
Design: docs/design/durabletask-multiworkflow-and-subworkflows.md
* feat(durabletask): host multiple workflows per worker with scoped names (phase 1)
Enables hosting more than one MAF workflow on a single standalone Durable Task
worker, and aligns both hosts on workflow-scoped durable names so two co-hosted
workflows that reuse an executor id cannot collide.
Naming (shared, host-agnostic):
- orchestration: dafx-{workflowName} (matches .NET; the name DT tooling surfaces)
- non-agent activity / agent entity: dafx-{workflowName}-{executorId} (scoped)
- New naming helpers workflow_scoped_executor_id / workflow_executor_activity_name.
Standalone worker (agent-framework-durabletask):
- configure_workflow is now additive: stores workflows keyed by Workflow.name,
rejects duplicate / auto-generated (WorkflowBuilder-<uuid>) / invalid names,
registers one orchestrator per workflow plus its scoped activities/entities.
- The shared orchestrator dispatches scoped names derived from workflow.name.
- New registered_workflow_names property.
Client (DurableWorkflowClient):
- Optional default workflow_name on the client; start/run/stream accept a per-call
workflow_name and target dafx-{name}.
- Opt-in ownership validation on status/HITL methods: when a workflow name is
resolvable, an instance whose orchestration name does not match is treated as
not-found (status -> None, pending -> [], send_hitl_response / await -> raise),
mirroring the Azure Functions route-scoping check.
Azure Functions host (agent-framework-azurefunctions):
- Registration now uses the same scoped names so the shared orchestrator's
dispatch matches (single workflow per app for now; flat workflow/* routes kept).
- Workflow name is validated up front; workflow agents register under the scoped
entity id; _is_workflow_orchestration scopes to dafx-{workflow.name}.
Samples + tests:
- Durable Task and Azure Functions workflow samples now name their workflow.
- Unit tests cover multi-workflow registration, name validation, client targeting,
and ownership; integration tests target the named workflows.
WORKFLOW_ORCHESTRATOR_NAME remains exported (deprecated). This is a hard switch:
in-flight single-workflow instances created before upgrade (under the old
workflow_orchestrator name) will not resume.
Design: docs/design/durabletask-multiworkflow-and-subworkflows.md
* feat(azurefunctions): host multiple workflows per app with per-workflow routes (phase 2)
Completes multi-workflow hosting on the Azure Functions host, building on the
shared scoped-naming foundation from the worker phase.
AgentFunctionApp:
- New `workflows=` parameter accepting a list (keyed by each `Workflow.name`) or a
name->Workflow mapping; the existing `workflow=` is a single-workflow alias.
Both may be combined. Duplicate names and mapping-key/name mismatches are rejected.
- Each workflow registers its own `dafx-{name}` orchestration, workflow-scoped
activities/entities, and per-workflow HTTP routes:
`workflow/{name}/run`, `workflow/{name}/status/{instanceId}`,
`workflow/{name}/respond/{instanceId}/{requestId}`. Routes are always
per-workflow (even for a single workflow) so callers don't change URLs as an app
grows from one workflow to many.
- Route ownership check is per-workflow (`_is_owned_orchestration(status, name)`):
a leaked instance id for another orchestration -- or another workflow -- is
treated as not-found, extending the route-scoping defense.
- `get_agent(context, name, workflow_name=...)` resolves a workflow agent under its
scoped id; bare `agents=` registration keeps the standalone surface. New
`workflows` introspection property; `.workflow` now returns the sole workflow
(or None when several are hosted).
- Removed the now-unused flat-URL helper `_build_status_url` (handlers inline
per-workflow URLs).
Samples + tests:
- Azure Functions workflow samples (09-12) name their workflow; integration tests
target the per-workflow routes.
- Unit tests cover multi-workflow registration, duplicate/mapping/auto-name
rejection, and per-workflow ownership.
Note: sample README / demo.http route docs are updated in the docs phase.
Design: docs/design/durabletask-multiworkflow-and-subworkflows.md
* feat(durabletask): sub-workflows via durable child orchestrations (phase 3)
Run WorkflowExecutor nodes as durable child orchestrations on both hosts.
- Protocol: add call_sub_orchestrator to WorkflowOrchestrationContext, implemented by the durabletask and Azure Functions adapters.
- Registration: planner classifies WorkflowExecutor as subworkflow_executors; collect_hosted_workflows walks nested workflows (parent first, deduped by name). Both hosts recursively register every nested workflow's orchestration/agents/activities once; only top-level workflows get HTTP routes. Names validated up front before any registration side effects.
- Orchestrator: dispatch WorkflowExecutor nodes via call_sub_orchestrator(dafx-{innerName}) with deterministic child instance ids ({instanceId}::{executorId}::{counter}), a trusted-input marker carrying nesting depth (bounded at 25), and outputs routed as messages (default) or parent outputs (allow_direct_output).
- Tests: registration/collect, orchestrator prepare/process/unwrap, recursive registration on both hosts. Sample: 11_subworkflow.
* feat(durabletask): sub-workflow HITL via qualified request ids (phase 4)
Surface a nested sub-workflow's human-in-the-loop request behind the top-level instance (B2 single addressing surface).
- Orchestrator records dispatched sub-workflow child instance ids in its custom status (subworkflows map) before suspending in task_all, so the read side can reach a child's pending request while the parent is paused.
- Read side (durabletask client get_pending_hitl_requests; AF status route) recurses into nested child statuses, qualifying each nested request id as {executorId}::{requestId} (accumulated for deeper nesting).
- Write side (durabletask client send_hitl_response; AF respond route) splits a qualified id on '::', resolves the owning child orchestration via the parent's subworkflows map, and raises the event on the leaf child with the bare request id. Unknown/inactive sub-workflow -> error/404.
- Shared SUBWORKFLOW_REQUEST_SEPARATOR ('::') in naming so both hosts and the client agree. respondUrl/respond always targets the top-level instance.
- Tests: TestSubworkflowHitl (durabletask client, 7), TestAgentFunctionAppSubworkflowHitl (AF, 7). Sample: 12_subworkflow_hitl (HITL pause inside an embedded sub-workflow).
* docs(durabletask): ADR + sample route docs for multi-workflow and sub-workflows (phase 5)
- Add ADR-0030 capturing the multi-workflow and sub-workflow hosting decisions (naming, scoped inner names, per-workflow routes, child-orchestration sub-workflows, hard-switch migration, B2 sub-workflow HITL, scoped agent addressing) with considered alternatives; mark the design doc as implemented and link the ADR.
- Update Azure Functions workflow samples (09-12) README/demo.http to the per-workflow route shape (workflow/{name}/run|status|respond) introduced in phase 2.
- Extend the durabletask sample catalog with the workflow hosting patterns (08-12), including the new 11_subworkflow and 12_subworkflow_hitl samples.
* fix(durabletask): harden sub-workflow hosting + add sub-workflow integration tests
Post-review hardening of the multi-workflow / sub-workflow durable hosting:
- Trust boundary: strip the reserved sub-workflow envelope key from untrusted
client input at both host boundaries (DurableWorkflowClient.start_workflow and
the AF start route) so a forged envelope cannot reach the trusted pickle path.
- Nested HITL addressing: qualify nested pending requests by (executorId, ordinal)
using a '~' separator (was '::', which collided with core's auto::N functional
request ids); the parent status subworkflows map is now a per-executor list so
multiple children dispatched in one superstep stay independently addressable.
- Reject two different workflow instances that share a name (the same instance
reused by sibling nodes is still deduped); validate executor ids (separator-free,
length-bounded) when hosting durably.
- Remove the arbitrary sub-workflow nesting depth cap: a WorkflowExecutor wraps a
concrete Workflow so the nesting tree is finite at build time, and the durable
instance-id length limit is the natural ceiling (matches .NET, which has none).
Tests/samples:
- New durabletask integration tests for sub-workflow composition (11) and nested
sub-workflow HITL (12); new no-agent AF sub-workflow HITL sample (13) + test.
- Exempt no-agent samples from the model-credential gate in both integration
conftests so the nested-HITL plumbing is covered deterministically.
- Update durabletask sample 12 docs to the new qualified-id format.
Validated: 484 unit tests; durabletask integration 08/09/11/12 and AF 12/13 pass
against the live emulators; pyright 0 errors; ruff clean.
* fix(durabletask): address PR review feedback on naming, typing, and docs
- Unquote df.DurableOrchestrationClient annotations so pyupgrade passes.
- Narrow the split_subworkflow_request_id result before unpacking in a naming test so the strict type checkers pass.
- Correct the durabletask sample catalog to the {executor}~{ordinal}~{requestId} qualified id format.
- Reword the Azure Functions sub-workflow sample intro so it does not imply a difference from a same-numbered sample.
- Drop internal shorthand (B2, phase labels) from code comments.
* fix(durabletask): reject case-insensitive workflow name collisions
The route ownership guard compares the durable orchestration name with casefold(), but registration kept raw names as distinct keys. Hosting 'Orders' and 'orders' therefore succeeded while either workflow's status/respond route could operate on the other's instances. Reject case-insensitive name collisions at registration (within a composition via collect_hosted_workflows, and across registration calls via the case-folded _registered_orchestrations map and the top-level guard in both hosts) so the case-folded ownership boundary stays real. Single names of any case remain valid; only collisions are rejected.
* docs(durabletask): remove multiworkflow/subworkflow ADR and design docs
Drop the ADR and design exploration documents and the dangling docstring reference to them.
* refactor(durabletask): simplify workflow client status parsing and drop deprecated orchestrator-name symbols
Extract a shared _parse_custom_status helper in DurableWorkflowClient to remove duplicated custom-status JSON parsing across three call sites.
Drop the now-unused single-workflow compatibility shims WORKFLOW_ORCHESTRATOR_NAME and WorkflowRegistrationPlan.orchestrator_name, replaced by per-workflow workflow_orchestrator_name(name).
* fix(core): drop WORKFLOW_ORCHESTRATOR_NAME from agent_framework.azure re-exports
The constant was removed from agent-framework-durabletask, but the core azure lazy-loading namespace still re-exported it, breaking pyright in packages/core. Remove it from both the runtime _IMPORTS map and the .pyi stub.
* fix(durabletask): atomic multi-workflow registration and bubble sub-workflow events
Make configure_workflow / AgentFunctionApp registration atomic: check every cross-call name collision before mutating any state, so a colliding nested sub-workflow no longer leaves a host partially configured (with the top-level name stuck in the registry). Applied to both the standalone worker and the Functions app.
Bubble sub-workflow intermediate events: a workflow run as a child orchestration now returns a SUBWORKFLOW_RESULT_KEY envelope carrying its outputs plus event timeline, and the parent re-tags the child's intermediate events with the WorkflowExecutor node id and republishes them, matching the in-process WorkflowExecutor contract. Top-level runs still return a bare outputs list.
Adds cross-registration atomicity tests on both hosts and unit tests for the result envelope and event bubbling. Resolves review threads on _worker.py, orchestrator.py, and test coverage.
* fix(azurefunctions): widen workflow orchestrator wrapper return type
The shared run_workflow_orchestrator now returns list | dict (the sub-workflow result envelope), so the azurefunctions _workflow.py wrapper that delegates to it must widen its Generator return annotation to match. Caught by the package-level pyright in CI (Package Checks), which type-checks the whole package, not just the files changed in the previous commit.
|
||
|
|
9c4cd07899 |
Python: Add SkillsSourceContext to SkillsSource.get_skills (#6895)
* Python: Add SkillsSourceContext to SkillsSource.get_skills Thread an invocation context (agent + optional session) through the skill source pipeline so sources and decorators can make context-aware decisions. - Add frozen, experimental SkillsSourceContext(agent, session). - Change SkillsSource.get_skills and all sources/decorators to accept and forward the context. - Make FilteringSkillsSource predicate context-aware: (skill, context) -> bool. - Add optional cache_isolation_key_selector to CachingSkillsSource for per-key cache isolation (None keeps the shared-bucket behavior). - Build the context in SkillsProvider from before_run agent/session. - Update foundry_hosting toolbox source, exports, tests, and docs. Python port of .NET PR #6797. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Clarify skills source docstring examples Address PR review: docstring examples referenced `context` without constructing it. Add a `SkillsSourceContext` construction line (with a placeholder agent) to each source example and a note that the provider normally supplies it. Use `source_context` in the FilteringSkillsSource example to avoid clashing with the predicate's `context` parameter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Fix CI type errors and skill_filtering sample predicate Address CI failures from the SkillsSourceContext change: - Update the skill_filtering sample to the 2-arg predicate signature (skill, context); the old 1-arg lambda would fail at runtime. - Replace ad-hoc _StubAgent test stubs with the shared MockAgent / MockAgentSession from conftest so all type checkers (incl. ty) accept the SupportsAgentRun-typed agent. Add a small _NamedMockAgent subclass for tests needing distinct agent names, and drop now-unnecessary attr-defined ignores. - Use cast(SupportsAgentRun, ...) in foundry_hosting tests, which have no shared mock infrastructure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Make SkillsProvider caching safe-by-default; clarify context docstrings Address PR review comments: - Do not auto-wrap a caller-supplied SkillsSource in the provider's default CachingSkillsSource. A shared, unkeyed cache around a context-aware source replays the first invocation's skills for later SkillsSourceContexts, leaking skills across agents/tenants. Default caching now applies only to the built-in, context-independent file/in-memory leaf sources (Deduplicating(Caching(leaf))), matching the .NET provider. Callers who want caching on a custom pipeline compose CachingSkillsSource (optionally with a cache_isolation_key_selector) themselves. disable_caching now only affects the built-in leaves. Adds a leak-prevention test. - Reword the misleading "Unused by this source" context docstrings on the File/InMemory/MCP sources: the param is part of the get_skills contract; these sources just return the same skills regardless of context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
cba9a1c050 |
Python: Add security information to harness features inline docs (#6936)
* Add security information to harness features inline docs * Address PR comments --------- Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com> |
||
|
|
c67372ff32 |
Python: [BREAKING]: Canonicalize AG-UI interrupt and resume handling (#6925)
* Python: Emit AG-UI interrupt outcomes Key decisions: raise ag-ui-protocol to 0.1.19, type AGUIRequest/AGUIChatOptions with protocol Interrupt and ResumeEntry, and emit interrupted runs through RUN_FINISHED.outcome.interrupts instead of the legacy top-level interrupt field. Preserve existing internal resume/snapshot compatibility by translating legacy interruption metadata into canonical Interrupt metadata. Files changed: packages/ag-ui pyproject, AG-UI run/type/workflow/snapshot helpers, AG-UI protocol-shape tests, and uv.lock. Verification: uv run poe test -P ag-ui; uv run poe syntax -P ag-ui -C; uv run poe typing -P ag-ui; uv run poe validate-dependency-bounds-test -P ag-ui; uv run poe check -P ag-ui; git diff --cached --check. Notes: README and local PRD/Ralph planning files were left unstaged. Follow-up slices still own richer approval/workflow response schemas and full client-side resume forwarding. * Python: Emit canonical AG-UI approval interrupts Key decisions: build Agent Framework approval pauses as canonical AG-UI Interrupt entries under RUN_FINISHED.outcome.interrupts; use reason=tool_call with toolCallId routing; advertise generic approval response schemas using the existing accepted/edited-argument payload contract; keep legacy Agent Framework approval metadata nested under metadata.agent_framework.value for internal snapshot/resume compatibility while avoiding any top-level interrupt value in emitted protocol JSON. Files changed: packages/ag-ui/agent_framework_ag_ui/_run_common.py adds canonical approval interrupt/schema helpers and uses them for function approval requests; packages/ag-ui/agent_framework_ag_ui/_agent_run.py emits canonical interrupts for predictive confirm_changes pauses; packages/ag-ui/tests/ag_ui/test_endpoint.py covers endpoint/SSE approval pause shape; packages/ag-ui/tests/ag_ui/test_run.py covers helper and run-level confirmation interrupt behavior. Verification: uv run pytest packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_pause_emits_canonical_interrupt_outcome packages/ag-ui/tests/ag_ui/test_run.py::test_emit_approval_request_populates_interrupt_metadata packages/ag-ui/tests/ag_ui/test_run.py::test_predictive_confirmation_run_finished_interrupt_links_tool_call -q; uv run pytest packages/ag-ui/tests/ag_ui/test_run.py::test_run_agent_stream_accumulates_multiple_confirm_interrupts packages/ag-ui/tests/ag_ui/test_endpoint.py::test_agent_endpoint_hydrates_interrupted_thread_without_invoking_agent packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_pause_emits_canonical_interrupt_outcome packages/ag-ui/tests/ag_ui/test_run.py::test_predictive_confirmation_run_finished_interrupt_links_tool_call -q; uv run poe test -P ag-ui; uv run poe syntax -P ag-ui -C; uv run poe pyright -P ag-ui; uv run poe typing -P ag-ui; uv run poe check -P ag-ui; git diff --check; git diff --cached --check. Notes: local README, PRD, .ralph, and issue planning artifacts remain unstaged. Follow-up slices still own canonical ResumeEntry approval continuation, workflow request_info canonical resume, client-side forwarding, pending interrupt contract enforcement, snapshot stale-prompt clearing, and documentation/examples. * Python: Resume AG-UI approvals canonically Key decisions: translate canonical ResumeEntry approval payloads into the existing Agent Framework function approval response path at the AG-UI agent-run boundary; route by canonical interruptId while preserving pending approval registry validation; allow edited arguments only through canonical resume translation by updating the stored pending argument fingerprint before execution; emit RUN_ERROR for cancelled, unknown, or malformed approval resumes instead of proceeding. Files changed: packages/ag-ui/agent_framework_ag_ui/_agent_run.py adds canonical approval resume translation, interrupt-id registry aliasing, explicit approval resume RUN_ERROR handling, and alias cleanup on consumption; packages/ag-ui/tests/ag_ui/test_endpoint.py adds endpoint/SSE coverage for approved, denied, edited, cancelled, and unknown canonical approval resumes. Verification: uv run pytest packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_resume_entry_executes_approved_tool packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_resume_entry_denial_does_not_execute_tool packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_resume_entry_applies_edited_arguments packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_cancelled_resume_entry_emits_run_error packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_unknown_resume_entry_emits_run_error -q; uv run pytest packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_pause_emits_canonical_interrupt_outcome packages/ag-ui/tests/ag_ui/test_endpoint.py::test_agent_endpoint_confirm_changes_clears_persisted_interrupt packages/ag-ui/tests/ag_ui/test_approval_result_event.py -q; uv run pytest packages/ag-ui/tests/ag_ui/test_agent_wrapper_comprehensive.py::test_approval_argument_mismatch_is_blocked packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_resume_entry_applies_edited_arguments packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_resume_entry_executes_approved_tool -q; uv run poe syntax -P ag-ui -C; uv run poe pyright -P ag-ui; uv run poe typing -P ag-ui; uv run poe test -P ag-ui; uv run poe check -P ag-ui; git diff --check; git diff --cached --check. Notes: issues/agui-int-03-agent-approval-resume-entry.md was moved to issues/done locally but remains unstaged. Existing local README, PRD, and .ralph artifacts remain unstaged. Follow-up slices still own workflow request_info canonical resume, client-side forwarding, stricter pending interrupt contract enforcement, snapshot stale-prompt clearing, and documentation/examples. * Python: Resume workflow interrupts canonically Key decisions: emit workflow request_info pauses as canonical input_required interrupt outcomes with response schemas and Agent Framework metadata; normalize typed ResumeEntry model dumps through the shared resume parser while preserving status; translate resolved workflow resume payloads through the existing workflow response coercion path; emit RUN_ERROR for cancelled workflow resumes before invoking the workflow. Files changed: packages/ag-ui/agent_framework_ag_ui/_run_common.py preserves canonical resume status/model dumps and merges interrupt metadata values; packages/ag-ui/agent_framework_ag_ui/_workflow_run.py builds canonical workflow request_info interrupts and cancellation errors; packages/ag-ui/tests/ag_ui/test_endpoint.py adds endpoint/SSE workflow pause, resolved resume, and cancelled resume coverage; packages/ag-ui/tests/ag_ui/test_run_common.py and packages/ag-ui/tests/ag_ui/test_workflow_run.py update canonical helper expectations. Verification: uv run pytest packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_workflow_request_info_emits_canonical_interrupt_and_resumes packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_workflow_request_info_cancelled_resume_emits_run_error -q; uv run pytest packages/ag-ui/tests/ag_ui/test_workflow_run.py -q; uv run pytest packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_resume_entry_executes_approved_tool packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_resume_entry_denial_does_not_execute_tool packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_resume_entry_applies_edited_arguments packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_cancelled_resume_entry_emits_run_error packages/ag-ui/tests/ag_ui/test_endpoint.py::test_endpoint_agent_approval_unknown_resume_entry_emits_run_error -q; uv run poe syntax -P ag-ui -C; uv run poe pyright -P ag-ui; uv run poe test -P ag-ui; uv run poe typing -P ag-ui; uv run poe check -P ag-ui; git diff --check; git diff --cached --check. Notes: issue bookkeeping and local PRD files were not staged; existing unstaged packages/ag-ui/README.md remains untouched. Follow-up slices still own client-side forwarding, stricter pending interrupt contract enforcement, snapshot stale-prompt clearing, and documentation/examples. * Python: Forward AG-UI interrupts through client Key decisions: normalize typed Interrupt and ResumeEntry values at the AGUIChatClient and AGUIHttpService boundaries using protocol aliases; map legacy request_info available-interrupt hints to canonical input_required reason while preserving legacy resume wrapper shapes; preserve remote RUN_FINISHED.outcome metadata and expose outcome.interrupts for Agent Framework callers without changing normal success completion handling. Files changed: packages/ag-ui/agent_framework_ag_ui/_client.py forwards normalized available_interrupts/resume values; packages/ag-ui/agent_framework_ag_ui/_http_service.py serializes typed protocol models and compatible values to camelCase wire JSON; packages/ag-ui/agent_framework_ag_ui/_event_converters.py preserves canonical outcomes/interruption metadata; packages/ag-ui/tests/ag_ui/test_ag_ui_client.py, test_http_service.py, and test_event_converters.py cover outgoing typed JSON, canonical interrupted conversion, and success outcome behavior. Verification: uv run pytest packages/ag-ui/tests/ag_ui/test_http_service.py::test_post_run_serializes_typed_interrupts_and_resume_with_protocol_aliases packages/ag-ui/tests/ag_ui/test_ag_ui_client.py::TestAGUIChatClient::test_typed_interrupt_options_forward_canonical_protocol_shape packages/ag-ui/tests/ag_ui/test_event_converters.py::TestAGUIEventConverter::test_run_finished_event_with_canonical_interrupt_outcome packages/ag-ui/tests/ag_ui/test_event_converters.py::TestAGUIEventConverter::test_run_finished_event_with_success_outcome_preserves_normal_completion -q; uv run pytest packages/ag-ui/tests/ag_ui/test_http_service.py packages/ag-ui/tests/ag_ui/test_ag_ui_client.py packages/ag-ui/tests/ag_ui/test_event_converters.py -q; uv run poe syntax -P ag-ui -C; uv run poe pyright -P ag-ui; uv run poe test -P ag-ui; uv run poe typing -P ag-ui; uv run poe check -P ag-ui; git diff --check; git diff --cached --check. Notes: issues/agui-int-05-chat-client-http-forwarding.md was moved to issues/done locally but not staged. Existing unstaged packages/ag-ui/README.md, .ralph, PRD, and snapshot planning artifacts remain untouched. Follow-up slices still own stricter pending interrupt contract enforcement, snapshot stale-prompt clearing, and documentation/examples. * Python: Enforce AG-UI resume contract Key decisions: validate pending AG-UI interrupts before agent or workflow execution; require resume entries to address every open interrupt exactly once; emit RUN_ERROR for missing, unknown, duplicate, malformed, cancelled, or schema-invalid resume payloads; keep successful canonical approval and workflow resume flows working while removing heuristic non-resume workflow continuation for interrupted threads. Files changed: packages/ag-ui/agent_framework_ag_ui/_run_common.py adds strict resume parsing and exact pending-interrupt contract validation; _agent_run.py applies the contract to approval resumes, validates edited approval argument types, and considers stored canonical interrupt ids; _workflow_run.py applies the contract to request_info resumes and fails invalid response coercion explicitly; AG-UI endpoint, workflow, golden, wrapper, and subgraph tests now cover RUN_ERROR failures and canonical resume entries. Verification: uv run pytest focused new resume-contract endpoint tests -q; uv run pytest existing approval/workflow resume endpoint tests -q; uv run pytest packages/ag-ui/tests/ag_ui/test_workflow_run.py packages/ag-ui/tests/ag_ui/test_run.py packages/ag-ui/tests/ag_ui/golden/test_scenario_workflow.py -q; uv run poe test -P ag-ui; uv run poe syntax -P ag-ui -C; uv run poe pyright -P ag-ui; uv run poe typing -P ag-ui; uv run poe check -P ag-ui; git diff --check; git diff --cached --check. Notes: issues/agui-int-06-resume-contract-validation.md was moved to issues/done locally but not staged. Existing unstaged packages/ag-ui/README.md and local .ralph/PRD artifacts remain untouched. Follow-up slices still own canonical snapshot stale-prompt clearing and documentation/examples. * Python: Clear AG-UI snapshot interrupts on cancel Key decisions: treat cancelled canonical approval and workflow resumes as completion of the stored interruption for AG-UI Thread Snapshot hydration; clear only the persisted interrupt field while preserving replayable messages and Shared State; consume cancelled approval registry entries so server-side approval state does not remain open; preserve existing RUN_ERROR responses for cancelled resumes. Files changed: packages/ag-ui/agent_framework_ag_ui/_snapshots.py adds shared persisted-interrupt clearing; _agent_run.py clears snapshots and consumes pending approvals on cancelled approval resumes; _workflow.py clears snapshots on cancelled workflow resumes; test_endpoint.py covers agent/workflow cancelled-resume stale prompt clearing; test_run_common.py covers canonical interrupt toolCallId trusted suffix filtering. Verification: uv run pytest focused interrupted snapshot/resume tests -q; uv run poe test -P ag-ui; uv run poe syntax -P ag-ui -C; uv run poe pyright -P ag-ui; uv run poe typing -P ag-ui; uv run poe check -P ag-ui; git diff --check; git diff --cached --check. Notes: issues/agui-int-07-thread-snapshot-interrupt-hydration.md was moved to issues/done locally but not staged. Existing unstaged packages/ag-ui/README.md and local .ralph/PRD artifacts remain untouched. Follow-up docs/examples slice still owns public guidance updates. * Python: Document canonical AG-UI interrupts Key decisions: document the clean release-candidate interrupt cutover around canonical AG-UI protocol models; direct users to RUN_FINISHED.outcome.interrupts and canonical resume arrays; make clear that Interrupt and ResumeEntry come from ag_ui.core rather than an Agent Framework-specific model; retain normal RUN_FINISHED completion guidance for non-interrupted runs. Files changed: packages/ag-ui/AGENTS.md updates package guidance; packages/ag-ui/README.md adds interrupt/resume protocol and migration notes; packages/ag-ui/agent_framework_ag_ui_examples/README.md documents canonical resume shape for examples; packages/ag-ui/getting_started/README.md teaches outcome.interrupts and ResumeEntry usage. Verification: uv run poe markdown-code-lint failed on pre-existing packages/mistral/README.md; uv run python scripts/check_md_code_blocks.py packages/ag-ui/README.md packages/ag-ui/agent_framework_ag_ui_examples/README.md packages/ag-ui/getting_started/README.md packages/ag-ui/AGENTS.md; git diff --check; git diff --cached --check. Notes: no issue or PRD artifacts were staged. Root AGENTS.md could not be read because access was denied; package and Python workspace guidance were applied. Follow-up docs/examples issue appears complete; no remaining AG-UI interrupt cutover tasks were found locally. * Canonicalize AG-UI interrupt and resume handling * Fix AG-UI interrupt resume feedback * Address AG-UI review feedback |
||
|
|
bcd2800d4c |
Python: Allow disabling approval for SkillsProvider tools (#6867)
* Python: Allow disabling approval for SkillsProvider tools Add disable_load_skill_approval, disable_read_skill_resource_approval, and disable_run_skill_script_approval keyword arguments to SkillsProvider.__init__ and SkillsProvider.from_paths. When set, the corresponding tool is registered with approval_mode=never_require so it runs without approval for trusted-skill scenarios. Approval remains required by default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Preserve from_paths compatibility for SkillsProvider subclasses Forward the disable_*_approval kwargs from SkillsProvider.from_paths only when explicitly enabled, so subclasses that override __init__ with the previous signature keep working when the flags are left at their defaults. Add a regression test covering a legacy-signature subclass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
868744aeea |
Python: Process messages to an executor serially within a superstep (#6776)
* Process messages to an executor serially within a superstep Add a per-executor asyncio.Lock in Executor.execute so each executor processes its messages one at a time within a superstep, while preserving concurrency across distinct executors. Includes a regression test. * Create per-executor lock lazily under the running loop asyncio.Lock created in Executor.__init__ would bind to the first event loop it was awaited under, so reusing an executor/workflow across loops (e.g. successive asyncio.run calls) raised 'bound to a different event loop'. Create the lock lazily via _get_execution_lock(), re-creating it when the running loop changes. Adds a loop-scoped lock test. * Re-create runner context event queue lazily under the running loop Like the per-executor lock, the runner context's asyncio.Queue bound to the first event loop it was awaited under, so reusing a workflow across loops (e.g. successive asyncio.run calls) raised 'bound to a different event loop'. Re-create the queue lazily via _get_event_queue() when the running loop changes. Adds an integration test reusing a workflow across event loops. * Use lazy-None init for the event queue, matching the executor lock Initialize _event_queue to None and create it on first use in _get_event_queue, mirroring the per-executor lock. Avoids constructing a queue in __init__/reset_for_new_run that is immediately discarded once the running loop is known. * Improve comments * Fix formatting |
||
|
|
a5fcd33967 |
Build(deps-dev): Bump js-yaml in /python/packages/devui/frontend (#6813)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.3.0. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.1.1...4.3.0) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.3.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
0260ea0e61 |
Python: implement ADR-0029 service_session_id lifecycle mapping (#6724)
* python: implement ADR-0029 service_session_id lifecycle mapping - Extend AgentSession service_session_id to support structured values - Add agent-owned conversation id extraction for chat forwarding and telemetry - Migrate A2A durable continuation state to A2AServiceSessionId - Keep A2AAgentSession as compatibility shim and mark it deprecated - Update core/a2a tests and package guidance Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix service_session_id type fallout across packages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix remaining test typing signatures for service_session_id Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix hosting test stubs for widened get_session type Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix remaining test stubs for get_session union type Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Simplify A2A session state handling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix import * Fix hosting-telegram test get_session typing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
24581d6865 | Python: Allow devs to opt-out of file-access approvals (#6879) | ||
|
|
09ea690062 |
Python: Fix Hyperlight workspace staging (#6856)
* Fix Hyperlight workspace link staging Reject symlinks, Windows junctions, and reparse points during Hyperlight input staging, and harden output collection/cleanup against the same link types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address Hyperlight staging review Anchor workspace enumeration to the resolved root and avoid following links while classifying output cleanup entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Improve Hyperlight path resolve errors Handle RuntimeError from path resolution alongside OSError when validating Hyperlight sandbox paths and report the source-root validation context in the error message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Mark Hyperlight real sandbox tests as integration Ensure Windows unit CI excludes real Hyperlight sandbox tests by applying the integration marker consistently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Clean up Hyperlight integration sandboxes Close real sandbox fixtures and provider-owned registries in Hyperlight integration tests so they do not rely on process teardown. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
e38592a23c |
Python: Fix Anthropic messages and function-loop fallback (#6794)
* Fix function loop fallback and Anthropic messages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR feedback for fallback and instructions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
c41676682e |
Python: [BREAKING] Extract caching from SkillsProvider into a CachingSkillsSource decorator (#6847)
* Python: [BREAKING] Extract caching from SkillsProvider into CachingSkillsSource decorator Adds a composable CachingSkillsSource(DelegatingSkillsSource) decorator that caches the inner source's skills list, and rewires SkillsProvider to wrap its resolved source in it by default (skipped when disable_caching=True). Removes the provider's baked-in caching (_cached_context field and _get_or_create_context). Mirrors .NET #6768. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add ty ignore for dynamic _test_context attribute in skills test helper Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
effbd17325 |
Python: [BREAKING] Treat nested SKILL.md content as part of the parent skill (#6849)
* Python: Stop skill discovery at skill boundaries File-based skill discovery kept descending after finding a SKILL.md, which treated content nested beneath a skill boundary as an independent skill root. Return immediately after recording a directory that contains SKILL.md so everything below it stays part of that skill, and add a regression test with a nested SKILL.md. Fixes #6682 * Python: Attach nested skill content to the parent skill Removing the SKILL.md subdirectory skip in resource and script scanning so that content beneath a skill boundary is attached to that skill, and update the discovery docstring and the nested-skill test to match. Complements the discovery early-return so a nested SKILL.md is never treated as an independent skill root. |
||
|
|
bc8dd4b63c |
Python: [BREAKING] FileAccess/FileMemory replace_lines literal replacement with line deletion (#6859)
* FileAccess/FileMemory: Allowing removing lines by using full line replace * Add agents.md changes * Address PR comments |
||
|
|
0f1fa21070 |
Python: Accept A2A data URI media parameters (#6818)
Co-authored-by: VectorPeak <VectorPeak@users.noreply.github.com> |
||
|
|
d50698bb79 |
Python: Allow custom argument parsing for skill scripts (#6817)
* Python: Allow custom argument marshaling for skill scripts Add an optional argument_marshaler hook so callers can plug in their own argument conversion logic for inline skill scripts. Supplied at the InlineSkillScript, InlineSkill, and ClassSkill levels; when omitted, behavior is unchanged. This supports backends (e.g. vLLM) that send tool-call arguments in a non-conforming shape such as a JSON string. Port of .NET PR #6498. Closes #6543. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review feedback on skill argument marshaling - Widen InlineSkillScript.run args to accept a raw str (the one place a marshaler-converted value is valid), and drop the now-unneeded type: ignore markers in tests. - Constrain the SkillScriptArgumentMarshaler output type to dict | None so the type enforces the inline-script contract instead of a docstring note. - Add a clear TypeError when a str reaches an inline script with no marshaler configured. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Rename SkillScriptArgumentMarshaler to SkillScriptArgumentParser In Python 'marshalling' specifically connotes the stdlib marshal module, so the term is misleading here. Rename the type alias, the argument_parser parameter/attribute, docstrings, exports, and tests accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fold argument_parser docstring into Args section The skill constructors are fully keyword-only, so name/description/function are already documented under Args. Singling out argument_parser into its own Keyword Args section was inconsistent; merge it into Args for InlineSkillScript, InlineSkill, and ClassSkill. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
059e1e055f |
Python: Fix local history not injected when non-history context providers are present (#6810)
The auto-injection of InMemoryHistoryProvider was gated on there being no context providers at all, so registering any non-history provider (e.g. SkillsProvider, FileAccessProvider, or a RAG memory provider) suppressed local history. On stateless clients this dropped prior messages across turns — most visibly the tool-approval resume turn lost the prior assistant function_call, causing a 400 "Expected toolResult blocks" error. Gate the injection on the absence of a loading HistoryProvider instead, matching the pattern already used in _workflows/_agent.py. Add regression tests covering a non-history provider, an existing loading provider, and a persist-only provider. Fixes #5672 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
43f2095244 |
Python: Fix GeminiChatClient dropping image/file content (#6751)
* Python: Fix GeminiChatClient dropping image/file content GeminiChatClient._convert_message_contents only handled text and function_call content, so data/uri (image, PDF, audio) parts were silently dropped and never reached Gemini. Convert data URIs to inline_data Parts and external URIs to file_data Parts, warning on genuinely unconvertible content. Adds tests for the multimodal conversion paths. Fixes #6688 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: strip data-URI mime params and handle non-inferable URIs Strip parameters (e.g. charset) from a data URI media type before passing it to Gemini, and wrap types.Part.from_uri so a URI with no media_type and no guessable extension is passed through as file_data without a mime type instead of raising ValueError. Adds tests for both paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: reuse shared data-URI helpers Reuse _get_data_bytes and detect_media_type_from_base64 from agent_framework instead of reimplementing base64 extraction/decoding and data-URI header parsing in the Gemini client. This also removes the manual header parsing that previously needed charset-parameter stripping. Updates tests accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
a25756b9ec |
Python: selective version bump for 1.10.0 release (date 260630) (#6840)
- Re-date all beta/alpha packages to 260630 (actual release date) - agent-framework-ag-ui: rc6 -> rc7 (fastapi bound update) - agent-framework-github-copilot: rc1 -> rc2 (approval hook feature) - Newly bumped: azure-ai-search, devui, gemini, hyperlight, ollama - CHANGELOG [1.10.0] date updated to 2026-06-30 with new entries - Hosting/hosting-responses/hosting-telegram excluded per team decision - Inter-package dependency bounds updated - uv.lock refreshed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
7f3a2aec38 |
[BREAKING] Python: Foundry Hosted Agent V2 protocol upgrade (#6811)
* Upgrade to FHA protocol v2 + toolbox integration
* Scope checkpoints and approval storage by user id
* Add toolbox skills integration
* Fix formatting
* Add httpx lower and upper bound
* Update foundry-hosting package version
* Remove custom http client
* Revert "Remove custom http client"
This reverts commit
|
||
|
|
4cb1a6651d |
Python: Align GitHub Copilot provider function approval to use SDK on_pre_tool_use hook (#6750)
* Python: align GitHub Copilot approval to SDK on_pre_tool_use hook Replace the bespoke on_function_approval enforcement in the GitHub Copilot provider with the Copilot SDK's native on_pre_tool_use hook. When no caller hook is supplied, a default hook returns 'ask' for approval_mode='always_require' tools (routed to on_permission_request) and defers others; a caller-supplied on_pre_tool_use takes precedence and logs a warning for any unenforced approval tool. Fixes #6746 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix type-checker errors and restore load_dotenv in sample Use a complete PreToolUseHookInput in on_pre_tool_use hook tests so pyright/pyrefly/ty/zuban no longer report missing required TypedDict keys. Restore load_dotenv() in the function-approval sample for consistency with the other GitHub Copilot samples (PR review feedback). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Deprecate on_function_approval instead of removing it Per PR review feedback, keep the on_function_approval callback working (still enforced in the tool handler for approval_mode='always_require' tools) but emit a DeprecationWarning at construction, so existing users get a signal rather than a silent behavior change. The default on_pre_tool_use ask-hook is not installed when on_function_approval is set, avoiding double-gating. Precedence: user on_pre_tool_use > on_function_approval > default ask-hook. Adds tests for the deprecated path and documents it in the package README. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make on_function_approval and on_pre_tool_use mutually exclusive Per automated review feedback, instead of a precedence ordering between the deprecated on_function_approval callback and the new on_pre_tool_use hook (which silently double-gated when both were set), raise ValueError if both are supplied - at construction (both in default_options) or per run (per-run on_pre_tool_use with a construction-time on_function_approval). This matches the repo convention for deprecated-vs-new params (see _workflows/_workflow.py) and removes the flag-threading. Updates tests and the package README. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
a2f56f7688 |
Python: [BREAKING] Improve FileAccess/FileMemory harness providers (surgical edits, read-only tier, consistent naming) (#6801)
* Python: Add additional file access and memory provider functionality and renames for simplification and consistency * Address PR comments and build failures. * Address PR comments * Address PR comments |
||
|
|
7e5ba70884 |
Python: Stop swallowing skill script and resource errors so the model can self-correct (#6755)
* Python: Add include_detailed_errors option for skill script execution Port the .NET fix from #6680. SkillsProvider previously swallowed exceptions from skill script execution and resource reading, returning a generic error string so the model could not self-correct. - Add an include_detailed_errors option to SkillsProvider.__init__ and from_paths. When True, script-execution failures return an error string with the exception message appended; when False (default), the exception is logged and re-raised, delegating to the function-invocation pipeline's own include_detailed_errors policy. - _read_skill_resource now logs and re-raises instead of returning a generic error string. Resources take no model arguments, so a swallowed generic error is not actionable by the model. - Update and add tests covering the new propagation and detailed-error behavior. Fixes #6681 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Re-raise skill script/resource errors instead of adding a provider option Address PR review: returning a plain error string from the skill provider bypassed the shared tool-error contract (no exception metadata, not counted toward consecutive-error limits), risking infinite retries. Instead of porting the .NET provider-level IncludeDetailedErrors option, _run_skill_script and _read_skill_resource now always log and re-raise on failure. This delegates error handling to the function-invocation pipeline, whose existing include_detailed_errors policy is the Python equivalent of .NET's FunctionInvokingChatClient.IncludeDetailedErrors and correctly preserves exception metadata and consecutive-error counting. Validation failures (empty/unknown skill, script, or resource names) still return user-facing error strings. Tests updated accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
6dd30950c1 |
Python: Fix background agent telemetry context error (#6764)
* Fix issue when using background agents with telemetry * Address PR comments * Fix issue when using background agents with telemetry * Address PR comments * Fix uv.lock * Remove unecessary comments and commit hook reformatted code |
||
|
|
c89a539c02 |
Python: [BREAKING] Make all SkillsProvider tools require approval by default (#6754)
* Python: [BREAKING] Make all SkillsProvider tools require approval by default All tools exposed by SkillsProvider (load_skill, read_skill_resource, run_skill_script) now require approval by default. Previously only run_skill_script could be gated, and only when require_script_approval=True. - Register all three tools with approval_mode="always_require" - Add read_only_tools_auto_approval_rule and all_tools_auto_approval_rule static rules plus tool-name constants (mirrors FileAccessProvider) - Remove the require_script_approval option from __init__ and from_paths - Add skills_auto_approval sample; update script_approval sample/docs Closes #6728 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review: batch skill approval responses and tidy sample - Collect a response for every approval request and send them in a single agent.run so the approval loop always makes progress (no infinite loop when a request lacks a function_call); reject non-function requests instead of skipping them. Applied to both the skills_auto_approval and script_approval samples. - Extract ToolApprovalMiddleware into a local variable in skills_auto_approval for readability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review: add approval handling to remaining skills samples The secure-by-default change makes all SkillsProvider tools require approval, which left the other skills samples emitting approval requests instead of the documented answers. Add ToolApprovalMiddleware with the all-tools auto-approval rule (and a session, which the middleware requires) so these samples run unattended as before: - code_defined_skill, file_based_skill, class_based_skill, mixed_skills, skill_filtering, mcp_based_skill - providers/foundry/foundry_chat_client_with_toolbox_skills The dedicated script_approval (manual) and skills_auto_approval (selective) samples continue to demonstrate interactive approval handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review: simplify "host approval" wording to "approval" Apply maintainer suggestions dropping "host" from the skill-approval docstrings, and align the matching SkillsProvider docstring/AGENTS.md note for consistency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
6dfcbc5c62 |
Python: support stable + preview Azure AI Search (Foundry IQ) API versions (#6603)
Update agent-framework-azure-ai-search to work across the stable/GA azure-search-documents SDK (12.0.0, api-version 2026-04-01) and the preview SDK (12.1.0b1, api-version 2026-05-01-preview) for both semantic and agentic modes. - Bump the dependency to azure-search-documents>=12.0.0,<13 and the package to 1.0.0b260618. - Add an api_version parameter (threaded into SearchClient, SearchIndexClient, and KnowledgeBaseRetrievalClient) plus STABLE_API_VERSION/PREVIEW_API_VERSION constants, re-exported from agent_framework.azure. - Auto-detect preview-only agentic features (output mode, low/medium reasoning effort) via _preview_features_active(), which requires both the preview SDK and a preview api-version; defaults (extractive + minimal) work on both channels and preview-only options raise an actionable error otherwise. - Make knowledge-base imports SDK-version resilient and fix the 12.x surface (k -> k_nearest_neighbors, defensive additional_properties). - Update tests (pass on both SDKs), docs, samples, CHANGELOG, and uv.lock. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
4272d90051 |
Python/.Net: Agent Harness blog post accompanying samples part 2 (#6692)
* Add samples for the harness blog part 2 * Address PR comments * Fix blog links. * Address PR comments * Fix bug where mode was incorrectly defaulted when reading the mode before the first run. * Add reference to new sample readme |
||
|
|
9a565f2bf8 |
Python: convert Pydantic model class response_format to JSON schema in OllamaChatClient (#6782)
Ollama's `format` param only accepts '', 'json', or a JSON-schema dict, so passing a Pydantic model class (the form OpenAIChatClient/FoundryChatClient and create_harness_agent plan mode use) raised a ValidationError while building the request. Convert a model class to its JSON schema when mapping response_format -> format, keeping the original class for typed response parsing. |
||
|
|
9fd3d29e09 |
Python: Fix FunctionShellTool throw and empty streaming shell command (#6763)
* Fix shell tool bug * Address PR feedback * Fix uv.lock changes * Update uv.lock |
||
|
|
6968a7fc59 | Updating background agent loop to resolve provider automatically and add feedback message builder. (#6735) | ||
|
|
4d4db7f501 |
Python: create_harness_agent skills_paths accepts str | Path | Sequence[str | Path] | None (#6717)
* fix: skills_paths accepts str | Path | Sequence[str | Path] | None * fix: update _assemble_context_providers skills_paths annotation to match public signature --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> |
||
|
|
730bcee9ea |
Python: Autolabelling MCP servers based on hints and Github MCP server ifc labels (#6171)
* Python: add GitHub MCP security label sample * modified samples to create devui auth token, support debugging with security, and change context label only using the labels of unhidden result from tools * FIDES: secure MCP labeling, _meta IFC parsing, and docs updates * FIDES: secure MCP labeling, _meta IFC parsing, and docs updates * modified docs * fixed PR comments, simplified github_mcp example * commented github_mcp example * remove the parse_github_mcp_labels and fix the user_identity label propogation * fix: use standard GitHub MCP endpoint with X-MCP-Features: ifc_labels instead of /insiders - Switch MCP_URL from /mcp/insiders to /mcp/ in github_mcp_example.py - Add MCP_HEADERS constant with X-MCP-Features: ifc_labels to opt-in to server-side IFC label emission in _meta payloads - Fix SecureMCPToolProxy to pass headers via httpx.AsyncClient so they are included on session.initialize(), not just on tool calls (was causing 401 to silently surface as anyio cancel-scope CancelledError) - Update README, FIDES_DEVELOPER_GUIDE, FIDES_IMPLEMENTATION_SUMMARY, and 0024-prompt-injection-defense.md to remove all /insiders references * address PR comments * Simplify GitHub MCP security sample to DevUI-only; document SecureAgentConfig quarantine client global behavior * minor PR comments * fixing failed checks * fixing failed checks --------- Co-authored-by: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com> |
||
|
|
a1c37b69e0 |
[Generated by SRE Agent] Clarify identifier security guidance (#6510)
Co-authored-by: Azure SRE Agent <noreply@microsoft.com> Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com> |
||
|
|
f1d838fc5e |
Python: bump package versions for 1.10.0 release (#6753)
* Python: bump package versions for 1.10.0 release - Released cohort (core, openai, foundry, root): 1.9.0/1.8.2 -> 1.10.0 - agent-framework-ag-ui: rc5 -> rc6 (tool history replay fix) - Beta/alpha packages with changes: anthropic, azurefunctions, bedrock, durabletask, hyperlight, purview, foundry-hosting, gemini, hosting, hosting-responses, hosting-telegram, tools bumped to new date stamp (260625) - Inter-package dependency bounds updated for changed packages - CHANGELOG.md updated with [1.10.0] section and compare links Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: update stale hosting dependency pins in hosting-responses and hosting-telegram Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * CI: cap xdist workers at 4 for Azure OpenAI and Functions integration jobs The Azure OpenAI and Functions+Durable Task integration jobs ran with `-n logical` (~20 workers on the hosted runner), oversubscribing the box and collapsing the whole pytest session (all workers reporting `node down: Not properly terminated`) in the merge queue. Pin these two jobs to `-n 4` in python-merge-tests.yml and python-integration-tests.yml to remove the oversubscription while keeping full coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: temporarily skip flaky Python integration tests crashing the merge queue Revert the `-n 4` xdist experiment (it did not prevent the runner crash) and instead skip the integration tests that collapse the pytest-xdist runner in the merge queue (all workers report `node down: Not properly terminated`): - Azure OpenAI: flip the per-file `skip_if_azure_openai_integration_tests_disabled` guard to an unconditional skip (integration tests only; unit tests still run). - Azure Functions / Durable Task: skip the four specific failing tests (test_weather_agent, test_parallel_workflow_end_to_end, test_weather_agent_with_tool, test_conditional_branching). Tracked for re-enablement in #6777. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: skip flaky test_math_agent_with_tool (durabletask integration) Same empty-AgentResponse flakiness as test_weather_agent_with_tool in the same file (AssertionError: assert 0 > 0 / empty .text). Skip it in the merge queue. Tracked in #6777. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
3c3feb8705 |
Python: Refactor runner/workflow responsibilities and fix checkpoint ancestry bug (#6695)
* Refactor runner/workflow responsibilities, add concurrency guards, and fix checkpoint ancestry bug Move runner-state ownership out of Workflow into Runner for clearer responsibilities. Add a weakref-based concurrent-run guard in Workflow and fix the stream-drop race in run_until_convergence. Fix the checkpoint ancestry bug by tracking the previous checkpoint id as runner instance state so parent pointers persist across resumed runs. Move Runner to a deprecated lazy __getattr__ export (backward-compatible with DeprecationWarning) and export CheckpointID. * Scope runtime checkpoint storage to its owning run Close the stream-drop race where a dropped run's deferred async-generator finalizer could leave a runtime checkpoint storage override set (inherited by a new run) or clear a successor run's storage. run() now defensively clears any stale override before starting, and _run_core only clears the override if this run still owns it (mirroring the _active_run ownership guard). Adds regression tests for both the inheritance and clobber cases. * Collapse runtime-storage ownership into the active-run weakref _runtime_storage_owner always held the same weakref as _active_run, so the two ownership conditions were equivalent. Derive ownership from a single owns_run = (_active_run is my_active_run) captured before the active-run clear, and remove the redundant field. No behavior change. * Nest runtime-storage clear under the owns_run guard Both the active-run release and the runtime-storage clear are gated on owns_run, so fold the storage clear inside the if owns_run block. No behavior change. * Reset resume flag in a finally so it can't leak across runs _resumed_from_checkpoint was only cleared on the success path of run_until_convergence, so a failure during a resumed run (e.g. executor failure) left it True. The next fresh run then skipped the superstep-0 checkpoint and parented later checkpoints to the stale resume point. Move the reset into a finally. Add a regression test that fails a resumed run via an executor error and asserts the next fresh run creates the superstep-0 checkpoint. * Fix tests and formatting * Fix formatting * Address comments * Update type ignore statements |
||
|
|
d75f2286f4 |
Python: Add Telegram channel for agent-framework-hosting (#6698)
* Python: Add Telegram channel for agent-framework-hosting - Add agent-framework-hosting-telegram package with TelegramChannel supporting polling and webhook transports, streaming edits with Telegram Bot API rate limiting, per-chat serial workers, and multi-modal inbound/outbound (text, photo, document, voice) - Add local_telegram sample demonstrating multi-channel hosting with a TelegramChannel alongside ResponsesChannel, using per-chat FileHistoryProvider and a run_hook for Telegram persona temperature - Fix test layout: move tests to tests/hosting_telegram/ (no __init__.py) - Remove old [tool.mypy] section and mypy poe task; source type-checking is handled by pyright via shared_tasks - Update uv.lock, pyproject.toml workspace sources, and PACKAGE_STATUS.md Fixes #6588 Refs #6265 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Address Telegram channel CI failures and review feedback - Fix webhook secret validation to use constant-time compare_digest - Harden webhook update parsing: require integer chat IDs and guard slash-only commands - Fix streaming edge cases in TelegramChannel: - prevent edit worker deadlocks when text exceeds 4096 chars - prevent deadlock when placeholder send fails (message_id stays None) - enforce edit throttling with minimum interval sleep - honor send_typing_action=False in streaming mode - always forward final multimodal output (e.g. images), while avoiding duplicate text sends - Expand Telegram tests for slash-only command handling, non-int chat IDs, and streaming behavior (long text, final images, typing toggle) - Fix sample/docs feedback: - rename sample package to agent-framework-hosting-sample-local-telegram - switch sample uv.sources from feature branch to main - align docs/tool names with lookup_weather - fix broken links and server run instructions in README/call_server.py - align local_telegram app docstrings with reasoning hook behavior and strip model in responses_hook Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Fix TelegramChannel streaming to iterate contents for multimodal support - Remove stale PR reference from module docstring - Add Google-style docstring to TelegramChannel.__init__ documenting all keyword args - Fix _stream_to_chat to iterate update.contents instead of using getattr(update, 'text', None); text chunks are extracted from Content items with type='text', non-text content in updates is correctly ignored (images etc. are forwarded via the final response) - Update _FakeStreamUpdate test helper to use contents list matching the real AgentResponseUpdate API; add from_text/from_image class methods - Update _FakeResponseStream to accept _FakeStreamUpdate objects directly - Add test verifying multimodal stream updates don't corrupt text accumulator Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Split local_telegram into simple Telegram-only and new multi-channel sample local_telegram is now a focused Telegram-only sample: - Removes ResponsesChannel and all responses_hook code - Removes call_server.py (no HTTP endpoint to call) - Uses a deterministic lookup_weather tool (hash-based, not random) - Single run_hook that strips model and raises reasoning effort - Drops agent-framework-hosting-responses dependency New local_multi_channel sample shows running both channels at once: - ResponsesChannel + TelegramChannel sharing a FileHistoryProvider - Cross-channel session resumption via previous_response_id - call_server.py moved here (the Responses endpoint lives here now) - Demonstrates the multi-channel coordination story Update README table to list both samples with clear descriptions. Also delete personal_assistant/.venv which was not tracked but caused pyright to crawl the entire installed venv (thousands of files), making sample pyright checks hang indefinitely. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Fallback when Telegram final edit fails - only mark final edit as sent after a confirmed 2xx edit response - fall back to sendMessage when final edit returns a non-success status - add regression test covering failed final edit fallback behavior Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Fix optional await_args typing in telegram test - assert await_args is not None before reading kwargs in streaming fallback test - resolves test-typing failures across mypy/pyright/ty/zuban for hosting-telegram Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
ce74c84bdb |
Python: Preserve OTel parent context for deferred streams (#6709)
* Python: Preserve OTel parent context for deferred streams - capture current OTel context when opening host-managed streaming runs - re-activate captured context during deferred stream pulls and finalization - add host-level regression coverage for deferred stream parent-span linkage - add Responses channel integration coverage for request parent span propagation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: Capture OTel stream context before target.run - capture OTel context snapshot before invoking target.run in _invoke_stream - add regression test guarding capture-before-run evaluation order Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
4fb1fb615a |
Python: Fix Hyperlight CodeAct span parenting (#6712)
* Fix Hyperlight CodeAct span parenting Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Hyperlight test OTEL fixture Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Hyperlight test typing annotations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
9f1ee23a4b |
Python: [BREAKING] Refactor FileSkillsSource for depth-based discovery and predicate filters (#6488)
* Python: [Breaking] Refactor FileSkillsSource for depth-based discovery and predicate filters Refactors FileSkillsSource to make script and resource discovery more flexible. ## Changes - **Drops** resource_directories / script_directories options (preconfigured directory whitelists). - **Adds** search_depth option (>= 1, default 2): controls how deep the recursive scan goes within each skill directory. - **Adds** script_filter / resource_filter predicate options that receive a FileSkillFilterContext (skill_name + relative_file_path), allowing whitelist/blacklist filtering by file path. - **Adds** FileSkillFilterContext class exported from agent_framework. ## Notes - The Skills API is marked @experimental -- the option removals are intentional breaking changes within the experimental surface. - Security checks (path containment, symlink detection) are preserved and continue to use the skill root directory as the trusted boundary. - Ports the same refactoring from .NET PR #6109 while following Python conventions (instance methods, Callable type hints, __slots__). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR feedback: clarify depth constants and skip nested skill directories - Add clarifying comments distinguishing MAX_SEARCH_DEPTH (SKILL.md discovery) from DEFAULT_SEARCH_DEPTH (per-skill resource/script scanning). - Stop recursing into subdirectories that contain their own SKILL.md, preventing child skill files from being attached to the parent skill. - Add test verifying nested skill boundary is respected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove __slots__ from FileSkillFilterContext and add type-ignore comments - Remove __slots__ from FileSkillFilterContext per reviewer feedback — the optimization is negligible and inconsistent with sibling classes. - Add type: ignore[attr-defined] / ty: ignore[unresolved-attribute] comments to test lines accessing private _resources/_scripts attributes, matching the convention established on main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Simplify filter predicates: remove FileSkillFilterContext, use Callable[[str, str], bool] Address reviewer feedback: - Remove FileSkillFilterContext class — a dedicated class for two strings is overkill in Python. Filters now receive (skill_name, relative_file_path) directly as positional args. - Update docstrings to describe behavior instead of referencing private instance attributes. - Remove FileSkillFilterContext from exports and __all__. - Update all test lambdas and remove TestFileSkillFilterContext class. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use DEFAULT_SEARCH_DEPTH as default argument directly Instead of accepting int | None and resolving None to the default internally, use DEFAULT_SEARCH_DEPTH as the parameter default value on both FileSkillsSource.__init__() and SkillsProvider.from_paths(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
1df47667ea |
Python: surface cache and reasoning token counts for the Bedrock and Gemini connectors (#6640)
* Python: surface Gemini cached and thinking token counts in usage details * Python: surface Bedrock cache token counts in usage details * Python: surface Gemini cached and thinking token counts in usage details * Python: surface Bedrock cache token counts in usage details * Return None from Bedrock _parse_usage when no token counts are present Matches the UsageDetails | None return annotation and the Gemini connector's behavior, so a usage payload with no recognized keys no longer propagates an empty mapping. Adds a regression test. |
||
|
|
91f639a694 |
Python: Explicitly emit available_resources and available_scripts in skill content (#6694)
Skill content now always emits <available_resources> and <available_scripts> blocks, using self-closing elements when empty, so models receive an authoritative list per category and do not hallucinate resource/script names. FileSkill now also emits its resources block. Closes #6348 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
d5c15f2fe1 |
.NET/Python: Purview: prefer token principal for user identity (#6693)
* Purview: prefer token principal for user identity Align Purview middleware identity resolution so user-token principals are preferred before supplied message identities, while app-token flows continue to use validated fallback user IDs. Also fix the content activities user route and add regression coverage for identity precedence and route construction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * .NET: Fix user ID resolution logic in ScopedContentProcessor and add unit test for empty token user ID --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
||
|
|
acb28a63b5 |
Python: Fix MCP metadata and tool name handling (#6656)
* Fix MCP metadata and tool name handling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address MCP review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |