From 8bf4235f4ec72e56ba91bc8603cc5eb3322e00fc Mon Sep 17 00:00:00 2001 From: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> Date: Thu, 5 Mar 2026 18:01:25 +0000 Subject: [PATCH 01/44] Python: Forward runtime kwargs to skill resource functions (#4417) * support code skills * address pr review comments * address package and syntax checks * address pr review comments * address pr review comment * address failed check * rename agentskill and agetnskillprovider * move agent skills related assets to _skills.py * address pr review comments * address review comments * support kwargs * address pr review feedback --- .../packages/core/agent_framework/_skills.py | 20 ++++++++-- .../packages/core/tests/core/test_skills.py | 37 +++++++++++++++++++ .../02-agents/skills/code_skill/README.md | 7 ++-- .../02-agents/skills/code_skill/code_skill.py | 24 ++++++++---- 4 files changed, 75 insertions(+), 13 deletions(-) diff --git a/python/packages/core/agent_framework/_skills.py b/python/packages/core/agent_framework/_skills.py index 49695c89e6..11de6c3bdb 100644 --- a/python/packages/core/agent_framework/_skills.py +++ b/python/packages/core/agent_framework/_skills.py @@ -107,6 +107,15 @@ class SkillResource: self.content = content self.function = function + # Precompute whether the function accepts **kwargs to avoid + # repeated inspect.signature() calls on every invocation. + self._accepts_kwargs: bool = False + if function is not None: + sig = inspect.signature(function) + self._accepts_kwargs = any( + p.kind == inspect.Parameter.VAR_KEYWORD for p in sig.parameters.values() + ) + class Skill: """A skill definition with optional resources. @@ -511,7 +520,7 @@ class SkillsProvider(BaseContextProvider): return content - async def _read_skill_resource(self, skill_name: str, resource_name: str) -> str: + async def _read_skill_resource(self, skill_name: str, resource_name: str, **kwargs: Any) -> str: """Read a named resource from a skill. Resolves the resource by case-insensitive name lookup. Static @@ -521,6 +530,9 @@ class SkillsProvider(BaseContextProvider): Args: skill_name: The name of the owning skill. resource_name: The resource name to look up (case-insensitive). + **kwargs: Runtime keyword arguments forwarded to resource functions + that accept ``**kwargs`` (e.g. arguments passed via + ``agent.run(user_id="123")``). Returns: The resource content string, or a user-facing error message on @@ -550,9 +562,11 @@ class SkillsProvider(BaseContextProvider): if resource.function is not None: try: if inspect.iscoroutinefunction(resource.function): - result = await resource.function() + result = ( + await resource.function(**kwargs) if resource._accepts_kwargs else await resource.function() + ) else: - result = resource.function() + result = resource.function(**kwargs) if resource._accepts_kwargs else resource.function() return str(result) except Exception as exc: logger.exception("Failed to read resource '%s' from skill '%s'", resource_name, skill_name) diff --git a/python/packages/core/tests/core/test_skills.py b/python/packages/core/tests/core/test_skills.py index e64691e655..cb829b7b9f 100644 --- a/python/packages/core/tests/core/test_skills.py +++ b/python/packages/core/tests/core/test_skills.py @@ -6,6 +6,7 @@ from __future__ import annotations import os from pathlib import Path +from typing import Any from unittest.mock import AsyncMock import pytest @@ -993,6 +994,42 @@ class TestSkillsProviderCodeSkill: result = await provider._read_skill_resource("prog-skill", "nonexistent") assert result.startswith("Error:") + async def test_read_callable_resource_sync_with_kwargs(self) -> None: + skill = Skill(name="prog-skill", description="A skill.", content="Body") + + @skill.resource + def get_user_config(**kwargs: Any) -> str: + user_id = kwargs.get("user_id", "unknown") + return f"config for {user_id}" + + provider = SkillsProvider(skills=[skill]) + result = await provider._read_skill_resource("prog-skill", "get_user_config", user_id="user_123") + assert result == "config for user_123" + + async def test_read_callable_resource_async_with_kwargs(self) -> None: + skill = Skill(name="prog-skill", description="A skill.", content="Body") + + @skill.resource + async def get_user_data(**kwargs: Any) -> str: + token = kwargs.get("auth_token", "none") + return f"data with token={token}" + + provider = SkillsProvider(skills=[skill]) + result = await provider._read_skill_resource("prog-skill", "get_user_data", auth_token="abc") + assert result == "data with token=abc" + + async def test_read_callable_resource_without_kwargs_ignores_extra_args(self) -> None: + """Resource functions without **kwargs should still work when kwargs are passed.""" + skill = Skill(name="prog-skill", description="A skill.", content="Body") + + @skill.resource + def static_resource() -> str: + return "static content" + + provider = SkillsProvider(skills=[skill]) + result = await provider._read_skill_resource("prog-skill", "static_resource", user_id="ignored") + assert result == "static content" + async def test_before_run_injects_code_skills(self) -> None: skill = Skill(name="prog-skill", description="A code-defined skill.", content="Body") provider = SkillsProvider(skills=[skill]) diff --git a/python/samples/02-agents/skills/code_skill/README.md b/python/samples/02-agents/skills/code_skill/README.md index 828e7c8e22..4900d00eb5 100644 --- a/python/samples/02-agents/skills/code_skill/README.md +++ b/python/samples/02-agents/skills/code_skill/README.md @@ -4,12 +4,13 @@ This sample demonstrates how to create **Agent Skills** in Python code, without ## What are Code-Defined Skills? -While file-based skills use `SKILL.md` files discovered on disk, code-defined skills let you define skills entirely in Python using `Skill` and `SkillResource` classes. Two patterns are shown: +While file-based skills use `SKILL.md` files discovered on disk, code-defined skills let you define skills entirely in Python using `Skill` and `SkillResource` classes. Three patterns are shown: 1. **Basic Code Skill** — Create a `Skill` directly with static resources (inline content) 2. **Dynamic Resources** — Attach callable resources via the `@skill.resource` decorator that generate content at invocation time +3. **Dynamic Resources with kwargs** — Attach a callable resource that accepts `**kwargs` to receive runtime arguments passed via `agent.run()`, useful for injecting request-scoped context (user tokens, session data) -Both patterns can be combined with file-based skills in a single `SkillsProvider`. +All patterns can be combined with file-based skills in a single `SkillsProvider`. ## Project Structure @@ -47,7 +48,7 @@ uv run samples/02-agents/skills/code_skill/code_skill.py The sample runs two examples: 1. **Code style question** — Uses Pattern 1 (static resources): the agent loads the `code-style` skill and reads the `style-guide` resource to answer naming convention questions -2. **Project info question** — Uses Pattern 2 (dynamic resources): the agent reads dynamically generated `environment` and `team-roster` resources +2. **Project info question** — Uses Patterns 2 & 3 (dynamic resources with kwargs): the agent reads the dynamically generated `team-roster` resource and the `environment` resource which receives `app_version` via runtime kwargs ## Learn More diff --git a/python/samples/02-agents/skills/code_skill/code_skill.py b/python/samples/02-agents/skills/code_skill/code_skill.py index 3c95688c49..e111567244 100644 --- a/python/samples/02-agents/skills/code_skill/code_skill.py +++ b/python/samples/02-agents/skills/code_skill/code_skill.py @@ -4,6 +4,7 @@ import asyncio import os import sys from textwrap import dedent +from typing import Any from agent_framework import Agent, Skill, SkillResource, SkillsProvider from agent_framework.azure import AzureOpenAIResponsesClient @@ -14,7 +15,7 @@ from dotenv import load_dotenv Code-Defined Agent Skills — Define skills in Python code This sample demonstrates how to create Agent Skills in code, -without needing SKILL.md files on disk. Two patterns are shown: +without needing SKILL.md files on disk. Three patterns are shown: Pattern 1: Basic Code Skill Create a Skill instance directly with static resources (inline content). @@ -24,6 +25,11 @@ Pattern 2: Dynamic Resources decorator. Resources can be sync or async functions that generate content at invocation time. +Pattern 3: Dynamic Resources with kwargs + Attach a callable resource that accepts **kwargs to receive runtime + arguments passed via agent.run(). This is useful for injecting + request-scoped context (user tokens, session data) into skill resources. + Both patterns can be combined with file-based skills in a single SkillsProvider. """ @@ -72,12 +78,15 @@ project_info_skill = Skill( @project_info_skill.resource -def environment() -> str: +def environment(**kwargs: Any) -> str: """Get current environment configuration.""" + # Access runtime kwargs passed via agent.run(app_version="...") + app_version = kwargs.get("app_version", "unknown") env = os.environ.get("APP_ENV", "development") region = os.environ.get("APP_REGION", "us-east-1") return f"""\ # Environment Configuration + - App Version: {app_version} - Environment: {env} - Region: {region} - Python: {sys.version} @@ -124,10 +133,11 @@ async def main() -> None: response = await agent.run("What naming convention should I use for class attributes?") print(f"Agent: {response}\n") - # Example 2: Project info question (Pattern 2 — dynamic resources) + # Example 2: Project info question (Pattern 2 & 3 — dynamic resources with kwargs) print("Example 2: Project info question") print("---------------------------------") - response = await agent.run("What environment are we running in and who is on the team?") + # Pass app_version as a runtime kwarg; it flows to the environment() resource via **kwargs + response = await agent.run("What environment are we running in and who is on the team?", app_version="2.4.1") print(f"Agent: {response}\n") """ @@ -141,9 +151,9 @@ async def main() -> None: Example 2: Project info question --------------------------------- - Agent: We're running in the development environment in us-east-1. - The team consists of Alice Chen (Tech Lead), Bob Smith (Backend Engineer), - and Carol Davis (Frontend Engineer). + Agent: We're running app version 2.4.1 in the development environment + in us-east-1. The team consists of Alice Chen (Tech Lead), Bob Smith + (Backend Engineer), and Carol Davis (Frontend Engineer). """ From ce7b5b17c13928ac5be94de5621e97c000ee8d27 Mon Sep 17 00:00:00 2001 From: Giles Odigwe <79032838+giles17@users.noreply.github.com> Date: Thu, 5 Mar 2026 12:12:11 -0800 Subject: [PATCH 02/44] Python: Fix `as_agent()` not defaulting name/description from client properties (#4484) * Fix as_agent() not defaulting name/description from client properties AzureAIClient.as_agent() and AzureAIAgentClient.as_agent() now fall back to self.agent_name and self.agent_description when name/description are not explicitly passed. This ensures Agent.name is populated for telemetry spans without requiring callers to repeat the name. Fixes #4471 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: use is None checks instead of truthiness Switch from name or self.agent_name to explicit is None checks so that callers can intentionally pass empty strings without them being replaced by client defaults. Added edge-case tests for empty strings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update docstrings to document name/description defaulting behavior Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../agent_framework_azure_ai/_chat_client.py | 9 ++-- .../agent_framework_azure_ai/_client.py | 9 ++-- .../tests/test_azure_ai_agent_client.py | 42 +++++++++++++++++++ .../azure-ai/tests/test_azure_ai_client.py | 42 +++++++++++++++++++ 4 files changed, 94 insertions(+), 8 deletions(-) diff --git a/python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py b/python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py index a0c9d9046c..4c0e3a56e7 100644 --- a/python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py +++ b/python/packages/azure-ai/agent_framework_azure_ai/_chat_client.py @@ -1461,8 +1461,9 @@ class AzureAIAgentClient( Keyword Args: id: The unique identifier for the agent. Will be created automatically if not provided. - name: The name of the agent. - description: A brief description of the agent's purpose. + name: The name of the agent. Defaults to the client's ``agent_name`` when None. + description: A brief description of the agent's purpose. Defaults to the client's + ``agent_description`` when None. instructions: Optional instructions for the agent. tools: The tools to use for the request. default_options: A TypedDict containing chat options. @@ -1475,8 +1476,8 @@ class AzureAIAgentClient( """ return super().as_agent( id=id, - name=name, - description=description, + name=self.agent_name if name is None else name, + description=self.agent_description if description is None else description, instructions=instructions, tools=tools, default_options=default_options, diff --git a/python/packages/azure-ai/agent_framework_azure_ai/_client.py b/python/packages/azure-ai/agent_framework_azure_ai/_client.py index df0340a8f1..26fb0c390a 100644 --- a/python/packages/azure-ai/agent_framework_azure_ai/_client.py +++ b/python/packages/azure-ai/agent_framework_azure_ai/_client.py @@ -1189,8 +1189,9 @@ class RawAzureAIClient(RawOpenAIResponsesClient[AzureAIClientOptionsT], Generic[ Keyword Args: id: The unique identifier for the agent. Will be created automatically if not provided. - name: The name of the agent. - description: A brief description of the agent's purpose. + name: The name of the agent. Defaults to the client's ``agent_name`` when None. + description: A brief description of the agent's purpose. Defaults to the client's + ``agent_description`` when None. instructions: Optional instructions for the agent. tools: The tools to use for the request. default_options: A TypedDict containing chat options. @@ -1203,8 +1204,8 @@ class RawAzureAIClient(RawOpenAIResponsesClient[AzureAIClientOptionsT], Generic[ """ return super().as_agent( id=id, - name=name, - description=description, + name=self.agent_name if name is None else name, + description=self.agent_description if description is None else description, instructions=instructions, tools=tools, default_options=default_options, diff --git a/python/packages/azure-ai/tests/test_azure_ai_agent_client.py b/python/packages/azure-ai/tests/test_azure_ai_agent_client.py index 6c18352195..4d20add20a 100644 --- a/python/packages/azure-ai/tests/test_azure_ai_agent_client.py +++ b/python/packages/azure-ai/tests/test_azure_ai_agent_client.py @@ -509,6 +509,48 @@ async def test_azure_ai_chat_client_prepare_options_merges_instructions_from_mes assert "concise" in instructions_text.lower() +def test_as_agent_uses_client_agent_name_as_default(mock_agents_client: MagicMock) -> None: + """Test that as_agent() defaults Agent.name to client.agent_name when name is not provided.""" + client = create_test_azure_ai_chat_client(mock_agents_client, agent_name="my_agent") + client.agent_description = "my description" + + agent = client.as_agent(instructions="You are helpful.") + + assert agent.name == "my_agent" + assert agent.description == "my description" + + +def test_as_agent_explicit_name_overrides_client_agent_name(mock_agents_client: MagicMock) -> None: + """Test that an explicit name passed to as_agent() takes precedence over client.agent_name.""" + client = create_test_azure_ai_chat_client(mock_agents_client, agent_name="client_name") + client.agent_description = "client description" + + agent = client.as_agent(name="explicit_name", description="explicit description", instructions="You are helpful.") + + assert agent.name == "explicit_name" + assert agent.description == "explicit description" + + +def test_as_agent_no_name_anywhere(mock_agents_client: MagicMock) -> None: + """Test that Agent.name is None when neither as_agent name nor client.agent_name is provided.""" + client = create_test_azure_ai_chat_client(mock_agents_client) + + agent = client.as_agent(instructions="You are helpful.") + + assert agent.name is None + + +def test_as_agent_empty_string_preserves_explicit_value(mock_agents_client: MagicMock) -> None: + """Test that empty-string name/description are preserved and do not fall back to client defaults.""" + client = create_test_azure_ai_chat_client(mock_agents_client, agent_name="client_name") + client.agent_description = "client description" + + agent = client.as_agent(name="", description="", instructions="You are helpful.") + + assert agent.name == "" + assert agent.description == "" + + async def test_azure_ai_chat_client_inner_get_response(mock_agents_client: MagicMock) -> None: """Test _inner_get_response method.""" client = create_test_azure_ai_chat_client(mock_agents_client, agent_id="test-agent") diff --git a/python/packages/azure-ai/tests/test_azure_ai_client.py b/python/packages/azure-ai/tests/test_azure_ai_client.py index e2145618c0..8760197284 100644 --- a/python/packages/azure-ai/tests/test_azure_ai_client.py +++ b/python/packages/azure-ai/tests/test_azure_ai_client.py @@ -546,6 +546,48 @@ def test_update_agent_name_and_description(mock_project_client: MagicMock) -> No mock_update.assert_called_once_with(None) +def test_as_agent_uses_client_agent_name_as_default(mock_project_client: MagicMock) -> None: + """Test that as_agent() defaults Agent.name to client.agent_name when name is not provided.""" + client = create_test_azure_ai_client(mock_project_client, agent_name="my_agent") + client.agent_description = "my description" + + agent = client.as_agent(instructions="You are helpful.") + + assert agent.name == "my_agent" + assert agent.description == "my description" + + +def test_as_agent_explicit_name_overrides_client_agent_name(mock_project_client: MagicMock) -> None: + """Test that an explicit name passed to as_agent() takes precedence over client.agent_name.""" + client = create_test_azure_ai_client(mock_project_client, agent_name="client_name") + client.agent_description = "client description" + + agent = client.as_agent(name="explicit_name", description="explicit description", instructions="You are helpful.") + + assert agent.name == "explicit_name" + assert agent.description == "explicit description" + + +def test_as_agent_no_name_anywhere(mock_project_client: MagicMock) -> None: + """Test that Agent.name is None when neither as_agent name nor client.agent_name is provided.""" + client = create_test_azure_ai_client(mock_project_client) + + agent = client.as_agent(instructions="You are helpful.") + + assert agent.name is None + + +def test_as_agent_empty_string_preserves_explicit_value(mock_project_client: MagicMock) -> None: + """Test that empty-string name/description are preserved and do not fall back to client defaults.""" + client = create_test_azure_ai_client(mock_project_client, agent_name="client_name") + client.agent_description = "client description" + + agent = client.as_agent(name="", description="", instructions="You are helpful.") + + assert agent.name == "" + assert agent.description == "" + + async def test_async_context_manager(mock_project_client: MagicMock) -> None: """Test async context manager functionality.""" client = create_test_azure_ai_client(mock_project_client, should_close_client=True) From 8664d1928553c6555ccd234cc9ebff9ee2524e1b Mon Sep 17 00:00:00 2001 From: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> Date: Thu, 5 Mar 2026 15:16:19 -0800 Subject: [PATCH 03/44] Python: Propagated MCP isError flag through function middleware pipeline (#4511) * Propagated MCP isError flag through function middleware pipeline Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Small update Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- python/packages/core/agent_framework/_mcp.py | 4 + .../packages/core/agent_framework/_skills.py | 4 +- python/packages/core/tests/core/test_mcp.py | 148 +++++++++++++++++- 3 files changed, 152 insertions(+), 4 deletions(-) diff --git a/python/packages/core/agent_framework/_mcp.py b/python/packages/core/agent_framework/_mcp.py index 0c241cb89a..b07a872204 100644 --- a/python/packages/core/agent_framework/_mcp.py +++ b/python/packages/core/agent_framework/_mcp.py @@ -901,7 +901,11 @@ class MCPTool: for attempt in range(2): try: result = await self.session.call_tool(tool_name, arguments=filtered_kwargs, meta=otel_meta) # type: ignore + if result.isError: + raise ToolExecutionException(parser(result)) return parser(result) + except ToolExecutionException: + raise except ClosedResourceError as cl_ex: if attempt == 0: # First attempt failed, try reconnecting diff --git a/python/packages/core/agent_framework/_skills.py b/python/packages/core/agent_framework/_skills.py index 11de6c3bdb..c7d59d789e 100644 --- a/python/packages/core/agent_framework/_skills.py +++ b/python/packages/core/agent_framework/_skills.py @@ -563,10 +563,10 @@ class SkillsProvider(BaseContextProvider): try: if inspect.iscoroutinefunction(resource.function): result = ( - await resource.function(**kwargs) if resource._accepts_kwargs else await resource.function() + await resource.function(**kwargs) if resource._accepts_kwargs else await resource.function() # pyright: ignore[reportPrivateUsage] ) else: - result = resource.function(**kwargs) if resource._accepts_kwargs else resource.function() + result = resource.function(**kwargs) if resource._accepts_kwargs else resource.function() # pyright: ignore[reportPrivateUsage] return str(result) except Exception as exc: logger.exception("Failed to read resource '%s' from skill '%s'", resource_name, skill_name) diff --git a/python/packages/core/tests/core/test_mcp.py b/python/packages/core/tests/core/test_mcp.py index 65b4015093..867e7183cf 100644 --- a/python/packages/core/tests/core/test_mcp.py +++ b/python/packages/core/tests/core/test_mcp.py @@ -14,6 +14,8 @@ from pydantic import AnyUrl, BaseModel from agent_framework import ( Content, + FunctionInvocationContext, + FunctionMiddleware, MCPStdioTool, MCPStreamableHTTPTool, MCPWebsocketTool, @@ -30,6 +32,7 @@ from agent_framework._mcp import ( _prepare_message_for_mcp, logger, ) +from agent_framework._middleware import FunctionMiddlewarePipeline from agent_framework.exceptions import ToolException, ToolExecutionException # Integration test skip condition @@ -898,6 +901,147 @@ async def test_local_mcp_server_function_execution_error(): await func.invoke(param="test_value") +async def test_mcp_tool_call_tool_raises_on_is_error(): + """Test that call_tool raises ToolExecutionException when MCP returns isError=True.""" + + class TestServer(MCPTool): + async def connect(self): + self.session = Mock(spec=ClientSession) + self.session.list_tools = AsyncMock( + return_value=types.ListToolsResult( + tools=[ + types.Tool( + name="test_tool", + description="Test tool", + inputSchema={ + "type": "object", + "properties": {"param": {"type": "string"}}, + "required": ["param"], + }, + ) + ] + ) + ) + self.session.call_tool = AsyncMock( + return_value=types.CallToolResult( + content=[types.TextContent(type="text", text="Something went wrong")], + isError=True, + ) + ) + + def get_mcp_client(self) -> _AsyncGeneratorContextManager[Any, None]: + return None + + server = TestServer(name="test_server") + async with server: + await server.load_tools() + func = server.functions[0] + + with pytest.raises(ToolExecutionException, match="Something went wrong"): + await func.invoke(param="test_value") + + +async def test_mcp_tool_call_tool_succeeds_when_is_error_false(): + """Test that call_tool returns normally when MCP returns isError=False.""" + + class TestServer(MCPTool): + async def connect(self): + self.session = Mock(spec=ClientSession) + self.session.list_tools = AsyncMock( + return_value=types.ListToolsResult( + tools=[ + types.Tool( + name="test_tool", + description="Test tool", + inputSchema={ + "type": "object", + "properties": {"param": {"type": "string"}}, + "required": ["param"], + }, + ) + ] + ) + ) + self.session.call_tool = AsyncMock( + return_value=types.CallToolResult( + content=[types.TextContent(type="text", text="Success")], + isError=False, + ) + ) + + def get_mcp_client(self) -> _AsyncGeneratorContextManager[Any, None]: + return None + + server = TestServer(name="test_server") + async with server: + await server.load_tools() + func = server.functions[0] + result = await func.invoke(param="test_value") + assert result == "Success" + + +async def test_mcp_tool_is_error_propagates_through_function_middleware(): + """Test that MCP isError=True propagates as ToolExecutionException through function middleware.""" + error_seen_in_middleware = False + + class ErrorCheckMiddleware(FunctionMiddleware): + async def process(self, context: FunctionInvocationContext, call_next): + nonlocal error_seen_in_middleware + try: + await call_next() + except ToolExecutionException: + error_seen_in_middleware = True + raise + + class TestServer(MCPTool): + async def connect(self): + self.session = Mock(spec=ClientSession) + self.session.list_tools = AsyncMock( + return_value=types.ListToolsResult( + tools=[ + types.Tool( + name="test_tool", + description="Test tool", + inputSchema={ + "type": "object", + "properties": {"param": {"type": "string"}}, + "required": ["param"], + }, + ) + ] + ) + ) + self.session.call_tool = AsyncMock( + return_value=types.CallToolResult( + content=[types.TextContent(type="text", text="MCP error occurred")], + isError=True, + ) + ) + + def get_mcp_client(self) -> _AsyncGeneratorContextManager[Any, None]: + return None + + server = TestServer(name="test_server") + async with server: + await server.load_tools() + func = server.functions[0] + + middleware_pipeline = FunctionMiddlewarePipeline(ErrorCheckMiddleware()) + + middleware_context = FunctionInvocationContext( + function=func, + arguments={"param": "test_value"}, + ) + + with pytest.raises(ToolExecutionException, match="MCP error occurred"): + await middleware_pipeline.execute( + middleware_context, + lambda ctx: func.invoke(arguments=ctx.arguments), + ) + + assert error_seen_in_middleware, "Middleware should have seen the ToolExecutionException" + + async def test_local_mcp_server_prompt_execution(): """Test prompt execution through MCP server.""" @@ -2098,7 +2242,7 @@ async def test_mcp_tool_connection_properly_invalidated_after_closed_resource_er tool._tools_loaded = True # First call should work - connection is valid - mock_session.call_tool.return_value = MagicMock(content=[]) + mock_session.call_tool.return_value = types.CallToolResult(content=[]) result = await tool.call_tool("test_tool", arg1="value1") assert result is not None @@ -2111,7 +2255,7 @@ async def test_mcp_tool_connection_properly_invalidated_after_closed_resource_er call_count += 1 if call_count == 1: raise ClosedResourceError - return MagicMock(content=[]) + return types.CallToolResult(content=[]) mock_session.call_tool = call_tool_with_error From 1ac68f65bffab18f8f46cd29bd1d29328c951ac8 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Mar 2026 17:34:35 -0800 Subject: [PATCH 04/44] Python: Fix RedisContextProvider for redisvl 0.14.0 by using AggregateHybridQuery (#3954) * Initial plan * Fix: Replace alpha with linear_alpha in HybridQuery for redisvl 0.14.0 compatibility Co-authored-by: markwallace-microsoft <127216156+markwallace-microsoft@users.noreply.github.com> * Address code review: Improve test readability and add explanatory comment Co-authored-by: markwallace-microsoft <127216156+markwallace-microsoft@users.noreply.github.com> * Add CHANGELOG entry for redisvl 0.14.0 compatibility fix Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com> * Use AggregateHybridQuery instead of HybridQuery for backward compatibility Replace HybridQuery with AggregateHybridQuery to preserve existing functionality that works with older Redis versions. The new HybridQuery in redisvl 0.14.0 requires Redis 8.4.0+ and uses a different API, while AggregateHybridQuery maintains compatibility with the original implementation. Co-authored-by: TaoChenOSU <12570346+TaoChenOSU@users.noreply.github.com> * Fix test to use linear_alpha parameter matching _redis_search implementation The test was passing alpha as a keyword argument to _redis_search(), but the method uses linear_alpha to match the redisvl 0.14.0 AggregateHybridQuery API. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix pyright error: use alpha parameter matching AggregateHybridQuery API AggregateHybridQuery expects 'alpha', not 'linear_alpha'. Updated the _redis_search method parameter and the test accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: markwallace-microsoft <127216156+markwallace-microsoft@users.noreply.github.com> Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com> Co-authored-by: TaoChenOSU <12570346+TaoChenOSU@users.noreply.github.com> Co-authored-by: Ben Thomas Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- python/CHANGELOG.md | 4 ++ .../_context_provider.py | 8 ++-- python/packages/redis/tests/test_providers.py | 38 +++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/python/CHANGELOG.md b/python/CHANGELOG.md index de085490cd..7ecab1b442 100644 --- a/python/CHANGELOG.md +++ b/python/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- **agent-framework-redis**: Fix `RedisContextProvider` compatibility with redisvl 0.14.0 by using `AggregateHybridQuery` ([#3954](https://github.com/microsoft/agent-framework/pull/3954)) + ## [1.0.0rc3] - 2026-03-04 ### Added diff --git a/python/packages/redis/agent_framework_redis/_context_provider.py b/python/packages/redis/agent_framework_redis/_context_provider.py index 32b6a6cc5d..98d5d9917f 100644 --- a/python/packages/redis/agent_framework_redis/_context_provider.py +++ b/python/packages/redis/agent_framework_redis/_context_provider.py @@ -22,7 +22,7 @@ from agent_framework.exceptions import ( IntegrationInvalidRequestException, ) from redisvl.index import AsyncSearchIndex -from redisvl.query import HybridQuery, TextQuery +from redisvl.query import AggregateHybridQuery, TextQuery from redisvl.query.filter import FilterExpression, Tag from redisvl.utils.token_escaper import TokenEscaper from redisvl.utils.vectorize import BaseVectorizer @@ -341,7 +341,7 @@ class RedisContextProvider(BaseContextProvider): filter_expression: Any | None = None, return_fields: list[str] | None = None, num_results: int = 10, - linear_alpha: float = 0.7, + alpha: float = 0.7, ) -> list[dict[str, Any]]: """Runs a text or hybrid vector-text search with optional filters.""" await self._ensure_index() @@ -371,14 +371,14 @@ class RedisContextProvider(BaseContextProvider): try: if self.redis_vectorizer and self.vector_field_name: vector = await self.redis_vectorizer.aembed(q) # pyright: ignore[reportUnknownMemberType] - query = HybridQuery( + query = AggregateHybridQuery( text=q, text_field_name="content", vector=vector, vector_field_name=self.vector_field_name, text_scorer=text_scorer, filter_expression=combined_filter, - linear_alpha=linear_alpha, + alpha=alpha, dtype=self.redis_vectorizer.dtype, # pyright: ignore[reportUnknownMemberType] num_results=num_results, return_fields=return_fields, diff --git a/python/packages/redis/tests/test_providers.py b/python/packages/redis/tests/test_providers.py index 67db227630..dd0ff51cd8 100644 --- a/python/packages/redis/tests/test_providers.py +++ b/python/packages/redis/tests/test_providers.py @@ -271,6 +271,44 @@ class TestRedisContextProviderContextManager: assert p is provider +class TestRedisContextProviderHybridQuery: + """Test for AggregateHybridQuery parameter compatibility with redisvl 0.14.0.""" + + async def test_aggregate_hybrid_query_uses_alpha( + self, + mock_index: AsyncMock, + patch_index_from_dict: MagicMock, # noqa: ARG002 - fixture modifies behavior via side effects + ): + """Ensure AggregateHybridQuery is called with alpha parameter.""" + from redisvl.utils.vectorize import BaseVectorizer + + # Create a mock vectorizer that inherits from BaseVectorizer + mock_vectorizer = MagicMock(spec=BaseVectorizer) + mock_vectorizer.dims = 128 + mock_vectorizer.dtype = "float32" + mock_vectorizer.aembed = AsyncMock(return_value=[0.1] * 128) + + mock_index.query = AsyncMock(return_value=[{"content": "test result"}]) + + provider = RedisContextProvider( + source_id="ctx", + user_id="u1", + redis_vectorizer=mock_vectorizer, + vector_field_name="embedding", + ) + + # Call _redis_search with custom alpha + with patch("agent_framework_redis._context_provider.AggregateHybridQuery") as mock_hybrid_query: + mock_hybrid_query.return_value = MagicMock() + await provider._redis_search(text="test query", alpha=0.5) + + # Verify AggregateHybridQuery was called with alpha parameter + mock_hybrid_query.assert_called_once() + call_kwargs = mock_hybrid_query.call_args.kwargs + assert "alpha" in call_kwargs + assert call_kwargs["alpha"] == 0.5 + + # =========================================================================== # RedisHistoryProvider tests # =========================================================================== From 4bd546979831e1975f5dc4506ad1496608a4c2bd Mon Sep 17 00:00:00 2001 From: Evan Mattson <35585003+moonbox3@users.noreply.github.com> Date: Fri, 6 Mar 2026 16:06:56 +0900 Subject: [PATCH 05/44] Python: Improve ag-ui tests and coverage (#4442) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Improve ag-ui tests and coverage * fix tests paths * Fixes * Improve AG-UI test robustness and correctness - Map toolName → tool_call_name in SSE helpers for TOOL_CALL_START events - Fail loudly on malformed SSE JSON in parse_sse_response() instead of silently dropping - Detect duplicate TOOL_CALL_START/TOOL_CALL_END in assert_tool_calls_balanced() - Remove fragile source line reference from test docstring - Add found guard in test_client_tool_sets_additional_properties to prevent vacuous pass Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- python/packages/ag-ui/pyproject.toml | 2 +- python/packages/ag-ui/tests/ag_ui/conftest.py | 88 ++ .../ag-ui/tests/ag_ui/event_stream.py | 175 ++++ .../ag-ui/tests/ag_ui/golden/__init__.py | 1 + .../ag-ui/tests/ag_ui/golden/conftest.py | 13 + .../golden/test_scenario_agentic_chat.py | 140 +++ .../golden/test_scenario_backend_tools.py | 236 +++++ .../test_scenario_generative_ui_agent.py | 91 ++ .../test_scenario_generative_ui_tool.py | 135 +++ .../tests/ag_ui/golden/test_scenario_hitl.py | 196 ++++ .../golden/test_scenario_predictive_state.py | 130 +++ .../golden/test_scenario_shared_state.py | 110 ++ .../ag_ui/golden/test_scenario_subgraphs.py | 211 ++++ .../ag_ui/golden/test_scenario_workflow.py | 962 ++++++++++++++++++ .../packages/ag-ui/tests/ag_ui/sse_helpers.py | 72 ++ .../ag-ui/tests/ag_ui/test_ag_ui_client.py | 107 +- .../ag-ui/tests/ag_ui/test_endpoint.py | 53 + .../ag-ui/tests/ag_ui/test_http_round_trip.py | 215 ++++ .../tests/ag_ui/test_message_adapters.py | 642 ++++++++++++ .../ag-ui/tests/ag_ui/test_multi_turn.py | 332 ++++++ .../ag-ui/tests/ag_ui/test_run_common.py | 122 +++ .../ag-ui/tests/ag_ui/test_workflow_run.py | 750 ++++++++++++++ 22 files changed, 4766 insertions(+), 17 deletions(-) create mode 100644 python/packages/ag-ui/tests/ag_ui/event_stream.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/__init__.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/conftest.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_agentic_chat.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_backend_tools.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_generative_ui_agent.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_generative_ui_tool.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_hitl.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_predictive_state.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_shared_state.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_subgraphs.py create mode 100644 python/packages/ag-ui/tests/ag_ui/golden/test_scenario_workflow.py create mode 100644 python/packages/ag-ui/tests/ag_ui/sse_helpers.py create mode 100644 python/packages/ag-ui/tests/ag_ui/test_http_round_trip.py create mode 100644 python/packages/ag-ui/tests/ag_ui/test_multi_turn.py create mode 100644 python/packages/ag-ui/tests/ag_ui/test_run_common.py diff --git a/python/packages/ag-ui/pyproject.toml b/python/packages/ag-ui/pyproject.toml index 044d7d935a..e41176e4c0 100644 --- a/python/packages/ag-ui/pyproject.toml +++ b/python/packages/ag-ui/pyproject.toml @@ -44,7 +44,7 @@ packages = ["agent_framework_ag_ui", "agent_framework_ag_ui_examples"] [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests/ag_ui"] -pythonpath = ["."] +pythonpath = [".", "tests/ag_ui"] markers = [ "integration: marks tests as integration tests that require external services", ] diff --git a/python/packages/ag-ui/tests/ag_ui/conftest.py b/python/packages/ag-ui/tests/ag_ui/conftest.py index d86ebb1720..b73eddb8ad 100644 --- a/python/packages/ag-ui/tests/ag_ui/conftest.py +++ b/python/packages/ag-ui/tests/ag_ui/conftest.py @@ -4,6 +4,7 @@ import sys from collections.abc import AsyncIterable, AsyncIterator, Awaitable, Callable, Mapping, MutableSequence, Sequence +from pathlib import Path from types import SimpleNamespace from typing import Any, Generic, Literal, cast, overload @@ -36,6 +37,13 @@ StreamFn = Callable[..., AsyncIterable[ChatResponseUpdate]] ResponseFn = Callable[..., Awaitable[ChatResponse]] +def pytest_configure() -> None: + """Ensure this test directory is on sys.path so helper modules can be imported by name.""" + test_dir = str(Path(__file__).resolve().parent) + if test_dir not in sys.path: + sys.path.insert(0, test_dir) + + class StreamingChatClientStub( ChatMiddlewareLayer[OptionsCoT], FunctionInvocationLayer[OptionsCoT], @@ -241,3 +249,83 @@ def stream_from_updates_fixture() -> Callable[[list[ChatResponseUpdate]], Stream def stub_agent() -> type[SupportsAgentRun]: """Return the StubAgent class for creating test instances.""" return StubAgent # type: ignore[return-value] + + +# ── Fixtures for golden / integration tests ── + + +@pytest.fixture +def collect_events() -> Callable[..., Any]: + """Return an async helper that collects all events from an async generator.""" + + async def _collect(async_gen: AsyncIterable[Any]) -> list[Any]: + return [event async for event in async_gen] + + return _collect + + +@pytest.fixture +def make_agent_wrapper() -> Callable[..., Any]: + """Factory that builds an AgentFrameworkAgent from a stream function. + + Usage:: + + agent = make_agent_wrapper( + stream_fn=stream_from_updates(updates), + state_schema=..., + ) + events = [e async for e in agent.run(payload)] + """ + from agent_framework_ag_ui import AgentFrameworkAgent + + def _factory( + stream_fn: StreamFn, + *, + state_schema: Any | None = None, + predict_state_config: dict[str, dict[str, str]] | None = None, + require_confirmation: bool = True, + ) -> Any: + client = StreamingChatClientStub(stream_fn) + stub = StubAgent(client=client) + return AgentFrameworkAgent( + agent=stub, + state_schema=state_schema, + predict_state_config=predict_state_config, + require_confirmation=require_confirmation, + ) + + return _factory + + +@pytest.fixture +def make_app() -> Callable[..., Any]: + """Factory that builds a FastAPI app with an AG-UI endpoint. + + Usage:: + + app = make_app(agent_or_wrapper, path="/test") + """ + from fastapi import FastAPI + + from agent_framework_ag_ui import add_agent_framework_fastapi_endpoint + + def _factory( + agent: Any, + *, + path: str = "/", + state_schema: Any | None = None, + predict_state_config: dict[str, dict[str, str]] | None = None, + default_state: dict[str, Any] | None = None, + ) -> FastAPI: + app = FastAPI() + add_agent_framework_fastapi_endpoint( + app, + agent, + path=path, + state_schema=state_schema, + predict_state_config=predict_state_config, + default_state=default_state, + ) + return app + + return _factory diff --git a/python/packages/ag-ui/tests/ag_ui/event_stream.py b/python/packages/ag-ui/tests/ag_ui/event_stream.py new file mode 100644 index 0000000000..a6300c1042 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/event_stream.py @@ -0,0 +1,175 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""EventStream assertion helper for AG-UI regression tests.""" + +from __future__ import annotations + +from typing import Any + + +class EventStream: + """Wraps a list of AG-UI events with structured assertion methods. + + Usage: + events = [event async for event in agent.run(payload)] + stream = EventStream(events) + stream.assert_bookends() + stream.assert_text_messages_balanced() + """ + + def __init__(self, events: list[Any]) -> None: + self.events = events + + def __len__(self) -> int: + return len(self.events) + + def __iter__(self): + return iter(self.events) + + def types(self) -> list[str]: + """Return ordered list of event type strings.""" + return [self._type_str(e) for e in self.events] + + def get(self, event_type: str) -> list[Any]: + """Filter events matching the given type string.""" + return [e for e in self.events if self._type_str(e) == event_type] + + def first(self, event_type: str) -> Any: + """Return the first event matching the given type, or raise.""" + matches = self.get(event_type) + if not matches: + raise ValueError(f"No event of type {event_type!r} found. Available: {self.types()}") + return matches[0] + + def last(self, event_type: str) -> Any: + """Return the last event matching the given type, or raise.""" + matches = self.get(event_type) + if not matches: + raise ValueError(f"No event of type {event_type!r} found. Available: {self.types()}") + return matches[-1] + + def snapshot(self) -> dict[str, Any]: + """Return the latest StateSnapshotEvent snapshot dict.""" + return self.last("STATE_SNAPSHOT").snapshot + + def messages_snapshot(self) -> list[Any]: + """Return the latest MessagesSnapshotEvent messages list.""" + return self.last("MESSAGES_SNAPSHOT").messages + + # ── Structural assertions ── + + def assert_bookends(self) -> None: + """Assert first event is RUN_STARTED and last is RUN_FINISHED.""" + types = self.types() + assert types, "Event stream is empty" + assert types[0] == "RUN_STARTED", f"Expected RUN_STARTED first, got {types[0]}" + assert types[-1] == "RUN_FINISHED", f"Expected RUN_FINISHED last, got {types[-1]}" + + def assert_has_run_lifecycle(self) -> None: + """Assert RUN_STARTED is first and RUN_FINISHED exists (may not be last). + + Use this instead of assert_bookends() for workflow resume streams where + _drain_open_message() can emit TEXT_MESSAGE_END after RUN_FINISHED. + """ + types = self.types() + assert types, "Event stream is empty" + assert types[0] == "RUN_STARTED", f"Expected RUN_STARTED first, got {types[0]}" + assert "RUN_FINISHED" in types, f"Expected RUN_FINISHED in stream. Types: {types}" + + def assert_strict_types(self, expected: list[str]) -> None: + """Assert exact type sequence match.""" + actual = self.types() + assert actual == expected, f"Event type mismatch.\nExpected: {expected}\nActual: {actual}" + + def assert_ordered_types(self, expected: list[str]) -> None: + """Assert expected types appear as a subsequence (in order, not necessarily contiguous).""" + actual = self.types() + actual_idx = 0 + for expected_type in expected: + found = False + while actual_idx < len(actual): + if actual[actual_idx] == expected_type: + actual_idx += 1 + found = True + break + actual_idx += 1 + if not found: + raise AssertionError( + f"Expected subsequence type {expected_type!r} not found after index {actual_idx}.\n" + f"Expected subsequence: {expected}\n" + f"Actual types: {actual}" + ) + + def assert_text_messages_balanced(self) -> None: + """Assert every TEXT_MESSAGE_START has a matching TEXT_MESSAGE_END with the same message_id.""" + starts: dict[str, int] = {} + ends: set[str] = set() + for i, event in enumerate(self.events): + t = self._type_str(event) + if t == "TEXT_MESSAGE_START": + mid = event.message_id + assert mid not in starts, f"Duplicate TEXT_MESSAGE_START for message_id={mid}" + starts[mid] = i + elif t == "TEXT_MESSAGE_END": + mid = event.message_id + assert mid in starts, f"TEXT_MESSAGE_END for unknown message_id={mid}" + assert mid not in ends, f"Duplicate TEXT_MESSAGE_END for message_id={mid}" + ends.add(mid) + + unclosed = set(starts.keys()) - ends + assert not unclosed, f"Unclosed text messages: {unclosed}" + + def assert_tool_calls_balanced(self) -> None: + """Assert every TOOL_CALL_START has a matching TOOL_CALL_END with the same tool_call_id.""" + starts: dict[str, int] = {} + ends: set[str] = set() + for i, event in enumerate(self.events): + t = self._type_str(event) + if t == "TOOL_CALL_START": + tid = event.tool_call_id + assert tid not in starts, f"Duplicate TOOL_CALL_START for tool_call_id={tid}" + starts[tid] = i + elif t == "TOOL_CALL_END": + tid = event.tool_call_id + assert tid in starts, f"TOOL_CALL_END for unknown tool_call_id={tid}" + assert tid not in ends, f"Duplicate TOOL_CALL_END for tool_call_id={tid}" + ends.add(tid) + + unclosed = set(starts.keys()) - ends + assert not unclosed, f"Unclosed tool calls: {unclosed}" + + def assert_no_run_error(self) -> None: + """Assert no RUN_ERROR events exist.""" + errors = self.get("RUN_ERROR") + if errors: + messages = [getattr(e, "message", str(e)) for e in errors] + raise AssertionError(f"Found {len(errors)} RUN_ERROR event(s): {messages}") + + def assert_has_type(self, event_type: str) -> None: + """Assert at least one event of the given type exists.""" + assert event_type in self.types(), f"Expected {event_type!r} in stream. Available: {self.types()}" + + def assert_message_ids_consistent(self) -> None: + """Assert TEXT_MESSAGE_CONTENT events reference valid, open message_ids.""" + open_messages: set[str] = set() + for event in self.events: + t = self._type_str(event) + if t == "TEXT_MESSAGE_START": + open_messages.add(event.message_id) + elif t == "TEXT_MESSAGE_END": + open_messages.discard(event.message_id) + elif t == "TEXT_MESSAGE_CONTENT": + mid = event.message_id + assert mid in open_messages, f"TEXT_MESSAGE_CONTENT references message_id={mid} which is not open" + + # ── Internal ── + + @staticmethod + def _type_str(event: Any) -> str: + """Extract event type as a plain string.""" + t = getattr(event, "type", None) + if t is None: + return type(event).__name__ + if isinstance(t, str): + return t + return getattr(t, "value", str(t)) diff --git a/python/packages/ag-ui/tests/ag_ui/golden/__init__.py b/python/packages/ag-ui/tests/ag_ui/golden/__init__.py new file mode 100644 index 0000000000..2a50eae894 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/__init__.py @@ -0,0 +1 @@ +# Copyright (c) Microsoft. All rights reserved. diff --git a/python/packages/ag-ui/tests/ag_ui/golden/conftest.py b/python/packages/ag-ui/tests/ag_ui/golden/conftest.py new file mode 100644 index 0000000000..c9470fc198 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/conftest.py @@ -0,0 +1,13 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Conftest for golden tests — ensures parent test dir is importable.""" + +import sys +from pathlib import Path + + +def pytest_configure() -> None: + """Ensure parent test directory is on sys.path for helper module imports.""" + parent_test_dir = str(Path(__file__).resolve().parent.parent) + if parent_test_dir not in sys.path: + sys.path.insert(0, parent_test_dir) diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_agentic_chat.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_agentic_chat.py new file mode 100644 index 0000000000..00516171c2 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_agentic_chat.py @@ -0,0 +1,140 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Golden event-stream tests for the basic agentic chat scenario.""" + +from __future__ import annotations + +from typing import Any + +from agent_framework import AgentResponseUpdate, Content +from conftest import StubAgent +from event_stream import EventStream + +from agent_framework_ag_ui import AgentFrameworkAgent + + +def _build_agent(updates: list[AgentResponseUpdate], **kwargs: Any) -> AgentFrameworkAgent: + stub = StubAgent(updates=updates) + return AgentFrameworkAgent(agent=stub, **kwargs) + + +async def _run(agent: AgentFrameworkAgent, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in agent.run(payload)]) + + +BASIC_PAYLOAD: dict[str, Any] = { + "thread_id": "thread-chat", + "run_id": "run-chat", + "messages": [{"role": "user", "content": "Hello"}], +} + + +def _text_update(text: str) -> AgentResponseUpdate: + return AgentResponseUpdate(contents=[Content.from_text(text=text)], role="assistant") + + +def _snapshot_role(msg: Any) -> str: + """Extract role string from a snapshot message (Pydantic model or dict).""" + role = getattr(msg, "role", None) or (msg.get("role") if isinstance(msg, dict) else None) + if role is None: + return "" + return str(getattr(role, "value", role)) + + +def _snapshot_content(msg: Any) -> str: + """Extract content string from a snapshot message.""" + content = getattr(msg, "content", None) or (msg.get("content") if isinstance(msg, dict) else "") + return str(content) if content else "" + + +# ── Golden stream tests ── + + +async def test_basic_chat_golden_event_sequence() -> None: + """Assert the exact event type sequence for a single text response.""" + agent = _build_agent([_text_update("Hi there!")]) + stream = await _run(agent, BASIC_PAYLOAD) + + stream.assert_strict_types( + [ + "RUN_STARTED", + "TEXT_MESSAGE_START", + "TEXT_MESSAGE_CONTENT", + "TEXT_MESSAGE_END", + "MESSAGES_SNAPSHOT", + "RUN_FINISHED", + ] + ) + + +async def test_basic_chat_bookends() -> None: + """RUN_STARTED is first, RUN_FINISHED is last.""" + agent = _build_agent([_text_update("reply")]) + stream = await _run(agent, BASIC_PAYLOAD) + stream.assert_bookends() + + +async def test_basic_chat_text_messages_balanced() -> None: + """Every TEXT_MESSAGE_START has a matching TEXT_MESSAGE_END.""" + agent = _build_agent([_text_update("reply")]) + stream = await _run(agent, BASIC_PAYLOAD) + stream.assert_text_messages_balanced() + + +async def test_basic_chat_no_errors() -> None: + """No RUN_ERROR events in a normal flow.""" + agent = _build_agent([_text_update("reply")]) + stream = await _run(agent, BASIC_PAYLOAD) + stream.assert_no_run_error() + + +async def test_basic_chat_message_id_consistency() -> None: + """All text events reference the same message_id.""" + agent = _build_agent([_text_update("reply")]) + stream = await _run(agent, BASIC_PAYLOAD) + + start = stream.first("TEXT_MESSAGE_START") + content = stream.first("TEXT_MESSAGE_CONTENT") + end = stream.first("TEXT_MESSAGE_END") + assert start.message_id == content.message_id == end.message_id + + +async def test_multi_chunk_text_golden_sequence() -> None: + """Streaming multiple chunks produces START + multiple CONTENT + END.""" + agent = _build_agent([_text_update("Hello "), _text_update("world!")]) + stream = await _run(agent, BASIC_PAYLOAD) + + stream.assert_strict_types( + [ + "RUN_STARTED", + "TEXT_MESSAGE_START", + "TEXT_MESSAGE_CONTENT", + "TEXT_MESSAGE_CONTENT", + "TEXT_MESSAGE_END", + "MESSAGES_SNAPSHOT", + "RUN_FINISHED", + ] + ) + stream.assert_text_messages_balanced() + stream.assert_message_ids_consistent() + + +async def test_messages_snapshot_contains_assistant_reply() -> None: + """MessagesSnapshotEvent includes the assistant's accumulated text.""" + agent = _build_agent([_text_update("Hello there")]) + stream = await _run(agent, BASIC_PAYLOAD) + + snapshot = stream.messages_snapshot() + assistant_msgs = [m for m in snapshot if _snapshot_role(m) == "assistant"] + assert assistant_msgs, "No assistant message in snapshot" + assert any("Hello there" in _snapshot_content(m) for m in assistant_msgs) + + +async def test_empty_messages_produces_start_and_finish() -> None: + """Empty message list still produces RUN_STARTED and RUN_FINISHED.""" + agent = _build_agent([_text_update("reply")]) + payload = {"thread_id": "t1", "run_id": "r1", "messages": []} + stream = await _run(agent, payload) + + stream.assert_bookends() + assert "TEXT_MESSAGE_START" not in stream.types() diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_backend_tools.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_backend_tools.py new file mode 100644 index 0000000000..7b48740cad --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_backend_tools.py @@ -0,0 +1,236 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Golden event-stream tests for the backend (server-side) tools scenario.""" + +from __future__ import annotations + +from typing import Any + +from agent_framework import AgentResponseUpdate, Content +from conftest import StubAgent +from event_stream import EventStream + +from agent_framework_ag_ui import AgentFrameworkAgent + + +def _build_agent(updates: list[AgentResponseUpdate], **kwargs: Any) -> AgentFrameworkAgent: + stub = StubAgent(updates=updates) + return AgentFrameworkAgent(agent=stub, **kwargs) + + +async def _run(agent: AgentFrameworkAgent, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in agent.run(payload)]) + + +PAYLOAD: dict[str, Any] = { + "thread_id": "thread-tools", + "run_id": "run-tools", + "messages": [{"role": "user", "content": "What's the weather?"}], +} + + +# ── Golden stream tests ── + + +async def test_tool_call_lifecycle_golden_sequence() -> None: + """Assert the full event sequence for a tool call → result → text response.""" + updates = [ + # LLM calls the tool + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments='{"city": "SF"}')], + role="assistant", + ), + # Tool result comes back + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F and sunny")], + role="assistant", + ), + # LLM responds with text + AgentResponseUpdate( + contents=[Content.from_text(text="It's 72°F and sunny in SF!")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_ordered_types( + [ + "RUN_STARTED", + "TEXT_MESSAGE_START", # Synthetic start for tool-only message + "TOOL_CALL_START", + "TOOL_CALL_ARGS", + "TOOL_CALL_END", + "TOOL_CALL_RESULT", + "TEXT_MESSAGE_END", # End of synthetic message + "TEXT_MESSAGE_START", # New message for text response + "TEXT_MESSAGE_CONTENT", + "TEXT_MESSAGE_END", + "MESSAGES_SNAPSHOT", + "RUN_FINISHED", + ] + ) + + +async def test_tool_calls_balanced() -> None: + """Every TOOL_CALL_START has a matching TOOL_CALL_END.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments='{"city": "SF"}')], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_text(text="It's 72°F!")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_tool_calls_balanced() + + +async def test_text_messages_balanced_with_tools() -> None: + """Text messages are properly balanced even around tool calls.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments='{"city": "SF"}')], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_text(text="It's 72°F!")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_text_messages_balanced() + + +async def test_tool_call_id_matches_result() -> None: + """TOOL_CALL_START and TOOL_CALL_RESULT reference the same tool_call_id.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments="{}")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + start = stream.first("TOOL_CALL_START") + result = stream.first("TOOL_CALL_RESULT") + assert start.tool_call_id == result.tool_call_id == "call-1" + + +async def test_tool_result_content_preserved() -> None: + """TOOL_CALL_RESULT event carries the tool's result content.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments="{}")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F and sunny")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + result = stream.first("TOOL_CALL_RESULT") + assert result.content == "72°F and sunny" + + +async def test_no_run_error_on_tool_flow() -> None: + """Tool call flow doesn't produce RUN_ERROR.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments="{}")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_no_run_error() + stream.assert_bookends() + + +async def test_multiple_sequential_tool_calls() -> None: + """Multiple sequential tool calls each produce balanced START/END pairs.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="tool_a", call_id="call-a", arguments="{}")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-a", result="result-a")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_call(name="tool_b", call_id="call-b", arguments="{}")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-b", result="result-b")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_text(text="Done!")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_tool_calls_balanced() + stream.assert_text_messages_balanced() + stream.assert_bookends() + + # Both tool calls should appear + starts = stream.get("TOOL_CALL_START") + assert len(starts) == 2 + assert {s.tool_call_name for s in starts} == {"tool_a", "tool_b"} + + +async def test_messages_snapshot_includes_tool_calls() -> None: + """MessagesSnapshotEvent includes tool call and result messages.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments='{"city":"SF"}')], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_text(text="It's warm!")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_has_type("MESSAGES_SNAPSHOT") + snapshot = stream.messages_snapshot() + # Should have: user message, assistant with tool_calls, tool result, assistant text + assert len(snapshot) >= 3 diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_generative_ui_agent.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_generative_ui_agent.py new file mode 100644 index 0000000000..211bbeedc6 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_generative_ui_agent.py @@ -0,0 +1,91 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Golden event-stream tests for the generative UI (workflow-as-agent) scenario.""" + +from __future__ import annotations + +from typing import Any + +from agent_framework import WorkflowBuilder, WorkflowContext, executor +from event_stream import EventStream +from typing_extensions import Never + +from agent_framework_ag_ui import AgentFrameworkWorkflow + + +async def _run(wrapper: AgentFrameworkWorkflow, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in wrapper.run(payload)]) + + +PAYLOAD: dict[str, Any] = { + "thread_id": "thread-gen-ui-agent", + "run_id": "run-gen-ui-agent", + "messages": [{"role": "user", "content": "Generate a UI"}], +} + + +# ── Golden stream tests ── + + +async def test_workflow_agent_golden_sequence() -> None: + """Workflow-as-agent: emits step events and text content.""" + + @executor(id="generator") + async def generator(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("Here is your generated UI content!") + + workflow = WorkflowBuilder(start_executor=generator).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, PAYLOAD) + + stream.assert_bookends() + stream.assert_no_run_error() + stream.assert_text_messages_balanced() + + # Should have step events for the executor + stream.assert_has_type("STEP_STARTED") + stream.assert_has_type("STEP_FINISHED") + + # Should have text message content + stream.assert_has_type("TEXT_MESSAGE_CONTENT") + + +async def test_workflow_agent_step_names_match() -> None: + """Step started/finished events reference the executor name.""" + + @executor(id="my_executor") + async def my_executor(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("Done!") + + workflow = WorkflowBuilder(start_executor=my_executor).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, PAYLOAD) + + started = [e for e in stream.get("STEP_STARTED") if getattr(e, "step_name", "") == "my_executor"] + finished = [e for e in stream.get("STEP_FINISHED") if getattr(e, "step_name", "") == "my_executor"] + assert started, "Expected STEP_STARTED for 'my_executor'" + assert finished, "Expected STEP_FINISHED for 'my_executor'" + + +async def test_workflow_agent_ordered_events() -> None: + """Workflow events follow expected ordering: RUN_STARTED → STEP_STARTED → content → STEP_FINISHED → RUN_FINISHED.""" + + @executor(id="my_step") + async def my_step(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("Generated content") + + workflow = WorkflowBuilder(start_executor=my_step).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, PAYLOAD) + + stream.assert_ordered_types( + [ + "RUN_STARTED", + "STEP_STARTED", + "TEXT_MESSAGE_START", + "TEXT_MESSAGE_CONTENT", + "STEP_FINISHED", + "TEXT_MESSAGE_END", + "RUN_FINISHED", + ] + ) diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_generative_ui_tool.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_generative_ui_tool.py new file mode 100644 index 0000000000..b154b53236 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_generative_ui_tool.py @@ -0,0 +1,135 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Golden event-stream tests for the client-side (declaration-only) tools scenario.""" + +from __future__ import annotations + +from typing import Any + +from agent_framework import AgentResponseUpdate, Content +from conftest import StubAgent +from event_stream import EventStream + +from agent_framework_ag_ui import AgentFrameworkAgent + + +def _build_agent(updates: list[AgentResponseUpdate], **kwargs: Any) -> AgentFrameworkAgent: + stub = StubAgent(updates=updates) + return AgentFrameworkAgent(agent=stub, **kwargs) + + +async def _run(agent: AgentFrameworkAgent, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in agent.run(payload)]) + + +PAYLOAD: dict[str, Any] = { + "thread_id": "thread-gen-ui-tool", + "run_id": "run-gen-ui-tool", + "messages": [{"role": "user", "content": "Show me a chart"}], + "tools": [ + { + "type": "function", + "function": { + "name": "render_chart", + "description": "Render a chart in the UI", + "parameters": { + "type": "object", + "properties": {"data": {"type": "array"}}, + }, + }, + } + ], +} + + +# ── Golden stream tests ── + + +async def test_declaration_only_tool_golden_sequence() -> None: + """Declaration-only tool: TOOL_CALL_START/ARGS emitted, TOOL_CALL_END at stream end.""" + # The LLM calls a client-side tool (no server-side execution) + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="render_chart", + call_id="call-chart", + arguments='{"data": [1, 2, 3]}', + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_bookends() + stream.assert_no_run_error() + + # Tool call start and args should be present + stream.assert_has_type("TOOL_CALL_START") + stream.assert_has_type("TOOL_CALL_ARGS") + + # TOOL_CALL_END should be emitted (via get_pending_without_end) + stream.assert_has_type("TOOL_CALL_END") + stream.assert_tool_calls_balanced() + + +async def test_declaration_only_tool_no_tool_call_result() -> None: + """Declaration-only tools should NOT produce TOOL_CALL_RESULT events.""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="render_chart", + call_id="call-chart", + arguments='{"data": [1, 2, 3]}', + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + assert "TOOL_CALL_RESULT" not in stream.types(), "Declaration-only tools should not have TOOL_CALL_RESULT" + + +async def test_declaration_only_tool_text_messages_balanced() -> None: + """Text messages remain balanced even with declaration-only tools.""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="render_chart", + call_id="call-chart", + arguments='{"data": [1, 2, 3]}', + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_text_messages_balanced() + + +async def test_declaration_only_tool_messages_snapshot() -> None: + """MessagesSnapshotEvent includes the tool call for declaration-only tools.""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="render_chart", + call_id="call-chart", + arguments='{"data": [1, 2, 3]}', + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_has_type("MESSAGES_SNAPSHOT") diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_hitl.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_hitl.py new file mode 100644 index 0000000000..7af256f625 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_hitl.py @@ -0,0 +1,196 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Golden event-stream tests for the HITL (human-in-the-loop) approval scenario.""" + +from __future__ import annotations + +import json +from typing import Any + +from agent_framework import AgentResponseUpdate, Content +from conftest import StubAgent +from event_stream import EventStream + +from agent_framework_ag_ui import AgentFrameworkAgent + +PREDICT_CONFIG = { + "tasks": { + "tool": "generate_task_steps", + "tool_argument": "steps", + } +} + +STATE_SCHEMA = { + "tasks": {"type": "array", "items": {"type": "object"}}, +} + + +def _build_agent(updates: list[AgentResponseUpdate], **kwargs: Any) -> AgentFrameworkAgent: + stub = StubAgent(updates=updates) + return AgentFrameworkAgent( + agent=stub, + state_schema=STATE_SCHEMA, + predict_state_config=PREDICT_CONFIG, + require_confirmation=True, + **kwargs, + ) + + +async def _run(agent: AgentFrameworkAgent, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in agent.run(payload)]) + + +STEPS = [ + {"description": "Step 1: Plan", "status": "enabled"}, + {"description": "Step 2: Execute", "status": "enabled"}, +] + + +PAYLOAD: dict[str, Any] = { + "thread_id": "thread-hitl", + "run_id": "run-hitl", + "messages": [{"role": "user", "content": "Plan my tasks"}], + "state": {"tasks": []}, +} + + +# ── Turn 1: Tool call → confirm_changes → interrupt ── + + +async def test_hitl_turn1_golden_sequence() -> None: + """Turn 1 emits tool call, confirm_changes, and finishes with interrupt.""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="generate_task_steps", + call_id="call-steps", + arguments=json.dumps({"steps": STEPS}), + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + # Should have: tool call start/args/end for the primary tool, + # then TOOL_CALL_END, STATE_SNAPSHOT, confirm_changes cycle + stream.assert_bookends() + stream.assert_no_run_error() + + # confirm_changes tool call should be present + tool_starts = stream.get("TOOL_CALL_START") + tool_names = [getattr(s, "tool_call_name", None) for s in tool_starts] + assert "generate_task_steps" in tool_names + assert "confirm_changes" in tool_names + + # RUN_FINISHED should have interrupt metadata + finished = stream.last("RUN_FINISHED") + interrupt = getattr(finished, "interrupt", None) + assert interrupt is not None, "Expected interrupt in RUN_FINISHED" + assert len(interrupt) > 0 + + +async def test_hitl_turn1_tool_calls_balanced() -> None: + """All tool calls in turn 1 (primary + confirm_changes) are balanced.""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="generate_task_steps", + call_id="call-steps", + arguments=json.dumps({"steps": STEPS}), + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_tool_calls_balanced() + + +async def test_hitl_turn1_text_messages_balanced() -> None: + """Text messages are balanced even in the approval flow.""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="generate_task_steps", + call_id="call-steps", + arguments=json.dumps({"steps": STEPS}), + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_text_messages_balanced() + + +# ── Turn 2: Resume with approval → confirmation message → no interrupt ── + + +async def test_hitl_turn2_resume_with_approval() -> None: + """Resuming with confirm_changes result emits confirmation text and finishes cleanly.""" + # Turn 2: user sends confirm_changes result as resume + # The agent wrapper sees a confirm_changes response and emits a confirmation message + confirm_result = json.dumps( + { + "accepted": True, + "steps": STEPS, + } + ) + + # Build payload with resume containing the approval + # For confirm_changes, the messages should include the tool result + payload: dict[str, Any] = { + "thread_id": "thread-hitl", + "run_id": "run-hitl-2", + "messages": [ + {"role": "user", "content": "Plan my tasks"}, + { + "role": "assistant", + "tool_calls": [ + { + "id": "confirm-id-1", + "type": "function", + "function": {"name": "confirm_changes", "arguments": json.dumps({"steps": STEPS})}, + } + ], + }, + { + "role": "tool", + "toolCallId": "confirm-id-1", + "content": confirm_result, + }, + ], + "state": {"tasks": []}, + } + + # In turn 2, the agent sees the confirm_changes result and emits a confirmation text + updates = [ + AgentResponseUpdate( + contents=[Content.from_text(text="Tasks confirmed!")], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, payload) + + stream.assert_bookends() + stream.assert_text_messages_balanced() + stream.assert_no_run_error() + + # Should have text message content (the confirmation message) + text_events = stream.get("TEXT_MESSAGE_CONTENT") + assert text_events, "Expected confirmation text message" + + # RUN_FINISHED should NOT have interrupt (approval completed) + finished = stream.last("RUN_FINISHED") + interrupt = getattr(finished, "interrupt", None) + assert not interrupt, f"Expected no interrupt after approval, got {interrupt}" diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_predictive_state.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_predictive_state.py new file mode 100644 index 0000000000..3870e00728 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_predictive_state.py @@ -0,0 +1,130 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Golden event-stream tests for the predictive state scenario.""" + +from __future__ import annotations + +from typing import Any + +from agent_framework import AgentResponseUpdate, Content +from conftest import StubAgent +from event_stream import EventStream + +from agent_framework_ag_ui import AgentFrameworkAgent + +PREDICT_CONFIG = { + "document": { + "tool": "update_document", + "tool_argument": "content", + } +} + +STATE_SCHEMA = { + "document": {"type": "string"}, +} + + +def _build_agent(updates: list[AgentResponseUpdate], **kwargs: Any) -> AgentFrameworkAgent: + stub = StubAgent(updates=updates) + return AgentFrameworkAgent( + agent=stub, + state_schema=STATE_SCHEMA, + predict_state_config=PREDICT_CONFIG, + require_confirmation=False, + **kwargs, + ) + + +async def _run(agent: AgentFrameworkAgent, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in agent.run(payload)]) + + +PAYLOAD: dict[str, Any] = { + "thread_id": "thread-predict", + "run_id": "run-predict", + "messages": [{"role": "user", "content": "Write a document"}], + "state": {"document": ""}, +} + + +# ── Golden stream tests ── + + +async def test_predictive_state_emits_deltas_during_tool_args() -> None: + """STATE_DELTA events are emitted as tool arguments stream in.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="update_document", call_id="call-1", arguments="")], + role="assistant", + ), + AgentResponseUpdate( + contents=[ + Content.from_function_call(name="update_document", call_id="call-1", arguments='{"content": "Hello') + ], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_call(name="update_document", call_id="call-1", arguments=' world"}')], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_bookends() + stream.assert_no_run_error() + + # PredictState custom event should be present + custom_events = stream.get("CUSTOM") + predict_events = [e for e in custom_events if getattr(e, "name", None) == "PredictState"] + assert predict_events, "Expected PredictState custom event" + + # STATE_DELTA events should be emitted during tool arg streaming + assert "STATE_DELTA" in stream.types(), "Expected STATE_DELTA events during predictive streaming" + + +async def test_predictive_state_snapshot_after_tool_end() -> None: + """STATE_SNAPSHOT is emitted when a predictive tool completes (no confirmation).""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="update_document", call_id="call-1", arguments='{"content": "Final text"}' + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_bookends() + + # Should have initial state snapshot + updated snapshot after tool completion + snapshots = stream.get("STATE_SNAPSHOT") + assert len(snapshots) >= 1, "Expected at least one STATE_SNAPSHOT" + + +async def test_predictive_state_ordered_events() -> None: + """Event ordering: RUN_STARTED → PredictState → STATE_SNAPSHOT → TOOL_CALL_* → STATE_SNAPSHOT → RUN_FINISHED.""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_function_call(name="update_document", call_id="call-1", arguments='{"content": "doc"}') + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_ordered_types( + [ + "RUN_STARTED", + "CUSTOM", # PredictState + "STATE_SNAPSHOT", # Initial state + "TOOL_CALL_START", + "TOOL_CALL_ARGS", + "RUN_FINISHED", + ] + ) diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_shared_state.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_shared_state.py new file mode 100644 index 0000000000..efbe34ed8f --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_shared_state.py @@ -0,0 +1,110 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Golden event-stream tests for the shared state (structured output) scenario.""" + +from __future__ import annotations + +from typing import Any + +from agent_framework import AgentResponseUpdate, Content +from conftest import StubAgent +from event_stream import EventStream +from pydantic import BaseModel + +from agent_framework_ag_ui import AgentFrameworkAgent + + +class RecipeState(BaseModel): + recipe_title: str = "" + ingredients: list[str] = [] + message: str = "" + + +def _build_agent(updates: list[AgentResponseUpdate], **kwargs: Any) -> AgentFrameworkAgent: + stub = StubAgent( + updates=updates, + default_options={"tools": None, "response_format": RecipeState}, + ) + return AgentFrameworkAgent( + agent=stub, + state_schema={ + "recipe_title": {"type": "string"}, + "ingredients": {"type": "array", "items": {"type": "string"}}, + }, + **kwargs, + ) + + +async def _run(agent: AgentFrameworkAgent, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in agent.run(payload)]) + + +PAYLOAD: dict[str, Any] = { + "thread_id": "thread-state", + "run_id": "run-state", + "messages": [{"role": "user", "content": "Give me a pasta recipe"}], + "state": {"recipe_title": "", "ingredients": []}, +} + + +# ── Golden stream tests ── + + +async def test_shared_state_emits_state_snapshot() -> None: + """Structured output agent emits STATE_SNAPSHOT with parsed model fields.""" + # The structured output agent gets a response that the framework parses as RecipeState + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_text( + text='{"recipe_title": "Pasta Carbonara", "ingredients": ["pasta", "eggs", "cheese"], "message": "Here is your recipe!"}' + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + stream.assert_bookends() + stream.assert_no_run_error() + + # Should have STATE_SNAPSHOT with the initial state at minimum + stream.assert_has_type("STATE_SNAPSHOT") + + +async def test_shared_state_initial_snapshot_on_first_update() -> None: + """When state_schema and state are provided, initial STATE_SNAPSHOT is emitted after RUN_STARTED.""" + updates = [ + AgentResponseUpdate( + contents=[Content.from_text(text='{"recipe_title": "Test", "ingredients": [], "message": "hi"}')], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + # RUN_STARTED should be followed by STATE_SNAPSHOT (initial state) + stream.assert_ordered_types(["RUN_STARTED", "STATE_SNAPSHOT"]) + + +async def test_shared_state_text_emitted_from_message_field() -> None: + """Structured output's 'message' field is emitted as text message events.""" + updates = [ + AgentResponseUpdate( + contents=[ + Content.from_text( + text='{"recipe_title": "Pasta", "ingredients": ["pasta"], "message": "Enjoy your pasta!"}' + ) + ], + role="assistant", + ), + ] + agent = _build_agent(updates) + stream = await _run(agent, PAYLOAD) + + # Text should be emitted from the message field + text_contents = stream.get("TEXT_MESSAGE_CONTENT") + if text_contents: + combined = "".join(getattr(e, "delta", "") for e in text_contents) + assert "Enjoy your pasta!" in combined diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_subgraphs.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_subgraphs.py new file mode 100644 index 0000000000..61e89057fb --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_subgraphs.py @@ -0,0 +1,211 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Golden event-stream tests for the workflow HITL (subgraphs) scenario. + +Extends the existing test_subgraphs_example_agent.py with EventStream assertions +on full event ordering, balancing, and interrupt structure. +""" + +from __future__ import annotations + +import json +from typing import Any + +from event_stream import EventStream + +from agent_framework_ag_ui_examples.agents.subgraphs_agent import subgraphs_agent + + +async def _run(agent: Any, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in agent.run(payload)]) + + +# ── Turn 1: Initial request → flight interrupt ── + + +async def test_subgraphs_turn1_golden_bookends() -> None: + """Turn 1 starts with RUN_STARTED and ends with RUN_FINISHED.""" + agent = subgraphs_agent() + stream = await _run( + agent, + { + "thread_id": "thread-sub-golden-1", + "run_id": "run-1", + "messages": [{"role": "user", "content": "Plan a trip to San Francisco"}], + }, + ) + stream.assert_bookends() + + +async def test_subgraphs_turn1_no_errors() -> None: + """Turn 1 completes without errors.""" + agent = subgraphs_agent() + stream = await _run( + agent, + { + "thread_id": "thread-sub-golden-2", + "run_id": "run-1", + "messages": [{"role": "user", "content": "Plan a trip"}], + }, + ) + stream.assert_no_run_error() + + +async def test_subgraphs_turn1_has_step_events() -> None: + """Turn 1 emits STEP_STARTED and STEP_FINISHED for workflow executors.""" + agent = subgraphs_agent() + stream = await _run( + agent, + { + "thread_id": "thread-sub-golden-3", + "run_id": "run-1", + "messages": [{"role": "user", "content": "Plan a trip"}], + }, + ) + stream.assert_has_type("STEP_STARTED") + stream.assert_has_type("STEP_FINISHED") + + +async def test_subgraphs_turn1_interrupt_structure() -> None: + """Turn 1 RUN_FINISHED carries flight interrupt with correct structure.""" + agent = subgraphs_agent() + stream = await _run( + agent, + { + "thread_id": "thread-sub-golden-4", + "run_id": "run-1", + "messages": [{"role": "user", "content": "Plan a trip to SF"}], + }, + ) + + finished = stream.last("RUN_FINISHED") + interrupt = getattr(finished, "interrupt", None) + assert interrupt is not None, "Expected interrupt in RUN_FINISHED" + assert isinstance(interrupt, list) + assert len(interrupt) > 0 + assert interrupt[0]["value"]["agent"] == "flights" + assert len(interrupt[0]["value"]["options"]) == 2 + + +async def test_subgraphs_turn1_text_messages_balanced() -> None: + """All text messages in turn 1 are properly balanced.""" + agent = subgraphs_agent() + stream = await _run( + agent, + { + "thread_id": "thread-sub-golden-5", + "run_id": "run-1", + "messages": [{"role": "user", "content": "Plan a trip"}], + }, + ) + stream.assert_text_messages_balanced() + + +async def test_subgraphs_turn1_ordered_flow() -> None: + """Turn 1 event ordering: RUN_STARTED → STATE_SNAPSHOT → STEP_* → TOOL_CALL_* → RUN_FINISHED.""" + agent = subgraphs_agent() + stream = await _run( + agent, + { + "thread_id": "thread-sub-golden-6", + "run_id": "run-1", + "messages": [{"role": "user", "content": "Plan a trip"}], + }, + ) + stream.assert_ordered_types( + [ + "RUN_STARTED", + "STATE_SNAPSHOT", + "STEP_STARTED", + "RUN_FINISHED", + ] + ) + + +# ── Multi-turn: Flight selection → hotel interrupt → completion ── + + +async def test_subgraphs_full_flow_event_ordering() -> None: + """Complete 3-turn flow maintains proper event ordering throughout.""" + agent = subgraphs_agent() + thread_id = "thread-sub-golden-full" + + # Turn 1 + stream1 = await _run( + agent, + { + "thread_id": thread_id, + "run_id": "run-1", + "messages": [{"role": "user", "content": "Plan a trip to SF from Amsterdam"}], + }, + ) + stream1.assert_bookends() + stream1.assert_no_run_error() + + # Extract flight interrupt + finished1 = stream1.last("RUN_FINISHED") + interrupt1 = finished1.model_dump()["interrupt"][0] + + # Turn 2: Select flight + stream2 = await _run( + agent, + { + "thread_id": thread_id, + "run_id": "run-2", + "resume": { + "interrupts": [ + { + "id": interrupt1["id"], + "value": json.dumps( + { + "airline": "United", + "departure": "Amsterdam (AMS)", + "arrival": "San Francisco (SFO)", + "price": "$720", + "duration": "12h 15m", + } + ), + } + ] + }, + }, + ) + stream2.assert_bookends() + stream2.assert_no_run_error() + + # Should now have hotel interrupt + finished2 = stream2.last("RUN_FINISHED") + interrupt2 = finished2.model_dump()["interrupt"] + assert interrupt2[0]["value"]["agent"] == "hotels" + + # Turn 3: Select hotel + stream3 = await _run( + agent, + { + "thread_id": thread_id, + "run_id": "run-3", + "resume": { + "interrupts": [ + { + "id": interrupt2[0]["id"], + "value": json.dumps( + { + "name": "The Ritz-Carlton", + "location": "Nob Hill", + "price_per_night": "$550/night", + "rating": "4.8 stars", + } + ), + } + ] + }, + }, + ) + stream3.assert_bookends() + stream3.assert_no_run_error() + stream3.assert_text_messages_balanced() + + # Final turn should not have interrupt + finished3 = stream3.last("RUN_FINISHED") + final_interrupt = getattr(finished3, "interrupt", None) + assert not final_interrupt, f"Expected no interrupt after completion, got {final_interrupt}" diff --git a/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_workflow.py b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_workflow.py new file mode 100644 index 0000000000..5f13b8e67f --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/golden/test_scenario_workflow.py @@ -0,0 +1,962 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Comprehensive golden event-stream tests for AgentFrameworkWorkflow. + +Covers the full matrix of workflow-specific AG-UI patterns: +- request_info → TOOL_CALL lifecycle and balancing +- Executor step events and activity snapshots +- Text output, dict output, BaseEvent passthrough, AgentResponse output +- Text deduplication across workflow outputs +- Workflow error handling → RUN_ERROR +- Multi-turn interrupt/resume round-trips +- Empty turns with pending requests +- Custom workflow events +- Text message draining on request_info and executor boundaries +""" + +import json +from typing import Any, cast + +from ag_ui.core import EventType, StateSnapshotEvent +from agent_framework import ( + AgentResponse, + Content, + Executor, + Message, + WorkflowBuilder, + WorkflowContext, + WorkflowEvent, + executor, + handler, + response_handler, +) +from event_stream import EventStream +from typing_extensions import Never + +from agent_framework_ag_ui import AgentFrameworkWorkflow + + +async def _run(wrapper: AgentFrameworkWorkflow, payload: dict[str, Any]) -> EventStream: + return EventStream([event async for event in wrapper.run(payload)]) + + +def _payload( + msg: str = "go", + *, + thread_id: str = "thread-wf", + run_id: str = "run-wf", + **extra: Any, +) -> dict[str, Any]: + return {"thread_id": thread_id, "run_id": run_id, "messages": [{"role": "user", "content": msg}], **extra} + + +# ────────────────────────────────────────────────────────────────────── +# 1. Basic workflow text output +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_text_output_golden_sequence() -> None: + """Simple text output: RUN_STARTED → STEP_STARTED → TEXT_* → STEP_FINISHED → TEXT_MESSAGE_END → RUN_FINISHED.""" + + @executor(id="greeter") + async def greeter(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("Hello from workflow!") + + workflow = WorkflowBuilder(start_executor=greeter).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_bookends() + stream.assert_no_run_error() + stream.assert_text_messages_balanced() + stream.assert_has_type("TEXT_MESSAGE_START") + stream.assert_has_type("TEXT_MESSAGE_CONTENT") + stream.assert_has_type("TEXT_MESSAGE_END") + + # Verify actual content + deltas = [e.delta for e in stream.get("TEXT_MESSAGE_CONTENT")] + assert "Hello from workflow!" in deltas + + +async def test_workflow_text_output_message_id_consistency() -> None: + """All text events for a single output share the same message_id.""" + + @executor(id="echo") + async def echo(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("echo reply") + + workflow = WorkflowBuilder(start_executor=echo).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_message_ids_consistent() + + +# ────────────────────────────────────────────────────────────────────── +# 2. Executor step events and activity snapshots +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_executor_lifecycle_events() -> None: + """Executor invocation produces STEP_STARTED, ACTIVITY_SNAPSHOT, STEP_FINISHED.""" + + @executor(id="worker") + async def worker(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("done") + + workflow = WorkflowBuilder(start_executor=worker).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + # Step events with executor ID + started = [e for e in stream.get("STEP_STARTED") if getattr(e, "step_name", "") == "worker"] + finished = [e for e in stream.get("STEP_FINISHED") if getattr(e, "step_name", "") == "worker"] + assert started, "Expected STEP_STARTED for 'worker'" + assert finished, "Expected STEP_FINISHED for 'worker'" + + # Activity snapshots + activities = stream.get("ACTIVITY_SNAPSHOT") + assert activities, "Expected ACTIVITY_SNAPSHOT events" + # Check one of them has executor payload + executor_activities = [a for a in activities if getattr(a, "activity_type", None) == "executor"] + assert executor_activities, "Expected executor-type activity snapshots" + + +async def test_workflow_executor_step_ordering() -> None: + """STEP_STARTED comes before content, STEP_FINISHED comes after.""" + + @executor(id="orderer") + async def orderer(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("ordered output") + + workflow = WorkflowBuilder(start_executor=orderer).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_ordered_types( + [ + "RUN_STARTED", + "STEP_STARTED", + "TEXT_MESSAGE_START", + "TEXT_MESSAGE_CONTENT", + "STEP_FINISHED", + "RUN_FINISHED", + ] + ) + + +# ────────────────────────────────────────────────────────────────────── +# 3. Dict output → CUSTOM workflow_output +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_dict_output_maps_to_custom_event() -> None: + """Non-chat dict output is emitted as CUSTOM workflow_output event.""" + + @executor(id="structured") + async def structured(message: Any, ctx: WorkflowContext[Never, dict[str, int]]) -> None: + await ctx.yield_output({"count": 42, "status": 1}) + + workflow = WorkflowBuilder(start_executor=structured).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_bookends() + stream.assert_no_run_error() + + customs = [e for e in stream.get("CUSTOM") if getattr(e, "name", None) == "workflow_output"] + assert len(customs) == 1 + assert customs[0].value == {"count": 42, "status": 1} + + # Should NOT have TEXT_MESSAGE events for dict output + assert "TEXT_MESSAGE_CONTENT" not in stream.types() + + +# ────────────────────────────────────────────────────────────────────── +# 4. BaseEvent passthrough +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_base_event_passthrough() -> None: + """AG-UI BaseEvent outputs are yielded directly, not wrapped.""" + + @executor(id="stateful") + async def stateful(message: Any, ctx: WorkflowContext[Never, StateSnapshotEvent]) -> None: + await ctx.yield_output(StateSnapshotEvent(type=EventType.STATE_SNAPSHOT, snapshot={"active_agent": "flights"})) + + workflow = WorkflowBuilder(start_executor=stateful).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_bookends() + snapshots = stream.get("STATE_SNAPSHOT") + assert len(snapshots) == 1 + assert snapshots[0].snapshot["active_agent"] == "flights" + + +# ────────────────────────────────────────────────────────────────────── +# 5. AgentResponse output (conversation payload) +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_agent_response_output_extracts_latest_assistant() -> None: + """AgentResponse output uses only the latest assistant message, not full history.""" + + @executor(id="responder") + async def responder(message: Any, ctx: WorkflowContext[Never, AgentResponse]) -> None: + response = AgentResponse( + messages=[ + Message(role="user", contents=[Content.from_text("My order is damaged")]), + Message(role="assistant", contents=[Content.from_text("I'll process your replacement.")]), + ] + ) + await ctx.yield_output(response) + + workflow = WorkflowBuilder(start_executor=responder).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_bookends() + stream.assert_text_messages_balanced() + + deltas = [e.delta for e in stream.get("TEXT_MESSAGE_CONTENT")] + assert deltas == ["I'll process your replacement."] + + +# ────────────────────────────────────────────────────────────────────── +# 6. Custom workflow events +# ────────────────────────────────────────────────────────────────────── + + +class ProgressEvent(WorkflowEvent): + """Custom workflow event for testing CUSTOM event mapping.""" + + def __init__(self, progress: int) -> None: + super().__init__("custom_progress", data={"progress": progress}) + + +async def test_workflow_custom_events() -> None: + """Custom workflow events are mapped to CUSTOM AG-UI events.""" + + @executor(id="progress_tracker") + async def progress_tracker(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.add_event(ProgressEvent(25)) + await ctx.yield_output("In progress...") + await ctx.add_event(ProgressEvent(100)) + + workflow = WorkflowBuilder(start_executor=progress_tracker).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_bookends() + stream.assert_no_run_error() + + progress_events = [e for e in stream.get("CUSTOM") if getattr(e, "name", None) == "custom_progress"] + assert len(progress_events) == 2 + assert progress_events[0].value == {"progress": 25} + assert progress_events[1].value == {"progress": 100} + + +# ────────────────────────────────────────────────────────────────────── +# 7. request_info → TOOL_CALL lifecycle +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_request_info_tool_call_lifecycle() -> None: + """request_info emits TOOL_CALL_START/ARGS/END cycle plus CUSTOM request_info.""" + + @executor(id="requester") + async def requester(message: Any, ctx: WorkflowContext) -> None: + await ctx.request_info("Need approval", str, request_id="req-1") + + workflow = WorkflowBuilder(start_executor=requester).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_bookends() + stream.assert_no_run_error() + + # Tool call lifecycle + stream.assert_ordered_types( + [ + "RUN_STARTED", + "TOOL_CALL_START", + "TOOL_CALL_ARGS", + "TOOL_CALL_END", + "CUSTOM", # request_info + "RUN_FINISHED", + ] + ) + + # Verify tool call details + start = stream.first("TOOL_CALL_START") + assert start.tool_call_id == "req-1" + assert start.tool_call_name == "request_info" + + # TOOL_CALL_ARGS should contain the request payload + args = stream.first("TOOL_CALL_ARGS") + assert args.tool_call_id == "req-1" + parsed_args = json.loads(args.delta) + assert parsed_args["request_id"] == "req-1" + + # Tool calls should be balanced + stream.assert_tool_calls_balanced() + + +async def test_workflow_request_info_interrupt_in_run_finished() -> None: + """request_info populates RUN_FINISHED.interrupt with the request metadata.""" + + @executor(id="requester") + async def requester(message: Any, ctx: WorkflowContext) -> None: + await ctx.request_info( + {"message": "Choose a flight", "options": [{"airline": "KLM"}], "agent": "flights"}, + dict, + request_id="flights-choice", + ) + + workflow = WorkflowBuilder(start_executor=requester).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + finished = stream.last("RUN_FINISHED") + interrupt = finished.model_dump().get("interrupt") + assert isinstance(interrupt, list) + assert len(interrupt) == 1 + assert interrupt[0]["id"] == "flights-choice" + assert interrupt[0]["value"]["agent"] == "flights" + + +async def test_workflow_request_info_emits_interrupt_card_event() -> None: + """request_info with dict data emits a WorkflowInterruptEvent custom event.""" + + @executor(id="requester") + async def requester(message: Any, ctx: WorkflowContext) -> None: + await ctx.request_info( + {"message": "Pick one", "options": ["A", "B"]}, + dict, + request_id="pick-1", + ) + + workflow = WorkflowBuilder(start_executor=requester).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + interrupt_cards = [e for e in stream.get("CUSTOM") if getattr(e, "name", None) == "WorkflowInterruptEvent"] + assert interrupt_cards, "Expected WorkflowInterruptEvent custom event" + + +# ────────────────────────────────────────────────────────────────────── +# 8. Text message draining on request_info boundary +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_text_drained_before_request_info() -> None: + """Open text message is closed (TEXT_MESSAGE_END) before request_info tool calls begin.""" + + @executor(id="text_then_request") + async def text_then_request(message: Any, ctx: WorkflowContext) -> None: + await ctx.yield_output("Please confirm this action.") + await ctx.request_info("Need approval", str, request_id="approval-1") + + workflow = WorkflowBuilder(start_executor=text_then_request).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_text_messages_balanced() + stream.assert_tool_calls_balanced() + + # TEXT_MESSAGE_END must appear before TOOL_CALL_START + types = stream.types() + text_end_idx = types.index("TEXT_MESSAGE_END") + tool_start_idx = types.index("TOOL_CALL_START") + assert text_end_idx < tool_start_idx, ( + f"TEXT_MESSAGE_END (idx={text_end_idx}) must come before TOOL_CALL_START (idx={tool_start_idx})" + ) + + +# ────────────────────────────────────────────────────────────────────── +# 9. Text deduplication +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_skips_duplicate_text_from_snapshot() -> None: + """Duplicate text from AgentResponse snapshot is not re-emitted.""" + + @executor(id="deduper") + async def deduper(message: Any, ctx: WorkflowContext[Never, Any]) -> None: + text = "Order processed successfully." + await ctx.yield_output(text) + # Snapshot repeats the same text + await ctx.yield_output( + AgentResponse( + messages=[ + Message(role="user", contents=[Content.from_text("process order")]), + Message(role="assistant", contents=[Content.from_text(text)]), + ] + ) + ) + + workflow = WorkflowBuilder(start_executor=deduper).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_text_messages_balanced() + deltas = [e.delta for e in stream.get("TEXT_MESSAGE_CONTENT")] + # Text should appear only once + assert deltas == ["Order processed successfully."] + + +async def test_workflow_skips_consecutive_duplicate_outputs() -> None: + """Consecutive identical text outputs are deduplicated.""" + + @executor(id="repeater") + async def repeater(message: Any, ctx: WorkflowContext[Never, Any]) -> None: + text = "Done!" + await ctx.yield_output(text) + await ctx.yield_output(text) + + workflow = WorkflowBuilder(start_executor=repeater).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_text_messages_balanced() + deltas = [e.delta for e in stream.get("TEXT_MESSAGE_CONTENT")] + assert deltas == ["Done!"] + + +async def test_workflow_emits_distinct_consecutive_outputs() -> None: + """Distinct text outputs are all emitted, not incorrectly deduplicated.""" + + @executor(id="multisayer") + async def multisayer(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("First part. ") + await ctx.yield_output("Second part.") + + workflow = WorkflowBuilder(start_executor=multisayer).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_text_messages_balanced() + deltas = [e.delta for e in stream.get("TEXT_MESSAGE_CONTENT")] + assert deltas == ["First part. ", "Second part."] + + +# ────────────────────────────────────────────────────────────────────── +# 10. Workflow error handling → RUN_ERROR +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_error_emits_run_error_event() -> None: + """Exceptions during workflow streaming produce RUN_ERROR events.""" + + class FailingWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + raise RuntimeError("workflow exploded") + yield # pragma: no cover + + return _stream() + + wrapper = AgentFrameworkWorkflow(workflow=cast(Any, FailingWorkflow())) + stream = await _run(wrapper, _payload()) + + # Should still have RUN_STARTED + stream.assert_has_type("RUN_STARTED") + # Should have RUN_ERROR + stream.assert_has_type("RUN_ERROR") + error = stream.first("RUN_ERROR") + assert "workflow exploded" in error.message + + +async def test_workflow_error_preserves_bookend_structure() -> None: + """Even on error, RUN_STARTED is the first event.""" + + class FailingWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + raise ValueError("bad input") + yield # pragma: no cover + + return _stream() + + wrapper = AgentFrameworkWorkflow(workflow=cast(Any, FailingWorkflow())) + stream = await _run(wrapper, _payload()) + + types = stream.types() + assert types[0] == "RUN_STARTED" + assert "RUN_ERROR" in types + + +# ────────────────────────────────────────────────────────────────────── +# 11. Multi-turn request_info interrupt/resume +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_interrupt_resume_round_trip() -> None: + """Turn 1: request_info → interrupt. Turn 2: resume → completion.""" + + class RequesterExecutor(Executor): + def __init__(self) -> None: + super().__init__(id="requester") + + @handler + async def start(self, message: Any, ctx: WorkflowContext) -> None: + await ctx.request_info("Choose an option", str, request_id="choice-1") + + @response_handler + async def handle_choice(self, original: str, response: str, ctx: WorkflowContext) -> None: + await ctx.yield_output(f"You chose: {response}") + + workflow = WorkflowBuilder(start_executor=RequesterExecutor()).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + + # Turn 1 + stream1 = await _run(wrapper, _payload(thread_id="thread-resume", run_id="run-1")) + stream1.assert_bookends() + stream1.assert_no_run_error() + stream1.assert_tool_calls_balanced() + + finished1 = stream1.last("RUN_FINISHED") + interrupt1 = finished1.model_dump().get("interrupt") + assert interrupt1, "Expected interrupt" + assert interrupt1[0]["id"] == "choice-1" + + # Turn 2: resume + stream2 = await _run( + wrapper, + { + "thread_id": "thread-resume", + "run_id": "run-2", + "messages": [], + "resume": {"interrupts": [{"id": "choice-1", "value": "Option A"}]}, + }, + ) + stream2.assert_has_run_lifecycle() + stream2.assert_no_run_error() + stream2.assert_text_messages_balanced() + + # Should have the response text + deltas = [e.delta for e in stream2.get("TEXT_MESSAGE_CONTENT")] + assert any("Option A" in d for d in deltas), f"Expected 'Option A' in deltas: {deltas}" + + # No interrupt after resume + finished2 = stream2.last("RUN_FINISHED") + interrupt2 = finished2.model_dump().get("interrupt") + assert not interrupt2 + + +async def test_workflow_forwarded_props_resume() -> None: + """CopilotKit-style forwarded_props.command.resume should resume a pending request.""" + + @executor(id="requester") + async def requester(message: Any, ctx: WorkflowContext) -> None: + await ctx.request_info({"options": [{"name": "A"}]}, dict, request_id="pick") + + workflow = WorkflowBuilder(start_executor=requester).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + + # Turn 1 + await _run(wrapper, _payload(thread_id="thread-fwd", run_id="run-1")) + + # Turn 2 via forwarded_props + stream2 = await _run( + wrapper, + { + "thread_id": "thread-fwd", + "run_id": "run-2", + "messages": [], + "forwarded_props": {"command": {"resume": json.dumps({"name": "A"})}}, + }, + ) + stream2.assert_bookends() + stream2.assert_no_run_error() + + finished = stream2.last("RUN_FINISHED") + assert not finished.model_dump().get("interrupt") + + +# ────────────────────────────────────────────────────────────────────── +# 12. Empty turns with pending requests +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_empty_turn_preserves_interrupts() -> None: + """An empty turn with a pending request still returns the interrupt without errors.""" + + @executor(id="requester") + async def requester(message: Any, ctx: WorkflowContext) -> None: + await ctx.request_info({"prompt": "choose"}, dict, request_id="pick-one") + + workflow = WorkflowBuilder(start_executor=requester).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + + # Turn 1: trigger the request + await _run(wrapper, _payload(thread_id="thread-empty", run_id="run-1")) + + # Turn 2: empty messages, no resume + stream2 = await _run( + wrapper, + { + "thread_id": "thread-empty", + "run_id": "run-2", + "messages": [], + }, + ) + stream2.assert_bookends() + stream2.assert_no_run_error() + stream2.assert_tool_calls_balanced() + + # Should re-emit the pending interrupt + finished = stream2.last("RUN_FINISHED") + interrupts = finished.model_dump().get("interrupt") + assert isinstance(interrupts, list) + assert interrupts[0]["id"] == "pick-one" + + # Should have TOOL_CALL events for the pending request + stream2.assert_has_type("TOOL_CALL_START") + + +async def test_workflow_empty_turn_no_pending_requests() -> None: + """Empty turn with no pending requests produces clean bookends.""" + + @executor(id="noop") + async def noop(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("done") + + workflow = WorkflowBuilder(start_executor=noop).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + + # Run once to completion + await _run(wrapper, _payload(thread_id="thread-empty-clean", run_id="run-1")) + + # Empty turn + stream2 = await _run( + wrapper, + { + "thread_id": "thread-empty-clean", + "run_id": "run-2", + "messages": [], + }, + ) + stream2.assert_bookends() + stream2.assert_no_run_error() + + +# ────────────────────────────────────────────────────────────────────── +# 13. Usage content as CUSTOM event +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_usage_output_maps_to_custom_event() -> None: + """Usage Content outputs are surfaced as custom usage events.""" + + @executor(id="usage_reporter") + async def usage_reporter(message: Any, ctx: WorkflowContext[Never, Content]) -> None: + await ctx.yield_output( + Content.from_usage({"input_token_count": 100, "output_token_count": 50, "total_token_count": 150}) + ) + + workflow = WorkflowBuilder(start_executor=usage_reporter).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + stream = await _run(wrapper, _payload()) + + stream.assert_bookends() + stream.assert_no_run_error() + + usage_events = [e for e in stream.get("CUSTOM") if getattr(e, "name", None) == "usage"] + assert len(usage_events) == 1 + assert usage_events[0].value["input_token_count"] == 100 + assert usage_events[0].value["total_token_count"] == 150 + + +# ────────────────────────────────────────────────────────────────────── +# 14. Approval flow (Content-based request_info) +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_approval_flow_round_trip() -> None: + """function_approval_request via request_info, then resume with approval response.""" + + class ApprovalExecutor(Executor): + def __init__(self) -> None: + super().__init__(id="approval_exec") + + @handler + async def start(self, message: Any, ctx: WorkflowContext) -> None: + function_call = Content.from_function_call( + call_id="refund-call", + name="submit_refund", + arguments={"order_id": "12345", "amount": "$89.99"}, + ) + approval_request = Content.from_function_approval_request(id="approval-1", function_call=function_call) + await ctx.request_info(approval_request, Content, request_id="approval-1") + + @response_handler + async def handle_approval(self, original_request: Content, response: Content, ctx: WorkflowContext) -> None: + status = "approved" if bool(response.approved) else "rejected" + await ctx.yield_output(f"Refund {status}.") + + workflow = WorkflowBuilder(start_executor=ApprovalExecutor()).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + + # Turn 1: request approval + stream1 = await _run(wrapper, _payload(thread_id="thread-approval", run_id="run-1")) + stream1.assert_bookends() + stream1.assert_no_run_error() + + finished1 = stream1.last("RUN_FINISHED") + interrupt1 = finished1.model_dump().get("interrupt") + assert interrupt1, "Expected approval interrupt" + interrupt_value = interrupt1[0]["value"] + + # Turn 2: approve + stream2 = await _run( + wrapper, + { + "thread_id": "thread-approval", + "run_id": "run-2", + "messages": [], + "resume": { + "interrupts": [ + { + "id": "approval-1", + "value": { + "type": "function_approval_response", + "approved": True, + "id": interrupt_value.get("id", "approval-1"), + "function_call": interrupt_value.get("function_call"), + }, + } + ] + }, + }, + ) + stream2.assert_has_run_lifecycle() + stream2.assert_no_run_error() + stream2.assert_text_messages_balanced() + + deltas = [e.delta for e in stream2.get("TEXT_MESSAGE_CONTENT")] + assert any("approved" in d for d in deltas) + + # No more interrupt + finished2 = stream2.last("RUN_FINISHED") + assert not finished2.model_dump().get("interrupt") + + +# ────────────────────────────────────────────────────────────────────── +# 15. Message list request/response coercion +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_message_list_resume() -> None: + """Resume with list[Message] payload coerces correctly into workflow response.""" + + class MessageRequestExecutor(Executor): + def __init__(self) -> None: + super().__init__(id="msg_request") + + @handler + async def start(self, message: Any, ctx: WorkflowContext) -> None: + await ctx.request_info({"prompt": "Need follow-up"}, list[Message], request_id="handoff") + + @response_handler + async def handle_input(self, original: dict, response: list[Message], ctx: WorkflowContext) -> None: + user_text = response[0].text if response else "" + await ctx.yield_output(f"Got: {user_text}") + + workflow = WorkflowBuilder(start_executor=MessageRequestExecutor()).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + + # Turn 1 + await _run(wrapper, _payload(thread_id="thread-msg", run_id="run-1")) + + # Turn 2: resume with message list + stream2 = await _run( + wrapper, + { + "thread_id": "thread-msg", + "run_id": "run-2", + "messages": [], + "resume": { + "interrupts": [ + { + "id": "handoff", + "value": [ + {"role": "user", "contents": [{"type": "text", "text": "Ship a replacement"}]}, + ], + } + ] + }, + }, + ) + stream2.assert_has_run_lifecycle() + stream2.assert_no_run_error() + stream2.assert_text_messages_balanced() + + deltas = [e.delta for e in stream2.get("TEXT_MESSAGE_CONTENT")] + assert any("replacement" in d for d in deltas) + + +# ────────────────────────────────────────────────────────────────────── +# 16. Plain text follow-up does NOT infer interrupt response +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_plain_text_does_not_resume_pending_dict_request() -> None: + """Plain text user follow-up should NOT be coerced into a dict response.""" + + @executor(id="requester") + async def requester(message: Any, ctx: WorkflowContext) -> None: + await ctx.request_info( + {"message": "Choose a flight", "options": [{"airline": "KLM"}], "agent": "flights"}, + dict, + request_id="flights-choice", + ) + + workflow = WorkflowBuilder(start_executor=requester).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + + # Turn 1 + await _run(wrapper, _payload(thread_id="thread-nocoerce", run_id="run-1")) + + # Turn 2: plain text follow-up with request_info tool call in history + stream2 = await _run( + wrapper, + { + "thread_id": "thread-nocoerce", + "run_id": "run-2", + "messages": [ + { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "id": "flights-choice", + "type": "function", + "function": {"name": "request_info", "arguments": "{}"}, + } + ], + }, + {"role": "user", "content": "I prefer KLM please"}, + ], + }, + ) + stream2.assert_bookends() + stream2.assert_no_run_error() + + # Should still have the interrupt (text was not accepted as dict response) + finished = stream2.last("RUN_FINISHED") + interrupts = finished.model_dump().get("interrupt") + assert isinstance(interrupts, list) + assert interrupts[0]["id"] == "flights-choice" + + +# ────────────────────────────────────────────────────────────────────── +# 17. Workflow factory (thread-scoped workflows) +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_factory_thread_scoping() -> None: + """workflow_factory creates separate workflow instances per thread_id.""" + + def make_workflow(thread_id: str): + @executor(id="echo") + async def echo(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output(f"Thread: {thread_id}") + + return WorkflowBuilder(start_executor=echo).build() + + wrapper = AgentFrameworkWorkflow(workflow_factory=make_workflow) + + stream_a = await _run(wrapper, _payload(thread_id="thread-a", run_id="run-a")) + stream_b = await _run(wrapper, _payload(thread_id="thread-b", run_id="run-b")) + + stream_a.assert_bookends() + stream_b.assert_bookends() + + deltas_a = [e.delta for e in stream_a.get("TEXT_MESSAGE_CONTENT")] + deltas_b = [e.delta for e in stream_b.get("TEXT_MESSAGE_CONTENT")] + assert any("thread-a" in d for d in deltas_a) + assert any("thread-b" in d for d in deltas_b) + + +# ────────────────────────────────────────────────────────────────────── +# 18. Multiple request_info calls in sequence +# ────────────────────────────────────────────────────────────────────── + + +async def test_workflow_sequential_request_info_interrupts() -> None: + """Two chained executors each requesting info: first triggers interrupt, resume, then second triggers interrupt. + + This mirrors the subgraphs_agent pattern where separate executors handle sequential interactions. + """ + + class NameRequester(Executor): + def __init__(self) -> None: + super().__init__(id="name_requester") + + @handler + async def start(self, message: Any, ctx: WorkflowContext[str]) -> None: + await ctx.request_info("What's your name?", str, request_id="name-req") + + @response_handler + async def handle_name(self, original: str, response: str, ctx: WorkflowContext[str]) -> None: + await ctx.send_message(response) + + class DestRequester(Executor): + def __init__(self) -> None: + super().__init__(id="dest_requester") + + @handler + async def start(self, message: str, ctx: WorkflowContext[str]) -> None: + self._name = message + await ctx.request_info("Where to?", str, request_id="dest-req") + + @response_handler + async def handle_dest(self, original: str, response: str, ctx: WorkflowContext[str]) -> None: + await ctx.yield_output(f"Booking for {self._name} to {response}") + + name_requester = NameRequester() + dest_requester = DestRequester() + workflow = WorkflowBuilder(start_executor=name_requester).add_chain([name_requester, dest_requester]).build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + + # Turn 1 + stream1 = await _run(wrapper, _payload(thread_id="thread-seq", run_id="run-1")) + stream1.assert_bookends() + stream1.assert_tool_calls_balanced() + interrupt1 = stream1.last("RUN_FINISHED").model_dump().get("interrupt") + assert interrupt1[0]["id"] == "name-req" + + # Turn 2: answer name → triggers second executor's request_info + stream2 = await _run( + wrapper, + { + "thread_id": "thread-seq", + "run_id": "run-2", + "messages": [], + "resume": {"interrupts": [{"id": "name-req", "value": "Alice"}]}, + }, + ) + stream2.assert_has_run_lifecycle() + stream2.assert_tool_calls_balanced() + interrupt2 = stream2.last("RUN_FINISHED").model_dump().get("interrupt") + assert interrupt2[0]["id"] == "dest-req" + + # Turn 3: answer destination → completion + stream3 = await _run( + wrapper, + { + "thread_id": "thread-seq", + "run_id": "run-3", + "messages": [], + "resume": {"interrupts": [{"id": "dest-req", "value": "Paris"}]}, + }, + ) + stream3.assert_has_run_lifecycle() + stream3.assert_no_run_error() + stream3.assert_text_messages_balanced() + + deltas = [e.delta for e in stream3.get("TEXT_MESSAGE_CONTENT")] + assert any("Alice" in d and "Paris" in d for d in deltas) + assert not stream3.last("RUN_FINISHED").model_dump().get("interrupt") diff --git a/python/packages/ag-ui/tests/ag_ui/sse_helpers.py b/python/packages/ag-ui/tests/ag_ui/sse_helpers.py new file mode 100644 index 0000000000..8a71dd9afb --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/sse_helpers.py @@ -0,0 +1,72 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""SSE parsing helpers for AG-UI HTTP round-trip tests.""" + +from __future__ import annotations + +import json +from typing import Any + +from event_stream import EventStream + + +def parse_sse_response(response_content: bytes) -> list[dict[str, Any]]: + """Parse raw SSE bytes from TestClient into a list of event dicts. + + Each SSE event is a ``data: {...}`` line followed by a blank line. + """ + text = response_content.decode("utf-8") + events: list[dict[str, Any]] = [] + decode_errors: list[str] = [] + for line in text.splitlines(): + if line.startswith("data: "): + payload = line[6:] + try: + events.append(json.loads(payload)) + except json.JSONDecodeError as exc: + decode_errors.append(f"payload={payload!r}, error={exc}") + continue + if decode_errors: + joined = "; ".join(decode_errors) + raise AssertionError(f"Failed to decode one or more SSE data lines: {joined}") + return events + + +def parse_sse_to_event_stream(response_content: bytes) -> EventStream: + """Parse SSE bytes and wrap in EventStream for structured assertions. + + Returns an EventStream over lightweight SimpleNamespace objects that + mirror AG-UI event attributes (type, message_id, tool_call_id, etc.) + so that EventStream assertion methods work. + """ + from types import SimpleNamespace + + raw_events = parse_sse_response(response_content) + events: list[Any] = [] + for raw in raw_events: + # Normalize camelCase keys to snake_case attributes that EventStream expects + ns = SimpleNamespace() + ns.type = raw.get("type", "") + ns.raw = raw + # Map common camelCase fields + for camel, snake in _FIELD_MAP.items(): + if camel in raw: + setattr(ns, snake, raw[camel]) + # Also keep camelCase as attributes for direct access + for key, value in raw.items(): + if not hasattr(ns, key): + setattr(ns, key, value) + events.append(ns) + return EventStream(events) + + +_FIELD_MAP: dict[str, str] = { + "messageId": "message_id", + "runId": "run_id", + "threadId": "thread_id", + "toolCallId": "tool_call_id", + "toolCallName": "tool_call_name", + "toolName": "tool_call_name", + "parentMessageId": "parent_message_id", + "stepName": "step_name", +} diff --git a/python/packages/ag-ui/tests/ag_ui/test_ag_ui_client.py b/python/packages/ag-ui/tests/ag_ui/test_ag_ui_client.py index b6d2152d2a..df6359b8ba 100644 --- a/python/packages/ag-ui/tests/ag_ui/test_ag_ui_client.py +++ b/python/packages/ag-ui/tests/ag_ui/test_ag_ui_client.py @@ -21,7 +21,7 @@ from agent_framework_ag_ui._client import AGUIChatClient from agent_framework_ag_ui._http_service import AGUIHttpService -class TestableAGUIChatClient(AGUIChatClient): +class StubAGUIChatClient(AGUIChatClient): """Testable wrapper exposing protected helpers.""" @property @@ -53,19 +53,19 @@ class TestAGUIChatClient: async def test_client_initialization(self) -> None: """Test client initialization.""" - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") assert client.http_service is not None assert client.http_service.endpoint.startswith("http://localhost:8888") async def test_client_context_manager(self) -> None: """Test client as async context manager.""" - async with TestableAGUIChatClient(endpoint="http://localhost:8888/") as client: + async with StubAGUIChatClient(endpoint="http://localhost:8888/") as client: assert client is not None async def test_extract_state_from_messages_no_state(self) -> None: """Test state extraction when no state is present.""" - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") messages = [ Message(role="user", text="Hello"), Message(role="assistant", text="Hi there"), @@ -80,7 +80,7 @@ class TestAGUIChatClient: """Test state extraction from last message.""" import base64 - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") state_data = {"key": "value", "count": 42} state_json = json.dumps(state_data) @@ -104,7 +104,7 @@ class TestAGUIChatClient: """Test state extraction with invalid JSON.""" import base64 - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") invalid_json = "not valid json" state_b64 = base64.b64encode(invalid_json.encode("utf-8")).decode("utf-8") @@ -123,7 +123,7 @@ class TestAGUIChatClient: async def test_convert_messages_to_agui_format(self) -> None: """Test message conversion to AG-UI format.""" - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") messages = [ Message(role="user", text="What is the weather?"), Message(role="assistant", text="Let me check.", message_id="msg_123"), @@ -140,7 +140,7 @@ class TestAGUIChatClient: async def test_get_thread_id_from_metadata(self) -> None: """Test thread ID extraction from metadata.""" - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") chat_options = ChatOptions(metadata={"thread_id": "existing_thread_123"}) thread_id = client.get_thread_id(chat_options) @@ -149,7 +149,7 @@ class TestAGUIChatClient: async def test_get_thread_id_generation(self) -> None: """Test automatic thread ID generation.""" - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") chat_options = ChatOptions() thread_id = client.get_thread_id(chat_options) @@ -170,7 +170,7 @@ class TestAGUIChatClient: for event in mock_events: yield event - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") monkeypatch.setattr(client.http_service, "post_run", mock_post_run) messages = [Message(role="user", text="Test message")] @@ -203,7 +203,7 @@ class TestAGUIChatClient: for event in mock_events: yield event - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") monkeypatch.setattr(client.http_service, "post_run", mock_post_run) messages = [Message(role="user", text="Test message")] @@ -246,7 +246,7 @@ class TestAGUIChatClient: for event in mock_events: yield event - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") monkeypatch.setattr(client.http_service, "post_run", mock_post_run) messages = [Message(role="user", text="Test with tools")] @@ -270,7 +270,7 @@ class TestAGUIChatClient: for event in mock_events: yield event - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") monkeypatch.setattr(client.http_service, "post_run", mock_post_run) messages = [Message(role="user", text="Test server tool execution")] @@ -312,7 +312,7 @@ class TestAGUIChatClient: monkeypatch.setattr("agent_framework._tools._auto_invoke_function", fake_auto_invoke) - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") monkeypatch.setattr(client.http_service, "post_run", mock_post_run) messages = [Message(role="user", text="Test server tool execution")] @@ -348,7 +348,7 @@ class TestAGUIChatClient: for event in mock_events: yield event - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") monkeypatch.setattr(client.http_service, "post_run", mock_post_run) chat_options = ChatOptions() @@ -357,6 +357,81 @@ class TestAGUIChatClient: assert response is not None + async def test_extract_state_from_empty_messages(self) -> None: + """Empty messages list returns empty list and None state.""" + client = StubAGUIChatClient(endpoint="http://localhost:8888/") + result_messages, state = client.extract_state_from_messages([]) + assert result_messages == [] + assert state is None + + async def test_register_server_tool_non_dict_config(self) -> None: + """Non-dict function_invocation_configuration is a no-op.""" + client = StubAGUIChatClient( + endpoint="http://localhost:8888/", + function_invocation_configuration=None, # type: ignore[arg-type] + ) + # Should not raise + client._register_server_tool_placeholder("some_tool") + + async def test_non_streaming_response(self, monkeypatch: MonkeyPatch) -> None: + """Non-streaming path collects updates into ChatResponse.""" + mock_events = [ + {"type": "RUN_STARTED", "threadId": "thread_1", "runId": "run_1"}, + {"type": "TEXT_MESSAGE_CONTENT", "messageId": "msg_1", "delta": "Hello"}, + {"type": "RUN_FINISHED", "threadId": "thread_1", "runId": "run_1"}, + ] + + async def mock_post_run(*args: object, **kwargs: Any) -> AsyncGenerator[dict[str, Any], None]: + for event in mock_events: + yield event + + client = StubAGUIChatClient(endpoint="http://localhost:8888/") + monkeypatch.setattr(client.http_service, "post_run", mock_post_run) + + messages = [Message(role="user", text="Test")] + response = await client.inner_get_response(messages=messages, options={}, stream=False) + + assert response is not None + assert len(response.messages) > 0 + + async def test_client_tool_sets_additional_properties(self, monkeypatch: MonkeyPatch) -> None: + """Client tool content gets agui_thread_id additional property.""" + + @tool + def my_tool(param: str) -> str: + """My tool.""" + return "result" + + mock_events = [ + {"type": "RUN_STARTED", "threadId": "thread_1", "runId": "run_1"}, + {"type": "TOOL_CALL_START", "toolCallId": "call_1", "toolName": "my_tool"}, + {"type": "TOOL_CALL_ARGS", "toolCallId": "call_1", "delta": '{"param": "test"}'}, + {"type": "RUN_FINISHED", "threadId": "thread_1", "runId": "run_1"}, + ] + + async def mock_post_run(*args: object, **kwargs: Any) -> AsyncGenerator[dict[str, Any], None]: + for event in mock_events: + yield event + + client = StubAGUIChatClient(endpoint="http://localhost:8888/") + monkeypatch.setattr(client.http_service, "post_run", mock_post_run) + + messages = [Message(role="user", text="Test")] + updates: list[ChatResponseUpdate] = [] + async for update in client._inner_get_response(messages=messages, stream=True, options={"tools": [my_tool]}): + updates.append(update) + + # Find the function_call content - it should have agui_thread_id + found = False + for update in updates: + for content in update.contents: + if content.type == "function_call" and content.name == "my_tool": + assert content.additional_properties is not None + assert "agui_thread_id" in content.additional_properties + found = True + break + assert found, "Expected to find function_call content for my_tool" + async def test_interrupt_options_transmission(self, monkeypatch: MonkeyPatch) -> None: """Interrupt option fields are forwarded to the HTTP service.""" available_interrupts = [{"id": "req_1", "type": "request_info"}] @@ -373,7 +448,7 @@ class TestAGUIChatClient: for event in mock_events: yield event - client = TestableAGUIChatClient(endpoint="http://localhost:8888/") + client = StubAGUIChatClient(endpoint="http://localhost:8888/") monkeypatch.setattr(client.http_service, "post_run", mock_post_run) messages = [Message(role="user", text="continue")] diff --git a/python/packages/ag-ui/tests/ag_ui/test_endpoint.py b/python/packages/ag-ui/tests/ag_ui/test_endpoint.py index 6b65a6ab51..51ab468b84 100644 --- a/python/packages/ag-ui/tests/ag_ui/test_endpoint.py +++ b/python/packages/ag-ui/tests/ag_ui/test_endpoint.py @@ -550,3 +550,56 @@ async def test_endpoint_without_dependencies_is_accessible(build_chat_client): assert response.status_code == 200 assert response.headers["content-type"] == "text/event-stream; charset=utf-8" + + +async def test_endpoint_invalid_agent_type_raises_typeerror(): + """Passing an invalid agent type raises TypeError.""" + app = FastAPI() + + with pytest.raises(TypeError, match="must be SupportsAgentRun"): + add_agent_framework_fastapi_endpoint(app, agent="not_an_agent") # type: ignore[arg-type] + + +async def test_endpoint_encoding_failure_emits_run_error(): + """Event encoding failure emits RUN_ERROR event in the SSE stream.""" + from unittest.mock import patch + + class SimpleWorkflow(AgentFrameworkWorkflow): + async def run(self, input_data: dict[str, Any]): + del input_data + yield RunStartedEvent(run_id="run-1", thread_id="thread-1") + + app = FastAPI() + add_agent_framework_fastapi_endpoint(app, SimpleWorkflow(), path="/encode-fail") + client = TestClient(app) + + with patch("ag_ui.encoder.EventEncoder.encode") as mock_encode: + # First call fails (the RUN_STARTED event), second call succeeds (the error event) + mock_encode.side_effect = [ValueError("encode boom"), 'data: {"type":"RUN_ERROR"}\n\n'] + response = client.post("/encode-fail", json={"messages": [{"role": "user", "content": "go"}]}) + + assert response.status_code == 200 + content = response.content.decode("utf-8") + assert "RUN_ERROR" in content + + +async def test_endpoint_double_encoding_failure_terminates(): + """When both event and error encoding fail, stream terminates gracefully.""" + from unittest.mock import patch + + class SimpleWorkflow(AgentFrameworkWorkflow): + async def run(self, input_data: dict[str, Any]): + del input_data + yield RunStartedEvent(run_id="run-1", thread_id="thread-1") + + app = FastAPI() + add_agent_framework_fastapi_endpoint(app, SimpleWorkflow(), path="/double-fail") + client = TestClient(app) + + with patch("ag_ui.encoder.EventEncoder.encode") as mock_encode: + # Both calls fail - event encode and error event encode + mock_encode.side_effect = ValueError("always fails") + response = client.post("/double-fail", json={"messages": [{"role": "user", "content": "go"}]}) + + # Should still get 200 (SSE stream), just with no events + assert response.status_code == 200 diff --git a/python/packages/ag-ui/tests/ag_ui/test_http_round_trip.py b/python/packages/ag-ui/tests/ag_ui/test_http_round_trip.py new file mode 100644 index 0000000000..7e4712535c --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/test_http_round_trip.py @@ -0,0 +1,215 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""HTTP round-trip tests: POST → SSE bytes → parse → validate event sequence. + +These tests exercise the full HTTP pipeline using FastAPI TestClient, +parsing the raw SSE byte stream and validating through EventStream assertions. +""" + +from __future__ import annotations + +from typing import Any + +from agent_framework import AgentResponseUpdate, Content, WorkflowBuilder, WorkflowContext, executor +from conftest import StubAgent +from fastapi import FastAPI +from fastapi.testclient import TestClient +from sse_helpers import parse_sse_response, parse_sse_to_event_stream +from typing_extensions import Never + +from agent_framework_ag_ui import AgentFrameworkAgent, AgentFrameworkWorkflow, add_agent_framework_fastapi_endpoint + + +def _build_app_with_agent(updates: list[AgentResponseUpdate], **kwargs: Any) -> FastAPI: + stub = StubAgent(updates=updates) + agent = AgentFrameworkAgent(agent=stub, **kwargs) + app = FastAPI() + add_agent_framework_fastapi_endpoint(app, agent) + return app + + +def _build_app_with_workflow(workflow_builder: WorkflowBuilder) -> FastAPI: + workflow = workflow_builder.build() + wrapper = AgentFrameworkWorkflow(workflow=workflow) + app = FastAPI() + add_agent_framework_fastapi_endpoint(app, wrapper) + return app + + +USER_PAYLOAD: dict[str, Any] = { + "messages": [{"role": "user", "content": "Hello"}], + "threadId": "thread-http", + "runId": "run-http", +} + + +# ── Agentic chat SSE round-trip ── + + +def test_agentic_chat_sse_round_trip() -> None: + """Full HTTP round-trip: POST → SSE bytes → parse → validate event sequence.""" + app = _build_app_with_agent( + [ + AgentResponseUpdate(contents=[Content.from_text(text="Hi there!")], role="assistant"), + ] + ) + client = TestClient(app) + response = client.post("/", json=USER_PAYLOAD) + + assert response.status_code == 200 + assert "text/event-stream" in response.headers["content-type"] + + stream = parse_sse_to_event_stream(response.content) + stream.assert_bookends() + stream.assert_text_messages_balanced() + stream.assert_no_run_error() + stream.assert_ordered_types( + [ + "RUN_STARTED", + "TEXT_MESSAGE_START", + "TEXT_MESSAGE_CONTENT", + "TEXT_MESSAGE_END", + "MESSAGES_SNAPSHOT", + "RUN_FINISHED", + ] + ) + + +# ── Tool call SSE round-trip ── + + +def test_tool_call_sse_round_trip() -> None: + """Tool call events survive SSE encoding/parsing round-trip.""" + app = _build_app_with_agent( + [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments='{"city": "SF"}')], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_text(text="It's warm!")], + role="assistant", + ), + ] + ) + client = TestClient(app) + response = client.post("/", json=USER_PAYLOAD) + + stream = parse_sse_to_event_stream(response.content) + stream.assert_bookends() + stream.assert_tool_calls_balanced() + stream.assert_text_messages_balanced() + + # Verify tool call details survive SSE encoding + start = stream.first("TOOL_CALL_START") + assert start.tool_call_name == "get_weather" + assert start.tool_call_id == "call-1" + + +# ── SSE encoding fidelity ── + + +def test_sse_event_encoding_fidelity() -> None: + """Every event from agent.run() produces a valid SSE data: line that round-trips.""" + app = _build_app_with_agent( + [ + AgentResponseUpdate(contents=[Content.from_text(text="Hello world")], role="assistant"), + ] + ) + client = TestClient(app) + response = client.post("/", json=USER_PAYLOAD) + + raw_events = parse_sse_response(response.content) + assert len(raw_events) > 0, "No SSE events parsed" + + # Every event should have a 'type' field + for event in raw_events: + assert "type" in event, f"Event missing 'type': {event}" + + # Event types should include the expected ones + event_types = [e["type"] for e in raw_events] + assert "RUN_STARTED" in event_types + assert "RUN_FINISHED" in event_types + + +# ── camelCase request field acceptance ── + + +def test_camel_case_request_fields_accepted() -> None: + """Request with camelCase fields (runId, threadId) is correctly parsed.""" + app = _build_app_with_agent( + [ + AgentResponseUpdate(contents=[Content.from_text(text="ok")], role="assistant"), + ] + ) + client = TestClient(app) + response = client.post( + "/", + json={ + "messages": [{"role": "user", "content": "hi"}], + "runId": "camel-run", + "threadId": "camel-thread", + }, + ) + assert response.status_code == 200 + + stream = parse_sse_to_event_stream(response.content) + stream.assert_bookends() + + +# ── Workflow SSE round-trip ── + + +def test_workflow_sse_round_trip() -> None: + """Workflow events survive SSE encoding/parsing.""" + + @executor(id="greeter") + async def greeter(message: Any, ctx: WorkflowContext[Never, str]) -> None: + await ctx.yield_output("Hello from workflow!") + + app = _build_app_with_workflow(WorkflowBuilder(start_executor=greeter)) + client = TestClient(app) + response = client.post("/", json=USER_PAYLOAD) + + assert response.status_code == 200 + stream = parse_sse_to_event_stream(response.content) + stream.assert_bookends() + stream.assert_no_run_error() + stream.assert_text_messages_balanced() + stream.assert_has_type("STEP_STARTED") + + +# ── Error handling ── + + +def test_empty_messages_returns_valid_sse() -> None: + """Empty messages list still returns a valid SSE stream with bookends.""" + app = _build_app_with_agent( + [ + AgentResponseUpdate(contents=[Content.from_text(text="ok")], role="assistant"), + ] + ) + client = TestClient(app) + response = client.post("/", json={"messages": []}) + + assert response.status_code == 200 + stream = parse_sse_to_event_stream(response.content) + stream.assert_bookends() + + +def test_sse_response_headers() -> None: + """SSE response has correct headers for event streaming.""" + app = _build_app_with_agent( + [ + AgentResponseUpdate(contents=[Content.from_text(text="ok")], role="assistant"), + ] + ) + client = TestClient(app) + response = client.post("/", json=USER_PAYLOAD) + + assert response.headers["content-type"] == "text/event-stream; charset=utf-8" + assert response.headers.get("cache-control") == "no-cache" diff --git a/python/packages/ag-ui/tests/ag_ui/test_message_adapters.py b/python/packages/ag-ui/tests/ag_ui/test_message_adapters.py index bc1b95ad7d..5227d376bb 100644 --- a/python/packages/ag-ui/tests/ag_ui/test_message_adapters.py +++ b/python/packages/ag-ui/tests/ag_ui/test_message_adapters.py @@ -868,6 +868,648 @@ def test_agui_messages_to_snapshot_format_basic(): assert result[1]["content"] == "Hi there" +# ── Tool history sanitization edge cases ── + + +def test_sanitize_multiple_approvals_and_logic(): + """Two function_approval_response contents: True + False → False overall.""" + from agent_framework_ag_ui._message_adapters import _sanitize_tool_history + + assistant_msg = Message( + role="assistant", + contents=[ + Content.from_function_call(call_id="c1", name="tool_a", arguments="{}"), + Content.from_function_call(call_id="c2", name="confirm_changes", arguments='{"function_call_id":"c1"}'), + ], + ) + user_msg = Message( + role="user", + contents=[ + Content.from_function_approval_response( + approved=True, + id="a1", + function_call=Content.from_function_call(call_id="c1", name="tool_a", arguments="{}"), + ), + Content.from_function_approval_response( + approved=False, + id="a2", + function_call=Content.from_function_call(call_id="c1", name="tool_a", arguments="{}"), + ), + ], + ) + + result = _sanitize_tool_history([assistant_msg, user_msg]) + # Both approvals should be preserved in user message + assert any(msg.role == "user" for msg in result) + + +def test_sanitize_pending_tool_skip_on_user_followup(): + """User text message after assistant tool call injects synthetic skipped results.""" + from agent_framework_ag_ui._message_adapters import _sanitize_tool_history + + assistant_msg = Message( + role="assistant", + contents=[Content.from_function_call(call_id="c1", name="get_weather", arguments="{}")], + ) + user_msg = Message( + role="user", + contents=[Content.from_text(text="Actually, never mind")], + ) + + result = _sanitize_tool_history([assistant_msg, user_msg]) + # Should have: assistant, synthetic tool result, user + tool_results = [m for m in result if m.role == "tool"] + assert len(tool_results) == 1 + assert "skipped" in str(tool_results[0].contents[0].result).lower() + + +def test_sanitize_tool_result_clears_pending_confirm(): + """Tool result for pending confirm_changes call_id clears pending state.""" + from agent_framework_ag_ui._message_adapters import _sanitize_tool_history + + assistant_msg = Message( + role="assistant", + contents=[ + Content.from_function_call(call_id="c1", name="tool_a", arguments="{}"), + ], + ) + tool_msg = Message( + role="tool", + contents=[Content.from_function_result(call_id="c1", result="done")], + ) + + result = _sanitize_tool_history([assistant_msg, tool_msg]) + assert len(result) == 2 + assert result[1].role == "tool" + + +def test_sanitize_non_standard_role_resets_state(): + """System message between assistant+user resets pending tool state.""" + from agent_framework_ag_ui._message_adapters import _sanitize_tool_history + + assistant_msg = Message( + role="assistant", + contents=[Content.from_function_call(call_id="c1", name="get_weather", arguments="{}")], + ) + system_msg = Message(role="system", contents=[Content.from_text(text="System update")]) + user_msg = Message(role="user", contents=[Content.from_text(text="Continue")]) + + result = _sanitize_tool_history([assistant_msg, system_msg, user_msg]) + # System message should reset pending state, so no synthetic tool results + tool_results = [m for m in result if m.role == "tool"] + assert len(tool_results) == 0 + + +def test_sanitize_json_confirm_changes_response(): + """User sends JSON text with 'accepted' after confirm_changes.""" + from agent_framework_ag_ui._message_adapters import _sanitize_tool_history + + assistant_msg = Message( + role="assistant", + contents=[ + Content.from_function_call(call_id="c1", name="tool_a", arguments="{}"), + Content.from_function_call(call_id="c2", name="confirm_changes", arguments='{"function_call_id":"c1"}'), + ], + ) + # Note: confirm_changes is filtered, so c2 won't be in pending_tool_call_ids + # But c1 will remain pending. User message with JSON accepted text doesn't match + # confirm_changes path since pending_confirm_changes_id was reset. + user_msg = Message( + role="user", + contents=[Content.from_text(text=json.dumps({"accepted": True}))], + ) + + result = _sanitize_tool_history([assistant_msg, user_msg]) + # Should still process without errors + assert len(result) >= 1 + + +# ── Deduplication edge cases ── + + +def test_deduplicate_tool_results(): + """Duplicate tool results for same call_id are deduplicated.""" + from agent_framework_ag_ui._message_adapters import _deduplicate_messages + + msg1 = Message(role="tool", contents=[Content.from_function_result(call_id="c1", result="first")]) + msg2 = Message(role="tool", contents=[Content.from_function_result(call_id="c1", result="second")]) + + result = _deduplicate_messages([msg1, msg2]) + assert len(result) == 1 + + +def test_deduplicate_assistant_tool_calls(): + """Duplicate assistant messages with same tool_calls are deduplicated.""" + from agent_framework_ag_ui._message_adapters import _deduplicate_messages + + msg1 = Message( + role="assistant", + contents=[Content.from_function_call(call_id="c1", name="fn", arguments="{}")], + ) + msg2 = Message( + role="assistant", + contents=[Content.from_function_call(call_id="c1", name="fn", arguments="{}")], + ) + + result = _deduplicate_messages([msg1, msg2]) + assert len(result) == 1 + + +def test_deduplicate_general_messages(): + """Duplicate general user messages are deduplicated.""" + from agent_framework_ag_ui._message_adapters import _deduplicate_messages + + msg1 = Message(role="user", contents=[Content.from_text(text="Hello")]) + msg2 = Message(role="user", contents=[Content.from_text(text="Hello")]) + + result = _deduplicate_messages([msg1, msg2]) + assert len(result) == 1 + + +def test_deduplicate_replaces_empty_tool_result(): + """Empty tool result is replaced by later non-empty result.""" + from agent_framework_ag_ui._message_adapters import _deduplicate_messages + + msg1 = Message(role="tool", contents=[Content.from_function_result(call_id="c1", result="")]) + msg2 = Message(role="tool", contents=[Content.from_function_result(call_id="c1", result="actual result")]) + + result = _deduplicate_messages([msg1, msg2]) + assert len(result) == 1 + assert result[0].contents[0].result == "actual result" + + +# ── Multimodal & content conversion edge cases ── + + +def test_convert_agui_content_unknown_source_type_fallback(): + """Unknown source type falls back to url/data/id fields.""" + from agent_framework_ag_ui._message_adapters import _parse_multimodal_media_part + + part = { + "type": "image", + "source": {"type": "custom", "url": "https://example.com/img.png"}, + } + result = _parse_multimodal_media_part(part) + assert result is not None + assert result.uri == "https://example.com/img.png" + + +def test_convert_agui_content_data_uri_prefix(): + """base64 data starting with 'data:' is treated as data URI.""" + from agent_framework_ag_ui._message_adapters import _parse_multimodal_media_part + + part = { + "type": "image", + "source": {"type": "base64", "data": "data:image/png;base64,abc", "mimeType": "image/png"}, + } + result = _parse_multimodal_media_part(part) + assert result is not None + assert result.uri == "data:image/png;base64,abc" + + +def test_convert_agui_content_binary_id(): + """Source with 'id' field creates ag-ui:// URI.""" + from agent_framework_ag_ui._message_adapters import _parse_multimodal_media_part + + part = { + "type": "image", + "source": {"type": "id", "id": "file123"}, + } + result = _parse_multimodal_media_part(part) + assert result is not None + assert result.uri == "ag-ui://binary/file123" + + +def test_convert_agui_content_string_items_in_list(): + """String items in content list create text Content.""" + from agent_framework_ag_ui._message_adapters import _convert_agui_content_to_framework + + result = _convert_agui_content_to_framework(["hello", "world"]) + assert len(result) == 2 + assert result[0].text == "hello" + assert result[1].text == "world" + + +def test_convert_agui_content_non_dict_non_str_items(): + """Non-dict/non-str items in list are stringified.""" + from agent_framework_ag_ui._message_adapters import _convert_agui_content_to_framework + + result = _convert_agui_content_to_framework([123, None]) + assert len(result) == 2 + assert result[0].text == "123" + assert result[1].text == "None" + + +def test_convert_agui_content_unknown_part_type_with_text(): + """Unknown part type with 'text' key extracts the text.""" + from agent_framework_ag_ui._message_adapters import _convert_agui_content_to_framework + + result = _convert_agui_content_to_framework([{"type": "widget", "text": "hi"}]) + assert len(result) == 1 + assert result[0].text == "hi" + + +def test_convert_agui_content_unknown_part_type_without_text(): + """Unknown part type without 'text' key stringifies the dict.""" + from agent_framework_ag_ui._message_adapters import _convert_agui_content_to_framework + + result = _convert_agui_content_to_framework([{"type": "widget", "data": 42}]) + assert len(result) == 1 + assert "widget" in result[0].text + + +def test_convert_agui_content_none(): + """None content returns empty list.""" + from agent_framework_ag_ui._message_adapters import _convert_agui_content_to_framework + + result = _convert_agui_content_to_framework(None) + assert result == [] + + +def test_convert_agui_content_non_str_non_list_non_none(): + """Non-string, non-list, non-None content is stringified.""" + from agent_framework_ag_ui._message_adapters import _convert_agui_content_to_framework + + result = _convert_agui_content_to_framework(42) + assert len(result) == 1 + assert result[0].text == "42" + + +# ── Snapshot normalization edge cases ── + + +def test_snapshot_input_image_to_binary(): + """input_image type is normalized to binary in snapshot.""" + result = agui_messages_to_snapshot_format( + [ + { + "role": "user", + "content": [ + {"type": "input_image", "source": {"type": "url", "url": "https://example.com/img.png"}}, + ], + } + ] + ) + assert isinstance(result[0]["content"], list) + assert result[0]["content"][0]["type"] == "binary" + + +def test_snapshot_mime_type_snake_case(): + """mime_type (snake_case) is normalized to mimeType.""" + result = agui_messages_to_snapshot_format( + [ + { + "role": "user", + "content": [ + {"type": "text", "text": "Caption", "mime_type": "text/plain"}, + { + "type": "image", + "source": {"type": "url", "url": "https://x.com/a.png", "mime_type": "image/png"}, + }, + ], + } + ] + ) + content = result[0]["content"] + assert isinstance(content, list) + # The text part should have mimeType added + text_part = content[0] + assert text_part.get("mimeType") == "text/plain" + + +def test_snapshot_text_only_list_collapsed(): + """List of only text parts is collapsed to string.""" + result = agui_messages_to_snapshot_format( + [{"role": "user", "content": [{"type": "text", "text": "Hello"}, {"type": "text", "text": " World"}]}] + ) + assert result[0]["content"] == "Hello World" + + +def test_snapshot_legacy_binary_data_and_id(): + """Legacy binary part with data and id fields.""" + result = agui_messages_to_snapshot_format( + [ + { + "role": "user", + "content": [ + {"type": "text", "text": "Caption"}, + {"type": "binary", "data": "base64data", "id": "file1", "mimeType": "image/png"}, + ], + } + ] + ) + content = result[0]["content"] + assert isinstance(content, list) + binary_part = content[1] + assert binary_part["type"] == "binary" + assert binary_part["data"] == "base64data" + assert binary_part["id"] == "file1" + + +# ── Message conversion edge cases ── + + +def test_agui_tool_message_action_execution_id_fallback(): + """Tool message with actionExecutionId but no tool_call_id.""" + messages = agui_messages_to_agent_framework( + [ + { + "role": "tool", + "content": "result data", + "actionExecutionId": "action_1", + } + ] + ) + assert len(messages) == 1 + assert messages[0].contents[0].type == "function_result" + assert messages[0].contents[0].call_id == "action_1" + + +def test_agui_tool_message_result_key_instead_of_content(): + """Tool message with 'result' key instead of 'content'.""" + messages = agui_messages_to_agent_framework( + [ + { + "role": "tool", + "result": "the result", + "toolCallId": "c1", + } + ] + ) + assert len(messages) == 1 + assert messages[0].contents[0].result == "the result" + + +def test_agui_tool_message_dict_content(): + """Tool message with dict content.""" + messages = agui_messages_to_agent_framework( + [ + { + "role": "tool", + "content": {"key": "value"}, + "toolCallId": "c1", + } + ] + ) + assert len(messages) == 1 + # Dict content as approval check: no 'accepted' key, so it's a regular tool result + assert messages[0].contents[0].type == "function_result" + + +def test_agui_tool_message_list_content(): + """Tool message with list content.""" + messages = agui_messages_to_agent_framework( + [ + { + "role": "tool", + "content": ["item1", "item2"], + "toolCallId": "c1", + } + ] + ) + assert len(messages) == 1 + assert messages[0].contents[0].type == "function_result" + + +def test_agui_action_execution_id_without_role(): + """Message with actionExecutionId but no role maps to tool.""" + messages = agui_messages_to_agent_framework( + [ + { + "actionExecutionId": "action_1", + "result": "tool result", + } + ] + ) + assert len(messages) == 1 + assert messages[0].role == "tool" + assert messages[0].contents[0].call_id == "action_1" + + +def test_agui_non_dict_tool_call_skipped(): + """Non-dict tool_call entries in tool_calls array are skipped.""" + messages = agui_messages_to_agent_framework( + [ + { + "role": "assistant", + "content": "", + "tool_calls": [ + "not_a_dict", + { + "id": "call_1", + "type": "function", + "function": {"name": "fn", "arguments": "{}"}, + }, + ], + } + ] + ) + assert len(messages) == 1 + func_calls = [c for c in messages[0].contents if c.type == "function_call"] + assert len(func_calls) == 1 + + +def test_agui_empty_content_default(): + """Message with empty/null content gets default empty text.""" + messages = agui_messages_to_agent_framework([{"role": "user"}]) + assert len(messages) == 1 + assert len(messages[0].contents) == 1 + assert messages[0].contents[0].text == "" + + +def test_agui_dict_tool_msg_without_tool_call_id(): + """Dict tool message missing toolCallId gets empty string.""" + result = agui_messages_to_snapshot_format([{"role": "tool", "content": "result"}]) + assert len(result) == 1 + assert result[0].get("toolCallId") == "" + + +def test_snapshot_argument_serialization_none(): + """None arguments in tool_calls are serialized to empty string.""" + result = agui_messages_to_snapshot_format( + [ + { + "role": "assistant", + "content": "", + "tool_calls": [ + {"id": "c1", "type": "function", "function": {"name": "fn", "arguments": None}}, + ], + } + ] + ) + tc = result[0]["tool_calls"][0] + assert tc["function"]["arguments"] == "" + + +def test_snapshot_argument_serialization_object(): + """Object arguments in tool_calls are JSON-serialized.""" + result = agui_messages_to_snapshot_format( + [ + { + "role": "assistant", + "content": "", + "tool_calls": [ + {"id": "c1", "type": "function", "function": {"name": "fn", "arguments": {"key": "val"}}}, + ], + } + ] + ) + tc = result[0]["tool_calls"][0] + assert tc["function"]["arguments"] == '{"key": "val"}' + + +def test_snapshot_tool_call_id_normalization(): + """tool_call_id is normalized to toolCallId in snapshot.""" + result = agui_messages_to_snapshot_format([{"role": "tool", "content": "result", "tool_call_id": "c1"}]) + assert result[0].get("toolCallId") == "c1" + assert "tool_call_id" not in result[0] + + +def test_agui_to_framework_dict_tool_msg_without_tool_call_id(): + """Dict tool message in agent_framework_messages_to_agui without toolCallId.""" + result = agent_framework_messages_to_agui( + [{"role": "tool", "content": "result"}] # type: ignore[list-item] + ) + assert len(result) == 1 + assert result[0].get("toolCallId") == "" + + +def test_snapshot_none_content(): + """None content is normalized to empty string.""" + result = agui_messages_to_snapshot_format([{"role": "user", "content": None}]) + assert result[0]["content"] == "" + + +def test_sanitize_confirm_changes_with_approval_accepted(): + """Approval for pending confirm_changes creates synthetic result.""" + from agent_framework_ag_ui._message_adapters import _sanitize_tool_history + + # Create assistant with both a real tool and confirm_changes + assistant_msg = Message( + role="assistant", + contents=[ + Content.from_function_call(call_id="c1", name="tool_a", arguments="{}"), + Content.from_function_call(call_id="c2", name="confirm_changes", arguments='{"function_call_id":"c1"}'), + ], + ) + # Note: confirm_changes gets filtered out, so pending_confirm_changes_id becomes None. + # The test verifies the filtering path works without error. + user_msg = Message( + role="user", + contents=[ + Content.from_function_approval_response( + approved=True, + id="a1", + function_call=Content.from_function_call(call_id="c1", name="tool_a", arguments="{}"), + ), + ], + ) + + result = _sanitize_tool_history([assistant_msg, user_msg]) + # Should process without errors; confirm_changes is filtered from assistant msg + assert len(result) >= 1 + + +def test_sanitize_json_accepted_text_for_pending_confirm(): + """JSON text with 'accepted' field for non-filtered confirm_changes path.""" + from agent_framework_ag_ui._message_adapters import _sanitize_tool_history + + # Create an assistant with a tool call that requires a result + assistant_msg = Message( + role="assistant", + contents=[ + Content.from_function_call(call_id="c1", name="tool_a", arguments="{}"), + ], + ) + # A tool result arrives, then a user message + tool_msg = Message( + role="tool", + contents=[Content.from_function_result(call_id="c1", result="done")], + ) + user_msg = Message( + role="user", + contents=[Content.from_text(text="Continue please")], + ) + + result = _sanitize_tool_history([assistant_msg, tool_msg, user_msg]) + # Should have: assistant, tool result, user + assert len(result) == 3 + + +def test_parse_multimodal_media_part_no_data_no_url(): + """Part with no url, data, or id returns None.""" + from agent_framework_ag_ui._message_adapters import _parse_multimodal_media_part + + result = _parse_multimodal_media_part({"type": "image"}) + assert result is None + + +def test_parse_multimodal_media_part_binary_source_type(): + """Source with type='binary' extracts data field.""" + from agent_framework_ag_ui._message_adapters import _parse_multimodal_media_part + + result = _parse_multimodal_media_part( + {"type": "image", "source": {"type": "binary", "data": "data:image/png;base64,abc"}} + ) + assert result is not None + assert result.uri == "data:image/png;base64,abc" + + +def test_snapshot_non_dict_item_in_content_list(): + """Non-dict items in content list are stringified.""" + result = agui_messages_to_snapshot_format([{"role": "user", "content": [42, "text"]}]) + # Text-only after stringification means collapsed to string + assert isinstance(result[0]["content"], str) + + +def test_snapshot_non_dict_tool_call_skipped(): + """Non-dict entries in tool_calls are skipped during argument serialization.""" + result = agui_messages_to_snapshot_format( + [ + { + "role": "assistant", + "content": "", + "tool_calls": [ + "not_a_dict", + {"id": "c1", "type": "function", "function": {"name": "fn", "arguments": "{}"}}, + ], + } + ] + ) + # Should not error + assert len(result) == 1 + + +def test_snapshot_tool_call_without_function_payload(): + """tool_call dict without function payload is skipped.""" + result = agui_messages_to_snapshot_format( + [ + { + "role": "assistant", + "content": "", + "tool_calls": [{"id": "c1", "type": "function"}], + } + ] + ) + assert len(result) == 1 + + +def test_agui_to_framework_action_name_without_role(): + """Message with actionName but no explicit role maps to tool.""" + messages = agui_messages_to_agent_framework([{"actionName": "get_weather", "result": "Sunny", "toolCallId": "c1"}]) + assert len(messages) == 1 + assert messages[0].role == "tool" + + +def test_agui_to_framework_tool_message_content_none(): + """Tool message with content=None uses result field fallback.""" + messages = agui_messages_to_agent_framework( + [{"role": "tool", "content": None, "result": "fallback_result", "toolCallId": "c1"}] + ) + assert len(messages) == 1 + assert messages[0].contents[0].result == "fallback_result" + + def test_agui_fresh_approval_is_still_processed(): """A fresh approval (no assistant response after it) must still produce function_approval_response. diff --git a/python/packages/ag-ui/tests/ag_ui/test_multi_turn.py b/python/packages/ag-ui/tests/ag_ui/test_multi_turn.py new file mode 100644 index 0000000000..714ce2ce50 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/test_multi_turn.py @@ -0,0 +1,332 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Multi-turn conversation tests: POST → collect events → extract snapshot → POST again. + +These tests catch round-trip fidelity bugs: if MessagesSnapshotEvent produces a +malformed message list, the second turn will fail during normalize_agui_input_messages() +or produce incorrect behavior. +""" + +from __future__ import annotations + +import json +from typing import Any + +from agent_framework import AgentResponseUpdate, Content +from conftest import StubAgent +from fastapi import FastAPI +from fastapi.testclient import TestClient +from sse_helpers import parse_sse_response, parse_sse_to_event_stream + +from agent_framework_ag_ui import AgentFrameworkAgent, add_agent_framework_fastapi_endpoint + + +def _build_app_with_agent(updates: list[AgentResponseUpdate], **kwargs: Any) -> FastAPI: + stub = StubAgent(updates=updates) + agent = AgentFrameworkAgent(agent=stub, **kwargs) + app = FastAPI() + add_agent_framework_fastapi_endpoint(app, agent) + return app + + +def _extract_snapshot_messages(response_content: bytes) -> list[dict[str, Any]]: + """Extract the latest MessagesSnapshotEvent.messages from SSE response bytes.""" + raw_events = parse_sse_response(response_content) + snapshot_msgs: list[dict[str, Any]] | None = None + for event in raw_events: + if event.get("type") == "MESSAGES_SNAPSHOT": + snapshot_msgs = event.get("messages", []) + assert snapshot_msgs is not None, "No MESSAGES_SNAPSHOT event found" + return snapshot_msgs + + +# ── Basic multi-turn chat ── + + +def test_basic_multi_turn_chat() -> None: + """Turn 1: user→assistant. Turn 2: user→assistant with prior history from snapshot.""" + app = _build_app_with_agent( + [ + AgentResponseUpdate(contents=[Content.from_text(text="Hello! How can I help?")], role="assistant"), + ] + ) + client = TestClient(app) + + # Turn 1 + resp1 = client.post( + "/", + json={ + "messages": [{"role": "user", "content": "Hi there"}], + "threadId": "thread-multi", + "runId": "run-1", + }, + ) + assert resp1.status_code == 200 + stream1 = parse_sse_to_event_stream(resp1.content) + stream1.assert_bookends() + stream1.assert_text_messages_balanced() + + # Extract snapshot messages from turn 1 + snapshot_messages = _extract_snapshot_messages(resp1.content) + + # Turn 2: send snapshot messages + new user message + turn2_messages = list(snapshot_messages) + [{"role": "user", "content": "Tell me more"}] + resp2 = client.post( + "/", + json={ + "messages": turn2_messages, + "threadId": "thread-multi", + "runId": "run-2", + }, + ) + assert resp2.status_code == 200 + stream2 = parse_sse_to_event_stream(resp2.content) + stream2.assert_bookends() + stream2.assert_text_messages_balanced() + stream2.assert_no_run_error() + + +# ── Tool call history round-trip ── + + +def test_tool_call_history_round_trips() -> None: + """Turn 1: tool call + result. Turn 2: snapshot messages correctly reconstruct tool history.""" + app = _build_app_with_agent( + [ + AgentResponseUpdate( + contents=[Content.from_function_call(name="get_weather", call_id="call-1", arguments='{"city": "SF"}')], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_function_result(call_id="call-1", result="72°F")], + role="assistant", + ), + AgentResponseUpdate( + contents=[Content.from_text(text="It's warm!")], + role="assistant", + ), + ] + ) + client = TestClient(app) + + # Turn 1 + resp1 = client.post( + "/", + json={ + "messages": [{"role": "user", "content": "What's the weather?"}], + "threadId": "thread-tool-multi", + "runId": "run-1", + }, + ) + assert resp1.status_code == 200 + stream1 = parse_sse_to_event_stream(resp1.content) + stream1.assert_tool_calls_balanced() + + # Extract snapshot and verify it has tool history + snapshot_messages = _extract_snapshot_messages(resp1.content) + roles = [m.get("role") for m in snapshot_messages] + assert "tool" in roles or "assistant" in roles, f"Expected tool/assistant messages in snapshot, got: {roles}" + + # Turn 2: send snapshot + new question + turn2_messages = list(snapshot_messages) + [{"role": "user", "content": "What about tomorrow?"}] + resp2 = client.post( + "/", + json={ + "messages": turn2_messages, + "threadId": "thread-tool-multi", + "runId": "run-2", + }, + ) + assert resp2.status_code == 200 + stream2 = parse_sse_to_event_stream(resp2.content) + stream2.assert_bookends() + stream2.assert_no_run_error() + + +# ── Approval interrupt/resume round-trip ── + + +async def test_approval_interrupt_resume_round_trip() -> None: + """Turn 1: approval request → interrupt with confirm_changes. Turn 2: confirm_changes result → confirmation text. + + The confirm_changes flow uses a specific message format that bypasses the agent + and directly emits a confirmation text message. + """ + from event_stream import EventStream + + steps = [{"description": "Execute task", "status": "enabled"}] + + # Build agent with predictive state and confirmation + stub = StubAgent( + updates=[ + AgentResponseUpdate( + contents=[ + Content.from_function_call( + name="generate_task_steps", + call_id="call-steps", + arguments=json.dumps({"steps": steps}), + ) + ], + role="assistant", + ), + ] + ) + agent = AgentFrameworkAgent( + agent=stub, + state_schema={"tasks": {"type": "array"}}, + predict_state_config={"tasks": {"tool": "generate_task_steps", "tool_argument": "steps"}}, + require_confirmation=True, + ) + + # Turn 1 + events1 = [ + e + async for e in agent.run( + { + "thread_id": "thread-approval-multi", + "run_id": "run-1", + "messages": [{"role": "user", "content": "Plan my tasks"}], + "state": {"tasks": []}, + } + ) + ] + stream1 = EventStream(events1) + stream1.assert_bookends() + stream1.assert_tool_calls_balanced() + + # Should have interrupt with function_approval_request + finished1 = stream1.last("RUN_FINISHED") + interrupt1 = finished1.model_dump().get("interrupt") + assert interrupt1, "Expected interrupt in RUN_FINISHED" + + # Verify confirm_changes tool call was emitted + tool_starts = stream1.get("TOOL_CALL_START") + tool_names = [getattr(s, "tool_call_name", None) for s in tool_starts] + assert "confirm_changes" in tool_names, f"Expected confirm_changes in tool calls, got {tool_names}" + + # Turn 2: Direct confirm_changes response (the way CopilotKit sends it) + # Construct the messages as CopilotKit would - with the confirm_changes tool call + # and a tool result + confirm_tool = [s for s in tool_starts if getattr(s, "tool_call_name", None) == "confirm_changes"][0] + confirm_id = confirm_tool.tool_call_id + confirm_args = None + for e in stream1.get("TOOL_CALL_ARGS"): + if e.tool_call_id == confirm_id: + confirm_args = e.delta + break + + turn2_messages = [ + {"role": "user", "content": "Plan my tasks"}, + { + "role": "assistant", + "tool_calls": [ + { + "id": confirm_id, + "type": "function", + "function": {"name": "confirm_changes", "arguments": confirm_args or "{}"}, + }, + ], + }, + { + "role": "tool", + "toolCallId": confirm_id, + "content": json.dumps({"accepted": True, "steps": steps}), + }, + ] + + events2 = [ + e + async for e in agent.run( + { + "thread_id": "thread-approval-multi", + "run_id": "run-2", + "messages": turn2_messages, + "state": {"tasks": []}, + } + ) + ] + stream2 = EventStream(events2) + stream2.assert_bookends() + stream2.assert_text_messages_balanced() + stream2.assert_no_run_error() + + # Turn 2 should have confirmation text (the approval handler generates it) + text_events = stream2.get("TEXT_MESSAGE_CONTENT") + assert text_events, "Expected confirmation text message in turn 2" + + # Turn 2 should NOT have interrupt (approval completed) + finished2 = stream2.last("RUN_FINISHED") + interrupt2 = finished2.model_dump().get("interrupt") + assert not interrupt2, f"Expected no interrupt after approval, got {interrupt2}" + + +# ── Workflow interrupt/resume round-trip ── +# Note: Workflow tests use async agent.run() directly instead of HTTP TestClient +# because the sync TestClient runs in a different event loop, which conflicts +# with the workflow's asyncio Queue. + + +async def test_workflow_interrupt_resume_round_trip() -> None: + """Turn 1: workflow request_info → interrupt. Turn 2: resume → completion.""" + from event_stream import EventStream + + from agent_framework_ag_ui_examples.agents.subgraphs_agent import subgraphs_agent + + agent = subgraphs_agent() + + # Turn 1: initial request → flight interrupt + events1 = [ + event + async for event in agent.run( + { + "messages": [{"role": "user", "content": "Plan a trip to SF"}], + "thread_id": "thread-wf-multi", + "run_id": "run-1", + } + ) + ] + stream1 = EventStream(events1) + stream1.assert_bookends() + stream1.assert_no_run_error() + + finished1 = stream1.last("RUN_FINISHED") + interrupt1 = finished1.model_dump().get("interrupt") + assert interrupt1, "Expected flight interrupt" + assert interrupt1[0]["value"]["agent"] == "flights" + + # Turn 2: resume with flight selection + events2 = [ + event + async for event in agent.run( + { + "messages": [], + "thread_id": "thread-wf-multi", + "run_id": "run-2", + "resume": { + "interrupts": [ + { + "id": interrupt1[0]["id"], + "value": json.dumps( + { + "airline": "United", + "departure": "Amsterdam (AMS)", + "arrival": "San Francisco (SFO)", + "price": "$720", + "duration": "12h 15m", + } + ), + } + ], + }, + } + ) + ] + stream2 = EventStream(events2) + stream2.assert_bookends() + stream2.assert_no_run_error() + + # Should now have hotel interrupt + finished2 = stream2.last("RUN_FINISHED") + interrupt2 = finished2.model_dump().get("interrupt") + assert interrupt2, "Expected hotel interrupt" + assert interrupt2[0]["value"]["agent"] == "hotels" diff --git a/python/packages/ag-ui/tests/ag_ui/test_run_common.py b/python/packages/ag-ui/tests/ag_ui/test_run_common.py new file mode 100644 index 0000000000..526a3c33c1 --- /dev/null +++ b/python/packages/ag-ui/tests/ag_ui/test_run_common.py @@ -0,0 +1,122 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Tests for _run_common.py edge cases.""" + +from agent_framework import Content + +from agent_framework_ag_ui._run_common import ( + FlowState, + _emit_tool_result, + _extract_resume_payload, + _normalize_resume_interrupts, +) + + +class TestNormalizeResumeInterrupts: + """Tests for _normalize_resume_interrupts edge cases.""" + + def test_plain_list_of_dicts(self): + """Resume payload as a plain list of interrupt dicts.""" + result = _normalize_resume_interrupts([{"id": "x", "value": "y"}]) + assert result == [{"id": "x", "value": "y"}] + + def test_dict_with_singular_interrupt_key(self): + """Resume dict using 'interrupt' (singular) instead of 'interrupts'.""" + result = _normalize_resume_interrupts({"interrupt": [{"id": "x", "value": "y"}]}) + assert result == [{"id": "x", "value": "y"}] + + def test_dict_without_interrupts_key_wraps_as_candidate(self): + """Resume dict without interrupts/interrupt key wraps the dict itself.""" + result = _normalize_resume_interrupts({"id": "x", "value": "y"}) + assert result == [{"id": "x", "value": "y"}] + + def test_non_dict_items_in_list_are_skipped(self): + """Non-dict items in candidate list are silently skipped.""" + result = _normalize_resume_interrupts([None, "string", {"id": "x", "value": "y"}]) + assert result == [{"id": "x", "value": "y"}] + + def test_items_missing_id_are_skipped(self): + """Dict items without any id field are skipped.""" + result = _normalize_resume_interrupts([{"name": "test"}]) + assert result == [] + + def test_response_key_used_as_value(self): + """'response' key is used as value when 'value' is absent.""" + result = _normalize_resume_interrupts([{"id": "x", "response": "approved"}]) + assert result == [{"id": "x", "value": "approved"}] + + def test_neither_value_nor_response_uses_remaining_fields(self): + """When neither 'value' nor 'response' key exists, remaining fields become value.""" + result = _normalize_resume_interrupts([{"id": "x", "extra": "data", "more": 42}]) + assert result == [{"id": "x", "value": {"extra": "data", "more": 42}}] + + def test_none_payload_returns_empty(self): + """None resume payload returns empty list.""" + assert _normalize_resume_interrupts(None) == [] + + def test_non_dict_non_list_returns_empty(self): + """Non-dict, non-list payload returns empty list.""" + assert _normalize_resume_interrupts(42) == [] + + def test_interrupt_id_key_used_as_id(self): + """interruptId key is accepted as identifier.""" + result = _normalize_resume_interrupts([{"interruptId": "abc", "value": "yes"}]) + assert result == [{"id": "abc", "value": "yes"}] + + def test_tool_call_id_key_used_as_id(self): + """toolCallId key is accepted as identifier.""" + result = _normalize_resume_interrupts([{"toolCallId": "tc1", "value": "done"}]) + assert result == [{"id": "tc1", "value": "done"}] + + +class TestExtractResumePayload: + """Tests for _extract_resume_payload edge cases.""" + + def test_forwarded_props_resume_not_nested_in_command(self): + """forwarded_props.resume (not nested in command) is extracted.""" + result = _extract_resume_payload({"forwarded_props": {"resume": "data"}}) + assert result == "data" + + def test_forwarded_props_not_dict_returns_none(self): + """Non-dict forwarded_props returns None.""" + result = _extract_resume_payload({"forwarded_props": "string"}) + assert result is None + + def test_resume_key_has_priority(self): + """Direct resume key takes priority over forwarded_props.""" + result = _extract_resume_payload({"resume": "direct", "forwarded_props": {"resume": "fp"}}) + assert result == "direct" + + def test_no_resume_at_all(self): + """No resume key anywhere returns None.""" + result = _extract_resume_payload({"messages": []}) + assert result is None + + def test_forwarded_props_camelcase(self): + """camelCase forwardedProps is also supported.""" + result = _extract_resume_payload({"forwardedProps": {"resume": "camel"}}) + assert result == "camel" + + +class TestEmitToolResult: + """Tests for _emit_tool_result edge cases.""" + + def test_tool_result_without_call_id_returns_empty(self): + """Tool result Content without call_id returns empty event list.""" + content = Content.from_function_result(call_id=None, result="some result") + flow = FlowState() + events = _emit_tool_result(content, flow) + assert events == [] + + def test_tool_result_closes_open_text_message(self): + """Tool result closes any open text message (issue #3568 fix).""" + content = Content.from_function_result(call_id="call_1", result="done") + flow = FlowState(message_id="msg_1", accumulated_text="Hello") + events = _emit_tool_result(content, flow) + + event_types = [e.type for e in events] + assert "TOOL_CALL_END" in event_types + assert "TOOL_CALL_RESULT" in event_types + assert "TEXT_MESSAGE_END" in event_types + assert flow.message_id is None + assert flow.accumulated_text == "" diff --git a/python/packages/ag-ui/tests/ag_ui/test_workflow_run.py b/python/packages/ag-ui/tests/ag_ui/test_workflow_run.py index 8497145c56..8ebd8fcaaa 100644 --- a/python/packages/ag-ui/tests/ag_ui/test_workflow_run.py +++ b/python/packages/ag-ui/tests/ag_ui/test_workflow_run.py @@ -3,12 +3,14 @@ """Tests for native workflow AG-UI runner.""" import json +from enum import Enum from types import SimpleNamespace from typing import Any, cast from ag_ui.core import EventType, StateSnapshotEvent from agent_framework import ( AgentResponse, + AgentResponseUpdate, Content, Executor, Message, @@ -22,8 +24,25 @@ from agent_framework import ( from typing_extensions import Never from agent_framework_ag_ui._workflow_run import ( + _coerce_content, + _coerce_json_value, _coerce_message, + _coerce_message_content, _coerce_response_for_request, + _coerce_responses_for_pending_requests, + _custom_event_value, + _details_code, + _details_message, + _interrupt_entry_for_request_event, + _latest_assistant_contents, + _latest_user_text, + _message_role_value, + _pending_request_events, + _request_payload_from_request_event, + _single_pending_response_from_value, + _text_from_contents, + _workflow_interrupt_event_value, + _workflow_payload_to_contents, run_workflow_stream, ) @@ -677,3 +696,734 @@ async def test_workflow_run_emits_run_error_when_stream_raises() -> None: assert "RUN_ERROR" in event_types run_error = next(event for event in events if event.type == "RUN_ERROR") assert "workflow stream exploded" in run_error.message + + +# ── Helper function unit tests ── + + +class TestPendingRequestEvents: + """Tests for _pending_request_events helper.""" + + async def test_no_runner_context(self): + """Workflow without _runner_context returns empty dict.""" + workflow = SimpleNamespace() + result = await _pending_request_events(cast(Any, workflow)) + assert result == {} + + async def test_runner_context_missing_get_pending(self): + """Runner context without get_pending_request_info_events returns empty.""" + workflow = SimpleNamespace(_runner_context=SimpleNamespace()) + result = await _pending_request_events(cast(Any, workflow)) + assert result == {} + + async def test_get_pending_returns_non_dict(self): + """get_pending returning non-dict returns empty dict.""" + + async def get_pending(): + return ["not", "a", "dict"] + + workflow = SimpleNamespace(_runner_context=SimpleNamespace(get_pending_request_info_events=get_pending)) + result = await _pending_request_events(cast(Any, workflow)) + assert result == {} + + +class TestInterruptEntryForRequestEvent: + """Tests for _interrupt_entry_for_request_event helper.""" + + def test_request_id_none(self): + """request_id=None returns None.""" + event = SimpleNamespace(request_id=None) + assert _interrupt_entry_for_request_event(event) is None + + def test_dict_data_used_directly(self): + """Dict data is used as interrupt value.""" + event = SimpleNamespace(request_id="r1", data={"key": "val"}) + result = _interrupt_entry_for_request_event(event) + assert result == {"id": "r1", "value": {"key": "val"}} + + def test_non_dict_data_wrapped(self): + """Non-dict data is wrapped in {data: ...}.""" + event = SimpleNamespace(request_id="r1", data="text") + result = _interrupt_entry_for_request_event(event) + assert result == {"id": "r1", "value": {"data": "text"}} + + +class TestRequestPayloadFromRequestEvent: + """Tests for _request_payload_from_request_event helper.""" + + def test_falsy_request_id_returns_none(self): + """Empty string request_id returns None.""" + event = SimpleNamespace(request_id="", request_type=None, response_type=None, data=None) + assert _request_payload_from_request_event(event) is None + + +class TestCoerceJsonValue: + """Tests for _coerce_json_value helper.""" + + def test_empty_string(self): + """Empty string returns original value.""" + assert _coerce_json_value("") == "" + + def test_whitespace_string(self): + """Whitespace-only string returns original value.""" + assert _coerce_json_value(" ") == " " + + def test_valid_json_parsed(self): + """Valid JSON string is parsed.""" + assert _coerce_json_value('{"a": 1}') == {"a": 1} + + def test_invalid_json_returned_as_is(self): + """Invalid JSON string returned as-is.""" + assert _coerce_json_value("not json") == "not json" + + def test_non_string_returned_as_is(self): + """Non-string values returned as-is.""" + assert _coerce_json_value(42) == 42 + assert _coerce_json_value(None) is None + + +class TestCoerceContent: + """Tests for _coerce_content helper.""" + + def test_already_content(self): + """Content object returned as-is.""" + content = Content.from_text(text="hello") + assert _coerce_content(content) is content + + def test_non_dict_returns_none(self): + """Non-dict value (after JSON parse) returns None.""" + assert _coerce_content([1, 2, 3]) is None + assert _coerce_content(42) is None + + def test_auto_function_approval_response_type_attempted(self): + """Dict with approved+id+function_call triggers the auto-type detection path.""" + # The function injects type="function_approval_response" into a copy, + # but Content.from_dict may fail for complex nested types - returns None. + value = { + "approved": True, + "id": "a1", + "function_call": {"call_id": "c1", "name": "fn", "arguments": "{}"}, + } + # Exercises the auto-detection code path even though result is None + result = _coerce_content(value) + assert result is None # from_dict fails for this shape + + def test_valid_text_content_dict(self): + """Dict with type=text converts successfully.""" + result = _coerce_content({"type": "text", "text": "hello"}) + assert result is not None + assert result.type == "text" + assert result.text == "hello" + + +class TestCoerceMessageContent: + """Tests for _coerce_message_content helper.""" + + def test_string_content(self): + """String content creates text Content.""" + result = _coerce_message_content("hello") + assert result is not None + assert result.type == "text" + assert result.text == "hello" + + def test_already_content_object(self): + """Content object returned as-is.""" + content = Content.from_text(text="test") + assert _coerce_message_content(content) is content + + def test_none_input_returns_none(self): + """None input returns None.""" + assert _coerce_message_content(None) is None + + +class TestCoerceMessage: + """Tests for _coerce_message helper.""" + + def test_already_message(self): + """Message object returned as-is.""" + msg = Message(role="user", contents=[Content.from_text(text="hi")]) + assert _coerce_message(msg) is msg + + def test_non_dict_non_str_returns_none(self): + """Non-dict/str (e.g. int) returns None.""" + assert _coerce_message(123) is None + + def test_empty_contents(self): + """Dict with no contents key gets empty text content.""" + msg = _coerce_message({"role": "user"}) + assert msg is not None + assert len(msg.contents) == 1 + assert msg.contents[0].text == "" + + def test_dict_with_content_key_variant(self): + """'content' key maps to contents.""" + msg = _coerce_message({"role": "assistant", "content": "Done"}) + assert msg is not None + assert msg.role == "assistant" + assert len(msg.contents) == 1 + + +class TestCoerceResponseForRequest: + """Tests for _coerce_response_for_request helper.""" + + def test_response_type_none(self): + """None response_type returns candidate as-is.""" + event = SimpleNamespace(response_type=None) + assert _coerce_response_for_request(event, "hello") == "hello" + + def test_response_type_any(self): + """Any response_type returns candidate as-is.""" + event = SimpleNamespace(response_type=Any) + assert _coerce_response_for_request(event, {"a": 1}) == {"a": 1} + + def test_list_coercion_bare_list(self): + """list without type args passes through.""" + event = SimpleNamespace(response_type=list) + assert _coerce_response_for_request(event, [1, 2]) == [1, 2] + + def test_list_content_coercion(self): + """list[Content] coerces dicts to Content objects.""" + event = SimpleNamespace(response_type=list[Content]) + result = _coerce_response_for_request(event, [{"type": "text", "text": "hi"}]) + assert result is not None + assert len(result) == 1 + assert isinstance(result[0], Content) + + def test_list_message_coercion(self): + """list[Message] coerces dicts to Message objects.""" + event = SimpleNamespace(response_type=list[Message]) + result = _coerce_response_for_request(event, [{"role": "user", "contents": [{"type": "text", "text": "hi"}]}]) + assert result is not None + assert len(result) == 1 + assert isinstance(result[0], Message) + + def test_list_coercion_fails_returns_none(self): + """list coercion returns None when items can't be converted.""" + event = SimpleNamespace(response_type=list[Content]) + result = _coerce_response_for_request(event, [None]) + assert result is None + + def test_str_coercion_from_dict(self): + """str type coerces dict to JSON string.""" + event = SimpleNamespace(response_type=str) + result = _coerce_response_for_request(event, {"a": 1}) + assert isinstance(result, str) + assert '"a"' in result + + def test_unknown_type_mismatch(self): + """Custom class type returns None for non-instance.""" + + class Custom: + pass + + event = SimpleNamespace(response_type=Custom) + assert _coerce_response_for_request(event, "not_custom") is None + + def test_unknown_type_match(self): + """Custom class type returns object if isinstance matches.""" + + class Custom: + pass + + obj = Custom() + event = SimpleNamespace(response_type=Custom) + assert _coerce_response_for_request(event, obj) is obj + + +class TestSinglePendingResponseFromValue: + """Tests for _single_pending_response_from_value helper.""" + + def test_missing_request_id(self): + """Event with no request_id returns empty dict.""" + event = SimpleNamespace(response_type=str) + pending = {"key": event} + result = _single_pending_response_from_value(pending, "value") + assert result == {} + + def test_multiple_pending_returns_empty(self): + """Multiple pending events returns empty dict (ambiguous).""" + e1 = SimpleNamespace(request_id="r1", response_type=str) + e2 = SimpleNamespace(request_id="r2", response_type=str) + result = _single_pending_response_from_value({"r1": e1, "r2": e2}, "val") + assert result == {} + + +class TestCoerceResponsesForPendingRequests: + """Tests for _coerce_responses_for_pending_requests helper.""" + + def test_failed_coercion_skipped(self): + """Incompatible type causes response to be skipped.""" + event = SimpleNamespace(response_type=bool) + responses = {"r1": "not_a_bool"} + pending = {"r1": event} + result = _coerce_responses_for_pending_requests(responses, pending) + assert "r1" not in result + + def test_unknown_request_id_preserved(self): + """Responses for unknown request IDs are preserved as-is.""" + responses = {"unknown_id": "value"} + pending = {} + result = _coerce_responses_for_pending_requests(responses, pending) + assert result == {"unknown_id": "value"} + + def test_empty_responses(self): + """Empty responses dict returns responses unchanged.""" + result = _coerce_responses_for_pending_requests({}, {"r1": SimpleNamespace()}) + assert result == {} + + +class TestMessageRoleValue: + """Tests for _message_role_value helper.""" + + def test_string_role(self): + """String role returned directly.""" + msg = Message(role="user", contents=[]) + assert _message_role_value(msg) == "user" + + def test_enum_role(self): + """Enum-like role gets .value.""" + + class Role(Enum): + USER = "user" + + msg = SimpleNamespace(role=Role.USER) + assert _message_role_value(cast(Any, msg)) == "user" + + +class TestLatestUserText: + """Tests for _latest_user_text helper.""" + + def test_only_assistant_messages(self): + """Only assistant messages returns None.""" + messages = [Message(role="assistant", contents=[Content.from_text(text="hi")])] + assert _latest_user_text(messages) is None + + def test_user_with_non_text_content(self): + """User message with only non-text content returns None.""" + messages = [ + Message(role="user", contents=[Content.from_function_call(call_id="c1", name="fn", arguments="{}")]) + ] + assert _latest_user_text(messages) is None + + def test_user_with_empty_text(self): + """User message with empty/whitespace text returns None.""" + messages = [Message(role="user", contents=[Content.from_text(text=" ")])] + assert _latest_user_text(messages) is None + + +class TestLatestAssistantContents: + """Tests for _latest_assistant_contents helper.""" + + def test_no_assistant_messages(self): + """Only user messages returns None.""" + messages = [Message(role="user", contents=[Content.from_text(text="hi")])] + assert _latest_assistant_contents(messages) is None + + def test_assistant_with_empty_contents(self): + """Assistant message with empty contents returns None.""" + messages = [Message(role="assistant", contents=[])] + assert _latest_assistant_contents(messages) is None + + +class TestTextFromContents: + """Tests for _text_from_contents helper.""" + + def test_empty_text_skipped(self): + """Empty string text content is skipped.""" + contents = [Content.from_text(text="")] + assert _text_from_contents(contents) is None + + def test_non_text_content_skipped(self): + """Non-text content types are skipped.""" + contents = [Content.from_function_call(call_id="c1", name="fn", arguments="{}")] + assert _text_from_contents(contents) is None + + +class TestWorkflowInterruptEventValue: + """Tests for _workflow_interrupt_event_value helper.""" + + def test_none_data(self): + """None data returns None.""" + assert _workflow_interrupt_event_value({"data": None}) is None + + def test_string_data(self): + """String data returned directly.""" + assert _workflow_interrupt_event_value({"data": "text"}) == "text" + + def test_dict_data_serialized(self): + """Dict data is JSON-serialized.""" + result = _workflow_interrupt_event_value({"data": {"key": "val"}}) + assert json.loads(result) == {"key": "val"} + + +class TestWorkflowPayloadToContents: + """Tests for _workflow_payload_to_contents helper.""" + + def test_none_payload(self): + """None payload returns None.""" + assert _workflow_payload_to_contents(None) is None + + def test_non_assistant_message(self): + """User Message returns None.""" + msg = Message(role="user", contents=[Content.from_text(text="hi")]) + assert _workflow_payload_to_contents(msg) is None + + def test_agent_response_update_non_assistant(self): + """AgentResponseUpdate with user role returns None.""" + update = AgentResponseUpdate(contents=[Content.from_text(text="hi")], role="user") + assert _workflow_payload_to_contents(update) is None + + def test_agent_response_update_none_role(self): + """AgentResponseUpdate with None role returns None.""" + update = AgentResponseUpdate(contents=[Content.from_text(text="hi")], role=None) + assert _workflow_payload_to_contents(update) is None + + def test_list_with_none_item(self): + """List containing None causes None return.""" + result = _workflow_payload_to_contents([Content.from_text(text="hi"), None]) + assert result is None + + def test_empty_list(self): + """Empty list returns None.""" + assert _workflow_payload_to_contents([]) is None + + def test_string_payload(self): + """String payload creates text content.""" + result = _workflow_payload_to_contents("hello") + assert result is not None + assert len(result) == 1 + assert result[0].type == "text" + + def test_content_payload(self): + """Single Content returned as list.""" + content = Content.from_text(text="test") + result = _workflow_payload_to_contents(content) + assert result == [content] + + def test_unknown_type_returns_none(self): + """Unknown types return None.""" + assert _workflow_payload_to_contents(42) is None + + +class TestCustomEventValue: + """Tests for _custom_event_value helper.""" + + def test_event_with_data(self): + """Event with .data attribute returns data.""" + event = SimpleNamespace(type="custom", data={"progress": 50}) + assert _custom_event_value(event) == {"progress": 50} + + def test_event_without_data(self): + """Event without .data returns filtered custom fields.""" + event = SimpleNamespace(type="custom", data=None, custom_field="value") + result = _custom_event_value(event) + assert result == {"custom_field": "value"} + + def test_event_with_no_custom_fields(self): + """Event with only base fields returns None.""" + event = SimpleNamespace(type="custom", data=None) + result = _custom_event_value(event) + assert result is None + + +class TestDetailsMessage: + """Tests for _details_message helper.""" + + def test_none_details(self): + """None details returns default message.""" + assert _details_message(None) == "Workflow execution failed." + + def test_details_with_message(self): + """Details with .message attribute uses it.""" + details = SimpleNamespace(message="Custom error") + assert _details_message(details) == "Custom error" + + def test_details_with_empty_message(self): + """Details with empty .message falls back to str().""" + details = SimpleNamespace(message="") + result = _details_message(details) + assert "message=" in result or result == str(details) + + def test_details_without_message(self): + """Details without .message uses str().""" + assert _details_message("plain string") == "plain string" + + +class TestDetailsCode: + """Tests for _details_code helper.""" + + def test_none_details(self): + """None details returns None.""" + assert _details_code(None) is None + + def test_details_with_error_type(self): + """Details with .error_type returns it.""" + details = SimpleNamespace(error_type="ValueError") + assert _details_code(details) == "ValueError" + + def test_details_with_empty_error_type(self): + """Details with empty .error_type returns None.""" + details = SimpleNamespace(error_type="") + assert _details_code(details) is None + + def test_details_without_error_type(self): + """Details without .error_type returns None.""" + details = SimpleNamespace(message="err") + assert _details_code(details) is None + + +# ── Stream integration tests ── + + +async def test_workflow_run_available_interrupts_logged(): + """available_interrupts in input data should be logged without errors.""" + + @executor(id="noop") + async def noop(message: Any, ctx: WorkflowContext) -> None: + pass + + workflow = WorkflowBuilder(start_executor=noop).build() + input_data = { + "messages": [{"role": "user", "content": "go"}], + "available_interrupts": [{"id": "req_1", "type": "request_info"}], + } + + events = [event async for event in run_workflow_stream(input_data, workflow)] + event_types = [event.type for event in events] + assert "RUN_STARTED" in event_types + assert "RUN_FINISHED" in event_types + assert "RUN_ERROR" not in event_types + + +async def test_workflow_run_failed_event(): + """Workflow 'failed' event should produce RUN_ERROR.""" + + class FailingWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + yield SimpleNamespace(type="started") + yield SimpleNamespace( + type="failed", details=SimpleNamespace(message="it broke", error_type="TestError") + ) + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, FailingWorkflow()) + ) + ] + + event_types = [event.type for event in events] + assert "RUN_STARTED" in event_types + assert "RUN_ERROR" in event_types + error_event = next(e for e in events if e.type == "RUN_ERROR") + assert error_event.message == "it broke" + assert error_event.code == "TestError" + + +async def test_workflow_run_status_enum_state(): + """Status events with enum-like state should be handled.""" + + class WorkflowState(Enum): + IDLE = "idle" + + class StatusWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + yield SimpleNamespace(type="started") + yield SimpleNamespace(type="status", state=WorkflowState.IDLE) + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, StatusWorkflow()) + ) + ] + + event_types = [event.type for event in events] + assert "RUN_STARTED" in event_types + assert "RUN_FINISHED" in event_types + + +async def test_workflow_run_executor_invoked_drains_text(): + """executor_invoked should drain any open text message.""" + + class ExecutorWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + yield SimpleNamespace(type="started") + yield SimpleNamespace(type="output", data="Hello world") + yield SimpleNamespace(type="executor_invoked", executor_id="agent_1", data=None) + yield SimpleNamespace(type="executor_completed", executor_id="agent_1", data=None) + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, ExecutorWorkflow()) + ) + ] + + # Text should end before executor step starts + text_end_idx = next(i for i, e in enumerate(events) if e.type == "TEXT_MESSAGE_END") + step_start_idx = next(i for i, e in enumerate(events) if e.type == "STEP_STARTED") + assert text_end_idx < step_start_idx + + +async def test_workflow_run_executor_failed_event(): + """executor_failed event should emit activity snapshot with failed status.""" + + class ExecutorFailWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + yield SimpleNamespace(type="started") + yield SimpleNamespace( + type="executor_failed", + executor_id="agent_1", + details=SimpleNamespace(message="agent crashed"), + ) + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, ExecutorFailWorkflow()) + ) + ] + + activity = [e for e in events if e.type == "ACTIVITY_SNAPSHOT"] + assert len(activity) == 1 + assert activity[0].content["status"] == "failed" + assert activity[0].content["details"]["message"] == "agent crashed" + + +async def test_workflow_run_list_base_event_output(): + """Workflow yielding list of BaseEvent objects should emit each.""" + + class ListEventWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + yield SimpleNamespace(type="started") + yield SimpleNamespace( + type="output", + data=[ + StateSnapshotEvent(type=EventType.STATE_SNAPSHOT, snapshot={"a": 1}), + StateSnapshotEvent(type=EventType.STATE_SNAPSHOT, snapshot={"b": 2}), + ], + ) + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, ListEventWorkflow()) + ) + ] + + snapshots = [e for e in events if e.type == "STATE_SNAPSHOT"] + assert len(snapshots) == 2 + assert snapshots[0].snapshot == {"a": 1} + assert snapshots[1].snapshot == {"b": 2} + + +async def test_workflow_run_late_run_started(): + """If no events emitted, RUN_STARTED still emitted at end.""" + + class EmptyWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + return + yield # pragma: no cover + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, EmptyWorkflow()) + ) + ] + + assert events[0].type == "RUN_STARTED" + assert events[-1].type == "RUN_FINISHED" + + +async def test_workflow_run_last_assistant_text_update(): + """Text outputs update last_assistant_text for dedup tracking.""" + + class DualTextWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + yield SimpleNamespace(type="started") + yield SimpleNamespace(type="output", data="First text") + yield SimpleNamespace(type="output", data="Second text") + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, DualTextWorkflow()) + ) + ] + + text_deltas = [e.delta for e in events if e.type == "TEXT_MESSAGE_CONTENT"] + assert "First text" in text_deltas + assert "Second text" in text_deltas + + +async def test_workflow_run_superstep_events(): + """superstep_started/completed emit Step events with iteration.""" + + class SuperstepWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + yield SimpleNamespace(type="started") + yield SimpleNamespace(type="superstep_started", iteration=1) + yield SimpleNamespace(type="superstep_completed", iteration=1) + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, SuperstepWorkflow()) + ) + ] + + step_started = [e for e in events if e.type == "STEP_STARTED"] + step_finished = [e for e in events if e.type == "STEP_FINISHED"] + assert len(step_started) == 1 + assert step_started[0].step_name == "superstep:1" + assert len(step_finished) == 1 + assert step_finished[0].step_name == "superstep:1" + + +async def test_workflow_run_non_terminal_status_emits_custom(): + """Non-terminal status events emit custom events.""" + + class StatusWorkflow: + def run(self, **kwargs: Any): + async def _stream(): + yield SimpleNamespace(type="started") + yield SimpleNamespace(type="status", state="running") + + return _stream() + + events = [ + event + async for event in run_workflow_stream( + {"messages": [{"role": "user", "content": "go"}]}, cast(Any, StatusWorkflow()) + ) + ] + + custom = [e for e in events if e.type == "CUSTOM" and e.name == "status"] + assert len(custom) == 1 + assert custom[0].value == {"state": "running"} From d8d6ac1c5906a6d4eb192438a321cddfd2754870 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Fri, 6 Mar 2026 09:39:33 +0000 Subject: [PATCH 06/44] Add ServiceLifetime support for Hosting DI registration (#4476) --- ...AgentHostingServiceCollectionExtensions.cs | 39 ++-- .../HostApplicationBuilderAgentExtensions.cs | 26 ++- ...ostApplicationBuilderWorkflowExtensions.cs | 7 +- .../HostedAgentBuilder.cs | 8 +- .../HostedAgentBuilderExtensions.cs | 38 +++- .../HostedWorkflowBuilderExtensions.cs | 10 +- .../IHostedAgentBuilder.cs | 5 + ...HostingServiceCollectionExtensionsTests.cs | 92 ++++++++- ...tApplicationBuilderAgentExtensionsTests.cs | 75 +++++++- ...plicationBuilderWorkflowExtensionsTests.cs | 73 +++++++- .../HostedAgentBuilderToolsExtensionsTests.cs | 174 ++++++++++++++++++ 11 files changed, 507 insertions(+), 40 deletions(-) diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting/AgentHostingServiceCollectionExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Hosting/AgentHostingServiceCollectionExtensions.cs index 733a7af9a7..03ec8cdadb 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting/AgentHostingServiceCollectionExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting/AgentHostingServiceCollectionExtensions.cs @@ -19,9 +19,10 @@ public static class AgentHostingServiceCollectionExtensions /// The service collection to configure. /// The name of the agent. /// The instructions for the agent. + /// The DI service lifetime for the agent registration. Defaults to . /// The same instance so that additional calls can be chained. /// Thrown when or is . - public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, string? instructions) + public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, string? instructions, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(services); Throw.IfNullOrEmpty(name); @@ -30,7 +31,7 @@ public static class AgentHostingServiceCollectionExtensions var chatClient = sp.GetRequiredService(); var tools = sp.GetKeyedServices(name).ToList(); return new ChatClientAgent(chatClient, instructions, key, tools: tools); - }); + }, lifetime); } /// @@ -40,9 +41,10 @@ public static class AgentHostingServiceCollectionExtensions /// The name of the agent. /// The instructions for the agent. /// The chat client which the agent will use for inference. + /// The DI service lifetime for the agent registration. Defaults to . /// The same instance so that additional calls can be chained. /// Thrown when or is . - public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, string? instructions, IChatClient chatClient) + public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, string? instructions, IChatClient chatClient, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(services); Throw.IfNullOrEmpty(name); @@ -50,7 +52,7 @@ public static class AgentHostingServiceCollectionExtensions { var tools = sp.GetKeyedServices(name).ToList(); return new ChatClientAgent(chatClient, instructions, key, tools: tools); - }); + }, lifetime); } /// @@ -60,9 +62,10 @@ public static class AgentHostingServiceCollectionExtensions /// The name of the agent. /// The instructions for the agent. /// The key to use when resolving the chat client from the service provider. If , a non-keyed service will be resolved. + /// The DI service lifetime for the agent registration. Defaults to . /// The same instance so that additional calls can be chained. /// Thrown when or is . - public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, string? instructions, object? chatClientServiceKey) + public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, string? instructions, object? chatClientServiceKey, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(services); Throw.IfNullOrEmpty(name); @@ -71,7 +74,7 @@ public static class AgentHostingServiceCollectionExtensions var chatClient = chatClientServiceKey is null ? sp.GetRequiredService() : sp.GetRequiredKeyedService(chatClientServiceKey); var tools = sp.GetKeyedServices(name).ToList(); return new ChatClientAgent(chatClient, instructions, key, tools: tools); - }); + }, lifetime); } /// @@ -82,9 +85,10 @@ public static class AgentHostingServiceCollectionExtensions /// The instructions for the agent. /// A description of the agent. /// The key to use when resolving the chat client from the service provider. If , a non-keyed service will be resolved. + /// The DI service lifetime for the agent registration. Defaults to . /// The same instance so that additional calls can be chained. /// Thrown when or is . - public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, string? instructions, string? description, object? chatClientServiceKey) + public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, string? instructions, string? description, object? chatClientServiceKey, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(services); Throw.IfNullOrEmpty(name); @@ -93,7 +97,7 @@ public static class AgentHostingServiceCollectionExtensions var chatClient = chatClientServiceKey is null ? sp.GetRequiredService() : sp.GetRequiredKeyedService(chatClientServiceKey); var tools = sp.GetKeyedServices(name).ToList(); return new ChatClientAgent(chatClient, instructions: instructions, name: key, description: description, tools: tools); - }); + }, lifetime); } /// @@ -102,15 +106,16 @@ public static class AgentHostingServiceCollectionExtensions /// The service collection to configure. /// The name of the agent. /// A factory delegate that creates the AI agent instance. The delegate receives the service provider and agent key as parameters. + /// The DI service lifetime for the agent registration. Defaults to . /// The same instance so that additional calls can be chained. /// Thrown when , , or is . /// Thrown when the agent factory delegate returns or an agent whose does not match . - public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, Func createAgentDelegate) + public static IHostedAgentBuilder AddAIAgent(this IServiceCollection services, string name, Func createAgentDelegate, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(services); Throw.IfNull(name); Throw.IfNull(createAgentDelegate); - services.AddKeyedSingleton(name, (sp, key) => + services.AddKeyedService(name, (sp, key) => { Throw.IfNull(key); var keyString = key as string; @@ -122,8 +127,18 @@ public static class AgentHostingServiceCollectionExtensions } return agent; - }); + }, lifetime); - return new HostedAgentBuilder(name, services); + return new HostedAgentBuilder(name, services, lifetime); + } + + /// + /// Registers a keyed service with the specified lifetime. + /// + internal static void AddKeyedService(this IServiceCollection services, object? serviceKey, Func factory, ServiceLifetime lifetime) + where T : class + { + var descriptor = new ServiceDescriptor(typeof(T), serviceKey, (sp, key) => factory(sp, key), lifetime); + services.Add(descriptor); } } diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderAgentExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderAgentExtensions.cs index 434024866a..2d8620611a 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderAgentExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderAgentExtensions.cs @@ -2,6 +2,7 @@ using System; using Microsoft.Extensions.AI; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Shared.Diagnostics; @@ -18,12 +19,13 @@ public static class HostApplicationBuilderAgentExtensions /// The host application builder to configure. /// The name of the agent. /// The instructions for the agent. + /// The DI service lifetime for the agent registration. Defaults to . /// The configured host application builder. /// Thrown when , , or is null. - public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, string? instructions) + public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, string? instructions, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(builder); - return builder.Services.AddAIAgent(name, instructions); + return builder.Services.AddAIAgent(name, instructions, lifetime); } /// @@ -33,13 +35,14 @@ public static class HostApplicationBuilderAgentExtensions /// The name of the agent. /// The instructions for the agent. /// The chat client which the agent will use for inference. + /// The DI service lifetime for the agent registration. Defaults to . /// The configured host application builder. /// Thrown when , , or is null. - public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, string? instructions, IChatClient chatClient) + public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, string? instructions, IChatClient chatClient, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(builder); Throw.IfNullOrEmpty(name); - return builder.Services.AddAIAgent(name, instructions, chatClient); + return builder.Services.AddAIAgent(name, instructions, chatClient, lifetime); } /// @@ -50,13 +53,14 @@ public static class HostApplicationBuilderAgentExtensions /// The instructions for the agent. /// A description of the agent. /// The key to use when resolving the chat client from the service provider. If null, a non-keyed service will be resolved. + /// The DI service lifetime for the agent registration. Defaults to . /// The configured host application builder. /// Thrown when , , or is null. - public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, string? instructions, string? description, object? chatClientServiceKey) + public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, string? instructions, string? description, object? chatClientServiceKey, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(builder); Throw.IfNullOrEmpty(name); - return builder.Services.AddAIAgent(name, instructions, description, chatClientServiceKey); + return builder.Services.AddAIAgent(name, instructions, description, chatClientServiceKey, lifetime); } /// @@ -66,12 +70,13 @@ public static class HostApplicationBuilderAgentExtensions /// The name of the agent. /// The instructions for the agent. /// The key to use when resolving the chat client from the service provider. If null, a non-keyed service will be resolved. + /// The DI service lifetime for the agent registration. Defaults to . /// The configured host application builder. /// Thrown when , , or is null. - public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, string? instructions, object? chatClientServiceKey) + public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, string? instructions, object? chatClientServiceKey, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(builder); - return builder.Services.AddAIAgent(name, instructions, chatClientServiceKey); + return builder.Services.AddAIAgent(name, instructions, chatClientServiceKey, lifetime); } /// @@ -80,12 +85,13 @@ public static class HostApplicationBuilderAgentExtensions /// The host application builder to configure. /// The name of the agent. /// A factory delegate that creates the AI agent instance. The delegate receives the service provider and agent key as parameters. + /// The DI service lifetime for the agent registration. Defaults to . /// The configured host application builder. /// Thrown when , , or is null. /// Thrown when the agent factory delegate returns null or an invalid AI agent instance. - public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, Func createAgentDelegate) + public static IHostedAgentBuilder AddAIAgent(this IHostApplicationBuilder builder, string name, Func createAgentDelegate, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(builder); - return builder.Services.AddAIAgent(name, createAgentDelegate); + return builder.Services.AddAIAgent(name, createAgentDelegate, lifetime); } } diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderWorkflowExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderWorkflowExtensions.cs index 8075caec59..cbefe94f1f 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderWorkflowExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderWorkflowExtensions.cs @@ -19,19 +19,20 @@ public static class HostApplicationBuilderWorkflowExtensions /// The to configure. /// The unique name for the workflow. /// A factory function that creates the instance. The function receives the service provider and workflow name as parameters. + /// The DI service lifetime for the workflow registration. Defaults to . /// An that can be used to further configure the workflow. /// Thrown when , , or is null. /// Thrown when is empty. /// /// Thrown when the factory delegate returns null or a workflow with a name that doesn't match the expected name. /// - public static IHostedWorkflowBuilder AddWorkflow(this IHostApplicationBuilder builder, string name, Func createWorkflowDelegate) + public static IHostedWorkflowBuilder AddWorkflow(this IHostApplicationBuilder builder, string name, Func createWorkflowDelegate, ServiceLifetime lifetime = ServiceLifetime.Singleton) { Throw.IfNull(builder); Throw.IfNull(name); Throw.IfNull(createWorkflowDelegate); - builder.Services.AddKeyedSingleton(name, (sp, key) => + builder.Services.AddKeyedService(name, (sp, key) => { Throw.IfNull(key); var keyString = key as string; @@ -43,7 +44,7 @@ public static class HostApplicationBuilderWorkflowExtensions } return workflow; - }); + }, lifetime); return new HostedWorkflowBuilder(name, builder); } diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilder.cs b/dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilder.cs index 89bf096b62..2d2d9bc5ed 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilder.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilder.cs @@ -9,15 +9,17 @@ internal sealed class HostedAgentBuilder : IHostedAgentBuilder { public string Name { get; } public IServiceCollection ServiceCollection { get; } + public ServiceLifetime Lifetime { get; } - public HostedAgentBuilder(string name, IHostApplicationBuilder builder) - : this(name, builder.Services) + public HostedAgentBuilder(string name, IHostApplicationBuilder builder, ServiceLifetime lifetime = ServiceLifetime.Singleton) + : this(name, builder.Services, lifetime) { } - public HostedAgentBuilder(string name, IServiceCollection serviceCollection) + public HostedAgentBuilder(string name, IServiceCollection serviceCollection, ServiceLifetime lifetime = ServiceLifetime.Singleton) { this.Name = name; this.ServiceCollection = serviceCollection; + this.Lifetime = lifetime; } } diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilderExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilderExtensions.cs index 12c1e08dfd..d1397fcda4 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilderExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting/HostedAgentBuilderExtensions.cs @@ -42,17 +42,19 @@ public static class HostedAgentBuilderExtensions /// The host agent builder to configure. /// A factory function that creates an agent session store instance using the provided service provider and agent /// name. + /// The DI service lifetime for the session store registration. Defaults to + /// because session stores persist conversation state across requests and are consumed independently of the agent's lifetime. /// The same host agent builder instance, enabling further configuration. - public static IHostedAgentBuilder WithSessionStore(this IHostedAgentBuilder builder, Func createAgentSessionStore) + public static IHostedAgentBuilder WithSessionStore(this IHostedAgentBuilder builder, Func createAgentSessionStore, ServiceLifetime lifetime = ServiceLifetime.Singleton) { - builder.ServiceCollection.AddKeyedSingleton(builder.Name, (sp, key) => + builder.ServiceCollection.AddKeyedService(builder.Name, (sp, key) => { Throw.IfNull(key); var keyString = key as string; Throw.IfNullOrEmpty(keyString); return createAgentSessionStore(sp, keyString) ?? throw new InvalidOperationException($"The agent session store factory did not return a valid {nameof(AgentSessionStore)} instance for key '{keyString}'."); - }); + }, lifetime); return builder; } @@ -98,13 +100,39 @@ public static class HostedAgentBuilderExtensions /// /// The hosted agent builder. /// A factory function that creates a AI tool using the provided service provider. - public static IHostedAgentBuilder WithAITool(this IHostedAgentBuilder builder, Func factory) + /// The DI service lifetime for the tool registration. If , the agent's lifetime is used. + /// The same instance so that additional calls can be chained. + /// Thrown when or is . + /// + /// Thrown when the effective tool lifetime is shorter than the agent's lifetime, which would cause a captive dependency. + /// For example, a singleton agent cannot use scoped or transient tools. + /// + public static IHostedAgentBuilder WithAITool(this IHostedAgentBuilder builder, Func factory, ServiceLifetime? lifetime = null) { Throw.IfNull(builder); Throw.IfNull(factory); - builder.ServiceCollection.AddKeyedSingleton(builder.Name, (sp, name) => factory(sp)); + var effectiveLifetime = lifetime ?? builder.Lifetime; + ValidateToolLifetime(builder.Lifetime, effectiveLifetime); + + builder.ServiceCollection.AddKeyedService(builder.Name, (sp, name) => factory(sp), effectiveLifetime); return builder; } + + /// + /// Validates that the tool lifetime is compatible with the agent lifetime. + /// A tool's lifetime must be at least as long as the agent's lifetime to prevent captive dependency issues. + /// + internal static void ValidateToolLifetime(ServiceLifetime agentLifetime, ServiceLifetime toolLifetime) + { + // ServiceLifetime enum: Singleton=0, Scoped=1, Transient=2 + // A higher value means a shorter lifetime. + if (toolLifetime > agentLifetime) + { + throw new InvalidOperationException( + $"A tool with lifetime '{toolLifetime}' cannot be registered for an agent with lifetime '{agentLifetime}'. " + + "The tool's lifetime must be at least as long as the agent's lifetime to avoid captive dependency issues."); + } + } } diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting/HostedWorkflowBuilderExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Hosting/HostedWorkflowBuilderExtensions.cs index f01a12c7ea..abee1cb566 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting/HostedWorkflowBuilderExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting/HostedWorkflowBuilderExtensions.cs @@ -14,22 +14,24 @@ public static class HostedWorkflowBuilderExtensions /// Registers the workflow as an AI agent in the dependency injection container. /// /// The instance to extend. + /// The DI service lifetime for the agent registration. Defaults to . /// An that can be used to further configure the agent. - public static IHostedAgentBuilder AddAsAIAgent(this IHostedWorkflowBuilder builder) - => builder.AddAsAIAgent(name: null); + public static IHostedAgentBuilder AddAsAIAgent(this IHostedWorkflowBuilder builder, ServiceLifetime lifetime = ServiceLifetime.Singleton) + => builder.AddAsAIAgent(name: null, lifetime: lifetime); /// /// Registers the workflow as an AI agent in the dependency injection container. /// /// The instance to extend. /// The optional name for the AI agent. If not specified, the workflow name is used. + /// The DI service lifetime for the agent registration. Defaults to . /// An that can be used to further configure the agent. - public static IHostedAgentBuilder AddAsAIAgent(this IHostedWorkflowBuilder builder, string? name) + public static IHostedAgentBuilder AddAsAIAgent(this IHostedWorkflowBuilder builder, string? name, ServiceLifetime lifetime = ServiceLifetime.Singleton) { var workflowName = builder.Name; var agentName = name ?? workflowName; return builder.HostApplicationBuilder.AddAIAgent(agentName, (sp, key) => - sp.GetRequiredKeyedService(workflowName).AsAIAgent(name: key)); + sp.GetRequiredKeyedService(workflowName).AsAIAgent(name: key), lifetime); } } diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting/IHostedAgentBuilder.cs b/dotnet/src/Microsoft.Agents.AI.Hosting/IHostedAgentBuilder.cs index f67f4eb7cd..0751ba630b 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting/IHostedAgentBuilder.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting/IHostedAgentBuilder.cs @@ -18,4 +18,9 @@ public interface IHostedAgentBuilder /// Gets the service collection for configuration. /// IServiceCollection ServiceCollection { get; } + + /// + /// Gets the DI service lifetime used for the agent registration. + /// + ServiceLifetime Lifetime { get; } } diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/AgentHostingServiceCollectionExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/AgentHostingServiceCollectionExtensionsTests.cs index 03ab65c9f2..4d0a829933 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/AgentHostingServiceCollectionExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/AgentHostingServiceCollectionExtensionsTests.cs @@ -105,7 +105,7 @@ public class AgentHostingServiceCollectionExtensionsTests } /// - /// Verifies that AddAIAgent registers the agent as a keyed singleton service. + /// Verifies that AddAIAgent registers the agent as a keyed singleton service by default. /// [Fact] public void AddAIAgent_RegistersKeyedSingleton() @@ -203,4 +203,94 @@ public class AgentHostingServiceCollectionExtensionsTests d.ServiceType == typeof(AIAgent)); Assert.NotNull(descriptor); } + + /// + /// Verifies that AddAIAgent registers with the specified scoped lifetime. + /// + [Fact] + public void AddAIAgent_WithScopedLifetime_RegistersKeyedScoped() + { + // Arrange + var services = new ServiceCollection(); + var mockAgent = new Mock(); + const string AgentName = "scopedAgent"; + + // Act + var result = services.AddAIAgent(AgentName, (sp, key) => mockAgent.Object, ServiceLifetime.Scoped); + + // Assert + var descriptor = services.FirstOrDefault( + d => (d.ServiceKey as string) == AgentName && + d.ServiceType == typeof(AIAgent)); + + Assert.NotNull(descriptor); + Assert.Equal(ServiceLifetime.Scoped, descriptor.Lifetime); + Assert.Equal(ServiceLifetime.Scoped, result.Lifetime); + } + + /// + /// Verifies that AddAIAgent registers with the specified transient lifetime. + /// + [Fact] + public void AddAIAgent_WithTransientLifetime_RegistersKeyedTransient() + { + // Arrange + var services = new ServiceCollection(); + var mockAgent = new Mock(); + const string AgentName = "transientAgent"; + + // Act + var result = services.AddAIAgent(AgentName, (sp, key) => mockAgent.Object, ServiceLifetime.Transient); + + // Assert + var descriptor = services.FirstOrDefault( + d => (d.ServiceKey as string) == AgentName && + d.ServiceType == typeof(AIAgent)); + + Assert.NotNull(descriptor); + Assert.Equal(ServiceLifetime.Transient, descriptor.Lifetime); + Assert.Equal(ServiceLifetime.Transient, result.Lifetime); + } + + /// + /// Verifies that the builder exposes the correct lifetime for default registration. + /// + [Fact] + public void AddAIAgent_DefaultLifetime_BuilderExposesSingleton() + { + // Arrange + var services = new ServiceCollection(); + var mockAgent = new Mock(); + + // Act + var result = services.AddAIAgent("agentName", (sp, key) => mockAgent.Object); + + // Assert + Assert.Equal(ServiceLifetime.Singleton, result.Lifetime); + } + + /// + /// Verifies that AddAIAgent with instructions overload respects the lifetime parameter. + /// + [Theory] + [InlineData(ServiceLifetime.Singleton)] + [InlineData(ServiceLifetime.Scoped)] + [InlineData(ServiceLifetime.Transient)] + public void AddAIAgent_InstructionsOverload_RespectsLifetime(ServiceLifetime lifetime) + { + // Arrange + var services = new ServiceCollection(); + + // Act + var result = services.AddAIAgent("agent", "instructions", lifetime); + + // Assert + var descriptor = services.FirstOrDefault( + d => (d.ServiceKey as string) == "agent" && + d.ServiceType == typeof(AIAgent)); + + Assert.NotNull(descriptor); + Assert.Equal(lifetime, descriptor.Lifetime); + Assert.Equal(lifetime, result.Lifetime); + } } diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostApplicationBuilderAgentExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostApplicationBuilderAgentExtensionsTests.cs index 0036a60cc7..f80d2b7c32 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostApplicationBuilderAgentExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostApplicationBuilderAgentExtensionsTests.cs @@ -127,7 +127,7 @@ public class HostApplicationBuilderAgentExtensionsTests } /// - /// Verifies that AddAIAgent registers the agent as a keyed singleton service. + /// Verifies that AddAIAgent registers the agent as a keyed singleton service by default. /// [Fact] public void AddAIAgent_RegistersKeyedSingleton() @@ -235,4 +235,77 @@ public class HostApplicationBuilderAgentExtensionsTests d.ServiceType == typeof(AIAgent)); Assert.NotNull(descriptor); } + + /// + /// Verifies that AddAIAgent registers with the specified scoped lifetime via the host builder. + /// + [Fact] + public void AddAIAgent_WithScopedLifetime_RegistersKeyedScoped() + { + // Arrange + var builder = new HostApplicationBuilder(); + var mockAgent = new Mock(); + const string AgentName = "scopedAgent"; + + // Act + var result = builder.AddAIAgent(AgentName, (sp, key) => mockAgent.Object, ServiceLifetime.Scoped); + + // Assert + var descriptor = builder.Services.FirstOrDefault( + d => (d.ServiceKey as string) == AgentName && + d.ServiceType == typeof(AIAgent)); + + Assert.NotNull(descriptor); + Assert.Equal(ServiceLifetime.Scoped, descriptor.Lifetime); + Assert.Equal(ServiceLifetime.Scoped, result.Lifetime); + } + + /// + /// Verifies that AddAIAgent registers with the specified transient lifetime via the host builder. + /// + [Fact] + public void AddAIAgent_WithTransientLifetime_RegistersKeyedTransient() + { + // Arrange + var builder = new HostApplicationBuilder(); + var mockAgent = new Mock(); + const string AgentName = "transientAgent"; + + // Act + var result = builder.AddAIAgent(AgentName, (sp, key) => mockAgent.Object, ServiceLifetime.Transient); + + // Assert + var descriptor = builder.Services.FirstOrDefault( + d => (d.ServiceKey as string) == AgentName && + d.ServiceType == typeof(AIAgent)); + + Assert.NotNull(descriptor); + Assert.Equal(ServiceLifetime.Transient, descriptor.Lifetime); + Assert.Equal(ServiceLifetime.Transient, result.Lifetime); + } + + /// + /// Verifies that AddAIAgent with instructions overload respects the lifetime parameter via the host builder. + /// + [Theory] + [InlineData(ServiceLifetime.Singleton)] + [InlineData(ServiceLifetime.Scoped)] + [InlineData(ServiceLifetime.Transient)] + public void AddAIAgent_InstructionsOverload_RespectsLifetime(ServiceLifetime lifetime) + { + // Arrange + var builder = new HostApplicationBuilder(); + + // Act + var result = builder.AddAIAgent("agent", "instructions", lifetime); + + // Assert + var descriptor = builder.Services.FirstOrDefault( + d => (d.ServiceKey as string) == "agent" && + d.ServiceType == typeof(AIAgent)); + + Assert.NotNull(descriptor); + Assert.Equal(lifetime, descriptor.Lifetime); + Assert.Equal(lifetime, result.Lifetime); + } } diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostApplicationBuilderWorkflowExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostApplicationBuilderWorkflowExtensionsTests.cs index d27b9a17e3..1c5649d17c 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostApplicationBuilderWorkflowExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostApplicationBuilderWorkflowExtensionsTests.cs @@ -63,7 +63,7 @@ public class HostApplicationBuilderWorkflowExtensionsTests } /// - /// Verifies that AddWorkflow registers the workflow as a keyed singleton service. + /// Verifies that AddWorkflow registers the workflow as a keyed singleton service by default. /// [Fact] public void AddWorkflow_RegistersKeyedSingleton() @@ -328,6 +328,77 @@ public class HostApplicationBuilderWorkflowExtensionsTests Assert.NotNull(agentDescriptor); } + /// + /// Verifies that AddWorkflow registers with the specified scoped lifetime. + /// + [Fact] + public void AddWorkflow_WithScopedLifetime_RegistersKeyedScoped() + { + // Arrange + var builder = new HostApplicationBuilder(); + const string WorkflowName = "scopedWorkflow"; + + // Act + builder.AddWorkflow(WorkflowName, (sp, key) => CreateTestWorkflow(key), ServiceLifetime.Scoped); + + // Assert + var descriptor = builder.Services.FirstOrDefault( + d => (d.ServiceKey as string) == WorkflowName && + d.ServiceType == typeof(Workflow)); + + Assert.NotNull(descriptor); + Assert.Equal(ServiceLifetime.Scoped, descriptor.Lifetime); + } + + /// + /// Verifies that AddWorkflow registers with the specified transient lifetime. + /// + [Fact] + public void AddWorkflow_WithTransientLifetime_RegistersKeyedTransient() + { + // Arrange + var builder = new HostApplicationBuilder(); + const string WorkflowName = "transientWorkflow"; + + // Act + builder.AddWorkflow(WorkflowName, (sp, key) => CreateTestWorkflow(key), ServiceLifetime.Transient); + + // Assert + var descriptor = builder.Services.FirstOrDefault( + d => (d.ServiceKey as string) == WorkflowName && + d.ServiceType == typeof(Workflow)); + + Assert.NotNull(descriptor); + Assert.Equal(ServiceLifetime.Transient, descriptor.Lifetime); + } + + /// + /// Verifies that AddAsAIAgent respects the lifetime parameter. + /// + [Theory] + [InlineData(ServiceLifetime.Singleton)] + [InlineData(ServiceLifetime.Scoped)] + [InlineData(ServiceLifetime.Transient)] + public void AddAsAIAgent_RespectsLifetime(ServiceLifetime lifetime) + { + // Arrange + var builder = new HostApplicationBuilder(); + const string WorkflowName = "testWorkflow"; + var workflowBuilder = builder.AddWorkflow(WorkflowName, (sp, key) => CreateTestWorkflow(key)); + + // Act + var agentBuilder = workflowBuilder.AddAsAIAgent("agent", lifetime); + + // Assert + var descriptor = builder.Services.FirstOrDefault( + d => (d.ServiceKey as string) == "agent" && + d.ServiceType == typeof(AIAgent)); + + Assert.NotNull(descriptor); + Assert.Equal(lifetime, descriptor.Lifetime); + Assert.Equal(lifetime, agentBuilder.Lifetime); + } + /// /// Helper method to create a simple test workflow with a given name. /// diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostedAgentBuilderToolsExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostedAgentBuilderToolsExtensionsTests.cs index 28b621714f..eb482964b0 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostedAgentBuilderToolsExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.UnitTests/HostedAgentBuilderToolsExtensionsTests.cs @@ -7,6 +7,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; +using Moq; namespace Microsoft.Agents.AI.Hosting.UnitTests; @@ -250,6 +251,179 @@ public sealed class HostedAgentBuilderToolsExtensionsTests Assert.Contains(factoryTool, agentTools); } + /// + /// Verifies that WithAITool factory method defaults to the agent's lifetime when no explicit lifetime is specified. + /// + [Theory] + [InlineData(ServiceLifetime.Singleton)] + [InlineData(ServiceLifetime.Scoped)] + [InlineData(ServiceLifetime.Transient)] + public void WithAIToolFactory_DefaultsToAgentLifetime(ServiceLifetime agentLifetime) + { + // Arrange + var services = new ServiceCollection(); + var builder = services.AddAIAgent("test-agent", (sp, key) => new Mock().Object, agentLifetime); + + // Act + builder.WithAITool(_ => new DummyAITool()); + + // Assert + var toolDescriptor = services.FirstOrDefault( + d => (d.ServiceKey as string) == "test-agent" && + d.ServiceType == typeof(AITool)); + + Assert.NotNull(toolDescriptor); + Assert.Equal(agentLifetime, toolDescriptor.Lifetime); + } + + /// + /// Verifies that WithAITool factory method accepts an explicit lifetime override. + /// + [Fact] + public void WithAIToolFactory_ExplicitLifetimeOverridesDefault() + { + // Arrange + var services = new ServiceCollection(); + var builder = services.AddAIAgent("test-agent", (sp, key) => new Mock().Object, ServiceLifetime.Transient); + + // Act - Transient agent with Singleton tool is valid (longer-lived dependency) + builder.WithAITool(_ => new DummyAITool(), ServiceLifetime.Singleton); + + // Assert + var toolDescriptor = services.FirstOrDefault( + d => (d.ServiceKey as string) == "test-agent" && + d.ServiceType == typeof(AITool)); + + Assert.NotNull(toolDescriptor); + Assert.Equal(ServiceLifetime.Singleton, toolDescriptor.Lifetime); + } + + /// + /// Verifies that WithAITool factory throws for singleton agent with scoped tool (captive dependency). + /// + [Fact] + public void WithAIToolFactory_SingletonAgentWithScopedTool_ThrowsInvalidOperationException() + { + // Arrange + var services = new ServiceCollection(); + var builder = services.AddAIAgent("test-agent", (sp, key) => new Mock().Object, ServiceLifetime.Singleton); + + // Act & Assert + Assert.Throws(() => + builder.WithAITool(_ => new DummyAITool(), ServiceLifetime.Scoped)); + } + + /// + /// Verifies that WithAITool factory throws for singleton agent with transient tool (captive dependency). + /// + [Fact] + public void WithAIToolFactory_SingletonAgentWithTransientTool_ThrowsInvalidOperationException() + { + // Arrange + var services = new ServiceCollection(); + var builder = services.AddAIAgent("test-agent", (sp, key) => new Mock().Object, ServiceLifetime.Singleton); + + // Act & Assert + Assert.Throws(() => + builder.WithAITool(_ => new DummyAITool(), ServiceLifetime.Transient)); + } + + /// + /// Verifies that WithAITool factory throws for scoped agent with transient tool (captive dependency). + /// + [Fact] + public void WithAIToolFactory_ScopedAgentWithTransientTool_ThrowsInvalidOperationException() + { + // Arrange + var services = new ServiceCollection(); + var builder = services.AddAIAgent("test-agent", (sp, key) => new Mock().Object, ServiceLifetime.Scoped); + + // Act & Assert + Assert.Throws(() => + builder.WithAITool(_ => new DummyAITool(), ServiceLifetime.Transient)); + } + + /// + /// Verifies all valid tool lifetime combinations do not throw. + /// + [Theory] + [InlineData(ServiceLifetime.Singleton, ServiceLifetime.Singleton)] + [InlineData(ServiceLifetime.Scoped, ServiceLifetime.Singleton)] + [InlineData(ServiceLifetime.Scoped, ServiceLifetime.Scoped)] + [InlineData(ServiceLifetime.Transient, ServiceLifetime.Singleton)] + [InlineData(ServiceLifetime.Transient, ServiceLifetime.Scoped)] + [InlineData(ServiceLifetime.Transient, ServiceLifetime.Transient)] + public void WithAIToolFactory_ValidLifetimeCombinations_DoNotThrow(ServiceLifetime agentLifetime, ServiceLifetime toolLifetime) + { + // Arrange + var services = new ServiceCollection(); + var builder = services.AddAIAgent("test-agent", (sp, key) => new Mock().Object, agentLifetime); + + // Act & Assert - should not throw + builder.WithAITool(_ => new DummyAITool(), toolLifetime); + } + + /// + /// Verifies that ValidateToolLifetime correctly identifies all invalid combinations. + /// + [Theory] + [InlineData(ServiceLifetime.Singleton, ServiceLifetime.Scoped)] + [InlineData(ServiceLifetime.Singleton, ServiceLifetime.Transient)] + [InlineData(ServiceLifetime.Scoped, ServiceLifetime.Transient)] + public void ValidateToolLifetime_InvalidCombinations_Throw(ServiceLifetime agentLifetime, ServiceLifetime toolLifetime) + { + // Act & Assert + Assert.Throws(() => + HostedAgentBuilderExtensions.ValidateToolLifetime(agentLifetime, toolLifetime)); + } + + /// + /// Verifies that the WithSessionStore factory method defaults to Singleton regardless of agent lifetime. + /// + [Theory] + [InlineData(ServiceLifetime.Singleton)] + [InlineData(ServiceLifetime.Scoped)] + [InlineData(ServiceLifetime.Transient)] + public void WithSessionStoreFactory_DefaultsToSingleton(ServiceLifetime agentLifetime) + { + // Arrange + var services = new ServiceCollection(); + var builder = services.AddAIAgent("test-agent", (sp, key) => new Mock().Object, agentLifetime); + + // Act + builder.WithSessionStore((sp, name) => new InMemoryAgentSessionStore()); + + // Assert + var storeDescriptor = services.FirstOrDefault( + d => (d.ServiceKey as string) == "test-agent" && + d.ServiceType == typeof(AgentSessionStore)); + + Assert.NotNull(storeDescriptor); + Assert.Equal(ServiceLifetime.Singleton, storeDescriptor.Lifetime); + } + + /// + /// Verifies that the WithSessionStore factory method accepts an explicit lifetime override. + /// + [Fact] + public void WithSessionStoreFactory_ExplicitLifetimeOverridesDefault() + { + // Arrange + var services = new ServiceCollection(); + var builder = services.AddAIAgent("test-agent", (sp, key) => new Mock().Object, ServiceLifetime.Transient); + + // Act + builder.WithSessionStore((sp, name) => new InMemoryAgentSessionStore(), ServiceLifetime.Singleton); + + // Assert + var storeDescriptor = services.FirstOrDefault( + d => (d.ServiceKey as string) == "test-agent" && + d.ServiceType == typeof(AgentSessionStore)); + + Assert.NotNull(storeDescriptor); + Assert.Equal(ServiceLifetime.Singleton, storeDescriptor.Lifetime); + } + /// /// Dummy AITool implementation for testing. /// From f7e4143c6174382cb5d49198fe65d1c53d58a087 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Fri, 6 Mar 2026 11:59:50 +0000 Subject: [PATCH 07/44] .NET: Fix filter combine logic for ChatHistoryMemoryProvider (#4501) * Fix filter combine logic for ChatHistoryMemoryProvider * Replace var with explicit types in filter building code and test Address PR review nit: use explicit types instead of var for better readability in the filter-building logic and the new combined filter compilation test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix style issues --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Memory/ChatHistoryMemoryProvider.cs | 51 +++++++++---- .../Memory/ChatHistoryMemoryProviderTests.cs | 71 +++++++++++++++++++ 2 files changed, 108 insertions(+), 14 deletions(-) diff --git a/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs b/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs index 80d5e1144f..0cc35fe85e 100644 --- a/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs @@ -350,36 +350,38 @@ public sealed class ChatHistoryMemoryProvider : MessageAIContextProvider, IDispo string? userId = searchScope.UserId; string? sessionId = searchScope.SessionId; - Expression, bool>>? filter = null; + // Build a combined filter using a single shared parameter to avoid expression tree + // scoping issues when multiple filters are combined with AndAlso. + ParameterExpression parameter = Expression.Parameter(typeof(Dictionary), "x"); + Expression? filterBody = null; + if (applicationId != null) { - filter = x => (string?)x[ApplicationIdField] == applicationId; + filterBody = RebindFilterBody(x => (string?)x[ApplicationIdField] == applicationId, parameter); } if (agentId != null) { - Expression, bool>> agentIdFilter = x => (string?)x[AgentIdField] == agentId; - filter = filter == null ? agentIdFilter : Expression.Lambda, bool>>( - Expression.AndAlso(filter.Body, agentIdFilter.Body), - filter.Parameters); + Expression body = RebindFilterBody(x => (string?)x[AgentIdField] == agentId, parameter); + filterBody = filterBody == null ? body : Expression.AndAlso(filterBody, body); } if (userId != null) { - Expression, bool>> userIdFilter = x => (string?)x[UserIdField] == userId; - filter = filter == null ? userIdFilter : Expression.Lambda, bool>>( - Expression.AndAlso(filter.Body, userIdFilter.Body), - filter.Parameters); + Expression body = RebindFilterBody(x => (string?)x[UserIdField] == userId, parameter); + filterBody = filterBody == null ? body : Expression.AndAlso(filterBody, body); } if (sessionId != null) { - Expression, bool>> sessionIdFilter = x => (string?)x[SessionIdField] == sessionId; - filter = filter == null ? sessionIdFilter : Expression.Lambda, bool>>( - Expression.AndAlso(filter.Body, sessionIdFilter.Body), - filter.Parameters); + Expression body = RebindFilterBody(x => (string?)x[SessionIdField] == sessionId, parameter); + filterBody = filterBody == null ? body : Expression.AndAlso(filterBody, body); } + Expression, bool>>? filter = filterBody != null + ? Expression.Lambda, bool>>(filterBody, parameter) + : null; + // Use search to find relevant messages var searchResults = collection.SearchAsync( queryText, @@ -467,6 +469,27 @@ public sealed class ChatHistoryMemoryProvider : MessageAIContextProvider, IDispo private string? SanitizeLogData(string? data) => this._enableSensitiveTelemetryData ? data : ""; + /// + /// Rebinds a filter expression's body to use the specified shared parameter, + /// replacing the original lambda parameter so that multiple filters can be safely + /// combined with . + /// + private static Expression RebindFilterBody( + Expression, bool>> filter, + ParameterExpression sharedParameter) + { + return new ParameterReplacer(filter.Parameters[0], sharedParameter).Visit(filter.Body); + } + + /// + /// An that replaces one with another. + /// + private sealed class ParameterReplacer(ParameterExpression original, ParameterExpression replacement) : ExpressionVisitor + { + protected override Expression VisitParameter(ParameterExpression node) + => node == original ? replacement : base.VisitParameter(node); + } + /// /// Represents the state of a stored in the . /// diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Memory/ChatHistoryMemoryProviderTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Memory/ChatHistoryMemoryProviderTests.cs index 5211fa0956..35c7f780b4 100644 --- a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Memory/ChatHistoryMemoryProviderTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Memory/ChatHistoryMemoryProviderTests.cs @@ -454,6 +454,77 @@ public class ChatHistoryMemoryProviderTests Times.Once); } + [Fact] + public async Task InvokedAsync_CombinedFilterCanBeCompiled_WhenMultipleScopeFiltersProvidedAsync() + { + // Arrange + // This test reproduces a bug where combining multiple scope filters + // (e.g. userId + sessionId) produces an expression tree with dangling + // ParameterExpression references that fails at compile time. + ChatHistoryMemoryProviderOptions providerOptions = new() + { + SearchTime = ChatHistoryMemoryProviderOptions.SearchBehavior.BeforeAIInvoke, + MaxResults = 2, + ContextPrompt = "Here is the relevant chat history:\n" + }; + + ChatHistoryMemoryProviderScope searchScope = new() + { + ApplicationId = "app1", + AgentId = "agent1", + SessionId = "session1", + UserId = "user1" + }; + + System.Linq.Expressions.Expression, bool>>? capturedFilter = null; + + this._vectorStoreCollectionMock + .Setup(c => c.SearchAsync( + It.IsAny(), + It.IsAny(), + It.IsAny>>(), + It.IsAny())) + .Callback((string query, int maxResults, VectorSearchOptions> options, CancellationToken ct) => + capturedFilter = options.Filter) + .Returns(ToAsyncEnumerableAsync(new List>>())); + + ChatHistoryMemoryProvider provider = new( + this._vectorStoreMock.Object, + TestCollectionName, + 1, + _ => new ChatHistoryMemoryProvider.State(searchScope, searchScope), + options: providerOptions); + + ChatMessage requestMsg = new(ChatRole.User, "requesting relevant history"); + AIContextProvider.InvokingContext invokingContext = new(s_mockAgent, new TestAgentSession(), new AIContext { Messages = new List { requestMsg } }); + + // Act + await provider.InvokingAsync(invokingContext, CancellationToken.None); + + // Assert - The filter must be compilable and executable without expression tree scoping errors + Assert.NotNull(capturedFilter); + Func, bool> compiledFilter = capturedFilter!.Compile(); + + Dictionary matchingRecord = new() + { + ["ApplicationId"] = "app1", + ["AgentId"] = "agent1", + ["SessionId"] = "session1", + ["UserId"] = "user1" + }; + + Dictionary nonMatchingRecord = new() + { + ["ApplicationId"] = "app1", + ["AgentId"] = "agent1", + ["SessionId"] = "other-session", + ["UserId"] = "user1" + }; + + Assert.True(compiledFilter(matchingRecord)); + Assert.False(compiledFilter(nonMatchingRecord)); + } + [Theory] [InlineData(false, false, 2)] [InlineData(true, false, 2)] From 7e98b0cd29b0dce33255dab781720ec0e6ed802c Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 12:15:10 +0000 Subject: [PATCH 08/44] .NET: Update HostedAgents samples to Azure.AI.AgentServer.AgentFramework 1.0.0-beta.9 and MEAI 10.3.0 (#4477) * Initial plan * Update HostedAgents samples to Azure.AI.AgentServer.AgentFramework 1.0.0-beta.9 and MEAI 10.3.0 Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com> * Fix HostedAgents samples for Microsoft.Agents.AI 1.0.0-rc2 API changes - Rename CreateAIAgent -> AsAIAgent (AgentThreadAndHITL, AgentWithHostedMCP, AgentWithTextSearchRag) - Rename AsAgent -> AsAIAgent (AgentsInWorkflows) - Replace AIContextProviderFactory with AIContextProviders and simplified TextSearchProvider ctor (AgentWithTextSearchRag) - Update Microsoft.Agents.AI.OpenAI to 1.0.0-rc2 (AgentThreadAndHITL, AgentWithTextSearchRag, AgentWithTools) - Update Microsoft.Agents.AI.Workflows to 1.0.0-rc2 (AgentsInWorkflows) - Add Microsoft.Agents.AI 1.0.0-rc2 reference (AgentWithHostedMCP) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update HostedAgents samples for beta.9 API changes and add missing projects to slnx - Use DefaultAzureCredential consistently across all samples - Add AgentThreadAndHITL, AgentWithLocalTools, AgentWithTools to slnx - Apply dotnet format Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove unnecessary Microsoft.Agents.AI.* package references (transitive from AgentFramework) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add DefaultAzureCredential production warning comments to all HostedAgents samples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update HostedAgents READMEs to reflect DefaultAzureCredential usage Replace AzureCliCredential references with DefaultAzureCredential in all HostedAgents README files to match the actual sample code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Replace Microsoft.Extensions.AI.OpenAI with Microsoft.Agents.AI.OpenAI and remove AsIChatClient() Swap package references from Microsoft.Extensions.AI.OpenAI to Microsoft.Agents.AI.OpenAI across all 6 HostedAgents samples. This enables using the AsAIAgent() extension directly on ChatClient/ResponsesClient (from OpenAI.Chat/OpenAI.Responses namespaces), removing the intermediate AsIChatClient() call in 3 samples where it was unnecessary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use explicit types and AsAIAgent() extensions across all HostedAgents samples Replace var with explicit types for clarity in all 6 samples. Replace new ChatClientAgent() constructor calls with chatClient.AsAIAgent() extension method in AgentWithLocalTools and AgentsInWorkflows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/agent-framework-dotnet.slnx | 3 ++ .../AgentThreadAndHITL.csproj | 7 ++--- .../AgentThreadAndHITL/Program.cs | 15 ++++++---- .../AgentWithHostedMCP.csproj | 4 +-- .../AgentWithHostedMCP/Program.cs | 8 ++--- .../HostedAgents/AgentWithHostedMCP/README.md | 2 +- .../AgentWithLocalTools.csproj | 4 +-- .../AgentWithLocalTools/Program.cs | 29 ++++++++++--------- .../AgentWithTextSearchRag.csproj | 5 ++-- .../AgentWithTextSearchRag/Program.cs | 8 ++--- .../AgentWithTools/AgentWithTools.csproj | 5 ++-- .../HostedAgents/AgentWithTools/Program.cs | 15 ++++++---- .../HostedAgents/AgentWithTools/README.md | 4 +-- .../AgentsInWorkflows.csproj | 7 ++--- .../HostedAgents/AgentsInWorkflows/Program.cs | 10 +++---- .../HostedAgents/AgentsInWorkflows/README.md | 2 +- .../05-end-to-end/HostedAgents/README.md | 2 +- 17 files changed, 69 insertions(+), 61 deletions(-) diff --git a/dotnet/agent-framework-dotnet.slnx b/dotnet/agent-framework-dotnet.slnx index 75888768fa..86f87b40e1 100644 --- a/dotnet/agent-framework-dotnet.slnx +++ b/dotnet/agent-framework-dotnet.slnx @@ -284,8 +284,11 @@ + + + diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentThreadAndHITL/AgentThreadAndHITL.csproj b/dotnet/samples/05-end-to-end/HostedAgents/AgentThreadAndHITL/AgentThreadAndHITL.csproj index 17b90fd6e2..1398a60228 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentThreadAndHITL/AgentThreadAndHITL.csproj +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentThreadAndHITL/AgentThreadAndHITL.csproj @@ -1,4 +1,4 @@ - + Exe @@ -36,11 +36,10 @@ - + - - + diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentThreadAndHITL/Program.cs b/dotnet/samples/05-end-to-end/HostedAgents/AgentThreadAndHITL/Program.cs index 305b9835ed..c816b018e9 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentThreadAndHITL/Program.cs +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentThreadAndHITL/Program.cs @@ -11,9 +11,10 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Extensions.AI; +using OpenAI.Chat; -var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); -var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +string endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); +string deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; [Description("Get the weather for a given location.")] static string GetWeather([Description("The location to get the weather for.")] string location) @@ -22,17 +23,19 @@ static string GetWeather([Description("The location to get the weather for.")] s // Create the chat client and agent. // Note: ApprovalRequiredAIFunction wraps the tool to require user approval before invocation. // User should reply with 'approve' or 'reject' when prompted. +// WARNING: DefaultAzureCredential is convenient for development but requires careful consideration in production. +// In production, consider using a specific credential (e.g., ManagedIdentityCredential) to avoid +// latency issues, unintended credential probing, and potential security risks from fallback mechanisms. #pragma warning disable MEAI001 // Type is for evaluation purposes only AIAgent agent = new AzureOpenAIClient( new Uri(endpoint), - new AzureCliCredential()) + new DefaultAzureCredential()) .GetChatClient(deploymentName) - .AsIChatClient() - .CreateAIAgent( + .AsAIAgent( instructions: "You are a helpful assistant", tools: [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(GetWeather))] ); #pragma warning restore MEAI001 -var threadRepository = new InMemoryAgentThreadRepository(agent); +InMemoryAgentThreadRepository threadRepository = new(agent); await agent.RunAIAgentAsync(telemetrySourceName: "Agents", threadRepository: threadRepository); diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/AgentWithHostedMCP.csproj b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/AgentWithHostedMCP.csproj index 361848c27d..e854cfcd40 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/AgentWithHostedMCP.csproj +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/AgentWithHostedMCP.csproj @@ -35,10 +35,10 @@ - + - + diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/Program.cs b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/Program.cs index 0898bc0252..972205cfe2 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/Program.cs +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/Program.cs @@ -9,9 +9,10 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Extensions.AI; +using OpenAI.Responses; -var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); -var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +string endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); +string deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; // Create an MCP tool that can be called without approval. AITool mcpTool = new HostedMcpServerTool(serverName: "microsoft_learn", serverAddress: "https://learn.microsoft.com/api/mcp") @@ -28,8 +29,7 @@ AIAgent agent = new AzureOpenAIClient( new Uri(endpoint), new DefaultAzureCredential()) .GetResponsesClient(deploymentName) - .AsIChatClient() - .CreateAIAgent( + .AsAIAgent( instructions: "You answer questions by searching the Microsoft Learn content only.", name: "MicrosoftLearnAgent", tools: [mcpTool]); diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/README.md b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/README.md index 8d8ddba330..106e08e720 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/README.md +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithHostedMCP/README.md @@ -18,7 +18,7 @@ Before running this sample, ensure you have: 2. A deployment of a chat model (e.g., gpt-4o-mini) 3. Azure CLI installed and authenticated -**Note**: This sample uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Azure OpenAI resource. +**Note**: This sample uses `DefaultAzureCredential` for authentication, which probes multiple sources automatically. For local development, make sure you're logged in with `az login` and have access to the Azure OpenAI resource. ## Environment Variables diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithLocalTools/AgentWithLocalTools.csproj b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithLocalTools/AgentWithLocalTools.csproj index 43cdbfb025..975333e584 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithLocalTools/AgentWithLocalTools.csproj +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithLocalTools/AgentWithLocalTools.csproj @@ -36,11 +36,11 @@ - + - + diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithLocalTools/Program.cs b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithLocalTools/Program.cs index 72eb938047..78a0aa62e9 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithLocalTools/Program.cs +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithLocalTools/Program.cs @@ -15,21 +15,21 @@ using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Extensions.AI; -var endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") +string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set."); -var deploymentName = Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +string deploymentName = Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; Console.WriteLine($"Project Endpoint: {endpoint}"); Console.WriteLine($"Model Deployment: {deploymentName}"); -var seattleHotels = new[] -{ +Hotel[] seattleHotels = +[ new Hotel("Contoso Suites", 189, 4.5, "Downtown"), new Hotel("Fabrikam Residences", 159, 4.2, "Pike Place Market"), new Hotel("Alpine Ski House", 249, 4.7, "Seattle Center"), new Hotel("Margie's Travel Lodge", 219, 4.4, "Waterfront"), new Hotel("Northwind Inn", 139, 4.0, "Capitol Hill"), new Hotel("Relecloud Hotel", 99, 3.8, "University District"), -}; +]; [Description("Get available hotels in Seattle for the specified dates. This simulates a call to a hotel availability API.")] string GetAvailableHotels( @@ -54,21 +54,21 @@ string GetAvailableHotels( return "Error: Check-out date must be after check-in date."; } - var nights = (checkOut - checkIn).Days; - var availableHotels = seattleHotels.Where(h => h.PricePerNight <= maxPrice).ToList(); + int nights = (checkOut - checkIn).Days; + List availableHotels = seattleHotels.Where(h => h.PricePerNight <= maxPrice).ToList(); if (availableHotels.Count == 0) { return $"No hotels found in Seattle within your budget of ${maxPrice}/night."; } - var result = new StringBuilder(); + StringBuilder result = new(); result.AppendLine($"Available hotels in Seattle from {checkInDate} to {checkOutDate} ({nights} nights):"); result.AppendLine(); - foreach (var hotel in availableHotels) + foreach (Hotel hotel in availableHotels) { - var totalCost = hotel.PricePerNight * nights; + int totalCost = hotel.PricePerNight * nights; result.AppendLine($"**{hotel.Name}**"); result.AppendLine($" Location: {hotel.Location}"); result.AppendLine($" Rating: {hotel.Rating}/5"); @@ -84,7 +84,10 @@ string GetAvailableHotels( } } -var credential = new AzureCliCredential(); +// WARNING: DefaultAzureCredential is convenient for development but requires careful consideration in production. +// In production, consider using a specific credential (e.g., ManagedIdentityCredential) to avoid +// latency issues, unintended credential probing, and potential security risks from fallback mechanisms. +DefaultAzureCredential credential = new(); AIProjectClient projectClient = new(new Uri(endpoint), credential); ClientConnection connection = projectClient.GetConnection(typeof(AzureOpenAIClient).FullName!); @@ -96,14 +99,14 @@ if (!connection.TryGetLocatorAsUri(out Uri? openAiEndpoint) || openAiEndpoint is openAiEndpoint = new Uri($"https://{openAiEndpoint.Host}"); Console.WriteLine($"OpenAI Endpoint: {openAiEndpoint}"); -var chatClient = new AzureOpenAIClient(openAiEndpoint, credential) +IChatClient chatClient = new AzureOpenAIClient(openAiEndpoint, credential) .GetChatClient(deploymentName) .AsIChatClient() .AsBuilder() .UseOpenTelemetry(sourceName: "Agents", configure: cfg => cfg.EnableSensitiveData = false) .Build(); -var agent = new ChatClientAgent(chatClient, +AIAgent agent = chatClient.AsAIAgent( name: "SeattleHotelAgent", instructions: """ You are a helpful travel assistant specializing in finding hotels in Seattle, Washington. diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTextSearchRag/AgentWithTextSearchRag.csproj b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTextSearchRag/AgentWithTextSearchRag.csproj index 03ffaf1824..32e00f832b 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTextSearchRag/AgentWithTextSearchRag.csproj +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTextSearchRag/AgentWithTextSearchRag.csproj @@ -35,11 +35,10 @@ - + - - + diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTextSearchRag/Program.cs b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTextSearchRag/Program.cs index ae94a52f67..bb28fc0d9b 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTextSearchRag/Program.cs +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTextSearchRag/Program.cs @@ -11,8 +11,8 @@ using Microsoft.Agents.AI; using Microsoft.Extensions.AI; using OpenAI.Chat; -var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); -var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +string endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); +string deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; TextSearchProviderOptions textSearchOptions = new() { @@ -28,13 +28,13 @@ AIAgent agent = new AzureOpenAIClient( new Uri(endpoint), new DefaultAzureCredential()) .GetChatClient(deploymentName) - .CreateAIAgent(new ChatClientAgentOptions + .AsAIAgent(new ChatClientAgentOptions { ChatOptions = new ChatOptions { Instructions = "You are a helpful support specialist for Contoso Outdoors. Answer questions using the provided context and cite the source document when available.", }, - AIContextProviderFactory = ctx => new TextSearchProvider(MockSearchAsync, ctx.SerializedState, ctx.JsonSerializerOptions, textSearchOptions) + AIContextProviders = [new TextSearchProvider(MockSearchAsync, textSearchOptions)] }); await agent.RunAIAgentAsync(); diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/AgentWithTools.csproj b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/AgentWithTools.csproj index ce8a739757..959cca1db5 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/AgentWithTools.csproj +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/AgentWithTools.csproj @@ -35,11 +35,10 @@ - + - - + diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/Program.cs b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/Program.cs index 3bb68d6e31..f564a0d8d3 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/Program.cs +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/Program.cs @@ -9,13 +9,16 @@ using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Extensions.AI; -var openAiEndpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); -var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; -var toolConnectionId = Environment.GetEnvironmentVariable("MCP_TOOL_CONNECTION_ID") ?? throw new InvalidOperationException("MCP_TOOL_CONNECTION_ID is not set."); +string openAiEndpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); +string deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +string toolConnectionId = Environment.GetEnvironmentVariable("MCP_TOOL_CONNECTION_ID") ?? throw new InvalidOperationException("MCP_TOOL_CONNECTION_ID is not set."); -var credential = new AzureCliCredential(); +// WARNING: DefaultAzureCredential is convenient for development but requires careful consideration in production. +// In production, consider using a specific credential (e.g., ManagedIdentityCredential) to avoid +// latency issues, unintended credential probing, and potential security risks from fallback mechanisms. +DefaultAzureCredential credential = new(); -var chatClient = new AzureOpenAIClient(new Uri(openAiEndpoint), credential) +IChatClient chatClient = new AzureOpenAIClient(new Uri(openAiEndpoint), credential) .GetChatClient(deploymentName) .AsIChatClient() .AsBuilder() @@ -23,7 +26,7 @@ var chatClient = new AzureOpenAIClient(new Uri(openAiEndpoint), credential) .UseOpenTelemetry(sourceName: "Agents", configure: (cfg) => cfg.EnableSensitiveData = true) .Build(); -var agent = new ChatClientAgent(chatClient, +AIAgent agent = chatClient.AsAIAgent( name: "AgentWithTools", instructions: @"You are a helpful assistant with access to tools for fetching Microsoft documentation. diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/README.md b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/README.md index 5a80ecda9f..55333f9940 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/README.md +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentWithTools/README.md @@ -6,7 +6,7 @@ Key features: - Configuring Foundry tools using `UseFoundryTools` with MCP and code interpreter - Connecting to an external MCP tool via a Foundry project connection -- Using `AzureCliCredential` for Azure authentication +- Using `DefaultAzureCredential` for Azure authentication - OpenTelemetry instrumentation for both the chat client and agent > For common prerequisites and setup instructions, see the [Hosted Agent Samples README](../README.md). @@ -36,7 +36,7 @@ $env:MCP_TOOL_CONNECTION_ID="SampleMCPTool" ## How It Works -1. An `AzureOpenAIClient` is created with `AzureCliCredential` and used to get a chat client +1. An `AzureOpenAIClient` is created with `DefaultAzureCredential` and used to get a chat client 2. The chat client is wrapped with `UseFoundryTools` which registers two Foundry tool types: - **MCP connection**: Connects to an external MCP server (Microsoft Learn) via the project connection name, providing documentation fetch and search capabilities - **Code interpreter**: Allows the agent to execute code snippets when needed diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/AgentsInWorkflows.csproj b/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/AgentsInWorkflows.csproj index a434e07d33..56a55a428d 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/AgentsInWorkflows.csproj +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/AgentsInWorkflows.csproj @@ -1,4 +1,4 @@ - + Exe @@ -35,11 +35,10 @@ - + - - + diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/Program.cs b/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/Program.cs index bd37a8311f..f5ea72e7f7 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/Program.cs +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/Program.cs @@ -12,8 +12,8 @@ using Microsoft.Agents.AI.Workflows; using Microsoft.Extensions.AI; // Set up the Azure OpenAI client -var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); -var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +string endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); +string deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; // WARNING: DefaultAzureCredential is convenient for development but requires careful consideration in production. // In production, consider using a specific credential (e.g., ManagedIdentityCredential) to avoid @@ -32,9 +32,9 @@ AIAgent agent = new WorkflowBuilder(frenchAgent) .AddEdge(frenchAgent, spanishAgent) .AddEdge(spanishAgent, englishAgent) .Build() - .AsAgent(); + .AsAIAgent(); await agent.RunAIAgentAsync(); -static ChatClientAgent GetTranslationAgent(string targetLanguage, IChatClient chatClient) => - new(chatClient, $"You are a translation assistant that translates the provided text to {targetLanguage}."); +static AIAgent GetTranslationAgent(string targetLanguage, IChatClient chatClient) => + chatClient.AsAIAgent($"You are a translation assistant that translates the provided text to {targetLanguage}."); diff --git a/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/README.md b/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/README.md index 72019bbf22..0f2f188f1b 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/README.md +++ b/dotnet/samples/05-end-to-end/HostedAgents/AgentsInWorkflows/README.md @@ -19,7 +19,7 @@ Before you begin, ensure you have the following prerequisites: - Azure OpenAI service endpoint and deployment configured - Azure CLI installed and authenticated (for Azure credential authentication) -**Note**: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Azure OpenAI resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively). +**Note**: This demo uses `DefaultAzureCredential` for authentication, which probes multiple sources automatically. For local development, make sure you're logged in with `az login` and have access to the Azure OpenAI resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively). Set the following environment variables: diff --git a/dotnet/samples/05-end-to-end/HostedAgents/README.md b/dotnet/samples/05-end-to-end/HostedAgents/README.md index f2d32f3c4d..a36a9bddd1 100644 --- a/dotnet/samples/05-end-to-end/HostedAgents/README.md +++ b/dotnet/samples/05-end-to-end/HostedAgents/README.md @@ -25,7 +25,7 @@ Before running any sample, ensure you have: ### Authenticate with Azure CLI -All samples use `AzureCliCredential` for authentication. Make sure you're logged in: +All samples use `DefaultAzureCredential` for authentication, which automatically probes multiple credential sources (environment variables, managed identity, Azure CLI, etc.). For local development, the simplest approach is to authenticate via Azure CLI: ```powershell az login From 394e9c1692c925de8258ec75f3df37226f03d40c Mon Sep 17 00:00:00 2001 From: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> Date: Fri, 6 Mar 2026 17:29:53 +0000 Subject: [PATCH 09/44] .NET: Improve skill name validation: reject consecutive hyphens and enforce directory name match (#4526) * improve skill validation * address pr review comments --- .../Skills/FileAgentSkillLoader.cs | 27 +++++++++++++++--- .../AgentSkills/FileAgentSkillLoaderTests.cs | 28 ++++++++++++++++--- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillLoader.cs b/dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillLoader.cs index 71a7124281..18fa87999a 100644 --- a/dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillLoader.cs +++ b/dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillLoader.cs @@ -40,9 +40,10 @@ internal sealed partial class FileAgentSkillLoader // "description: \"A skill\"" → (description, A skill, _) private static readonly Regex s_yamlKeyValueRegex = new(@"^\s*(\w+)\s*:\s*(?:[""'](.+?)[""']|(.+?))\s*$", RegexOptions.Multiline | RegexOptions.Compiled, TimeSpan.FromSeconds(5)); - // Validates skill names: lowercase letters, numbers, and hyphens only; must not start or end with a hyphen. - // Examples: "my-skill" ✓, "skill123" ✓, "-bad" ✗, "bad-" ✗, "Bad" ✗ - private static readonly Regex s_validNameRegex = new(@"^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$", RegexOptions.Compiled); + // Validates skill names: lowercase letters, numbers, and hyphens only; + // must not start or end with a hyphen; must not contain consecutive hyphens. + // Examples: "my-skill" ✓, "skill123" ✓, "-bad" ✗, "bad-" ✗, "Bad" ✗, "my--skill" ✗ + private static readonly Regex s_validNameRegex = new("^[a-z0-9]([a-z0-9]*-[a-z0-9])*[a-z0-9]*$", RegexOptions.Compiled); private readonly ILogger _logger; private readonly HashSet _allowedResourceExtensions; @@ -244,7 +245,22 @@ internal sealed partial class FileAgentSkillLoader if (name.Length > MaxNameLength || !s_validNameRegex.IsMatch(name)) { - LogInvalidFieldValue(this._logger, skillFilePath, "name", $"Must be {MaxNameLength} characters or fewer, using only lowercase letters, numbers, and hyphens, and must not start or end with a hyphen."); + LogInvalidFieldValue(this._logger, skillFilePath, "name", $"Must be {MaxNameLength} characters or fewer, using only lowercase letters, numbers, and hyphens, and must not start or end with a hyphen or contain consecutive hyphens."); + return false; + } + + // skillFilePath is e.g. "/skills/my-skill/SKILL.md". + // GetDirectoryName strips the filename → "/skills/my-skill". + // GetFileName then extracts the last segment → "my-skill". + // This gives us the skill's parent directory name to validate against the frontmatter name. + string directoryName = Path.GetFileName(Path.GetDirectoryName(skillFilePath)) ?? string.Empty; + if (!string.Equals(name, directoryName, StringComparison.Ordinal)) + { + if (this._logger.IsEnabled(LogLevel.Error)) + { + LogNameDirectoryMismatch(this._logger, SanitizePathForLog(skillFilePath), name, SanitizePathForLog(directoryName)); + } + return false; } @@ -457,6 +473,9 @@ internal sealed partial class FileAgentSkillLoader [LoggerMessage(LogLevel.Error, "SKILL.md at '{SkillFilePath}' has an invalid '{FieldName}' value: {Reason}")] private static partial void LogInvalidFieldValue(ILogger logger, string skillFilePath, string fieldName, string reason); + [LoggerMessage(LogLevel.Error, "SKILL.md at '{SkillFilePath}': skill name '{SkillName}' does not match parent directory name '{DirectoryName}'")] + private static partial void LogNameDirectoryMismatch(ILogger logger, string skillFilePath, string skillName, string directoryName); + [LoggerMessage(LogLevel.Warning, "Skipping resource in skill '{SkillName}': '{ResourcePath}' references a path outside the skill directory")] private static partial void LogResourcePathTraversal(ILogger logger, string skillName, string resourcePath); diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/FileAgentSkillLoaderTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/FileAgentSkillLoaderTests.cs index 0c79aabc99..6134b04feb 100644 --- a/dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/FileAgentSkillLoaderTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentSkills/FileAgentSkillLoaderTests.cs @@ -122,10 +122,11 @@ public sealed class FileAgentSkillLoaderTests : IDisposable [InlineData("-leading-hyphen")] [InlineData("trailing-hyphen-")] [InlineData("has spaces")] + [InlineData("consecutive--hyphens")] public void DiscoverAndLoadSkills_InvalidName_ExcludesSkill(string invalidName) { // Arrange - string skillDir = Path.Combine(this._testRoot, "invalid-name-test"); + string skillDir = Path.Combine(this._testRoot, invalidName); if (Directory.Exists(skillDir)) { Directory.Delete(skillDir, recursive: true); @@ -147,15 +148,19 @@ public sealed class FileAgentSkillLoaderTests : IDisposable public void DiscoverAndLoadSkills_DuplicateNames_KeepsFirstOnly() { // Arrange - string dir1 = Path.Combine(this._testRoot, "skill-a"); - string dir2 = Path.Combine(this._testRoot, "skill-b"); + string dir1 = Path.Combine(this._testRoot, "dupe"); + string dir2 = Path.Combine(this._testRoot, "subdir"); Directory.CreateDirectory(dir1); Directory.CreateDirectory(dir2); + + // Create a nested duplicate: subdir/dupe/SKILL.md + string nestedDir = Path.Combine(dir2, "dupe"); + Directory.CreateDirectory(nestedDir); File.WriteAllText( Path.Combine(dir1, "SKILL.md"), "---\nname: dupe\ndescription: First\n---\nFirst body."); File.WriteAllText( - Path.Combine(dir2, "SKILL.md"), + Path.Combine(nestedDir, "SKILL.md"), "---\nname: dupe\ndescription: Second\n---\nSecond body."); // Act @@ -168,6 +173,21 @@ public sealed class FileAgentSkillLoaderTests : IDisposable Assert.True(desc == "First" || desc == "Second", $"Unexpected description: {desc}"); } + [Fact] + public void DiscoverAndLoadSkills_NameMismatchesDirectory_ExcludesSkill() + { + // Arrange — directory name differs from the frontmatter name + _ = this.CreateSkillDirectoryWithRawContent( + "wrong-dir-name", + "---\nname: actual-skill-name\ndescription: A skill\n---\nBody."); + + // Act + var skills = this._loader.DiscoverAndLoadSkills(new[] { this._testRoot }); + + // Assert + Assert.Empty(skills); + } + [Fact] public void DiscoverAndLoadSkills_FilesWithMatchingExtensions_DiscoveredAsResources() { From c8750cbe923abaf1d8dfb7e640f9aec427704de6 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Fri, 6 Mar 2026 18:03:43 +0000 Subject: [PATCH 10/44] .NET: Create a sample to show bounded chat history with overflow into chat history memory (#4136) * Create a sample to show bounded chat history with overflow into chat history memory * Address PR comments. * Address PR comment and fix bug --- dotnet/agent-framework-dotnet.slnx | 1 + ...ithMemory_Step05_BoundedChatHistory.csproj | 22 +++ .../BoundedChatHistoryProvider.cs | 133 ++++++++++++++++++ .../Program.cs | 79 +++++++++++ .../README.md | 40 ++++++ .../TruncatingChatReducer.cs | 65 +++++++++ .../02-agents/AgentWithMemory/README.md | 1 + 7 files changed, 341 insertions(+) create mode 100644 dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/AgentWithMemory_Step05_BoundedChatHistory.csproj create mode 100644 dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/BoundedChatHistoryProvider.cs create mode 100644 dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/Program.cs create mode 100644 dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/README.md create mode 100644 dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/TruncatingChatReducer.cs diff --git a/dotnet/agent-framework-dotnet.slnx b/dotnet/agent-framework-dotnet.slnx index 86f87b40e1..0e1f678003 100644 --- a/dotnet/agent-framework-dotnet.slnx +++ b/dotnet/agent-framework-dotnet.slnx @@ -103,6 +103,7 @@ + diff --git a/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/AgentWithMemory_Step05_BoundedChatHistory.csproj b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/AgentWithMemory_Step05_BoundedChatHistory.csproj new file mode 100644 index 0000000000..860089b621 --- /dev/null +++ b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/AgentWithMemory_Step05_BoundedChatHistory.csproj @@ -0,0 +1,22 @@ + + + + Exe + net10.0 + + enable + enable + + + + + + + + + + + + + + diff --git a/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/BoundedChatHistoryProvider.cs b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/BoundedChatHistoryProvider.cs new file mode 100644 index 0000000000..b4d6ca3072 --- /dev/null +++ b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/BoundedChatHistoryProvider.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft. All rights reserved. + +using Microsoft.Agents.AI; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.VectorData; + +namespace SampleApp; + +/// +/// A that keeps a bounded window of recent messages in session state +/// (via ) and overflows older messages to a vector store +/// (via ). When providing chat history, it searches the vector +/// store for relevant older messages and prepends them as a memory context message. +/// +/// +/// Only non-system messages are counted towards the session state limit and overflow mechanism. System messages are always retained in session state and are not included in the vector store. +/// Function calls and function results are also dropped when truncation happens, both from in-memory state, and they are also not persisted to the vector store. +/// +internal sealed class BoundedChatHistoryProvider : ChatHistoryProvider, IDisposable +{ + private readonly InMemoryChatHistoryProvider _chatHistoryProvider; + private readonly ChatHistoryMemoryProvider _memoryProvider; + private readonly TruncatingChatReducer _reducer; + private readonly string _contextPrompt; + private IReadOnlyList? _stateKeys; + + /// + /// Initializes a new instance of the class. + /// + /// The maximum number of non-system messages to keep in session state before overflowing to the vector store. + /// The vector store to use for storing and retrieving overflow chat history. + /// The name of the collection for storing overflow chat history in the vector store. + /// The number of dimensions to use for the chat history vector store embeddings. + /// A delegate that initializes the memory provider state, providing the storage and search scopes. + /// Optional prompt to prefix memory search results. Defaults to a standard memory context prompt. + public BoundedChatHistoryProvider( + int maxSessionMessages, + VectorStore vectorStore, + string collectionName, + int vectorDimensions, + Func stateInitializer, + string? contextPrompt = null) + { + if (maxSessionMessages < 0) + { + throw new ArgumentOutOfRangeException(nameof(maxSessionMessages), "maxSessionMessages must be non-negative."); + } + + this._reducer = new TruncatingChatReducer(maxSessionMessages); + this._chatHistoryProvider = new InMemoryChatHistoryProvider(new InMemoryChatHistoryProviderOptions + { + ChatReducer = this._reducer, + ReducerTriggerEvent = InMemoryChatHistoryProviderOptions.ChatReducerTriggerEvent.AfterMessageAdded, + StorageInputRequestMessageFilter = msgs => msgs, + }); + this._memoryProvider = new ChatHistoryMemoryProvider( + vectorStore, + collectionName, + vectorDimensions, + stateInitializer, + options: new ChatHistoryMemoryProviderOptions + { + SearchInputMessageFilter = msgs => msgs, + StorageInputRequestMessageFilter = msgs => msgs, + }); + this._contextPrompt = contextPrompt + ?? "The following are memories from earlier in this conversation. Use them to inform your responses:"; + } + + /// + public override IReadOnlyList StateKeys => this._stateKeys ??= this._chatHistoryProvider.StateKeys.Concat(this._memoryProvider.StateKeys).ToArray(); + + /// + protected override async ValueTask> ProvideChatHistoryAsync( + InvokingContext context, + CancellationToken cancellationToken = default) + { + // Delegate to the inner provider's full lifecycle (retrieve, filter, stamp, merge with request messages). + var chatHistoryProviderInputContext = new InvokingContext(context.Agent, context.Session, []); + var allMessages = await this._chatHistoryProvider.InvokingAsync(chatHistoryProviderInputContext, cancellationToken).ConfigureAwait(false); + + // Search the vector store for relevant older messages. + var aiContext = new AIContext { Messages = context.RequestMessages.ToList() }; + var invokingContext = new AIContextProvider.InvokingContext( + context.Agent, context.Session, aiContext); + + var result = await this._memoryProvider.InvokingAsync(invokingContext, cancellationToken).ConfigureAwait(false); + + // Extract only the messages added by the memory provider (stamped with AIContextProvider source type). + var memoryMessages = result.Messages? + .Where(m => m.GetAgentRequestMessageSourceType() == AgentRequestMessageSourceType.AIContextProvider) + .ToList(); + + if (memoryMessages is { Count: > 0 }) + { + var memoryText = string.Join("\n", memoryMessages.Select(m => m.Text).Where(t => !string.IsNullOrWhiteSpace(t))); + + if (!string.IsNullOrWhiteSpace(memoryText)) + { + var contextMessage = new ChatMessage(ChatRole.User, $"{this._contextPrompt}\n{memoryText}"); + return new[] { contextMessage }.Concat(allMessages); + } + } + + return allMessages; + } + + /// + protected override async ValueTask StoreChatHistoryAsync( + InvokedContext context, + CancellationToken cancellationToken = default) + { + // Delegate storage to the in-memory provider. Its TruncatingChatReducer (AfterMessageAdded trigger) + // will automatically truncate to the configured maximum and expose any removed messages. + var innerContext = new InvokedContext( + context.Agent, context.Session, context.RequestMessages, context.ResponseMessages!); + await this._chatHistoryProvider.InvokedAsync(innerContext, cancellationToken).ConfigureAwait(false); + + // Archive any messages that the reducer removed to the vector store. + if (this._reducer.RemovedMessages is { Count: > 0 }) + { + var overflowContext = new AIContextProvider.InvokedContext( + context.Agent, context.Session, this._reducer.RemovedMessages, []); + await this._memoryProvider.InvokedAsync(overflowContext, cancellationToken).ConfigureAwait(false); + } + } + + /// + public void Dispose() + { + this._memoryProvider.Dispose(); + } +} diff --git a/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/Program.cs b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/Program.cs new file mode 100644 index 0000000000..ab3a0376eb --- /dev/null +++ b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/Program.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft. All rights reserved. + +// This sample shows how to create a bounded chat history provider that keeps a configurable number of +// recent messages in session state and automatically overflows older messages to a vector store. +// When the agent is invoked, it searches the vector store for relevant older messages and +// prepends them as a "memory" context message before the recent session history. + +using Azure.AI.OpenAI; +using Azure.Identity; +using Microsoft.Agents.AI; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.VectorData; +using Microsoft.SemanticKernel.Connectors.InMemory; +using OpenAI.Chat; +using SampleApp; + +var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); +var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +var embeddingDeploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME") ?? "text-embedding-3-large"; + +// WARNING: DefaultAzureCredential is convenient for development but requires careful consideration in production. +// In production, consider using a specific credential (e.g., ManagedIdentityCredential) to avoid +// latency issues, unintended credential probing, and potential security risks from fallback mechanisms. +var credential = new DefaultAzureCredential(); + +// Create a vector store to store overflow chat messages. +// For demonstration purposes, we are using an in-memory vector store. +// Replace this with a persistent vector store implementation for production scenarios. +VectorStore vectorStore = new InMemoryVectorStore(new InMemoryVectorStoreOptions() +{ + EmbeddingGenerator = new AzureOpenAIClient(new Uri(endpoint), credential) + .GetEmbeddingClient(embeddingDeploymentName) + .AsIEmbeddingGenerator() +}); + +var sessionId = Guid.NewGuid().ToString(); + +// Create the BoundedChatHistoryProvider with a maximum of 4 non-system messages in session state. +// It internally creates an InMemoryChatHistoryProvider with a TruncatingChatReducer and a +// ChatHistoryMemoryProvider with the correct configuration to ensure overflow messages are +// automatically archived to the vector store and recalled via semantic search. +var boundedProvider = new BoundedChatHistoryProvider( + maxSessionMessages: 4, + vectorStore, + collectionName: "chathistory-overflow", + vectorDimensions: 3072, + session => new ChatHistoryMemoryProvider.State( + storageScope: new() { UserId = "UID1", SessionId = sessionId }, + searchScope: new() { UserId = "UID1" })); + +// Create the agent with the bounded chat history provider. +AIAgent agent = new AzureOpenAIClient(new Uri(endpoint), credential) + .GetChatClient(deploymentName) + .AsAIAgent(new ChatClientAgentOptions + { + ChatOptions = new() { Instructions = "You are a helpful assistant. Answer questions concisely." }, + Name = "Assistant", + ChatHistoryProvider = boundedProvider, + }); + +// Start a conversation. The first several exchanges will fill up the session state window. +AgentSession session = await agent.CreateSessionAsync(); + +Console.WriteLine("--- Filling the session window (4 messages max) ---\n"); + +Console.WriteLine(await agent.RunAsync("My favorite color is blue.", session)); +Console.WriteLine(await agent.RunAsync("I have a dog named Max.", session)); + +// At this point the session state holds 4 messages (2 user + 2 assistant). +// The next exchange will push the oldest messages into the vector store. +Console.WriteLine("\n--- Next exchange will trigger overflow to vector store ---\n"); + +Console.WriteLine(await agent.RunAsync("What is the capital of France?", session)); + +// The oldest messages about favorite color have now been archived to the vector store. +// Ask the agent something that requires recalling the overflowed information. +Console.WriteLine("\n--- Asking about overflowed information (should recall from vector store) ---\n"); + +Console.WriteLine(await agent.RunAsync("What is my favorite color?", session)); diff --git a/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/README.md b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/README.md new file mode 100644 index 0000000000..c1e35f5a88 --- /dev/null +++ b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/README.md @@ -0,0 +1,40 @@ +# Bounded Chat History with Vector Store Overflow + +This sample demonstrates how to create a custom `ChatHistoryProvider` that keeps a bounded window of recent messages in session state and automatically overflows older messages to a vector store. When the agent is invoked, it searches the vector store for relevant older messages and prepends them as memory context. + +## Concepts + +- **`TruncatingChatReducer`**: A custom `IChatReducer` that keeps the most recent N messages and exposes removed messages via a `RemovedMessages` property. +- **`BoundedChatHistoryProvider`**: A custom `ChatHistoryProvider` that composes: + - `InMemoryChatHistoryProvider` for fast session-state storage (bounded by the reducer) + - `ChatHistoryMemoryProvider` for vector-store overflow and semantic search of older messages + +## Prerequisites + +- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) +- An Azure OpenAI resource with: + - A chat deployment (e.g., `gpt-4o-mini`) + - An embedding deployment (e.g., `text-embedding-3-large`) + +## Configuration + +Set the following environment variables: + +| Variable | Description | Default | +|---|---|---| +| `AZURE_OPENAI_ENDPOINT` | Your Azure OpenAI endpoint URL | *(required)* | +| `AZURE_OPENAI_DEPLOYMENT_NAME` | Chat model deployment name | `gpt-4o-mini` | +| `AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME` | Embedding model deployment name | `text-embedding-3-large` | + +## Running the Sample + +```bash +dotnet run +``` + +## How it Works + +1. The agent starts a conversation with a bounded session window of 4 non-system, non-function messages (i.e., user/assistant turns). System messages are always preserved, and function call/result messages are truncated and not preserved. +2. As messages accumulate beyond the limit, the `TruncatingChatReducer` removes the oldest messages. +3. The `BoundedChatHistoryProvider` detects the removed messages and stores them in a vector store via `ChatHistoryMemoryProvider`. +4. On subsequent invocations, the provider searches the vector store for relevant older messages and prepends them as memory context, allowing the agent to recall information from earlier in the conversation. diff --git a/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/TruncatingChatReducer.cs b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/TruncatingChatReducer.cs new file mode 100644 index 0000000000..b32df40dd7 --- /dev/null +++ b/dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step05_BoundedChatHistory/TruncatingChatReducer.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft. All rights reserved. + +using Microsoft.Extensions.AI; + +namespace SampleApp; + +/// +/// A truncating chat reducer that keeps the most recent messages up to a configured maximum, +/// preserving any leading system message. Removed messages are exposed via +/// so that a caller can archive them (e.g. to a vector store). +/// +internal sealed class TruncatingChatReducer : IChatReducer +{ + private readonly int _maxMessages; + + /// + /// Initializes a new instance of the class. + /// + /// The maximum number of non-system messages to retain. + public TruncatingChatReducer(int maxMessages) + { + this._maxMessages = maxMessages > 0 ? maxMessages : throw new ArgumentOutOfRangeException(nameof(maxMessages)); + } + + /// + /// Gets the messages that were removed during the most recent call to . + /// + public IReadOnlyList RemovedMessages { get; private set; } = []; + + /// + public Task> ReduceAsync(IEnumerable messages, CancellationToken cancellationToken) + { + _ = messages ?? throw new ArgumentNullException(nameof(messages)); + + ChatMessage? systemMessage = null; + Queue retained = new(capacity: this._maxMessages); + List removed = []; + + foreach (var message in messages) + { + if (message.Role == ChatRole.System) + { + // Preserve the first system message outside the counting window. + systemMessage ??= message; + } + else if (!message.Contents.Any(c => c is FunctionCallContent or FunctionResultContent)) + { + if (retained.Count >= this._maxMessages) + { + removed.Add(retained.Dequeue()); + } + + retained.Enqueue(message); + } + } + + this.RemovedMessages = removed; + + IEnumerable result = systemMessage is not null + ? new[] { systemMessage }.Concat(retained) + : retained; + + return Task.FromResult(result); + } +} diff --git a/dotnet/samples/02-agents/AgentWithMemory/README.md b/dotnet/samples/02-agents/AgentWithMemory/README.md index 893ba03772..87818c77d6 100644 --- a/dotnet/samples/02-agents/AgentWithMemory/README.md +++ b/dotnet/samples/02-agents/AgentWithMemory/README.md @@ -8,5 +8,6 @@ These samples show how to create an agent with the Agent Framework that uses Mem |[Memory with MemoryStore](./AgentWithMemory_Step02_MemoryUsingMem0/)|This sample demonstrates how to create and run an agent that uses the Mem0 service to extract and retrieve individual memories.| |[Custom Memory Implementation](../../01-get-started/04_memory/)|This sample demonstrates how to create a custom memory component and attach it to an agent.| |[Memory with Azure AI Foundry](./AgentWithMemory_Step04_MemoryUsingFoundry/)|This sample demonstrates how to create and run an agent that uses Azure AI Foundry's managed memory service to extract and retrieve individual memories.| +|[Bounded Chat History with Overflow](./AgentWithMemory_Step05_BoundedChatHistory/)|This sample demonstrates how to create a bounded chat history provider that overflows older messages to a vector store and recalls them as memories.| > **See also**: [Memory Search with Foundry Agents](../FoundryAgents/FoundryAgents_Step22_MemorySearch/) - demonstrates using the built-in Memory Search tool with Azure Foundry Agents. From b98880df32e2739b5551bd3801f0dd08c178ff5b Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 18:57:02 +0000 Subject: [PATCH 11/44] .NET: Update Anthropic to 12.8.0 and Anthropic.Foundry to 0.4.2 (#4475) * Initial plan * Update Anthropic to 12.8.0 and Anthropic.Foundry to 0.4.2 Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com> --- dotnet/Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index 255d8fe94f..81ab56efd3 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -11,8 +11,8 @@ - - + + From 1ca43f96432bd1fcb85542e112f6c5578035b831 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Fri, 6 Mar 2026 19:04:22 +0000 Subject: [PATCH 12/44] .NET: Add security warnings to xml comments for core components (#4527) * Add security warnings to xml comments for core components * Address build errors. * Fix formatting issue * Fix formatting issue * Supress formatting warning * Supress format issue in ChatHistoryMemoryProvider * Fix remarks paragraphs --- .../AIAgent.cs | 34 +++++++++++++++++++ .../AIContextProvider.cs | 22 ++++++++++++ .../AgentSession.cs | 14 ++++++++ .../ChatHistoryProvider.cs | 17 ++++++++++ .../CosmosChatHistoryProvider.cs | 18 ++++++++++ .../Microsoft.Agents.AI.Mem0/Mem0Provider.cs | 22 ++++++++++++ .../ChatClient/ChatClientAgent.cs | 22 ++++++++++++ .../Memory/ChatHistoryMemoryProvider.cs | 18 ++++++++++ .../Microsoft.Agents.AI/OpenTelemetryAgent.cs | 6 ++++ .../Microsoft.Agents.AI/TextSearchProvider.cs | 12 +++++++ 10 files changed, 185 insertions(+) diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs index 6ebdfa7978..3431a4b52b 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgent.cs @@ -20,6 +20,19 @@ namespace Microsoft.Agents.AI; /// serves as the foundational class for implementing AI agents that can participate in conversations /// and process user requests. An agent instance may participate in multiple concurrent conversations, and each conversation /// may involve multiple agents working together. +/// +/// Security considerations: An orchestrates data flow across trust boundaries — +/// messages are sent to external AI services, context providers, chat history stores, and function tools. Agent Framework +/// passes messages through as-is without validation or sanitization. Developers must be aware that: +/// +/// User-supplied messages may contain prompt injection attempts designed to manipulate LLM behavior. +/// LLM responses should be treated as untrusted output — they may contain hallucinations, malicious payloads (e.g., scripts, SQL), +/// or content influenced by indirect prompt injection. Always validate and sanitize LLM output before rendering in HTML, executing as code, +/// or using in database queries. +/// Messages with different roles carry different trust levels: system messages have the highest trust and must be developer-controlled; +/// user, assistant, and tool messages should be treated as untrusted. +/// +/// /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public abstract partial class AIAgent @@ -165,6 +178,11 @@ public abstract partial class AIAgent /// This method enables saving conversation sessions to persistent storage, /// allowing conversations to resume across application restarts or be migrated between /// different agent instances. Use to restore the session. + /// + /// Security consideration: Serialized sessions may contain conversation content, session identifiers, + /// and other potentially sensitive data including PII. Ensure that serialized session data is stored securely with + /// appropriate access controls and encryption at rest. + /// /// public ValueTask SerializeSessionAsync(AgentSession session, JsonSerializerOptions? jsonSerializerOptions = null, CancellationToken cancellationToken = default) => this.SerializeSessionCoreAsync(session, jsonSerializerOptions, cancellationToken); @@ -194,6 +212,12 @@ public abstract partial class AIAgent /// This method enables restoration of conversation sessions from previously saved state, /// allowing conversations to resume across application restarts or be migrated between /// different agent instances. + /// + /// Security consideration: Restoring a session from an untrusted source is equivalent to accepting untrusted input. + /// Serialized sessions may contain conversation content, session identifiers, and potentially sensitive data. A compromised + /// storage backend could alter message roles to escalate trust, or inject adversarial content that influences LLM behavior. + /// Treat serialized session data as sensitive and ensure it is stored and transmitted securely. + /// /// public ValueTask DeserializeSessionAsync(JsonElement serializedState, JsonSerializerOptions? jsonSerializerOptions = null, CancellationToken cancellationToken = default) => this.DeserializeSessionCoreAsync(serializedState, jsonSerializerOptions, cancellationToken); @@ -301,6 +325,11 @@ public abstract partial class AIAgent /// The messages are processed in the order provided and become part of the conversation history. /// The agent's response will also be added to if one is provided. /// + /// + /// Security consideration: Agent Framework does not validate or sanitize message content — it is passed through + /// to the underlying AI service as-is. If input messages include untrusted user content, developers should be aware of prompt injection risks. + /// System-role messages must be developer-controlled and should never contain end-user input. + /// /// public Task RunAsync( IEnumerable messages, @@ -426,6 +455,11 @@ public abstract partial class AIAgent /// Each represents a portion of the complete response, allowing consumers /// to display partial results, implement progressive loading, or provide immediate feedback to users. /// + /// + /// Security consideration: Agent Framework does not validate or sanitize message content — it is passed through + /// to the underlying AI service as-is. If input messages include untrusted user content, developers should be aware of prompt injection risks. + /// System-role messages must be developer-controlled and should never contain end-user input. + /// /// public async IAsyncEnumerable RunStreamingAsync( IEnumerable messages, diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs index 5ccf139363..9c1286c9b9 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs @@ -28,6 +28,14 @@ namespace Microsoft.Agents.AI; /// to provide context, and optionally called at the end of invocation via /// to process results. /// +/// +/// Security considerations: Context providers may inject messages with any role, including system, which +/// has the highest trust level and directly shapes LLM behavior. Developers must ensure that all providers attached to an agent +/// are trusted. Agent Framework does not validate or filter the data returned by providers — it is accepted as-is and merged into +/// the request context. If a provider retrieves data from an external source (e.g., a vector database or memory service), be aware +/// that a compromised data source could introduce adversarial content designed to manipulate LLM behavior via indirect prompt injection. +/// Implementers should validate and sanitize data retrieved from external sources before returning it. +/// /// public abstract class AIContextProvider { @@ -96,6 +104,11 @@ public abstract class AIContextProvider /// Injecting contextual messages from conversation history /// /// + /// + /// Security consideration: Data retrieved from external sources (e.g., vector databases, memory services, or + /// knowledge bases) may contain adversarial content designed to influence LLM behavior via indirect prompt injection. + /// Implementers should validate data integrity and consider the trustworthiness of the data source. + /// /// public ValueTask InvokingAsync(InvokingContext context, CancellationToken cancellationToken = default) => this.InvokingCoreAsync(Throw.IfNull(context), cancellationToken); @@ -195,6 +208,11 @@ public abstract class AIContextProvider /// In contrast with , this method only returns additional context to be merged with the input, /// while is responsible for returning the full merged for the invocation. /// + /// + /// Security consideration: Any messages, tools, or instructions returned by this method will be merged into the + /// AI request context. If data is retrieved from external or untrusted sources, implementers should validate and sanitize it + /// to prevent indirect prompt injection attacks. + /// /// /// Contains the request context including the caller provided messages that will be used by the agent for this invocation. /// The to monitor for cancellation requests. The default is . @@ -299,6 +317,10 @@ public abstract class AIContextProvider /// /// The default implementation of only calls this method if the invocation succeeded. /// + /// + /// Security consideration: Messages being processed/stored may contain PII and sensitive conversation content. + /// Implementers should ensure appropriate encryption at rest and access controls for the storage backend. + /// /// protected virtual ValueTask StoreAIContextAsync(InvokedContext context, CancellationToken cancellationToken = default) => default; diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentSession.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentSession.cs index a154b0a9f5..1960a4ce06 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentSession.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentSession.cs @@ -42,6 +42,15 @@ namespace Microsoft.Agents.AI; /// and the method /// can be used to deserialize the session. /// +/// +/// Security considerations: Serialized sessions may contain conversation content, session identifiers, +/// and other potentially sensitive data including PII. Developers should: +/// +/// Treat serialized session data as sensitive and store it securely with appropriate access controls and encryption at rest. +/// Treat restoring a session from an untrusted source as equivalent to accepting untrusted input. A compromised storage backend +/// could alter message roles to escalate trust, or inject adversarial content that influences LLM behavior. +/// +/// /// /// /// @@ -67,6 +76,11 @@ public abstract class AgentSession /// /// Gets any arbitrary state associated with this session. /// + /// + /// Data stored in the will be included when the session is serialized. + /// Avoid storing secrets, credentials, or highly sensitive data in the state bag without appropriate encryption, + /// as this data may be persisted to external storage. + /// [JsonPropertyName("stateBag")] public AgentSessionStateBag StateBag { get; protected set; } = new(); diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/ChatHistoryProvider.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/ChatHistoryProvider.cs index c7dfb4a233..f4f198df97 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/ChatHistoryProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/ChatHistoryProvider.cs @@ -37,6 +37,14 @@ namespace Microsoft.Agents.AI; /// A is only relevant for scenarios where the underlying AI service that the agent is using /// does not use in-service chat history storage. /// +/// +/// Security considerations: Agent Framework does not validate or filter the messages returned by the provider +/// during load — they are accepted as-is and treated identically to user-supplied messages. Implementers must ensure that only +/// trusted data is returned. If the underlying storage is compromised, adversarial content could influence LLM behavior via +/// indirect prompt injection — for example, injected messages could alter the conversation context or impersonate different roles. +/// Messages stored in chat history may contain PII and sensitive conversation content; implementers should consider encryption +/// at rest and appropriate access controls for the storage backend. +/// /// public abstract class ChatHistoryProvider { @@ -159,6 +167,11 @@ public abstract class ChatHistoryProvider /// Messages are returned in chronological order to maintain proper conversation flow and context for the agent. /// The oldest messages appear first in the collection, followed by more recent messages. /// + /// + /// Security consideration: Messages loaded from storage should be treated with the same caution as user-supplied + /// messages. A compromised storage backend could alter message roles to escalate trust (e.g., changing user messages to + /// system messages) or inject adversarial content that influences LLM behavior. + /// /// /// Contains the request context including the caller provided messages that will be used by the agent for this invocation. /// The to monitor for cancellation requests. The default is . @@ -273,6 +286,10 @@ public abstract class ChatHistoryProvider /// /// The default implementation of only calls this method if the invocation succeeded. /// + /// + /// Security consideration: Messages being stored may contain PII and sensitive conversation content. + /// Implementers should ensure appropriate encryption at rest and access controls for the storage backend. + /// /// protected virtual ValueTask StoreChatHistoryAsync(InvokedContext context, CancellationToken cancellationToken = default) => default; diff --git a/dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosChatHistoryProvider.cs b/dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosChatHistoryProvider.cs index c9238889c9..a8096b89c3 100644 --- a/dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosChatHistoryProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosChatHistoryProvider.cs @@ -17,6 +17,24 @@ namespace Microsoft.Agents.AI; /// /// Provides a Cosmos DB implementation of the abstract class. /// +/// +/// +/// Security considerations: +/// +/// PII and sensitive data: Chat history stored in Cosmos DB may contain PII, sensitive conversation +/// content, and system instructions. Ensure the Cosmos DB account is configured with appropriate access controls, encryption at rest, +/// and network security (e.g., private endpoints, virtual network rules). The property can be used to +/// automatically expire messages and limit data retention. +/// Compromised store risks: Agent Framework does not validate or filter messages loaded from the +/// store — they are accepted as-is. If the Cosmos DB store is compromised, adversarial content could be injected into the conversation +/// context, potentially influencing LLM behavior via indirect prompt injection. Altered message roles (e.g., changing user to +/// system) could escalate trust levels. +/// Authentication: Agent Framework does not manage authentication or encryption for the Cosmos DB +/// connection — these are the responsibility of the configuration. Use managed identity +/// or token-based authentication where possible, and avoid embedding connection strings with keys in source code. +/// +/// +/// [RequiresUnreferencedCode("The CosmosChatHistoryProvider uses JSON serialization which is incompatible with trimming.")] [RequiresDynamicCode("The CosmosChatHistoryProvider uses JSON serialization which is incompatible with NativeAOT.")] public sealed class CosmosChatHistoryProvider : ChatHistoryProvider, IDisposable diff --git a/dotnet/src/Microsoft.Agents.AI.Mem0/Mem0Provider.cs b/dotnet/src/Microsoft.Agents.AI.Mem0/Mem0Provider.cs index 678905e395..d7c54e2114 100644 --- a/dotnet/src/Microsoft.Agents.AI.Mem0/Mem0Provider.cs +++ b/dotnet/src/Microsoft.Agents.AI.Mem0/Mem0Provider.cs @@ -13,16 +13,38 @@ using Microsoft.Shared.Diagnostics; namespace Microsoft.Agents.AI.Mem0; +#pragma warning disable IDE0001 // Simplify Names - Microsoft.Extensions.Logging.LogLevel.Trace doesn't get found in net472 when removing the namespace. /// /// Provides a Mem0 backed that persists conversation messages as memories /// and retrieves related memories to augment the agent invocation context. /// /// +/// /// The provider stores user, assistant and system messages as Mem0 memories and retrieves relevant memories /// for new invocations using a semantic search endpoint. Retrieved memories are injected as user messages /// to the model, prefixed by a configurable context prompt. +/// +/// +/// Security considerations: +/// +/// External service trust: This provider communicates with an external Mem0 service over HTTP. +/// Agent Framework does not manage authentication, encryption, or connection details for this service — these are the responsibility +/// of the configuration. Ensure the HTTP client is configured with appropriate authentication +/// and uses HTTPS to protect data in transit. +/// PII and sensitive data: Conversation messages (including user inputs, LLM responses, and system +/// instructions) are sent to the external Mem0 service for storage. These messages may contain PII or sensitive information. +/// Ensure the Mem0 service is configured with appropriate data retention policies and access controls. +/// Indirect prompt injection: Memories retrieved from the Mem0 service are injected into the LLM +/// context as user messages. If the memory store is compromised, adversarial content could influence LLM behavior. The data +/// returned from the service is accepted as-is without validation or sanitization. +/// Trace logging: When is enabled, +/// full memory content (including search queries and results) may be logged. This data may contain PII and should not be enabled +/// in production environments. +/// +/// /// public sealed class Mem0Provider : MessageAIContextProvider +#pragma warning restore IDE0001 // Simplify Names { private const string DefaultContextPrompt = "## Memories\nConsider the following memories when answering user questions:"; diff --git a/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgent.cs b/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgent.cs index e4b772160e..adb6eb9f83 100644 --- a/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgent.cs @@ -17,6 +17,25 @@ namespace Microsoft.Agents.AI; /// /// Provides an that delegates to an implementation. /// +/// +/// +/// Security considerations: The orchestrates data flow across trust boundaries. +/// The underlying AI service is an external endpoint and LLM responses should be treated as untrusted output. Developers should be aware of: +/// +/// Hallucination: LLMs may generate plausible-sounding but factually incorrect information. +/// Do not treat LLM output as authoritative without verification. +/// Indirect prompt injection: Data retrieved by tools, AI context providers, or chat history providers may +/// contain adversarial content designed to influence LLM behavior or exfiltrate data through tool calls. +/// Malicious payloads: LLM output may contain content that is harmful if rendered or executed without +/// sanitization — for example, HTML/JavaScript for cross-site scripting, SQL for injection, or shell commands. +/// Tool invocation: By default, all tools provided to the agent are invoked without user approval. +/// The AI selects which functions to call and with what arguments. Function arguments should be treated as untrusted input. +/// Developers should require explicit approval for tools with side effects, data sensitivity, or irreversibility. +/// +/// Developers should validate and sanitize LLM output before rendering it in HTML, executing it as code, using it in database queries, +/// or passing it to any security-sensitive context. Apply defense-in-depth by combining tool approval requirements with output validation. +/// +/// public sealed partial class ChatClientAgent : AIAgent { private readonly ChatClientAgentOptions? _agentOptions; @@ -44,6 +63,9 @@ public sealed partial class ChatClientAgent : AIAgent /// Optional collection of tools that the agent can invoke during conversations. /// These tools augment any tools that may be provided to the agent via when /// the agent is run. + /// By default, all provided tools are invoked without user approval. The AI selects which functions to call and chooses + /// the arguments — these arguments should be treated as untrusted input. Developers should require explicit approval + /// for tools that have side effects, access sensitive data, or perform irreversible operations. /// /// /// Optional logger factory for creating loggers used by the agent and its components. diff --git a/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs b/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs index 0cc35fe85e..6881f7303f 100644 --- a/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI/Memory/ChatHistoryMemoryProvider.cs @@ -13,6 +13,7 @@ using Microsoft.Shared.Diagnostics; namespace Microsoft.Agents.AI; +#pragma warning disable IDE0001 // Simplify Names - Microsoft.Extensions.Logging.LogLevel.Trace doesn't get found in net472 when removing the namespace. /// /// A context provider that stores all chat history in a vector store and is able to /// retrieve related chat history later to augment the current conversation. @@ -33,8 +34,25 @@ namespace Microsoft.Agents.AI; /// exposes a function tool that the model can invoke to retrieve relevant memories on demand instead of /// injecting them automatically on each invocation. /// +/// +/// Security considerations: +/// +/// Indirect prompt injection: Messages retrieved from the vector store via semantic search +/// are injected into the LLM context. If the vector store is compromised, adversarial content could influence LLM behavior. +/// The data returned from the store is accepted as-is without validation or sanitization. +/// PII and sensitive data: Conversation messages (including user inputs and LLM responses) +/// are stored as vectors in the underlying store. These messages may contain PII or sensitive information. Ensure the vector +/// store is configured with appropriate access controls and encryption at rest. +/// On-demand search tool: When using , +/// the AI model controls when and what to search for. The search query is AI-generated and should be treated as untrusted input +/// by the vector store implementation. +/// Trace logging: When is enabled, +/// full search queries and results may be logged. This data may contain PII. +/// +/// /// public sealed class ChatHistoryMemoryProvider : MessageAIContextProvider, IDisposable +#pragma warning restore IDE0001 // Simplify Names { private const string DefaultContextPrompt = "## Memories\nConsider the following memories when answering user questions:"; private const int DefaultMaxResults = 3; diff --git a/dotnet/src/Microsoft.Agents.AI/OpenTelemetryAgent.cs b/dotnet/src/Microsoft.Agents.AI/OpenTelemetryAgent.cs index 7ec8a53161..fd1c2fd7f5 100644 --- a/dotnet/src/Microsoft.Agents.AI/OpenTelemetryAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI/OpenTelemetryAgent.cs @@ -70,6 +70,12 @@ public sealed class OpenTelemetryAgent : DelegatingAIAgent, IDisposable /// and outputs, such as message content, function call arguments, and function call results. /// The default value can be overridden by setting the OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT /// environment variable to "true". Explicitly setting this property will override the environment variable. + /// + /// Security consideration: When sensitive data capture is enabled, the full text of chat messages — + /// including user inputs, LLM responses, function call arguments, and function results — is emitted as telemetry. + /// This data may contain PII or other sensitive information. Ensure that your telemetry pipeline is configured + /// with appropriate access controls and data retention policies. + /// /// public bool EnableSensitiveData { diff --git a/dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs b/dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs index 11611f0f69..e389b02294 100644 --- a/dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs @@ -31,6 +31,18 @@ namespace Microsoft.Agents.AI; /// to the current request messages when forming the search input. This can improve search relevance by providing /// multi-turn context to the retrieval layer without permanently altering the conversation history. /// +/// +/// Security considerations: Search results retrieved from external sources are injected into the LLM context and may +/// contain adversarial content designed to manipulate LLM behavior via indirect prompt injection. Developers should be aware that: +/// +/// The search query may be constructed from user input or LLM-generated content, both of which are untrusted. +/// Implementers of the search delegate should validate search inputs and apply appropriate access controls to search results. +/// Retrieved documents are formatted and injected as messages in the AI request context. If the external data source +/// is compromised, adversarial content could influence the LLM's responses. +/// When using , the AI model controls +/// when and what to search for — the search query text is AI-generated and should be treated as untrusted input by the search implementation. +/// +/// /// public sealed class TextSearchProvider : MessageAIContextProvider { From d5e240b3755516a82daf7cfb65df1ff313e9e009 Mon Sep 17 00:00:00 2001 From: Evan Mattson <35585003+moonbox3@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:57:51 +0900 Subject: [PATCH 13/44] [BREAKING] Python: Update github-copilot-sdk integration to use ToolInvocation/ToolResult types (#4551) * Update github_copilot package for github-copilot-sdk>=0.1.32 (#4549) - Update requires-python from >=3.10 to >=3.11 - Remove Python 3.10 classifier - Update mypy python_version to 3.11 - Update dependency to github-copilot-sdk>=0.1.32 - Fix ToolResult API: use snake_case kwargs (text_result_for_llm, result_type) instead of camelCase (textResultForLlm, resultType) - Update test assertions to use attribute access on ToolResult - Add ToolResult type assertions to tool handler tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix tests to use ToolInvocation dataclass instead of plain dict (#4549) Update test_github_copilot_agent.py to pass ToolInvocation objects to tool handlers instead of plain dicts, matching the github-copilot-sdk>=0.1.32 API where ToolInvocation is a dataclass with an .arguments attribute. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add regression tests for ToolInvocation contract (#4549) Add tests to lock in the new ToolInvocation-based calling convention: - test_tool_handler_rejects_raw_dict_invocation: verifies passing a raw dict (old calling convention) raises TypeError/AttributeError - test_tool_handler_with_empty_arguments: verifies ToolInvocation with empty arguments works correctly for no-arg tools Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert requires-python to >=3.10 to avoid breaking CI (#4549) The repo CI runs with Python 3.10 (uv sync --all-packages) and all other packages require >=3.10. Raising this package to >=3.11 would break the shared install flow. The SDK dependency version constraint (>=0.1.32) will enforce any Python version requirement from the SDK itself. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix min Python version for github_copilot package to >=3.11 github-copilot-sdk>=0.1.32 requires Python>=3.11, which conflicts with the package's declared >=3.10 minimum, breaking uv sync. * Bump py version for GH workflows to 3.11, exclude GHCP sdk from 3.10 items * Fix uv command * Fixes * Update samples --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/actions/python-setup/action.yml | 18 + .github/workflows/python-code-quality.yml | 8 +- .../workflows/python-integration-tests.yml | 2 +- .github/workflows/python-lab-tests.yml | 1 + .github/workflows/python-merge-tests.yml | 2 +- .github/workflows/python-test-coverage.yml | 2 +- .github/workflows/python-tests.yml | 3 +- python/packages/core/pyproject.toml | 2 +- .../agent_framework_github_copilot/_agent.py | 13 +- python/packages/github_copilot/pyproject.toml | 7 +- .../tests/test_github_copilot_agent.py | 70 +- .../github_copilot_with_file_operations.py | 14 +- .../github_copilot/github_copilot_with_mcp.py | 6 +- ...ithub_copilot_with_multiple_permissions.py | 14 +- .../github_copilot_with_shell.py | 10 +- .../github_copilot/github_copilot_with_url.py | 10 +- python/uv.lock | 971 +----------------- 17 files changed, 169 insertions(+), 984 deletions(-) diff --git a/.github/actions/python-setup/action.yml b/.github/actions/python-setup/action.yml index 7850392a75..e81180fc28 100644 --- a/.github/actions/python-setup/action.yml +++ b/.github/actions/python-setup/action.yml @@ -8,6 +8,10 @@ inputs: os: description: The operating system to set up required: true + exclude-packages: + description: Space-separated list of packages to exclude from uv sync + required: false + default: '' runs: using: "composite" @@ -19,6 +23,20 @@ runs: enable-cache: true cache-suffix: ${{ inputs.os }}-${{ inputs.python-version }} cache-dependency-glob: "**/uv.lock" + - name: Exclude incompatible workspace packages + if: ${{ inputs.exclude-packages != '' }} + shell: bash + run: | + for pkg in ${{ inputs.exclude-packages }}; do + for f in python/packages/*/pyproject.toml; do + if grep -q "name = \"$pkg\"" "$f"; then + pkg_dir=$(dirname "$f" | sed 's|python/||') + echo "Excluding workspace package: $pkg ($pkg_dir)" + sed -i.bak '/\[tool\.uv\.workspace\]/a\exclude = ["'"$pkg_dir"'"]' python/pyproject.toml + sed -i.bak '/'"$pkg"' = { workspace = true }/d' python/pyproject.toml + fi + done + done - name: Install the project shell: bash run: | diff --git a/.github/workflows/python-code-quality.yml b/.github/workflows/python-code-quality.yml index 45d896d309..ada8d23738 100644 --- a/.github/workflows/python-code-quality.yml +++ b/.github/workflows/python-code-quality.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.11"] runs-on: ubuntu-latest continue-on-error: true defaults: @@ -55,7 +55,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.11"] runs-on: ubuntu-latest continue-on-error: true defaults: @@ -84,7 +84,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.11"] runs-on: ubuntu-latest continue-on-error: true defaults: @@ -117,7 +117,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.11"] runs-on: ubuntu-latest continue-on-error: true defaults: diff --git a/.github/workflows/python-integration-tests.yml b/.github/workflows/python-integration-tests.yml index df0e0cdc09..913b4325b4 100644 --- a/.github/workflows/python-integration-tests.yml +++ b/.github/workflows/python-integration-tests.yml @@ -170,7 +170,7 @@ jobs: environment: integration timeout-minutes: 60 env: - UV_PYTHON: "3.10" + UV_PYTHON: "3.11" OPENAI_CHAT_MODEL_ID: ${{ vars.OPENAI__CHATMODELID }} OPENAI_RESPONSES_MODEL_ID: ${{ vars.OPENAI__RESPONSESMODELID }} OPENAI_API_KEY: ${{ secrets.OPENAI__APIKEY }} diff --git a/.github/workflows/python-lab-tests.yml b/.github/workflows/python-lab-tests.yml index f5cb504d04..c8ed926dd4 100644 --- a/.github/workflows/python-lab-tests.yml +++ b/.github/workflows/python-lab-tests.yml @@ -67,6 +67,7 @@ jobs: with: python-version: ${{ matrix.python-version }} os: ${{ runner.os }} + exclude-packages: ${{ matrix.python-version == '3.10' && 'agent-framework-github-copilot' || '' }} env: # Configure a constant location for the uv cache UV_CACHE_DIR: /tmp/.uv-cache diff --git a/.github/workflows/python-merge-tests.yml b/.github/workflows/python-merge-tests.yml index e3fe1623d6..0e070463d4 100644 --- a/.github/workflows/python-merge-tests.yml +++ b/.github/workflows/python-merge-tests.yml @@ -288,7 +288,7 @@ jobs: runs-on: ubuntu-latest environment: integration env: - UV_PYTHON: "3.10" + UV_PYTHON: "3.11" OPENAI_CHAT_MODEL_ID: ${{ vars.OPENAI__CHATMODELID }} OPENAI_RESPONSES_MODEL_ID: ${{ vars.OPENAI__RESPONSESMODELID }} OPENAI_API_KEY: ${{ secrets.OPENAI__APIKEY }} diff --git a/.github/workflows/python-test-coverage.yml b/.github/workflows/python-test-coverage.yml index a9acfba0de..7563504b69 100644 --- a/.github/workflows/python-test-coverage.yml +++ b/.github/workflows/python-test-coverage.yml @@ -20,7 +20,7 @@ jobs: run: working-directory: python env: - UV_PYTHON: "3.10" + UV_PYTHON: "3.11" steps: - uses: actions/checkout@v6 # Save the PR number to a file since the workflow_run event diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 07b9200a46..ba2796a8f5 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -34,12 +34,13 @@ jobs: with: python-version: ${{ matrix.python-version }} os: ${{ runner.os }} + exclude-packages: ${{ matrix.python-version == '3.10' && 'agent-framework-github-copilot' || '' }} env: # Configure a constant location for the uv cache UV_CACHE_DIR: /tmp/.uv-cache # Unit tests - name: Run all tests - run: uv run poe all-tests + run: uv run poe all-tests ${{ matrix.python-version == '3.10' && '--ignore-glob=packages/github_copilot/**' || '' }} working-directory: ./python # Surface failing tests diff --git a/python/packages/core/pyproject.toml b/python/packages/core/pyproject.toml index 9d002453df..a789986898 100644 --- a/python/packages/core/pyproject.toml +++ b/python/packages/core/pyproject.toml @@ -55,7 +55,7 @@ all = [ "agent-framework-devui", "agent-framework-durabletask", "agent-framework-foundry-local", - "agent-framework-github-copilot", + "agent-framework-github-copilot; python_version >= '3.11'", "agent-framework-lab", "agent-framework-mem0", "agent-framework-ollama", diff --git a/python/packages/github_copilot/agent_framework_github_copilot/_agent.py b/python/packages/github_copilot/agent_framework_github_copilot/_agent.py index 1c30af36dc..7fa7d0dce4 100644 --- a/python/packages/github_copilot/agent_framework_github_copilot/_agent.py +++ b/python/packages/github_copilot/agent_framework_github_copilot/_agent.py @@ -26,12 +26,11 @@ from agent_framework._tools import FunctionTool, ToolTypes from agent_framework._types import AgentRunInputs, normalize_tools from agent_framework.exceptions import AgentException from copilot import CopilotClient, CopilotSession -from copilot.generated.session_events import SessionEvent, SessionEventType +from copilot.generated.session_events import PermissionRequest, SessionEvent, SessionEventType from copilot.types import ( CopilotClientOptions, MCPServerConfig, MessageOptions, - PermissionRequest, PermissionRequestResult, ResumeSessionConfig, SessionConfig, @@ -529,7 +528,7 @@ class GitHubCopilotAgent(BaseAgent, Generic[OptionsT]): """Convert an FunctionTool to a Copilot SDK tool.""" async def handler(invocation: ToolInvocation) -> ToolResult: - args = invocation.get("arguments", {}) + args: dict[str, Any] = invocation.arguments or {} try: if ai_func.input_model: args_instance = ai_func.input_model(**args) @@ -537,13 +536,13 @@ class GitHubCopilotAgent(BaseAgent, Generic[OptionsT]): else: result = await ai_func.invoke(arguments=args) return ToolResult( - textResultForLlm=str(result), - resultType="success", + text_result_for_llm=str(result), + result_type="success", ) except Exception as e: return ToolResult( - textResultForLlm=f"Error: {e}", - resultType="failure", + text_result_for_llm=f"Error: {e}", + result_type="failure", error=str(e), ) diff --git a/python/packages/github_copilot/pyproject.toml b/python/packages/github_copilot/pyproject.toml index 47069e34fa..ded7cca079 100644 --- a/python/packages/github_copilot/pyproject.toml +++ b/python/packages/github_copilot/pyproject.toml @@ -3,7 +3,7 @@ name = "agent-framework-github-copilot" description = "GitHub Copilot integration for Microsoft Agent Framework." authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}] readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" version = "1.0.0b260304" license-files = ["LICENSE"] urls.homepage = "https://aka.ms/agent-framework" @@ -15,7 +15,6 @@ classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -24,7 +23,7 @@ classifiers = [ ] dependencies = [ "agent-framework-core>=1.0.0rc3", - "github-copilot-sdk>=0.1.0", + "github-copilot-sdk>=0.1.32", ] [tool.uv] @@ -66,7 +65,7 @@ include = ["agent_framework_github_copilot"] [tool.mypy] plugins = ['pydantic.mypy'] strict = true -python_version = "3.10" +python_version = "3.11" ignore_missing_imports = true disallow_untyped_defs = true no_implicit_optional = true diff --git a/python/packages/github_copilot/tests/test_github_copilot_agent.py b/python/packages/github_copilot/tests/test_github_copilot_agent.py index 1e9281d21e..ed8c089fa3 100644 --- a/python/packages/github_copilot/tests/test_github_copilot_agent.py +++ b/python/packages/github_copilot/tests/test_github_copilot_agent.py @@ -16,6 +16,7 @@ from agent_framework import ( ) from agent_framework.exceptions import AgentException from copilot.generated.session_events import Data, SessionEvent, SessionEventType +from copilot.types import ToolInvocation, ToolResult from agent_framework_github_copilot import GitHubCopilotAgent, GitHubCopilotOptions @@ -745,10 +746,11 @@ class TestGitHubCopilotAgentToolConversion: config = call_args[0][0] copilot_tool = config["tools"][0] - result = await copilot_tool.handler({"arguments": {"arg": "test"}}) + result = await copilot_tool.handler(ToolInvocation(arguments={"arg": "test"})) - assert result["resultType"] == "success" - assert result["textResultForLlm"] == "Result: test" + assert isinstance(result, ToolResult) + assert result.result_type == "success" + assert result.text_result_for_llm == "Result: test" async def test_tool_handler_returns_failure_result_on_error( self, @@ -770,11 +772,61 @@ class TestGitHubCopilotAgentToolConversion: config = call_args[0][0] copilot_tool = config["tools"][0] - result = await copilot_tool.handler({"arguments": {"arg": "test"}}) + result = await copilot_tool.handler(ToolInvocation(arguments={"arg": "test"})) - assert result["resultType"] == "failure" - assert "Something went wrong" in result["textResultForLlm"] - assert "Something went wrong" in result["error"] + assert isinstance(result, ToolResult) + assert result.result_type == "failure" + assert "Something went wrong" in result.text_result_for_llm + assert "Something went wrong" in result.error + + async def test_tool_handler_rejects_raw_dict_invocation( + self, + mock_client: MagicMock, + mock_session: MagicMock, + ) -> None: + """Test that tool handler raises TypeError when called with a raw dict instead of ToolInvocation.""" + + def my_tool(arg: str) -> str: + """A test tool.""" + return f"Result: {arg}" + + agent = GitHubCopilotAgent(client=mock_client, tools=[my_tool]) + await agent.start() + + await agent._get_or_create_session(AgentSession()) # type: ignore + + call_args = mock_client.create_session.call_args + config = call_args[0][0] + copilot_tool = config["tools"][0] + + with pytest.raises((TypeError, AttributeError)): + await copilot_tool.handler({"arguments": {"arg": "test"}}) + + async def test_tool_handler_with_empty_arguments( + self, + mock_client: MagicMock, + mock_session: MagicMock, + ) -> None: + """Test that tool handler handles ToolInvocation with empty arguments.""" + + def no_args_tool() -> str: + """A tool with no arguments.""" + return "no args result" + + agent = GitHubCopilotAgent(client=mock_client, tools=[no_args_tool]) + await agent.start() + + await agent._get_or_create_session(AgentSession()) # type: ignore + + call_args = mock_client.create_session.call_args + config = call_args[0][0] + copilot_tool = config["tools"][0] + + result = await copilot_tool.handler(ToolInvocation(arguments={})) + + assert isinstance(result, ToolResult) + assert result.result_type == "success" + assert result.text_result_for_llm == "no args result" def test_copilot_tool_passthrough( self, @@ -784,7 +836,7 @@ class TestGitHubCopilotAgentToolConversion: from copilot.types import Tool as CopilotTool async def tool_handler(invocation: Any) -> Any: - return {"textResultForLlm": "result", "resultType": "success"} + return {"text_result_for_llm": "result", "result_type": "success"} copilot_tool = CopilotTool( name="direct_tool", @@ -813,7 +865,7 @@ class TestGitHubCopilotAgentToolConversion: return arg async def tool_handler(invocation: Any) -> Any: - return {"textResultForLlm": "result", "resultType": "success"} + return {"text_result_for_llm": "result", "result_type": "success"} copilot_tool = CopilotTool( name="direct_tool", diff --git a/python/samples/02-agents/providers/github_copilot/github_copilot_with_file_operations.py b/python/samples/02-agents/providers/github_copilot/github_copilot_with_file_operations.py index b5a17262ec..fbfdc34f43 100644 --- a/python/samples/02-agents/providers/github_copilot/github_copilot_with_file_operations.py +++ b/python/samples/02-agents/providers/github_copilot/github_copilot_with_file_operations.py @@ -15,16 +15,18 @@ SECURITY NOTE: Only enable file permissions when you trust the agent's actions. import asyncio from agent_framework.github import GitHubCopilotAgent -from copilot.types import PermissionRequest, PermissionRequestResult +from copilot.generated.session_events import PermissionRequest +from copilot.types import PermissionRequestResult -def prompt_permission(request: PermissionRequest, context: dict[str, str]) -> PermissionRequestResult: +def prompt_permission( + request: PermissionRequest, context: dict[str, str] +) -> PermissionRequestResult: """Permission handler that prompts the user for approval.""" - kind = request.get("kind", "unknown") - print(f"\n[Permission Request: {kind}]") + print(f"\n[Permission Request: {request.kind}]") - if "path" in request: - print(f" Path: {request.get('path')}") + if request.path is not None: + print(f" Path: {request.path}") response = input("Approve? (y/n): ").strip().lower() if response in ("y", "yes"): diff --git a/python/samples/02-agents/providers/github_copilot/github_copilot_with_mcp.py b/python/samples/02-agents/providers/github_copilot/github_copilot_with_mcp.py index aea9ff1734..fde1e8b72e 100644 --- a/python/samples/02-agents/providers/github_copilot/github_copilot_with_mcp.py +++ b/python/samples/02-agents/providers/github_copilot/github_copilot_with_mcp.py @@ -15,7 +15,8 @@ of MCP-related actions. import asyncio from agent_framework.github import GitHubCopilotAgent -from copilot.types import MCPServerConfig, PermissionRequest, PermissionRequestResult +from copilot.generated.session_events import PermissionRequest +from copilot.types import MCPServerConfig, PermissionRequestResult from dotenv import load_dotenv # Load environment variables from .env file @@ -24,8 +25,7 @@ load_dotenv() def prompt_permission(request: PermissionRequest, context: dict[str, str]) -> PermissionRequestResult: """Permission handler that prompts the user for approval.""" - kind = request.get("kind", "unknown") - print(f"\n[Permission Request: {kind}]") + print(f"\n[Permission Request: {request.kind}]") response = input("Approve? (y/n): ").strip().lower() if response in ("y", "yes"): diff --git a/python/samples/02-agents/providers/github_copilot/github_copilot_with_multiple_permissions.py b/python/samples/02-agents/providers/github_copilot/github_copilot_with_multiple_permissions.py index 8ecc26ab01..5ccc8e51f7 100644 --- a/python/samples/02-agents/providers/github_copilot/github_copilot_with_multiple_permissions.py +++ b/python/samples/02-agents/providers/github_copilot/github_copilot_with_multiple_permissions.py @@ -21,18 +21,18 @@ More permissions mean more potential for unintended actions. import asyncio from agent_framework.github import GitHubCopilotAgent -from copilot.types import PermissionRequest, PermissionRequestResult +from copilot.generated.session_events import PermissionRequest +from copilot.types import PermissionRequestResult def prompt_permission(request: PermissionRequest, context: dict[str, str]) -> PermissionRequestResult: """Permission handler that prompts the user for approval.""" - kind = request.get("kind", "unknown") - print(f"\n[Permission Request: {kind}]") + print(f"\n[Permission Request: {request.kind}]") - if "command" in request: - print(f" Command: {request.get('command')}") - if "path" in request: - print(f" Path: {request.get('path')}") + if request.full_command_text is not None: + print(f" Command: {request.full_command_text}") + if request.path is not None: + print(f" Path: {request.path}") response = input("Approve? (y/n): ").strip().lower() if response in ("y", "yes"): diff --git a/python/samples/02-agents/providers/github_copilot/github_copilot_with_shell.py b/python/samples/02-agents/providers/github_copilot/github_copilot_with_shell.py index f5e00aedca..98c37d40f3 100644 --- a/python/samples/02-agents/providers/github_copilot/github_copilot_with_shell.py +++ b/python/samples/02-agents/providers/github_copilot/github_copilot_with_shell.py @@ -14,16 +14,16 @@ Shell commands have full access to your system within the permissions of the run import asyncio from agent_framework.github import GitHubCopilotAgent -from copilot.types import PermissionRequest, PermissionRequestResult +from copilot.generated.session_events import PermissionRequest +from copilot.types import PermissionRequestResult def prompt_permission(request: PermissionRequest, context: dict[str, str]) -> PermissionRequestResult: """Permission handler that prompts the user for approval.""" - kind = request.get("kind", "unknown") - print(f"\n[Permission Request: {kind}]") + print(f"\n[Permission Request: {request.kind}]") - if "command" in request: - print(f" Command: {request.get('command')}") + if request.full_command_text is not None: + print(f" Command: {request.full_command_text}") response = input("Approve? (y/n): ").strip().lower() if response in ("y", "yes"): diff --git a/python/samples/02-agents/providers/github_copilot/github_copilot_with_url.py b/python/samples/02-agents/providers/github_copilot/github_copilot_with_url.py index 4c46017468..827dfd86c1 100644 --- a/python/samples/02-agents/providers/github_copilot/github_copilot_with_url.py +++ b/python/samples/02-agents/providers/github_copilot/github_copilot_with_url.py @@ -14,16 +14,16 @@ URL fetching allows the agent to access any URL accessible from your network. import asyncio from agent_framework.github import GitHubCopilotAgent -from copilot.types import PermissionRequest, PermissionRequestResult +from copilot.generated.session_events import PermissionRequest +from copilot.types import PermissionRequestResult def prompt_permission(request: PermissionRequest, context: dict[str, str]) -> PermissionRequestResult: """Permission handler that prompts the user for approval.""" - kind = request.get("kind", "unknown") - print(f"\n[Permission Request: {kind}]") + print(f"\n[Permission Request: {request.kind}]") - if "url" in request: - print(f" URL: {request.get('url')}") + if request.url is not None: + print(f" URL: {request.url}") response = input("Approve? (y/n): ").strip().lower() if response in ("y", "yes"): diff --git a/python/uv.lock b/python/uv.lock index 7233077c30..81a0a89291 100644 --- a/python/uv.lock +++ b/python/uv.lock @@ -1,22 +1,19 @@ version = 1 revision = 3 -requires-python = ">=3.10" +requires-python = ">=3.11" resolution-markers = [ "python_full_version >= '3.14' and sys_platform == 'darwin'", "python_full_version == '3.13.*' and sys_platform == 'darwin'", "python_full_version == '3.12.*' and sys_platform == 'darwin'", - "python_full_version == '3.11.*' and sys_platform == 'darwin'", - "python_full_version < '3.11' and sys_platform == 'darwin'", + "python_full_version < '3.12' and sys_platform == 'darwin'", "python_full_version >= '3.14' and sys_platform == 'linux'", "python_full_version == '3.13.*' and sys_platform == 'linux'", "python_full_version == '3.12.*' and sys_platform == 'linux'", - "python_full_version == '3.11.*' and sys_platform == 'linux'", - "python_full_version < '3.11' and sys_platform == 'linux'", + "python_full_version < '3.12' and sys_platform == 'linux'", "python_full_version >= '3.14' and sys_platform == 'win32'", "python_full_version == '3.13.*' and sys_platform == 'win32'", "python_full_version == '3.12.*' and sys_platform == 'win32'", - "python_full_version == '3.11.*' and sys_platform == 'win32'", - "python_full_version < '3.11' and sys_platform == 'win32'", + "python_full_version < '3.12' and sys_platform == 'win32'", ] supported-markers = [ "sys_platform == 'darwin'", @@ -524,14 +521,13 @@ version = "1.0.0b260304" source = { editable = "packages/github_copilot" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "github-copilot-sdk", version = "0.1.25", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "github-copilot-sdk", version = "0.1.30", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "github-copilot-sdk", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] [package.metadata] requires-dist = [ { name = "agent-framework-core", editable = "packages/core" }, - { name = "github-copilot-sdk", specifier = ">=0.1.0" }, + { name = "github-copilot-sdk", specifier = ">=0.1.32" }, ] [[package]] @@ -559,8 +555,7 @@ math = [ ] tau2 = [ { name = "loguru", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pydantic", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "tiktoken", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] @@ -677,8 +672,7 @@ version = "1.0.0b260304" source = { editable = "packages/redis" } dependencies = [ { name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "redis", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "redisvl", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] @@ -759,7 +753,6 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohappyeyeballs", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "aiosignal", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "async-timeout", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, { name = "attrs", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "frozenlist", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "multidict", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -768,23 +761,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/50/42/32cf8e7704ceb4481406eb87161349abb46a57fee3f008ba9cb610968646/aiohttp-3.13.3.tar.gz", hash = "sha256:a949eee43d3782f2daae4f4a2819b2cb9b0c5d3b7f7a927067cc84dafdbb9f88", size = 7844556, upload-time = "2026-01-03T17:33:05.204Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/36/d6/5aec9313ee6ea9c7cde8b891b69f4ff4001416867104580670a31daeba5b/aiohttp-3.13.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d5a372fd5afd301b3a89582817fdcdb6c34124787c70dbcc616f259013e7eef7", size = 738950, upload-time = "2026-01-03T17:29:13.002Z" }, - { url = "https://files.pythonhosted.org/packages/68/03/8fa90a7e6d11ff20a18837a8e2b5dd23db01aabc475aa9271c8ad33299f5/aiohttp-3.13.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:147e422fd1223005c22b4fe080f5d93ced44460f5f9c105406b753612b587821", size = 496099, upload-time = "2026-01-03T17:29:15.268Z" }, - { url = "https://files.pythonhosted.org/packages/d2/23/b81f744d402510a8366b74eb420fc0cc1170d0c43daca12d10814df85f10/aiohttp-3.13.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:859bd3f2156e81dd01432f5849fc73e2243d4a487c4fd26609b1299534ee1845", size = 491072, upload-time = "2026-01-03T17:29:16.922Z" }, - { url = "https://files.pythonhosted.org/packages/d5/e1/56d1d1c0dd334cd203dd97706ce004c1aa24b34a813b0b8daf3383039706/aiohttp-3.13.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dca68018bf48c251ba17c72ed479f4dafe9dbd5a73707ad8d28a38d11f3d42af", size = 1671588, upload-time = "2026-01-03T17:29:18.539Z" }, - { url = "https://files.pythonhosted.org/packages/5f/34/8d7f962604f4bc2b4e39eb1220dac7d4e4cba91fb9ba0474b4ecd67db165/aiohttp-3.13.3-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fee0c6bc7db1de362252affec009707a17478a00ec69f797d23ca256e36d5940", size = 1640334, upload-time = "2026-01-03T17:29:21.028Z" }, - { url = "https://files.pythonhosted.org/packages/94/1d/fcccf2c668d87337ddeef9881537baee13c58d8f01f12ba8a24215f2b804/aiohttp-3.13.3-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c048058117fd649334d81b4b526e94bde3ccaddb20463a815ced6ecbb7d11160", size = 1722656, upload-time = "2026-01-03T17:29:22.531Z" }, - { url = "https://files.pythonhosted.org/packages/aa/98/c6f3b081c4c606bc1e5f2ec102e87d6411c73a9ef3616fea6f2d5c98c062/aiohttp-3.13.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:215a685b6fbbfcf71dfe96e3eba7a6f58f10da1dfdf4889c7dd856abe430dca7", size = 1817625, upload-time = "2026-01-03T17:29:24.276Z" }, - { url = "https://files.pythonhosted.org/packages/2c/c0/cfcc3d2e11b477f86e1af2863f3858c8850d751ce8dc39c4058a072c9e54/aiohttp-3.13.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2c184bb1fe2cbd2cefba613e9db29a5ab559323f994b6737e370d3da0ac455", size = 1672604, upload-time = "2026-01-03T17:29:26.099Z" }, - { url = "https://files.pythonhosted.org/packages/1e/77/6b4ffcbcac4c6a5d041343a756f34a6dd26174ae07f977a64fe028dda5b0/aiohttp-3.13.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:75ca857eba4e20ce9f546cd59c7007b33906a4cd48f2ff6ccf1ccfc3b646f279", size = 1554370, upload-time = "2026-01-03T17:29:28.121Z" }, - { url = "https://files.pythonhosted.org/packages/f2/f0/e3ddfa93f17d689dbe014ba048f18e0c9f9b456033b70e94349a2e9048be/aiohttp-3.13.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:81e97251d9298386c2b7dbeb490d3d1badbdc69107fb8c9299dd04eb39bddc0e", size = 1642023, upload-time = "2026-01-03T17:29:30.002Z" }, - { url = "https://files.pythonhosted.org/packages/eb/45/c14019c9ec60a8e243d06d601b33dcc4fd92379424bde3021725859d7f99/aiohttp-3.13.3-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:c0e2d366af265797506f0283487223146af57815b388623f0357ef7eac9b209d", size = 1649680, upload-time = "2026-01-03T17:29:31.782Z" }, - { url = "https://files.pythonhosted.org/packages/9c/fd/09c9451dae5aa5c5ed756df95ff9ef549d45d4be663bafd1e4954fd836f0/aiohttp-3.13.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4e239d501f73d6db1522599e14b9b321a7e3b1de66ce33d53a765d975e9f4808", size = 1692407, upload-time = "2026-01-03T17:29:33.392Z" }, - { url = "https://files.pythonhosted.org/packages/a6/81/938bc2ec33c10efd6637ccb3d22f9f3160d08e8f3aa2587a2c2d5ab578eb/aiohttp-3.13.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:0db318f7a6f065d84cb1e02662c526294450b314a02bd9e2a8e67f0d8564ce40", size = 1543047, upload-time = "2026-01-03T17:29:34.855Z" }, - { url = "https://files.pythonhosted.org/packages/f7/23/80488ee21c8d567c83045e412e1d9b7077d27171591a4eb7822586e8c06a/aiohttp-3.13.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:bfc1cc2fe31a6026a8a88e4ecfb98d7f6b1fec150cfd708adbfd1d2f42257c29", size = 1715264, upload-time = "2026-01-03T17:29:36.389Z" }, - { url = "https://files.pythonhosted.org/packages/e2/83/259a8da6683182768200b368120ab3deff5370bed93880fb9a3a86299f34/aiohttp-3.13.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:af71fff7bac6bb7508956696dce8f6eec2bbb045eceb40343944b1ae62b5ef11", size = 1657275, upload-time = "2026-01-03T17:29:38.162Z" }, - { url = "https://files.pythonhosted.org/packages/3f/4f/2c41f800a0b560785c10fb316216ac058c105f9be50bdc6a285de88db625/aiohttp-3.13.3-cp310-cp310-win32.whl", hash = "sha256:37da61e244d1749798c151421602884db5270faf479cf0ef03af0ff68954c9dd", size = 434053, upload-time = "2026-01-03T17:29:40.074Z" }, - { url = "https://files.pythonhosted.org/packages/80/df/29cd63c7ecfdb65ccc12f7d808cac4fa2a19544660c06c61a4a48462de0c/aiohttp-3.13.3-cp310-cp310-win_amd64.whl", hash = "sha256:7e63f210bc1b57ef699035f2b4b6d9ce096b5914414a49b0997c839b2bd2223c", size = 456687, upload-time = "2026-01-03T17:29:41.819Z" }, { url = "https://files.pythonhosted.org/packages/f1/4c/a164164834f03924d9a29dc3acd9e7ee58f95857e0b467f6d04298594ebb/aiohttp-3.13.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5b6073099fb654e0a068ae678b10feff95c5cae95bbfcbfa7af669d361a8aa6b", size = 746051, upload-time = "2026-01-03T17:29:43.287Z" }, { url = "https://files.pythonhosted.org/packages/82/71/d5c31390d18d4f58115037c432b7e0348c60f6f53b727cad33172144a112/aiohttp-3.13.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cb93e166e6c28716c8c6aeb5f99dfb6d5ccf482d29fe9bf9a794110e6d0ab64", size = 499234, upload-time = "2026-01-03T17:29:44.822Z" }, { url = "https://files.pythonhosted.org/packages/0e/c9/741f8ac91e14b1d2e7100690425a5b2b919a87a5075406582991fb7de920/aiohttp-3.13.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:28e027cf2f6b641693a09f631759b4d9ce9165099d2b5d92af9bd4e197690eea", size = 494979, upload-time = "2026-01-03T17:29:46.405Z" }, @@ -927,7 +903,6 @@ name = "anyio" version = "4.12.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "exceptiongroup", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, { name = "idna", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "(python_full_version < '3.13' and sys_platform == 'darwin') or (python_full_version < '3.13' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform == 'win32')" }, ] @@ -1149,15 +1124,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/df/73/b6e24bd22e6720ca8ee9a85a0c4a2971af8497d8f3193fa05390cbd46e09/backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8", size = 15148, upload-time = "2022-10-05T19:19:30.546Z" }, ] -[[package]] -name = "backports-asyncio-runner" -version = "1.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8e/ff/70dca7d7cb1cbc0edb2c6cc0c38b65cba36cccc491eca64cabd5fe7f8670/backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162", size = 69893, upload-time = "2025-07-02T02:27:15.685Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a0/59/76ab57e3fe74484f48a53f8e337171b4a2349e506eabe136d7e01d059086/backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5", size = 12313, upload-time = "2025-07-02T02:27:14.263Z" }, -] - [[package]] name = "blinker" version = "1.9.0" @@ -1213,18 +1179,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/93/d7/516d984057745a6cd96575eea814fe1edd6646ee6efd552fb7b0921dec83/cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44", size = 184283, upload-time = "2025-09-08T23:22:08.01Z" }, - { url = "https://files.pythonhosted.org/packages/9e/84/ad6a0b408daa859246f57c03efd28e5dd1b33c21737c2db84cae8c237aa5/cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49", size = 180504, upload-time = "2025-09-08T23:22:10.637Z" }, - { url = "https://files.pythonhosted.org/packages/50/bd/b1a6362b80628111e6653c961f987faa55262b4002fcec42308cad1db680/cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c", size = 208811, upload-time = "2025-09-08T23:22:12.267Z" }, - { url = "https://files.pythonhosted.org/packages/4f/27/6933a8b2562d7bd1fb595074cf99cc81fc3789f6a6c05cdabb46284a3188/cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb", size = 216402, upload-time = "2025-09-08T23:22:13.455Z" }, - { url = "https://files.pythonhosted.org/packages/05/eb/b86f2a2645b62adcfff53b0dd97e8dfafb5c8aa864bd0d9a2c2049a0d551/cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0", size = 203217, upload-time = "2025-09-08T23:22:14.596Z" }, - { url = "https://files.pythonhosted.org/packages/9f/e0/6cbe77a53acf5acc7c08cc186c9928864bd7c005f9efd0d126884858a5fe/cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4", size = 203079, upload-time = "2025-09-08T23:22:15.769Z" }, - { url = "https://files.pythonhosted.org/packages/98/29/9b366e70e243eb3d14a5cb488dfd3a0b6b2f1fb001a203f653b93ccfac88/cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453", size = 216475, upload-time = "2025-09-08T23:22:17.427Z" }, - { url = "https://files.pythonhosted.org/packages/21/7a/13b24e70d2f90a322f2900c5d8e1f14fa7e2a6b3332b7309ba7b2ba51a5a/cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495", size = 218829, upload-time = "2025-09-08T23:22:19.069Z" }, - { url = "https://files.pythonhosted.org/packages/60/99/c9dc110974c59cc981b1f5b66e1d8af8af764e00f0293266824d9c4254bc/cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5", size = 211211, upload-time = "2025-09-08T23:22:20.588Z" }, - { url = "https://files.pythonhosted.org/packages/49/72/ff2d12dbf21aca1b32a40ed792ee6b40f6dc3a9cf1644bd7ef6e95e0ac5e/cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb", size = 218036, upload-time = "2025-09-08T23:22:22.143Z" }, - { url = "https://files.pythonhosted.org/packages/e2/cc/027d7fb82e58c48ea717149b03bcadcbdc293553edb283af792bd4bcbb3f/cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a", size = 172184, upload-time = "2025-09-08T23:22:23.328Z" }, - { url = "https://files.pythonhosted.org/packages/33/fa/072dd15ae27fbb4e06b437eb6e944e75b068deb09e2a2826039e49ee2045/cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739", size = 182790, upload-time = "2025-09-08T23:22:24.752Z" }, { url = "https://files.pythonhosted.org/packages/12/4a/3dfd5f7850cbf0d06dc84ba9aa00db766b52ca38d8b86e3a38314d52498c/cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe", size = 184344, upload-time = "2025-09-08T23:22:26.456Z" }, { url = "https://files.pythonhosted.org/packages/4f/8b/f0e4c441227ba756aafbe78f117485b25bb26b1c059d01f137fa6d14896b/cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c", size = 180560, upload-time = "2025-09-08T23:22:28.197Z" }, { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" }, @@ -1292,22 +1246,6 @@ version = "3.4.4" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1f/b8/6d51fc1d52cbd52cd4ccedd5b5b2f0f6a11bbf6765c782298b0f3e808541/charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d", size = 209709, upload-time = "2025-10-14T04:40:11.385Z" }, - { url = "https://files.pythonhosted.org/packages/5c/af/1f9d7f7faafe2ddfb6f72a2e07a548a629c61ad510fe60f9630309908fef/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8", size = 148814, upload-time = "2025-10-14T04:40:13.135Z" }, - { url = "https://files.pythonhosted.org/packages/79/3d/f2e3ac2bbc056ca0c204298ea4e3d9db9b4afe437812638759db2c976b5f/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad", size = 144467, upload-time = "2025-10-14T04:40:14.728Z" }, - { url = "https://files.pythonhosted.org/packages/ec/85/1bf997003815e60d57de7bd972c57dc6950446a3e4ccac43bc3070721856/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8", size = 162280, upload-time = "2025-10-14T04:40:16.14Z" }, - { url = "https://files.pythonhosted.org/packages/3e/8e/6aa1952f56b192f54921c436b87f2aaf7c7a7c3d0d1a765547d64fd83c13/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d", size = 159454, upload-time = "2025-10-14T04:40:17.567Z" }, - { url = "https://files.pythonhosted.org/packages/36/3b/60cbd1f8e93aa25d1c669c649b7a655b0b5fb4c571858910ea9332678558/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313", size = 153609, upload-time = "2025-10-14T04:40:19.08Z" }, - { url = "https://files.pythonhosted.org/packages/64/91/6a13396948b8fd3c4b4fd5bc74d045f5637d78c9675585e8e9fbe5636554/charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e", size = 151849, upload-time = "2025-10-14T04:40:20.607Z" }, - { url = "https://files.pythonhosted.org/packages/b7/7a/59482e28b9981d105691e968c544cc0df3b7d6133152fb3dcdc8f135da7a/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93", size = 151586, upload-time = "2025-10-14T04:40:21.719Z" }, - { url = "https://files.pythonhosted.org/packages/92/59/f64ef6a1c4bdd2baf892b04cd78792ed8684fbc48d4c2afe467d96b4df57/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0", size = 145290, upload-time = "2025-10-14T04:40:23.069Z" }, - { url = "https://files.pythonhosted.org/packages/6b/63/3bf9f279ddfa641ffa1962b0db6a57a9c294361cc2f5fcac997049a00e9c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84", size = 163663, upload-time = "2025-10-14T04:40:24.17Z" }, - { url = "https://files.pythonhosted.org/packages/ed/09/c9e38fc8fa9e0849b172b581fd9803bdf6e694041127933934184e19f8c3/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e", size = 151964, upload-time = "2025-10-14T04:40:25.368Z" }, - { url = "https://files.pythonhosted.org/packages/d2/d1/d28b747e512d0da79d8b6a1ac18b7ab2ecfd81b2944c4c710e166d8dd09c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db", size = 161064, upload-time = "2025-10-14T04:40:26.806Z" }, - { url = "https://files.pythonhosted.org/packages/bb/9a/31d62b611d901c3b9e5500c36aab0ff5eb442043fb3a1c254200d3d397d9/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6", size = 155015, upload-time = "2025-10-14T04:40:28.284Z" }, - { url = "https://files.pythonhosted.org/packages/1f/f3/107e008fa2bff0c8b9319584174418e5e5285fef32f79d8ee6a430d0039c/charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f", size = 99792, upload-time = "2025-10-14T04:40:29.613Z" }, - { url = "https://files.pythonhosted.org/packages/eb/66/e396e8a408843337d7315bab30dbf106c38966f1819f123257f5520f8a96/charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d", size = 107198, upload-time = "2025-10-14T04:40:30.644Z" }, - { url = "https://files.pythonhosted.org/packages/b5/58/01b4f815bf0312704c267f2ccb6e5d42bcc7752340cd487bc9f8c3710597/charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69", size = 100262, upload-time = "2025-10-14T04:40:32.108Z" }, { url = "https://files.pythonhosted.org/packages/ed/27/c6491ff4954e58a10f69ad90aca8a1b6fe9c5d3c6f380907af3c37435b59/charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", size = 206988, upload-time = "2025-10-14T04:40:33.79Z" }, { url = "https://files.pythonhosted.org/packages/94/59/2e87300fe67ab820b5428580a53cad894272dbb97f38a7a814a2a1ac1011/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", size = 147324, upload-time = "2025-10-14T04:40:34.961Z" }, { url = "https://files.pythonhosted.org/packages/07/fb/0cf61dc84b2b088391830f6274cb57c82e4da8bbc2efeac8c025edb88772/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", size = 142742, upload-time = "2025-10-14T04:40:36.105Z" }, @@ -1382,7 +1320,6 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "mcp", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "typing-extensions", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, ] sdist = { url = "https://files.pythonhosted.org/packages/46/e2/c5d5c4743ece496492a930bb75b878c830a9a9878ae3327b2d292647a8fa/claude_agent_sdk-0.1.45.tar.gz", hash = "sha256:97c1e981431b5af1e08c34731906ab8d4a58fe0774a04df0ea9587dcabc85151", size = 62436, upload-time = "2026-03-03T17:21:08.595Z" } wheels = [ @@ -1409,7 +1346,7 @@ name = "clr-loader" version = "0.2.10" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "cffi", marker = "(python_full_version < '3.14' and sys_platform == 'darwin') or (python_full_version < '3.14' and sys_platform == 'linux') or (python_full_version < '3.14' and sys_platform == 'win32')" }, + { name = "cffi", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/18/24/c12faf3f61614b3131b5c98d3bf0d376b49c7feaa73edca559aeb2aee080/clr_loader-0.2.10.tar.gz", hash = "sha256:81f114afbc5005bafc5efe5af1341d400e22137e275b042a8979f3feb9fc9446", size = 83605, upload-time = "2026-01-03T23:13:06.984Z" } wheels = [ @@ -1425,98 +1362,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] -[[package]] -name = "contourpy" -version = "1.3.2" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11' and sys_platform == 'darwin'", - "python_full_version < '3.11' and sys_platform == 'linux'", - "python_full_version < '3.11' and sys_platform == 'win32'", -] -dependencies = [ - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/66/54/eb9bfc647b19f2009dd5c7f5ec51c4e6ca831725f1aea7a993034f483147/contourpy-1.3.2.tar.gz", hash = "sha256:b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54", size = 13466130, upload-time = "2025-04-15T17:47:53.79Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/12/a3/da4153ec8fe25d263aa48c1a4cbde7f49b59af86f0b6f7862788c60da737/contourpy-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba38e3f9f330af820c4b27ceb4b9c7feee5fe0493ea53a8720f4792667465934", size = 268551, upload-time = "2025-04-15T17:34:46.581Z" }, - { url = "https://files.pythonhosted.org/packages/2f/6c/330de89ae1087eb622bfca0177d32a7ece50c3ef07b28002de4757d9d875/contourpy-1.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc41ba0714aa2968d1f8674ec97504a8f7e334f48eeacebcaa6256213acb0989", size = 253399, upload-time = "2025-04-15T17:34:51.427Z" }, - { url = "https://files.pythonhosted.org/packages/c1/bd/20c6726b1b7f81a8bee5271bed5c165f0a8e1f572578a9d27e2ccb763cb2/contourpy-1.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9be002b31c558d1ddf1b9b415b162c603405414bacd6932d031c5b5a8b757f0d", size = 312061, upload-time = "2025-04-15T17:34:55.961Z" }, - { url = "https://files.pythonhosted.org/packages/22/fc/a9665c88f8a2473f823cf1ec601de9e5375050f1958cbb356cdf06ef1ab6/contourpy-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8d2e74acbcba3bfdb6d9d8384cdc4f9260cae86ed9beee8bd5f54fee49a430b9", size = 351956, upload-time = "2025-04-15T17:35:00.992Z" }, - { url = "https://files.pythonhosted.org/packages/25/eb/9f0a0238f305ad8fb7ef42481020d6e20cf15e46be99a1fcf939546a177e/contourpy-1.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e259bced5549ac64410162adc973c5e2fb77f04df4a439d00b478e57a0e65512", size = 320872, upload-time = "2025-04-15T17:35:06.177Z" }, - { url = "https://files.pythonhosted.org/packages/32/5c/1ee32d1c7956923202f00cf8d2a14a62ed7517bdc0ee1e55301227fc273c/contourpy-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad687a04bc802cbe8b9c399c07162a3c35e227e2daccf1668eb1f278cb698631", size = 325027, upload-time = "2025-04-15T17:35:11.244Z" }, - { url = "https://files.pythonhosted.org/packages/83/bf/9baed89785ba743ef329c2b07fd0611d12bfecbedbdd3eeecf929d8d3b52/contourpy-1.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cdd22595308f53ef2f891040ab2b93d79192513ffccbd7fe19be7aa773a5e09f", size = 1306641, upload-time = "2025-04-15T17:35:26.701Z" }, - { url = "https://files.pythonhosted.org/packages/d4/cc/74e5e83d1e35de2d28bd97033426b450bc4fd96e092a1f7a63dc7369b55d/contourpy-1.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4f54d6a2defe9f257327b0f243612dd051cc43825587520b1bf74a31e2f6ef2", size = 1374075, upload-time = "2025-04-15T17:35:43.204Z" }, - { url = "https://files.pythonhosted.org/packages/0c/42/17f3b798fd5e033b46a16f8d9fcb39f1aba051307f5ebf441bad1ecf78f8/contourpy-1.3.2-cp310-cp310-win32.whl", hash = "sha256:f939a054192ddc596e031e50bb13b657ce318cf13d264f095ce9db7dc6ae81c0", size = 177534, upload-time = "2025-04-15T17:35:46.554Z" }, - { url = "https://files.pythonhosted.org/packages/54/ec/5162b8582f2c994721018d0c9ece9dc6ff769d298a8ac6b6a652c307e7df/contourpy-1.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c440093bbc8fc21c637c03bafcbef95ccd963bc6e0514ad887932c18ca2a759a", size = 221188, upload-time = "2025-04-15T17:35:50.064Z" }, - { url = "https://files.pythonhosted.org/packages/b3/b9/ede788a0b56fc5b071639d06c33cb893f68b1178938f3425debebe2dab78/contourpy-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a37a2fb93d4df3fc4c0e363ea4d16f83195fc09c891bc8ce072b9d084853445", size = 269636, upload-time = "2025-04-15T17:35:54.473Z" }, - { url = "https://files.pythonhosted.org/packages/e6/75/3469f011d64b8bbfa04f709bfc23e1dd71be54d05b1b083be9f5b22750d1/contourpy-1.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b7cd50c38f500bbcc9b6a46643a40e0913673f869315d8e70de0438817cb7773", size = 254636, upload-time = "2025-04-15T17:35:58.283Z" }, - { url = "https://files.pythonhosted.org/packages/8d/2f/95adb8dae08ce0ebca4fd8e7ad653159565d9739128b2d5977806656fcd2/contourpy-1.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6658ccc7251a4433eebd89ed2672c2ed96fba367fd25ca9512aa92a4b46c4f1", size = 313053, upload-time = "2025-04-15T17:36:03.235Z" }, - { url = "https://files.pythonhosted.org/packages/c3/a6/8ccf97a50f31adfa36917707fe39c9a0cbc24b3bbb58185577f119736cc9/contourpy-1.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:70771a461aaeb335df14deb6c97439973d253ae70660ca085eec25241137ef43", size = 352985, upload-time = "2025-04-15T17:36:08.275Z" }, - { url = "https://files.pythonhosted.org/packages/1d/b6/7925ab9b77386143f39d9c3243fdd101621b4532eb126743201160ffa7e6/contourpy-1.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65a887a6e8c4cd0897507d814b14c54a8c2e2aa4ac9f7686292f9769fcf9a6ab", size = 323750, upload-time = "2025-04-15T17:36:13.29Z" }, - { url = "https://files.pythonhosted.org/packages/c2/f3/20c5d1ef4f4748e52d60771b8560cf00b69d5c6368b5c2e9311bcfa2a08b/contourpy-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3859783aefa2b8355697f16642695a5b9792e7a46ab86da1118a4a23a51a33d7", size = 326246, upload-time = "2025-04-15T17:36:18.329Z" }, - { url = "https://files.pythonhosted.org/packages/8c/e5/9dae809e7e0b2d9d70c52b3d24cba134dd3dad979eb3e5e71f5df22ed1f5/contourpy-1.3.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:eab0f6db315fa4d70f1d8ab514e527f0366ec021ff853d7ed6a2d33605cf4b83", size = 1308728, upload-time = "2025-04-15T17:36:33.878Z" }, - { url = "https://files.pythonhosted.org/packages/e2/4a/0058ba34aeea35c0b442ae61a4f4d4ca84d6df8f91309bc2d43bb8dd248f/contourpy-1.3.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d91a3ccc7fea94ca0acab82ceb77f396d50a1f67412efe4c526f5d20264e6ecd", size = 1375762, upload-time = "2025-04-15T17:36:51.295Z" }, - { url = "https://files.pythonhosted.org/packages/09/33/7174bdfc8b7767ef2c08ed81244762d93d5c579336fc0b51ca57b33d1b80/contourpy-1.3.2-cp311-cp311-win32.whl", hash = "sha256:1c48188778d4d2f3d48e4643fb15d8608b1d01e4b4d6b0548d9b336c28fc9b6f", size = 178196, upload-time = "2025-04-15T17:36:55.002Z" }, - { url = "https://files.pythonhosted.org/packages/5e/fe/4029038b4e1c4485cef18e480b0e2cd2d755448bb071eb9977caac80b77b/contourpy-1.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:5ebac872ba09cb8f2131c46b8739a7ff71de28a24c869bcad554477eb089a878", size = 222017, upload-time = "2025-04-15T17:36:58.576Z" }, - { url = "https://files.pythonhosted.org/packages/34/f7/44785876384eff370c251d58fd65f6ad7f39adce4a093c934d4a67a7c6b6/contourpy-1.3.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4caf2bcd2969402bf77edc4cb6034c7dd7c0803213b3523f111eb7460a51b8d2", size = 271580, upload-time = "2025-04-15T17:37:03.105Z" }, - { url = "https://files.pythonhosted.org/packages/93/3b/0004767622a9826ea3d95f0e9d98cd8729015768075d61f9fea8eeca42a8/contourpy-1.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:82199cb78276249796419fe36b7386bd8d2cc3f28b3bc19fe2454fe2e26c4c15", size = 255530, upload-time = "2025-04-15T17:37:07.026Z" }, - { url = "https://files.pythonhosted.org/packages/e7/bb/7bd49e1f4fa805772d9fd130e0d375554ebc771ed7172f48dfcd4ca61549/contourpy-1.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:106fab697af11456fcba3e352ad50effe493a90f893fca6c2ca5c033820cea92", size = 307688, upload-time = "2025-04-15T17:37:11.481Z" }, - { url = "https://files.pythonhosted.org/packages/fc/97/e1d5dbbfa170725ef78357a9a0edc996b09ae4af170927ba8ce977e60a5f/contourpy-1.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d14f12932a8d620e307f715857107b1d1845cc44fdb5da2bc8e850f5ceba9f87", size = 347331, upload-time = "2025-04-15T17:37:18.212Z" }, - { url = "https://files.pythonhosted.org/packages/6f/66/e69e6e904f5ecf6901be3dd16e7e54d41b6ec6ae3405a535286d4418ffb4/contourpy-1.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:532fd26e715560721bb0d5fc7610fce279b3699b018600ab999d1be895b09415", size = 318963, upload-time = "2025-04-15T17:37:22.76Z" }, - { url = "https://files.pythonhosted.org/packages/a8/32/b8a1c8965e4f72482ff2d1ac2cd670ce0b542f203c8e1d34e7c3e6925da7/contourpy-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f26b383144cf2d2c29f01a1e8170f50dacf0eac02d64139dcd709a8ac4eb3cfe", size = 323681, upload-time = "2025-04-15T17:37:33.001Z" }, - { url = "https://files.pythonhosted.org/packages/30/c6/12a7e6811d08757c7162a541ca4c5c6a34c0f4e98ef2b338791093518e40/contourpy-1.3.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c49f73e61f1f774650a55d221803b101d966ca0c5a2d6d5e4320ec3997489441", size = 1308674, upload-time = "2025-04-15T17:37:48.64Z" }, - { url = "https://files.pythonhosted.org/packages/2a/8a/bebe5a3f68b484d3a2b8ffaf84704b3e343ef1addea528132ef148e22b3b/contourpy-1.3.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3d80b2c0300583228ac98d0a927a1ba6a2ba6b8a742463c564f1d419ee5b211e", size = 1380480, upload-time = "2025-04-15T17:38:06.7Z" }, - { url = "https://files.pythonhosted.org/packages/34/db/fcd325f19b5978fb509a7d55e06d99f5f856294c1991097534360b307cf1/contourpy-1.3.2-cp312-cp312-win32.whl", hash = "sha256:90df94c89a91b7362e1142cbee7568f86514412ab8a2c0d0fca72d7e91b62912", size = 178489, upload-time = "2025-04-15T17:38:10.338Z" }, - { url = "https://files.pythonhosted.org/packages/01/c8/fadd0b92ffa7b5eb5949bf340a63a4a496a6930a6c37a7ba0f12acb076d6/contourpy-1.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:8c942a01d9163e2e5cfb05cb66110121b8d07ad438a17f9e766317bcb62abf73", size = 223042, upload-time = "2025-04-15T17:38:14.239Z" }, - { url = "https://files.pythonhosted.org/packages/2e/61/5673f7e364b31e4e7ef6f61a4b5121c5f170f941895912f773d95270f3a2/contourpy-1.3.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:de39db2604ae755316cb5967728f4bea92685884b1e767b7c24e983ef5f771cb", size = 271630, upload-time = "2025-04-15T17:38:19.142Z" }, - { url = "https://files.pythonhosted.org/packages/ff/66/a40badddd1223822c95798c55292844b7e871e50f6bfd9f158cb25e0bd39/contourpy-1.3.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3f9e896f447c5c8618f1edb2bafa9a4030f22a575ec418ad70611450720b5b08", size = 255670, upload-time = "2025-04-15T17:38:23.688Z" }, - { url = "https://files.pythonhosted.org/packages/1e/c7/cf9fdee8200805c9bc3b148f49cb9482a4e3ea2719e772602a425c9b09f8/contourpy-1.3.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71e2bd4a1c4188f5c2b8d274da78faab884b59df20df63c34f74aa1813c4427c", size = 306694, upload-time = "2025-04-15T17:38:28.238Z" }, - { url = "https://files.pythonhosted.org/packages/dd/e7/ccb9bec80e1ba121efbffad7f38021021cda5be87532ec16fd96533bb2e0/contourpy-1.3.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de425af81b6cea33101ae95ece1f696af39446db9682a0b56daaa48cfc29f38f", size = 345986, upload-time = "2025-04-15T17:38:33.502Z" }, - { url = "https://files.pythonhosted.org/packages/dc/49/ca13bb2da90391fa4219fdb23b078d6065ada886658ac7818e5441448b78/contourpy-1.3.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:977e98a0e0480d3fe292246417239d2d45435904afd6d7332d8455981c408b85", size = 318060, upload-time = "2025-04-15T17:38:38.672Z" }, - { url = "https://files.pythonhosted.org/packages/c8/65/5245ce8c548a8422236c13ffcdcdada6a2a812c361e9e0c70548bb40b661/contourpy-1.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:434f0adf84911c924519d2b08fc10491dd282b20bdd3fa8f60fd816ea0b48841", size = 322747, upload-time = "2025-04-15T17:38:43.712Z" }, - { url = "https://files.pythonhosted.org/packages/72/30/669b8eb48e0a01c660ead3752a25b44fdb2e5ebc13a55782f639170772f9/contourpy-1.3.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c66c4906cdbc50e9cba65978823e6e00b45682eb09adbb78c9775b74eb222422", size = 1308895, upload-time = "2025-04-15T17:39:00.224Z" }, - { url = "https://files.pythonhosted.org/packages/05/5a/b569f4250decee6e8d54498be7bdf29021a4c256e77fe8138c8319ef8eb3/contourpy-1.3.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8b7fc0cd78ba2f4695fd0a6ad81a19e7e3ab825c31b577f384aa9d7817dc3bef", size = 1379098, upload-time = "2025-04-15T17:43:29.649Z" }, - { url = "https://files.pythonhosted.org/packages/19/ba/b227c3886d120e60e41b28740ac3617b2f2b971b9f601c835661194579f1/contourpy-1.3.2-cp313-cp313-win32.whl", hash = "sha256:15ce6ab60957ca74cff444fe66d9045c1fd3e92c8936894ebd1f3eef2fff075f", size = 178535, upload-time = "2025-04-15T17:44:44.532Z" }, - { url = "https://files.pythonhosted.org/packages/12/6e/2fed56cd47ca739b43e892707ae9a13790a486a3173be063681ca67d2262/contourpy-1.3.2-cp313-cp313-win_amd64.whl", hash = "sha256:e1578f7eafce927b168752ed7e22646dad6cd9bca673c60bff55889fa236ebf9", size = 223096, upload-time = "2025-04-15T17:44:48.194Z" }, - { url = "https://files.pythonhosted.org/packages/54/4c/e76fe2a03014a7c767d79ea35c86a747e9325537a8b7627e0e5b3ba266b4/contourpy-1.3.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0475b1f6604896bc7c53bb070e355e9321e1bc0d381735421a2d2068ec56531f", size = 285090, upload-time = "2025-04-15T17:43:34.084Z" }, - { url = "https://files.pythonhosted.org/packages/7b/e2/5aba47debd55d668e00baf9651b721e7733975dc9fc27264a62b0dd26eb8/contourpy-1.3.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c85bb486e9be652314bb5b9e2e3b0d1b2e643d5eec4992c0fbe8ac71775da739", size = 268643, upload-time = "2025-04-15T17:43:38.626Z" }, - { url = "https://files.pythonhosted.org/packages/a1/37/cd45f1f051fe6230f751cc5cdd2728bb3a203f5619510ef11e732109593c/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:745b57db7758f3ffc05a10254edd3182a2a83402a89c00957a8e8a22f5582823", size = 310443, upload-time = "2025-04-15T17:43:44.522Z" }, - { url = "https://files.pythonhosted.org/packages/8b/a2/36ea6140c306c9ff6dd38e3bcec80b3b018474ef4d17eb68ceecd26675f4/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:970e9173dbd7eba9b4e01aab19215a48ee5dd3f43cef736eebde064a171f89a5", size = 349865, upload-time = "2025-04-15T17:43:49.545Z" }, - { url = "https://files.pythonhosted.org/packages/95/b7/2fc76bc539693180488f7b6cc518da7acbbb9e3b931fd9280504128bf956/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6c4639a9c22230276b7bffb6a850dfc8258a2521305e1faefe804d006b2e532", size = 321162, upload-time = "2025-04-15T17:43:54.203Z" }, - { url = "https://files.pythonhosted.org/packages/f4/10/76d4f778458b0aa83f96e59d65ece72a060bacb20cfbee46cf6cd5ceba41/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc829960f34ba36aad4302e78eabf3ef16a3a100863f0d4eeddf30e8a485a03b", size = 327355, upload-time = "2025-04-15T17:44:01.025Z" }, - { url = "https://files.pythonhosted.org/packages/43/a3/10cf483ea683f9f8ab096c24bad3cce20e0d1dd9a4baa0e2093c1c962d9d/contourpy-1.3.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d32530b534e986374fc19eaa77fcb87e8a99e5431499949b828312bdcd20ac52", size = 1307935, upload-time = "2025-04-15T17:44:17.322Z" }, - { url = "https://files.pythonhosted.org/packages/78/73/69dd9a024444489e22d86108e7b913f3528f56cfc312b5c5727a44188471/contourpy-1.3.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e298e7e70cf4eb179cc1077be1c725b5fd131ebc81181bf0c03525c8abc297fd", size = 1372168, upload-time = "2025-04-15T17:44:33.43Z" }, - { url = "https://files.pythonhosted.org/packages/0f/1b/96d586ccf1b1a9d2004dd519b25fbf104a11589abfd05484ff12199cca21/contourpy-1.3.2-cp313-cp313t-win32.whl", hash = "sha256:d0e589ae0d55204991450bb5c23f571c64fe43adaa53f93fc902a84c96f52fe1", size = 189550, upload-time = "2025-04-15T17:44:37.092Z" }, - { url = "https://files.pythonhosted.org/packages/b0/e6/6000d0094e8a5e32ad62591c8609e269febb6e4db83a1c75ff8868b42731/contourpy-1.3.2-cp313-cp313t-win_amd64.whl", hash = "sha256:78e9253c3de756b3f6a5174d024c4835acd59eb3f8e2ca13e775dbffe1558f69", size = 238214, upload-time = "2025-04-15T17:44:40.827Z" }, - { url = "https://files.pythonhosted.org/packages/33/05/b26e3c6ecc05f349ee0013f0bb850a761016d89cec528a98193a48c34033/contourpy-1.3.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fd93cc7f3139b6dd7aab2f26a90dde0aa9fc264dbf70f6740d498a70b860b82c", size = 265681, upload-time = "2025-04-15T17:44:59.314Z" }, - { url = "https://files.pythonhosted.org/packages/2b/25/ac07d6ad12affa7d1ffed11b77417d0a6308170f44ff20fa1d5aa6333f03/contourpy-1.3.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:107ba8a6a7eec58bb475329e6d3b95deba9440667c4d62b9b6063942b61d7f16", size = 315101, upload-time = "2025-04-15T17:45:04.165Z" }, - { url = "https://files.pythonhosted.org/packages/8f/4d/5bb3192bbe9d3f27e3061a6a8e7733c9120e203cb8515767d30973f71030/contourpy-1.3.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ded1706ed0c1049224531b81128efbd5084598f18d8a2d9efae833edbd2b40ad", size = 220599, upload-time = "2025-04-15T17:45:08.456Z" }, - { url = "https://files.pythonhosted.org/packages/ff/c0/91f1215d0d9f9f343e4773ba6c9b89e8c0cc7a64a6263f21139da639d848/contourpy-1.3.2-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5f5964cdad279256c084b69c3f412b7801e15356b16efa9d78aa974041903da0", size = 266807, upload-time = "2025-04-15T17:45:15.535Z" }, - { url = "https://files.pythonhosted.org/packages/d4/79/6be7e90c955c0487e7712660d6cead01fa17bff98e0ea275737cc2bc8e71/contourpy-1.3.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49b65a95d642d4efa8f64ba12558fcb83407e58a2dfba9d796d77b63ccfcaff5", size = 318729, upload-time = "2025-04-15T17:45:20.166Z" }, - { url = "https://files.pythonhosted.org/packages/87/68/7f46fb537958e87427d98a4074bcde4b67a70b04900cfc5ce29bc2f556c1/contourpy-1.3.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:8c5acb8dddb0752bf252e01a3035b21443158910ac16a3b0d20e7fed7d534ce5", size = 221791, upload-time = "2025-04-15T17:45:24.794Z" }, -] - [[package]] name = "contourpy" version = "1.3.3" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.14' and sys_platform == 'darwin'", - "python_full_version == '3.13.*' and sys_platform == 'darwin'", - "python_full_version == '3.12.*' and sys_platform == 'darwin'", - "python_full_version == '3.11.*' and sys_platform == 'darwin'", - "python_full_version >= '3.14' and sys_platform == 'linux'", - "python_full_version == '3.13.*' and sys_platform == 'linux'", - "python_full_version == '3.12.*' and sys_platform == 'linux'", - "python_full_version == '3.11.*' and sys_platform == 'linux'", - "python_full_version >= '3.14' and sys_platform == 'win32'", - "python_full_version == '3.13.*' and sys_platform == 'win32'", - "python_full_version == '3.12.*' and sys_platform == 'win32'", - "python_full_version == '3.11.*' and sys_platform == 'win32'", -] dependencies = [ - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/58/01/1253e6698a07380cd31a736d248a3f2a50a7c88779a1813da27503cadc2a/contourpy-1.3.3.tar.gz", hash = "sha256:083e12155b210502d0bca491432bb04d56dc3432f95a979b429f2848c3dbe880", size = 13466174, upload-time = "2025-07-26T12:03:12.549Z" } wheels = [ @@ -1599,20 +1450,6 @@ version = "7.13.4" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/24/56/95b7e30fa389756cb56630faa728da46a27b8c6eb46f9d557c68fff12b65/coverage-7.13.4.tar.gz", hash = "sha256:e5c8f6ed1e61a8b2dcdf31eb0b9bbf0130750ca79c1c49eb898e2ad86f5ccc91", size = 827239, upload-time = "2026-02-09T12:59:03.86Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/44/d4/7827d9ffa34d5d4d752eec907022aa417120936282fc488306f5da08c292/coverage-7.13.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0fc31c787a84f8cd6027eba44010517020e0d18487064cd3d8968941856d1415", size = 219152, upload-time = "2026-02-09T12:56:11.974Z" }, - { url = "https://files.pythonhosted.org/packages/35/b0/d69df26607c64043292644dbb9dc54b0856fabaa2cbb1eeee3331cc9e280/coverage-7.13.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a32ebc02a1805adf637fc8dec324b5cdacd2e493515424f70ee33799573d661b", size = 219667, upload-time = "2026-02-09T12:56:13.33Z" }, - { url = "https://files.pythonhosted.org/packages/82/a4/c1523f7c9e47b2271dbf8c2a097e7a1f89ef0d66f5840bb59b7e8814157b/coverage-7.13.4-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:e24f9156097ff9dc286f2f913df3a7f63c0e333dcafa3c196f2c18b4175ca09a", size = 246425, upload-time = "2026-02-09T12:56:14.552Z" }, - { url = "https://files.pythonhosted.org/packages/f8/02/aa7ec01d1a5023c4b680ab7257f9bfde9defe8fdddfe40be096ac19e8177/coverage-7.13.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8041b6c5bfdc03257666e9881d33b1abc88daccaf73f7b6340fb7946655cd10f", size = 248229, upload-time = "2026-02-09T12:56:16.31Z" }, - { url = "https://files.pythonhosted.org/packages/35/98/85aba0aed5126d896162087ef3f0e789a225697245256fc6181b95f47207/coverage-7.13.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2a09cfa6a5862bc2fc6ca7c3def5b2926194a56b8ab78ffcf617d28911123012", size = 250106, upload-time = "2026-02-09T12:56:18.024Z" }, - { url = "https://files.pythonhosted.org/packages/96/72/1db59bd67494bc162e3e4cd5fbc7edba2c7026b22f7c8ef1496d58c2b94c/coverage-7.13.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:296f8b0af861d3970c2a4d8c91d48eb4dd4771bcef9baedec6a9b515d7de3def", size = 252021, upload-time = "2026-02-09T12:56:19.272Z" }, - { url = "https://files.pythonhosted.org/packages/9d/97/72899c59c7066961de6e3daa142d459d47d104956db43e057e034f015c8a/coverage-7.13.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e101609bcbbfb04605ea1027b10dc3735c094d12d40826a60f897b98b1c30256", size = 247114, upload-time = "2026-02-09T12:56:21.051Z" }, - { url = "https://files.pythonhosted.org/packages/39/1f/f1885573b5970235e908da4389176936c8933e86cb316b9620aab1585fa2/coverage-7.13.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:aa3feb8db2e87ff5e6d00d7e1480ae241876286691265657b500886c98f38bda", size = 248143, upload-time = "2026-02-09T12:56:22.585Z" }, - { url = "https://files.pythonhosted.org/packages/a8/cf/e80390c5b7480b722fa3e994f8202807799b85bc562aa4f1dde209fbb7be/coverage-7.13.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:4fc7fa81bbaf5a02801b65346c8b3e657f1d93763e58c0abdf7c992addd81a92", size = 246152, upload-time = "2026-02-09T12:56:23.748Z" }, - { url = "https://files.pythonhosted.org/packages/44/bf/f89a8350d85572f95412debb0fb9bb4795b1d5b5232bd652923c759e787b/coverage-7.13.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:33901f604424145c6e9c2398684b92e176c0b12df77d52db81c20abd48c3794c", size = 249959, upload-time = "2026-02-09T12:56:25.209Z" }, - { url = "https://files.pythonhosted.org/packages/f7/6e/612a02aece8178c818df273e8d1642190c4875402ca2ba74514394b27aba/coverage-7.13.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:bb28c0f2cf2782508a40cec377935829d5fcc3ad9a3681375af4e84eb34b6b58", size = 246416, upload-time = "2026-02-09T12:56:26.475Z" }, - { url = "https://files.pythonhosted.org/packages/cb/98/b5afc39af67c2fa6786b03c3a7091fc300947387ce8914b096db8a73d67a/coverage-7.13.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:9d107aff57a83222ddbd8d9ee705ede2af2cc926608b57abed8ef96b50b7e8f9", size = 247025, upload-time = "2026-02-09T12:56:27.727Z" }, - { url = "https://files.pythonhosted.org/packages/51/30/2bba8ef0682d5bd210c38fe497e12a06c9f8d663f7025e9f5c2c31ce847d/coverage-7.13.4-cp310-cp310-win32.whl", hash = "sha256:a6f94a7d00eb18f1b6d403c91a88fd58cfc92d4b16080dfdb774afc8294469bf", size = 221758, upload-time = "2026-02-09T12:56:29.051Z" }, - { url = "https://files.pythonhosted.org/packages/78/13/331f94934cf6c092b8ea59ff868eb587bc8fe0893f02c55bc6c0183a192e/coverage-7.13.4-cp310-cp310-win_amd64.whl", hash = "sha256:2cb0f1e000ebc419632bbe04366a8990b6e32c4e0b51543a6484ffe15eaeda95", size = 222693, upload-time = "2026-02-09T12:56:30.366Z" }, { url = "https://files.pythonhosted.org/packages/b4/ad/b59e5b451cf7172b8d1043dc0fa718f23aab379bc1521ee13d4bd9bfa960/coverage-7.13.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d490ba50c3f35dd7c17953c68f3270e7ccd1c6642e2d2afe2d8e720b98f5a053", size = 219278, upload-time = "2026-02-09T12:56:31.673Z" }, { url = "https://files.pythonhosted.org/packages/f1/17/0cb7ca3de72e5f4ef2ec2fa0089beafbcaaaead1844e8b8a63d35173d77d/coverage-7.13.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:19bc3c88078789f8ef36acb014d7241961dbf883fd2533d18cb1e7a5b4e28b11", size = 219783, upload-time = "2026-02-09T12:56:33.104Z" }, { url = "https://files.pythonhosted.org/packages/ab/63/325d8e5b11e0eaf6d0f6a44fad444ae58820929a9b0de943fa377fe73e85/coverage-7.13.4-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3998e5a32e62fdf410c0dbd3115df86297995d6e3429af80b8798aad894ca7aa", size = 250200, upload-time = "2026-02-09T12:56:34.474Z" }, @@ -1730,7 +1567,6 @@ version = "46.0.5" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cffi", marker = "(platform_python_implementation != 'PyPy' and sys_platform == 'darwin') or (platform_python_implementation != 'PyPy' and sys_platform == 'linux') or (platform_python_implementation != 'PyPy' and sys_platform == 'win32')" }, - { name = "typing-extensions", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, ] sdist = { url = "https://files.pythonhosted.org/packages/60/04/ee2a9e8542e4fa2773b81771ff8349ff19cdd56b7258a0cc442639052edb/cryptography-46.0.5.tar.gz", hash = "sha256:abace499247268e3757271b2f1e244b36b06f8515cf27c4d49468fc9eb16e93d", size = 750064, upload-time = "2026-02-10T19:18:38.255Z" } wheels = [ @@ -1883,18 +1719,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/de/15/545e2b6cf2e3be84bc1ed85613edd75b8aea69807a71c26f4ca6a9258e82/email_validator-2.3.0-py3-none-any.whl", hash = "sha256:80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4", size = 35604, upload-time = "2025-08-26T13:09:05.858Z" }, ] -[[package]] -name = "exceptiongroup" -version = "1.3.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, -] - [[package]] name = "execnet" version = "2.1.2" @@ -1941,17 +1765,6 @@ version = "0.14.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/c3/7d/d9daedf0f2ebcacd20d599928f8913e9d2aea1d56d2d355a93bfa2b611d7/fastuuid-0.14.0.tar.gz", hash = "sha256:178947fc2f995b38497a74172adee64fdeb8b7ec18f2a5934d037641ba265d26", size = 18232, upload-time = "2025-10-19T22:19:22.402Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ad/b2/731a6696e37cd20eed353f69a09f37a984a43c9713764ee3f7ad5f57f7f9/fastuuid-0.14.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:6e6243d40f6c793c3e2ee14c13769e341b90be5ef0c23c82fa6515a96145181a", size = 516760, upload-time = "2025-10-19T22:25:21.509Z" }, - { url = "https://files.pythonhosted.org/packages/c5/79/c73c47be2a3b8734d16e628982653517f80bbe0570e27185d91af6096507/fastuuid-0.14.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:13ec4f2c3b04271f62be2e1ce7e95ad2dd1cf97e94503a3760db739afbd48f00", size = 264748, upload-time = "2025-10-19T22:41:52.873Z" }, - { url = "https://files.pythonhosted.org/packages/24/c5/84c1eea05977c8ba5173555b0133e3558dc628bcf868d6bf1689ff14aedc/fastuuid-0.14.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b2fdd48b5e4236df145a149d7125badb28e0a383372add3fbaac9a6b7a394470", size = 254537, upload-time = "2025-10-19T22:33:55.603Z" }, - { url = "https://files.pythonhosted.org/packages/0e/23/4e362367b7fa17dbed646922f216b9921efb486e7abe02147e4b917359f8/fastuuid-0.14.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f74631b8322d2780ebcf2d2d75d58045c3e9378625ec51865fe0b5620800c39d", size = 278994, upload-time = "2025-10-19T22:26:17.631Z" }, - { url = "https://files.pythonhosted.org/packages/b2/72/3985be633b5a428e9eaec4287ed4b873b7c4c53a9639a8b416637223c4cd/fastuuid-0.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:83cffc144dc93eb604b87b179837f2ce2af44871a7b323f2bfed40e8acb40ba8", size = 280003, upload-time = "2025-10-19T22:23:45.415Z" }, - { url = "https://files.pythonhosted.org/packages/b3/6d/6ef192a6df34e2266d5c9deb39cd3eea986df650cbcfeaf171aa52a059c3/fastuuid-0.14.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a771f135ab4523eb786e95493803942a5d1fc1610915f131b363f55af53b219", size = 303583, upload-time = "2025-10-19T22:26:00.756Z" }, - { url = "https://files.pythonhosted.org/packages/9d/11/8a2ea753c68d4fece29d5d7c6f3f903948cc6e82d1823bc9f7f7c0355db3/fastuuid-0.14.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4edc56b877d960b4eda2c4232f953a61490c3134da94f3c28af129fb9c62a4f6", size = 460955, upload-time = "2025-10-19T22:36:25.196Z" }, - { url = "https://files.pythonhosted.org/packages/23/42/7a32c93b6ce12642d9a152ee4753a078f372c9ebb893bc489d838dd4afd5/fastuuid-0.14.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bcc96ee819c282e7c09b2eed2b9bd13084e3b749fdb2faf58c318d498df2efbe", size = 480763, upload-time = "2025-10-19T22:24:28.451Z" }, - { url = "https://files.pythonhosted.org/packages/b9/e9/a5f6f686b46e3ed4ed3b93770111c233baac87dd6586a411b4988018ef1d/fastuuid-0.14.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7a3c0bca61eacc1843ea97b288d6789fbad7400d16db24e36a66c28c268cfe3d", size = 452613, upload-time = "2025-10-19T22:25:06.827Z" }, - { url = "https://files.pythonhosted.org/packages/b4/c9/18abc73c9c5b7fc0e476c1733b678783b2e8a35b0be9babd423571d44e98/fastuuid-0.14.0-cp310-cp310-win32.whl", hash = "sha256:7f2f3efade4937fae4e77efae1af571902263de7b78a0aee1a1653795a093b2a", size = 155045, upload-time = "2025-10-19T22:28:32.732Z" }, - { url = "https://files.pythonhosted.org/packages/5e/8a/d9e33f4eb4d4f6d9f2c5c7d7e96b5cdbb535c93f3b1ad6acce97ee9d4bf8/fastuuid-0.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:ae64ba730d179f439b0736208b4c279b8bc9c089b102aec23f86512ea458c8a4", size = 156122, upload-time = "2025-10-19T22:23:15.59Z" }, { url = "https://files.pythonhosted.org/packages/98/f3/12481bda4e5b6d3e698fbf525df4443cc7dce746f246b86b6fcb2fba1844/fastuuid-0.14.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:73946cb950c8caf65127d4e9a325e2b6be0442a224fd51ba3b6ac44e1912ce34", size = 516386, upload-time = "2025-10-19T22:42:40.176Z" }, { url = "https://files.pythonhosted.org/packages/59/19/2fc58a1446e4d72b655648eb0879b04e88ed6fa70d474efcf550f640f6ec/fastuuid-0.14.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:12ac85024637586a5b69645e7ed986f7535106ed3013640a393a03e461740cb7", size = 264569, upload-time = "2025-10-19T22:25:50.977Z" }, { url = "https://files.pythonhosted.org/packages/78/29/3c74756e5b02c40cfcc8b1d8b5bac4edbd532b55917a6bcc9113550e99d1/fastuuid-0.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:05a8dde1f395e0c9b4be515b7a521403d1e8349443e7641761af07c7ad1624b1", size = 254366, upload-time = "2025-10-19T22:29:49.166Z" }, @@ -2055,14 +1868,6 @@ version = "4.61.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/ec/ca/cf17b88a8df95691275a3d77dc0a5ad9907f328ae53acbe6795da1b2f5ed/fonttools-4.61.1.tar.gz", hash = "sha256:6675329885c44657f826ef01d9e4fb33b9158e9d93c537d84ad8399539bc6f69", size = 3565756, upload-time = "2025-12-12T17:31:24.246Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5b/94/8a28707adb00bed1bf22dac16ccafe60faf2ade353dcb32c3617ee917307/fonttools-4.61.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c7db70d57e5e1089a274cbb2b1fd635c9a24de809a231b154965d415d6c6d24", size = 2854799, upload-time = "2025-12-12T17:29:27.5Z" }, - { url = "https://files.pythonhosted.org/packages/94/93/c2e682faaa5ee92034818d8f8a8145ae73eb83619600495dcf8503fa7771/fonttools-4.61.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5fe9fd43882620017add5eabb781ebfbc6998ee49b35bd7f8f79af1f9f99a958", size = 2403032, upload-time = "2025-12-12T17:29:30.115Z" }, - { url = "https://files.pythonhosted.org/packages/f1/62/1748f7e7e1ee41aa52279fd2e3a6d0733dc42a673b16932bad8e5d0c8b28/fonttools-4.61.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d8db08051fc9e7d8bc622f2112511b8107d8f27cd89e2f64ec45e9825e8288da", size = 4897863, upload-time = "2025-12-12T17:29:32.535Z" }, - { url = "https://files.pythonhosted.org/packages/69/69/4ca02ee367d2c98edcaeb83fc278d20972502ee071214ad9d8ca85e06080/fonttools-4.61.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a76d4cb80f41ba94a6691264be76435e5f72f2cb3cab0b092a6212855f71c2f6", size = 4859076, upload-time = "2025-12-12T17:29:34.907Z" }, - { url = "https://files.pythonhosted.org/packages/8c/f5/660f9e3cefa078861a7f099107c6d203b568a6227eef163dd173bfc56bdc/fonttools-4.61.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a13fc8aeb24bad755eea8f7f9d409438eb94e82cf86b08fe77a03fbc8f6a96b1", size = 4875623, upload-time = "2025-12-12T17:29:37.33Z" }, - { url = "https://files.pythonhosted.org/packages/63/d1/9d7c5091d2276ed47795c131c1bf9316c3c1ab2789c22e2f59e0572ccd38/fonttools-4.61.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b846a1fcf8beadeb9ea4f44ec5bdde393e2f1569e17d700bfc49cd69bde75881", size = 4993327, upload-time = "2025-12-12T17:29:39.781Z" }, - { url = "https://files.pythonhosted.org/packages/6f/2d/28def73837885ae32260d07660a052b99f0aa00454867d33745dfe49dbf0/fonttools-4.61.1-cp310-cp310-win32.whl", hash = "sha256:78a7d3ab09dc47ac1a363a493e6112d8cabed7ba7caad5f54dbe2f08676d1b47", size = 1502180, upload-time = "2025-12-12T17:29:42.217Z" }, - { url = "https://files.pythonhosted.org/packages/63/fa/bfdc98abb4dd2bd491033e85e3ba69a2313c850e759a6daa014bc9433b0f/fonttools-4.61.1-cp310-cp310-win_amd64.whl", hash = "sha256:eff1ac3cc66c2ac7cda1e64b4e2f3ffef474b7335f92fc3833fc632d595fcee6", size = 1550654, upload-time = "2025-12-12T17:29:44.564Z" }, { url = "https://files.pythonhosted.org/packages/69/12/bf9f4eaa2fad039356cc627587e30ed008c03f1cebd3034376b5ee8d1d44/fonttools-4.61.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c6604b735bb12fef8e0efd5578c9fb5d3d8532d5001ea13a19cddf295673ee09", size = 2852213, upload-time = "2025-12-12T17:29:46.675Z" }, { url = "https://files.pythonhosted.org/packages/ac/49/4138d1acb6261499bedde1c07f8c2605d1d8f9d77a151e5507fd3ef084b6/fonttools-4.61.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5ce02f38a754f207f2f06557523cd39a06438ba3aafc0639c477ac409fc64e37", size = 2401689, upload-time = "2025-12-12T17:29:48.769Z" }, { url = "https://files.pythonhosted.org/packages/e5/fe/e6ce0fe20a40e03aef906af60aa87668696f9e4802fa283627d0b5ed777f/fonttools-4.61.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77efb033d8d7ff233385f30c62c7c79271c8885d5c9657d967ede124671bbdfb", size = 5058809, upload-time = "2025-12-12T17:29:51.701Z" }, @@ -2125,22 +1930,6 @@ version = "1.8.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad", size = 45875, upload-time = "2025-10-06T05:38:17.865Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/83/4a/557715d5047da48d54e659203b9335be7bfaafda2c3f627b7c47e0b3aaf3/frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011", size = 86230, upload-time = "2025-10-06T05:35:23.699Z" }, - { url = "https://files.pythonhosted.org/packages/a2/fb/c85f9fed3ea8fe8740e5b46a59cc141c23b842eca617da8876cfce5f760e/frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565", size = 49621, upload-time = "2025-10-06T05:35:25.341Z" }, - { url = "https://files.pythonhosted.org/packages/63/70/26ca3f06aace16f2352796b08704338d74b6d1a24ca38f2771afbb7ed915/frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad", size = 49889, upload-time = "2025-10-06T05:35:26.797Z" }, - { url = "https://files.pythonhosted.org/packages/5d/ed/c7895fd2fde7f3ee70d248175f9b6cdf792fb741ab92dc59cd9ef3bd241b/frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2", size = 219464, upload-time = "2025-10-06T05:35:28.254Z" }, - { url = "https://files.pythonhosted.org/packages/6b/83/4d587dccbfca74cb8b810472392ad62bfa100bf8108c7223eb4c4fa2f7b3/frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186", size = 221649, upload-time = "2025-10-06T05:35:29.454Z" }, - { url = "https://files.pythonhosted.org/packages/6a/c6/fd3b9cd046ec5fff9dab66831083bc2077006a874a2d3d9247dea93ddf7e/frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e", size = 219188, upload-time = "2025-10-06T05:35:30.951Z" }, - { url = "https://files.pythonhosted.org/packages/ce/80/6693f55eb2e085fc8afb28cf611448fb5b90e98e068fa1d1b8d8e66e5c7d/frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450", size = 231748, upload-time = "2025-10-06T05:35:32.101Z" }, - { url = "https://files.pythonhosted.org/packages/97/d6/e9459f7c5183854abd989ba384fe0cc1a0fb795a83c033f0571ec5933ca4/frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef", size = 236351, upload-time = "2025-10-06T05:35:33.834Z" }, - { url = "https://files.pythonhosted.org/packages/97/92/24e97474b65c0262e9ecd076e826bfd1d3074adcc165a256e42e7b8a7249/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4", size = 218767, upload-time = "2025-10-06T05:35:35.205Z" }, - { url = "https://files.pythonhosted.org/packages/ee/bf/dc394a097508f15abff383c5108cb8ad880d1f64a725ed3b90d5c2fbf0bb/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff", size = 235887, upload-time = "2025-10-06T05:35:36.354Z" }, - { url = "https://files.pythonhosted.org/packages/40/90/25b201b9c015dbc999a5baf475a257010471a1fa8c200c843fd4abbee725/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c", size = 228785, upload-time = "2025-10-06T05:35:37.949Z" }, - { url = "https://files.pythonhosted.org/packages/84/f4/b5bc148df03082f05d2dd30c089e269acdbe251ac9a9cf4e727b2dbb8a3d/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f", size = 230312, upload-time = "2025-10-06T05:35:39.178Z" }, - { url = "https://files.pythonhosted.org/packages/db/4b/87e95b5d15097c302430e647136b7d7ab2398a702390cf4c8601975709e7/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7", size = 217650, upload-time = "2025-10-06T05:35:40.377Z" }, - { url = "https://files.pythonhosted.org/packages/e5/70/78a0315d1fea97120591a83e0acd644da638c872f142fd72a6cebee825f3/frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a", size = 39659, upload-time = "2025-10-06T05:35:41.863Z" }, - { url = "https://files.pythonhosted.org/packages/66/aa/3f04523fb189a00e147e60c5b2205126118f216b0aa908035c45336e27e4/frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6", size = 43837, upload-time = "2025-10-06T05:35:43.205Z" }, - { url = "https://files.pythonhosted.org/packages/39/75/1135feecdd7c336938bd55b4dc3b0dfc46d85b9be12ef2628574b28de776/frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e", size = 39989, upload-time = "2025-10-06T05:35:44.596Z" }, { url = "https://files.pythonhosted.org/packages/bc/03/077f869d540370db12165c0aa51640a873fb661d8b315d1d4d67b284d7ac/frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84", size = 86912, upload-time = "2025-10-06T05:35:45.98Z" }, { url = "https://files.pythonhosted.org/packages/df/b5/7610b6bd13e4ae77b96ba85abea1c8cb249683217ef09ac9e0ae93f25a91/frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9", size = 50046, upload-time = "2025-10-06T05:35:47.009Z" }, { url = "https://files.pythonhosted.org/packages/6e/ef/0e8f1fe32f8a53dd26bdd1f9347efe0778b0fddf62789ea683f4cc7d787d/frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93", size = 50119, upload-time = "2025-10-06T05:35:48.38Z" }, @@ -2278,56 +2067,19 @@ wheels = [ [[package]] name = "github-copilot-sdk" -version = "0.1.25" +version = "0.1.32" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11' and sys_platform == 'darwin'", - "python_full_version < '3.11' and sys_platform == 'linux'", - "python_full_version < '3.11' and sys_platform == 'win32'", -] dependencies = [ - { name = "pydantic", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "python-dateutil", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "typing-extensions", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, + { name = "pydantic", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "python-dateutil", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] wheels = [ - { url = "https://files.pythonhosted.org/packages/87/06/1dec504b54c724d69283969d4ed004225ec8bbb1c0a5e9e0c3b6b048099a/github_copilot_sdk-0.1.25-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:d32c3fc2c393f70923a645a133607da2e562d078b87437f499100d5bb8c1902f", size = 58097936, upload-time = "2026-02-18T00:07:20.672Z" }, - { url = "https://files.pythonhosted.org/packages/9f/a3/a6ad1ca47af561069d6d8d0a4b074b000b0be1dfa9e66215b264ee31650c/github_copilot_sdk-0.1.25-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7af33d3afbe09a78dfc9d65a843526e47aba15631e90926c42a21a200fab12da", size = 54867128, upload-time = "2026-02-18T00:07:25.228Z" }, - { url = "https://files.pythonhosted.org/packages/8c/08/74fd9be0ed292d524a15fa4db950f43f4afefb77514f856e36fd1203bf13/github_copilot_sdk-0.1.25-py3-none-manylinux_2_17_aarch64.whl", hash = "sha256:bc74a3d08ee45313ac02a3f7159c583ec41fc16090ec5f27f88c4b737f03139e", size = 60999905, upload-time = "2026-02-18T00:07:29.462Z" }, - { url = "https://files.pythonhosted.org/packages/ae/01/daae53c8586c0cadae9a2a146d1da9bd6dbd7e89b7dcd72643b453267345/github_copilot_sdk-0.1.25-py3-none-manylinux_2_17_x86_64.whl", hash = "sha256:13ef99fa8c709c5f80d820672bf36ee9176bc33f0efce6a2b5cbf6d1bb2369e8", size = 59183062, upload-time = "2026-02-18T00:07:34.059Z" }, - { url = "https://files.pythonhosted.org/packages/81/a8/2ec7d47a18b042cca2c140cabb5fe6621697c1b43b8721637061122c51ed/github_copilot_sdk-0.1.25-py3-none-win_amd64.whl", hash = "sha256:1a90ee583309ff308fea42f9edec61203645a33ca1d3dc42953628fb8c3eda07", size = 53624148, upload-time = "2026-02-18T00:07:38.558Z" }, - { url = "https://files.pythonhosted.org/packages/6b/2e/4cffd33552ede91de7517641835a3365571abd3f436c9d76a4f50793033c/github_copilot_sdk-0.1.25-py3-none-win_arm64.whl", hash = "sha256:5249a63d1ac1e4d325c70c9902e81327b0baca53afa46010f52ac3fd3b5a111b", size = 51623455, upload-time = "2026-02-18T00:07:42.156Z" }, -] - -[[package]] -name = "github-copilot-sdk" -version = "0.1.30" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.14' and sys_platform == 'darwin'", - "python_full_version == '3.13.*' and sys_platform == 'darwin'", - "python_full_version == '3.12.*' and sys_platform == 'darwin'", - "python_full_version == '3.11.*' and sys_platform == 'darwin'", - "python_full_version >= '3.14' and sys_platform == 'linux'", - "python_full_version == '3.13.*' and sys_platform == 'linux'", - "python_full_version == '3.12.*' and sys_platform == 'linux'", - "python_full_version == '3.11.*' and sys_platform == 'linux'", - "python_full_version >= '3.14' and sys_platform == 'win32'", - "python_full_version == '3.13.*' and sys_platform == 'win32'", - "python_full_version == '3.12.*' and sys_platform == 'win32'", - "python_full_version == '3.11.*' and sys_platform == 'win32'", -] -dependencies = [ - { name = "pydantic", marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, - { name = "python-dateutil", marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, -] -wheels = [ - { url = "https://files.pythonhosted.org/packages/18/37/92b8037c0673999ac1c49e9d079cf6d36283e6ee3453d66b54878da81bc8/github_copilot_sdk-0.1.30-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:47e95246a63beeebf192db6013662c5f39778ccfa6b1b718b79cbec6b6a88bf8", size = 58182964, upload-time = "2026-03-03T17:21:53.564Z" }, - { url = "https://files.pythonhosted.org/packages/08/79/9d0628fa819df73e92ebbd4af949cdd82850cc4bde79b3e78040fcd8ed80/github_copilot_sdk-0.1.30-py3-none-macosx_11_0_arm64.whl", hash = "sha256:601cbe1c5a576906b73cbf8591429451c91148bff5a564e56e1e83ff99b2dc10", size = 54935274, upload-time = "2026-03-03T17:21:57.494Z" }, - { url = "https://files.pythonhosted.org/packages/10/5d/f407e9c9155f912780b4587ab74abf3b94fae91af0463bad317cc8aacdfe/github_copilot_sdk-0.1.30-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:735fb90683bea27a418a0d45df430492db2a395e5ae88d575ac138be49d6cf07", size = 61071530, upload-time = "2026-03-03T17:22:01.601Z" }, - { url = "https://files.pythonhosted.org/packages/b8/9f/5c2ab2baf5f185150058c774da2b5e4c613b4532c48b499ce127419da461/github_copilot_sdk-0.1.30-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:21ade06dfe5ca111663c42fff000ab3ec6595e51b1cf4ab56ff550cdd7a2992f", size = 59252204, upload-time = "2026-03-03T17:22:05.706Z" }, - { url = "https://files.pythonhosted.org/packages/ef/80/4e72ccdc8868250ba8c5d48a1fef5a8244361c2a586820de9b77df0c79ed/github_copilot_sdk-0.1.30-py3-none-win_amd64.whl", hash = "sha256:f1be9e49da2af370a914d4425bfecbc2daecf8e5de0074beaa1e22735bdd5da6", size = 53691358, upload-time = "2026-03-03T17:22:09.474Z" }, - { url = "https://files.pythonhosted.org/packages/53/4f/25ff085d0d5d50d1197fd6ae9a53adc4cc8298940212f5a69f7ced68c33e/github_copilot_sdk-0.1.30-py3-none-win_arm64.whl", hash = "sha256:3e0691eb3030c385f629d63d74ded938e0577fcd98f452259efd5d7fb2283576", size = 51699653, upload-time = "2026-03-03T17:22:13.215Z" }, + { url = "https://files.pythonhosted.org/packages/cd/67/ebd002c14fe7d2640d0fff47a0b29fdb21ed239b597afa2d2c6f6cfebb0b/github_copilot_sdk-0.1.32-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:d97bc39fbd4b51e0aea3405299da1e643838ddbf6bff284f688a2d8c20d82ff8", size = 58576987, upload-time = "2026-03-07T15:28:24.062Z" }, + { url = "https://files.pythonhosted.org/packages/a5/50/add440f61e19f5b7e6989c89c5cefcb14c23f06627621e7c3a15a1f75e5d/github_copilot_sdk-0.1.32-py3-none-macosx_11_0_arm64.whl", hash = "sha256:8098592f34e7ee7decbcbb7615c7eb924471e65a3e4d0d93bc49b0d112f8ec51", size = 55328145, upload-time = "2026-03-07T15:28:28.395Z" }, + { url = "https://files.pythonhosted.org/packages/f9/b8/c3ca0678b21d8a0dd8fe3aa8fad4b7ec5f22cbe9d5fb3a11f82df4f40578/github_copilot_sdk-0.1.32-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:c20cae4bec3584ce007a65a363216a1f98a71428a3ca3b76622f9e556307eed2", size = 61456678, upload-time = "2026-03-07T15:28:32.646Z" }, + { url = "https://files.pythonhosted.org/packages/21/5c/bdfe177353f88d44da9600c3ec478e2b0df7a838901947b168e869ba5ad7/github_copilot_sdk-0.1.32-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:0941fd445e97a9b13fb713086c4a8c09c20ec8c7ab854cf009bd7cc213488999", size = 59641536, upload-time = "2026-03-07T15:28:36.977Z" }, + { url = "https://files.pythonhosted.org/packages/1e/d0/2f3a07c74ecd24587b8f7d26729738f73e63f3341bf4bdc9eb2bb73ddaaf/github_copilot_sdk-0.1.32-py3-none-win_amd64.whl", hash = "sha256:37a82ff0908e01512052b69df4aa498332fa5769999635425015ed43cd850622", size = 54077464, upload-time = "2026-03-07T15:28:41.34Z" }, + { url = "https://files.pythonhosted.org/packages/1c/76/292088d6ccf2daf8bcb8a94b22b4f16005a6772087896f1b43c4f0d5edaa/github_copilot_sdk-0.1.32-py3-none-win_arm64.whl", hash = "sha256:3199c99604e8d393b1d60905be80b84da44e70d16d30b92e2ae9b92814cdc4ae", size = 52083845, upload-time = "2026-03-07T15:28:45.092Z" }, ] [[package]] @@ -2387,18 +2139,9 @@ version = "3.3.2" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/a3/51/1664f6b78fc6ebbd98019a1fd730e83fa78f2db7058f72b1463d3612b8db/greenlet-3.3.2.tar.gz", hash = "sha256:2eaf067fc6d886931c7962e8c6bede15d2f01965560f3359b27c80bde2d151f2", size = 188267, upload-time = "2026-02-20T20:54:15.531Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/38/3f/9859f655d11901e7b2996c6e3d33e0caa9a1d4572c3bc61ed0faa64b2f4c/greenlet-3.3.2-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:9bc885b89709d901859cf95179ec9f6bb67a3d2bb1f0e88456461bd4b7f8fd0d", size = 277747, upload-time = "2026-02-20T20:16:21.325Z" }, - { url = "https://files.pythonhosted.org/packages/fb/07/cb284a8b5c6498dbd7cba35d31380bb123d7dceaa7907f606c8ff5993cbf/greenlet-3.3.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b568183cf65b94919be4438dc28416b234b678c608cafac8874dfeeb2a9bbe13", size = 579202, upload-time = "2026-02-20T20:47:28.955Z" }, - { url = "https://files.pythonhosted.org/packages/ed/45/67922992b3a152f726163b19f890a85129a992f39607a2a53155de3448b8/greenlet-3.3.2-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:527fec58dc9f90efd594b9b700662ed3fb2493c2122067ac9c740d98080a620e", size = 590620, upload-time = "2026-02-20T20:55:55.581Z" }, - { url = "https://files.pythonhosted.org/packages/03/5f/6e2a7d80c353587751ef3d44bb947f0565ec008a2e0927821c007e96d3a7/greenlet-3.3.2-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:508c7f01f1791fbc8e011bd508f6794cb95397fdb198a46cb6635eb5b78d85a7", size = 602132, upload-time = "2026-02-20T21:02:43.261Z" }, - { url = "https://files.pythonhosted.org/packages/ad/55/9f1ebb5a825215fadcc0f7d5073f6e79e3007e3282b14b22d6aba7ca6cb8/greenlet-3.3.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ad0c8917dd42a819fe77e6bdfcb84e3379c0de956469301d9fd36427a1ca501f", size = 591729, upload-time = "2026-02-20T20:20:58.395Z" }, - { url = "https://files.pythonhosted.org/packages/24/b4/21f5455773d37f94b866eb3cf5caed88d6cea6dd2c6e1f9c34f463cba3ec/greenlet-3.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:97245cc10e5515dbc8c3104b2928f7f02b6813002770cfaffaf9a6e0fc2b94ef", size = 1551946, upload-time = "2026-02-20T20:49:31.102Z" }, - { url = "https://files.pythonhosted.org/packages/00/68/91f061a926abead128fe1a87f0b453ccf07368666bd59ffa46016627a930/greenlet-3.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8c1fdd7d1b309ff0da81d60a9688a8bd044ac4e18b250320a96fc68d31c209ca", size = 1618494, upload-time = "2026-02-20T20:21:06.541Z" }, - { url = "https://files.pythonhosted.org/packages/ac/78/f93e840cbaef8becaf6adafbaf1319682a6c2d8c1c20224267a5c6c8c891/greenlet-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:5d0e35379f93a6d0222de929a25ab47b5eb35b5ef4721c2b9cbcc4036129ff1f", size = 230092, upload-time = "2026-02-20T20:17:09.379Z" }, { url = "https://files.pythonhosted.org/packages/f3/47/16400cb42d18d7a6bb46f0626852c1718612e35dcb0dffa16bbaffdf5dd2/greenlet-3.3.2-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:c56692189a7d1c7606cb794be0a8381470d95c57ce5be03fb3d0ef57c7853b86", size = 278890, upload-time = "2026-02-20T20:19:39.263Z" }, { url = "https://files.pythonhosted.org/packages/a3/90/42762b77a5b6aa96cd8c0e80612663d39211e8ae8a6cd47c7f1249a66262/greenlet-3.3.2-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ebd458fa8285960f382841da585e02201b53a5ec2bac6b156fc623b5ce4499f", size = 581120, upload-time = "2026-02-20T20:47:30.161Z" }, { url = "https://files.pythonhosted.org/packages/bf/6f/f3d64f4fa0a9c7b5c5b3c810ff1df614540d5aa7d519261b53fba55d4df9/greenlet-3.3.2-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a443358b33c4ec7b05b79a7c8b466f5d275025e750298be7340f8fc63dff2a55", size = 594363, upload-time = "2026-02-20T20:55:56.965Z" }, - { url = "https://files.pythonhosted.org/packages/9c/8b/1430a04657735a3f23116c2e0d5eb10220928846e4537a938a41b350bed6/greenlet-3.3.2-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4375a58e49522698d3e70cc0b801c19433021b5c37686f7ce9c65b0d5c8677d2", size = 605046, upload-time = "2026-02-20T21:02:45.234Z" }, { url = "https://files.pythonhosted.org/packages/72/83/3e06a52aca8128bdd4dcd67e932b809e76a96ab8c232a8b025b2850264c5/greenlet-3.3.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e2cd90d413acbf5e77ae41e5d3c9b3ac1d011a756d7284d7f3f2b806bbd6358", size = 594156, upload-time = "2026-02-20T20:20:59.955Z" }, { url = "https://files.pythonhosted.org/packages/70/79/0de5e62b873e08fe3cef7dbe84e5c4bc0e8ed0c7ff131bccb8405cd107c8/greenlet-3.3.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:442b6057453c8cb29b4fb36a2ac689382fc71112273726e2423f7f17dc73bf99", size = 1554649, upload-time = "2026-02-20T20:49:32.293Z" }, { url = "https://files.pythonhosted.org/packages/5a/00/32d30dee8389dc36d42170a9c66217757289e2afb0de59a3565260f38373/greenlet-3.3.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:45abe8eb6339518180d5a7fa47fa01945414d7cca5ecb745346fc6a87d2750be", size = 1619472, upload-time = "2026-02-20T20:21:07.966Z" }, @@ -2407,7 +2150,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ea/ab/1608e5a7578e62113506740b88066bf09888322a311cff602105e619bd87/greenlet-3.3.2-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:ac8d61d4343b799d1e526db579833d72f23759c71e07181c2d2944e429eb09cd", size = 280358, upload-time = "2026-02-20T20:17:43.971Z" }, { url = "https://files.pythonhosted.org/packages/a5/23/0eae412a4ade4e6623ff7626e38998cb9b11e9ff1ebacaa021e4e108ec15/greenlet-3.3.2-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ceec72030dae6ac0c8ed7591b96b70410a8be370b6a477b1dbc072856ad02bd", size = 601217, upload-time = "2026-02-20T20:47:31.462Z" }, { url = "https://files.pythonhosted.org/packages/f8/16/5b1678a9c07098ecb9ab2dd159fafaf12e963293e61ee8d10ecb55273e5e/greenlet-3.3.2-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a2a5be83a45ce6188c045bcc44b0ee037d6a518978de9a5d97438548b953a1ac", size = 611792, upload-time = "2026-02-20T20:55:58.423Z" }, - { url = "https://files.pythonhosted.org/packages/5c/c5/cc09412a29e43406eba18d61c70baa936e299bc27e074e2be3806ed29098/greenlet-3.3.2-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ae9e21c84035c490506c17002f5c8ab25f980205c3e61ddb3a2a2a2e6c411fcb", size = 626250, upload-time = "2026-02-20T21:02:46.596Z" }, { url = "https://files.pythonhosted.org/packages/50/1f/5155f55bd71cabd03765a4aac9ac446be129895271f73872c36ebd4b04b6/greenlet-3.3.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:43e99d1749147ac21dde49b99c9abffcbc1e2d55c67501465ef0930d6e78e070", size = 613875, upload-time = "2026-02-20T20:21:01.102Z" }, { url = "https://files.pythonhosted.org/packages/fc/dd/845f249c3fcd69e32df80cdab059b4be8b766ef5830a3d0aa9d6cad55beb/greenlet-3.3.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4c956a19350e2c37f2c48b336a3afb4bff120b36076d9d7fb68cb44e05d95b79", size = 1571467, upload-time = "2026-02-20T20:49:33.495Z" }, { url = "https://files.pythonhosted.org/packages/2a/50/2649fe21fcc2b56659a452868e695634722a6655ba245d9f77f5656010bf/greenlet-3.3.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6c6f8ba97d17a1e7d664151284cb3315fc5f8353e75221ed4324f84eb162b395", size = 1640001, upload-time = "2026-02-20T20:21:09.154Z" }, @@ -2416,7 +2158,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ac/48/f8b875fa7dea7dd9b33245e37f065af59df6a25af2f9561efa8d822fde51/greenlet-3.3.2-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:aa6ac98bdfd716a749b84d4034486863fd81c3abde9aa3cf8eff9127981a4ae4", size = 279120, upload-time = "2026-02-20T20:19:01.9Z" }, { url = "https://files.pythonhosted.org/packages/49/8d/9771d03e7a8b1ee456511961e1b97a6d77ae1dea4a34a5b98eee706689d3/greenlet-3.3.2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ab0c7e7901a00bc0a7284907273dc165b32e0d109a6713babd04471327ff7986", size = 603238, upload-time = "2026-02-20T20:47:32.873Z" }, { url = "https://files.pythonhosted.org/packages/59/0e/4223c2bbb63cd5c97f28ffb2a8aee71bdfb30b323c35d409450f51b91e3e/greenlet-3.3.2-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d248d8c23c67d2291ffd47af766e2a3aa9fa1c6703155c099feb11f526c63a92", size = 614219, upload-time = "2026-02-20T20:55:59.817Z" }, - { url = "https://files.pythonhosted.org/packages/94/2b/4d012a69759ac9d77210b8bfb128bc621125f5b20fc398bce3940d036b1c/greenlet-3.3.2-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ccd21bb86944ca9be6d967cf7691e658e43417782bce90b5d2faeda0ff78a7dd", size = 628268, upload-time = "2026-02-20T21:02:48.024Z" }, { url = "https://files.pythonhosted.org/packages/7a/34/259b28ea7a2a0c904b11cd36c79b8cef8019b26ee5dbe24e73b469dea347/greenlet-3.3.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b6997d360a4e6a4e936c0f9625b1c20416b8a0ea18a8e19cabbefc712e7397ab", size = 616774, upload-time = "2026-02-20T20:21:02.454Z" }, { url = "https://files.pythonhosted.org/packages/0a/03/996c2d1689d486a6e199cb0f1cf9e4aa940c500e01bdf201299d7d61fa69/greenlet-3.3.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:64970c33a50551c7c50491671265d8954046cb6e8e2999aacdd60e439b70418a", size = 1571277, upload-time = "2026-02-20T20:49:34.795Z" }, { url = "https://files.pythonhosted.org/packages/d9/c4/2570fc07f34a39f2caf0bf9f24b0a1a0a47bc2e8e465b2c2424821389dfc/greenlet-3.3.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1a9172f5bf6bd88e6ba5a84e0a68afeac9dc7b6b412b245dd64f52d83c81e55b", size = 1640455, upload-time = "2026-02-20T20:21:10.261Z" }, @@ -2425,7 +2166,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/3f/ae/8bffcbd373b57a5992cd077cbe8858fff39110480a9d50697091faea6f39/greenlet-3.3.2-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:8d1658d7291f9859beed69a776c10822a0a799bc4bfe1bd4272bb60e62507dab", size = 279650, upload-time = "2026-02-20T20:18:00.783Z" }, { url = "https://files.pythonhosted.org/packages/d1/c0/45f93f348fa49abf32ac8439938726c480bd96b2a3c6f4d949ec0124b69f/greenlet-3.3.2-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:18cb1b7337bca281915b3c5d5ae19f4e76d35e1df80f4ad3c1a7be91fadf1082", size = 650295, upload-time = "2026-02-20T20:47:34.036Z" }, { url = "https://files.pythonhosted.org/packages/b3/de/dd7589b3f2b8372069ab3e4763ea5329940fc7ad9dcd3e272a37516d7c9b/greenlet-3.3.2-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c2e47408e8ce1c6f1ceea0dffcdf6ebb85cc09e55c7af407c99f1112016e45e9", size = 662163, upload-time = "2026-02-20T20:56:01.295Z" }, - { url = "https://files.pythonhosted.org/packages/cd/ac/85804f74f1ccea31ba518dcc8ee6f14c79f73fe36fa1beba38930806df09/greenlet-3.3.2-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e3cb43ce200f59483eb82949bf1835a99cf43d7571e900d7c8d5c62cdf25d2f9", size = 675371, upload-time = "2026-02-20T21:02:49.664Z" }, { url = "https://files.pythonhosted.org/packages/d2/d8/09bfa816572a4d83bccd6750df1926f79158b1c36c5f73786e26dbe4ee38/greenlet-3.3.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:63d10328839d1973e5ba35e98cccbca71b232b14051fd957b6f8b6e8e80d0506", size = 664160, upload-time = "2026-02-20T20:21:04.015Z" }, { url = "https://files.pythonhosted.org/packages/48/cf/56832f0c8255d27f6c35d41b5ec91168d74ec721d85f01a12131eec6b93c/greenlet-3.3.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:8e4ab3cfb02993c8cc248ea73d7dae6cec0253e9afa311c9b37e603ca9fad2ce", size = 1619181, upload-time = "2026-02-20T20:49:36.052Z" }, { url = "https://files.pythonhosted.org/packages/0a/23/b90b60a4aabb4cec0796e55f25ffbfb579a907c3898cd2905c8918acaa16/greenlet-3.3.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:94ad81f0fd3c0c0681a018a976e5c2bd2ca2d9d94895f23e7bb1af4e8af4e2d5", size = 1687713, upload-time = "2026-02-20T20:21:11.684Z" }, @@ -2434,7 +2174,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/98/6d/8f2ef704e614bcf58ed43cfb8d87afa1c285e98194ab2cfad351bf04f81e/greenlet-3.3.2-cp314-cp314t-macosx_11_0_universal2.whl", hash = "sha256:e26e72bec7ab387ac80caa7496e0f908ff954f31065b0ffc1f8ecb1338b11b54", size = 286617, upload-time = "2026-02-20T20:19:29.856Z" }, { url = "https://files.pythonhosted.org/packages/5e/0d/93894161d307c6ea237a43988f27eba0947b360b99ac5239ad3fe09f0b47/greenlet-3.3.2-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b466dff7a4ffda6ca975979bab80bdadde979e29fc947ac3be4451428d8b0e4", size = 655189, upload-time = "2026-02-20T20:47:35.742Z" }, { url = "https://files.pythonhosted.org/packages/f5/2c/d2d506ebd8abcb57386ec4f7ba20f4030cbe56eae541bc6fd6ef399c0b41/greenlet-3.3.2-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b8bddc5b73c9720bea487b3bffdb1840fe4e3656fba3bd40aa1489e9f37877ff", size = 658225, upload-time = "2026-02-20T20:56:02.527Z" }, - { url = "https://files.pythonhosted.org/packages/d1/67/8197b7e7e602150938049d8e7f30de1660cfb87e4c8ee349b42b67bdb2e1/greenlet-3.3.2-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:59b3e2c40f6706b05a9cd299c836c6aa2378cabe25d021acd80f13abf81181cf", size = 666581, upload-time = "2026-02-20T21:02:51.526Z" }, { url = "https://files.pythonhosted.org/packages/8e/30/3a09155fbf728673a1dea713572d2d31159f824a37c22da82127056c44e4/greenlet-3.3.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b26b0f4428b871a751968285a1ac9648944cea09807177ac639b030bddebcea4", size = 657907, upload-time = "2026-02-20T20:21:05.259Z" }, { url = "https://files.pythonhosted.org/packages/f3/fd/d05a4b7acd0154ed758797f0a43b4c0962a843bedfe980115e842c5b2d08/greenlet-3.3.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:1fb39a11ee2e4d94be9a76671482be9398560955c9e568550de0224e41104727", size = 1618857, upload-time = "2026-02-20T20:49:37.309Z" }, { url = "https://files.pythonhosted.org/packages/6f/e1/50ee92a5db521de8f35075b5eff060dd43d39ebd46c2181a2042f7070385/greenlet-3.3.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:20154044d9085151bc309e7689d6f7ba10027f8f5a8c0676ad398b951913d89e", size = 1680010, upload-time = "2026-02-20T20:21:13.427Z" }, @@ -2460,28 +2199,16 @@ source = { registry = "https://pypi.org/simple" } resolution-markers = [ "python_full_version == '3.13.*' and sys_platform == 'darwin'", "python_full_version == '3.12.*' and sys_platform == 'darwin'", - "python_full_version == '3.11.*' and sys_platform == 'darwin'", - "python_full_version < '3.11' and sys_platform == 'darwin'", + "python_full_version < '3.12' and sys_platform == 'darwin'", "python_full_version == '3.13.*' and sys_platform == 'linux'", "python_full_version == '3.12.*' and sys_platform == 'linux'", - "python_full_version == '3.11.*' and sys_platform == 'linux'", - "python_full_version < '3.11' and sys_platform == 'linux'", + "python_full_version < '3.12' and sys_platform == 'linux'", "python_full_version == '3.13.*' and sys_platform == 'win32'", "python_full_version == '3.12.*' and sys_platform == 'win32'", - "python_full_version == '3.11.*' and sys_platform == 'win32'", - "python_full_version < '3.11' and sys_platform == 'win32'", + "python_full_version < '3.12' and sys_platform == 'win32'", ] sdist = { url = "https://files.pythonhosted.org/packages/20/53/d9282a66a5db45981499190b77790570617a604a38f3d103d0400974aeb5/grpcio-1.67.1.tar.gz", hash = "sha256:3dc2ed4cabea4dc14d5e708c2b426205956077cc5de419b4d4079315017e9732", size = 12580022, upload-time = "2024-10-29T06:30:07.787Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/4e/cd/f6ca5c49aa0ae7bc6d0757f7dae6f789569e9490a635eaabe02bc02de7dc/grpcio-1.67.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:8b0341d66a57f8a3119b77ab32207072be60c9bf79760fa609c5609f2deb1f3f", size = 5112450, upload-time = "2024-10-29T06:23:38.202Z" }, - { url = "https://files.pythonhosted.org/packages/d4/f0/d9bbb4a83cbee22f738ee7a74aa41e09ccfb2dcea2cc30ebe8dab5b21771/grpcio-1.67.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:f5a27dddefe0e2357d3e617b9079b4bfdc91341a91565111a21ed6ebbc51b22d", size = 10937518, upload-time = "2024-10-29T06:23:43.535Z" }, - { url = "https://files.pythonhosted.org/packages/5b/17/0c5dbae3af548eb76669887642b5f24b232b021afe77eb42e22bc8951d9c/grpcio-1.67.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:43112046864317498a33bdc4797ae6a268c36345a910de9b9c17159d8346602f", size = 5633610, upload-time = "2024-10-29T06:23:47.168Z" }, - { url = "https://files.pythonhosted.org/packages/17/48/e000614e00153d7b2760dcd9526b95d72f5cfe473b988e78f0ff3b472f6c/grpcio-1.67.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9b929f13677b10f63124c1a410994a401cdd85214ad83ab67cc077fc7e480f0", size = 6240678, upload-time = "2024-10-29T06:23:49.352Z" }, - { url = "https://files.pythonhosted.org/packages/64/19/a16762a70eeb8ddfe43283ce434d1499c1c409ceec0c646f783883084478/grpcio-1.67.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e7d1797a8a3845437d327145959a2c0c47c05947c9eef5ff1a4c80e499dcc6fa", size = 5884528, upload-time = "2024-10-29T06:23:52.345Z" }, - { url = "https://files.pythonhosted.org/packages/6b/dc/bd016aa3684914acd2c0c7fa4953b2a11583c2b844f3d7bae91fa9b98fbb/grpcio-1.67.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0489063974d1452436139501bf6b180f63d4977223ee87488fe36858c5725292", size = 6583680, upload-time = "2024-10-29T06:23:55.074Z" }, - { url = "https://files.pythonhosted.org/packages/1a/93/1441cb14c874f11aa798a816d582f9da82194b6677f0f134ea53d2d5dbeb/grpcio-1.67.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9fd042de4a82e3e7aca44008ee2fb5da01b3e5adb316348c21980f7f58adc311", size = 6162967, upload-time = "2024-10-29T06:23:57.286Z" }, - { url = "https://files.pythonhosted.org/packages/29/e9/9295090380fb4339b7e935b9d005fa9936dd573a22d147c9e5bb2df1b8d4/grpcio-1.67.1-cp310-cp310-win32.whl", hash = "sha256:638354e698fd0c6c76b04540a850bf1db27b4d2515a19fcd5cf645c48d3eb1ed", size = 3616336, upload-time = "2024-10-29T06:23:59.69Z" }, - { url = "https://files.pythonhosted.org/packages/ce/de/7c783b8cb8f02c667ca075c49680c4aeb8b054bc69784bcb3e7c1bbf4985/grpcio-1.67.1-cp310-cp310-win_amd64.whl", hash = "sha256:608d87d1bdabf9e2868b12338cd38a79969eaf920c89d698ead08f48de9c0f9e", size = 4352071, upload-time = "2024-10-29T06:24:02.477Z" }, { url = "https://files.pythonhosted.org/packages/59/2c/b60d6ea1f63a20a8d09c6db95c4f9a16497913fb3048ce0990ed81aeeca0/grpcio-1.67.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:7818c0454027ae3384235a65210bbf5464bd715450e30a3d40385453a85a70cb", size = 5119075, upload-time = "2024-10-29T06:24:04.696Z" }, { url = "https://files.pythonhosted.org/packages/b3/9a/e1956f7ca582a22dd1f17b9e26fcb8229051b0ce6d33b47227824772feec/grpcio-1.67.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ea33986b70f83844cd00814cee4451055cd8cab36f00ac64a31f5bb09b31919e", size = 11009159, upload-time = "2024-10-29T06:24:07.781Z" }, { url = "https://files.pythonhosted.org/packages/43/a8/35fbbba580c4adb1d40d12e244cf9f7c74a379073c0a0ca9d1b5338675a1/grpcio-1.67.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:c7a01337407dd89005527623a4a72c5c8e2894d22bead0895306b23c6695698f", size = 5629476, upload-time = "2024-10-29T06:24:11.444Z" }, @@ -2525,16 +2252,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/06/8a/3d098f35c143a89520e568e6539cc098fcd294495910e359889ce8741c84/grpcio-1.78.0.tar.gz", hash = "sha256:7382b95189546f375c174f53a5fa873cef91c4b8005faa05cc5b3beea9c4f1c5", size = 12852416, upload-time = "2026-02-06T09:57:18.093Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5a/a8/690a085b4d1fe066130de97a87de32c45062cf2ecd218df9675add895550/grpcio-1.78.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:7cc47943d524ee0096f973e1081cb8f4f17a4615f2116882a5f1416e4cfe92b5", size = 5946986, upload-time = "2026-02-06T09:54:34.043Z" }, - { url = "https://files.pythonhosted.org/packages/c7/1b/e5213c5c0ced9d2d92778d30529ad5bb2dcfb6c48c4e2d01b1f302d33d64/grpcio-1.78.0-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:c3f293fdc675ccba4db5a561048cca627b5e7bd1c8a6973ffedabe7d116e22e2", size = 11816533, upload-time = "2026-02-06T09:54:37.04Z" }, - { url = "https://files.pythonhosted.org/packages/18/37/1ba32dccf0a324cc5ace744c44331e300b000a924bf14840f948c559ede7/grpcio-1.78.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:10a9a644b5dd5aec3b82b5b0b90d41c0fa94c85ef42cb42cf78a23291ddb5e7d", size = 6519964, upload-time = "2026-02-06T09:54:40.268Z" }, - { url = "https://files.pythonhosted.org/packages/ed/f5/c0e178721b818072f2e8b6fde13faaba942406c634009caf065121ce246b/grpcio-1.78.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:4c5533d03a6cbd7f56acfc9cfb44ea64f63d29091e40e44010d34178d392d7eb", size = 7198058, upload-time = "2026-02-06T09:54:42.389Z" }, - { url = "https://files.pythonhosted.org/packages/5b/b2/40d43c91ae9cd667edc960135f9f08e58faa1576dc95af29f66ec912985f/grpcio-1.78.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ff870aebe9a93a85283837801d35cd5f8814fe2ad01e606861a7fb47c762a2b7", size = 6727212, upload-time = "2026-02-06T09:54:44.91Z" }, - { url = "https://files.pythonhosted.org/packages/ed/88/9da42eed498f0efcfcd9156e48ae63c0cde3bea398a16c99fb5198c885b6/grpcio-1.78.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:391e93548644e6b2726f1bb84ed60048d4bcc424ce5e4af0843d28ca0b754fec", size = 7300845, upload-time = "2026-02-06T09:54:47.562Z" }, - { url = "https://files.pythonhosted.org/packages/23/3f/1c66b7b1b19a8828890e37868411a6e6925df5a9030bfa87ab318f34095d/grpcio-1.78.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:df2c8f3141f7cbd112a6ebbd760290b5849cda01884554f7c67acc14e7b1758a", size = 8284605, upload-time = "2026-02-06T09:54:50.475Z" }, - { url = "https://files.pythonhosted.org/packages/94/c4/ca1bd87394f7b033e88525384b4d1e269e8424ab441ea2fba1a0c5b50986/grpcio-1.78.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:bd8cb8026e5f5b50498a3c4f196f57f9db344dad829ffae16b82e4fdbaea2813", size = 7726672, upload-time = "2026-02-06T09:54:53.11Z" }, - { url = "https://files.pythonhosted.org/packages/41/09/f16e487d4cc65ccaf670f6ebdd1a17566b965c74fc3d93999d3b2821e052/grpcio-1.78.0-cp310-cp310-win32.whl", hash = "sha256:f8dff3d9777e5d2703a962ee5c286c239bf0ba173877cc68dc02c17d042e29de", size = 4076715, upload-time = "2026-02-06T09:54:55.549Z" }, - { url = "https://files.pythonhosted.org/packages/2a/32/4ce60d94e242725fd3bcc5673c04502c82a8e87b21ea411a63992dc39f8f/grpcio-1.78.0-cp310-cp310-win_amd64.whl", hash = "sha256:94f95cf5d532d0e717eed4fc1810e8e6eded04621342ec54c89a7c2f14b581bf", size = 4799157, upload-time = "2026-02-06T09:54:59.838Z" }, { url = "https://files.pythonhosted.org/packages/86/c7/d0b780a29b0837bf4ca9580904dfb275c1fc321ded7897d620af7047ec57/grpcio-1.78.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:2777b783f6c13b92bd7b716667452c329eefd646bfb3f2e9dabea2e05dbd34f6", size = 5951525, upload-time = "2026-02-06T09:55:01.989Z" }, { url = "https://files.pythonhosted.org/packages/c5/b1/96920bf2ee61df85a9503cb6f733fe711c0ff321a5a697d791b075673281/grpcio-1.78.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:9dca934f24c732750389ce49d638069c3892ad065df86cb465b3fa3012b70c9e", size = 11830418, upload-time = "2026-02-06T09:55:04.462Z" }, { url = "https://files.pythonhosted.org/packages/83/0c/7c1528f098aeb75a97de2bae18c530f56959fb7ad6c882db45d9884d6edc/grpcio-1.78.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:459ab414b35f4496138d0ecd735fed26f1318af5e52cb1efbc82a09f0d5aa911", size = 6524477, upload-time = "2026-02-06T09:55:07.111Z" }, @@ -2798,18 +2515,6 @@ version = "0.13.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/0d/5e/4ec91646aee381d01cdb9974e30882c9cd3b8c5d1079d6b5ff4af522439a/jiter-0.13.0.tar.gz", hash = "sha256:f2839f9c2c7e2dffc1bc5929a510e14ce0a946be9365fd1219e7ef342dae14f4", size = 164847, upload-time = "2026-02-02T12:37:56.441Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d0/5a/41da76c5ea07bec1b0472b6b2fdb1b651074d504b19374d7e130e0cdfb25/jiter-0.13.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2ffc63785fd6c7977defe49b9824ae6ce2b2e2b77ce539bdaf006c26da06342e", size = 311164, upload-time = "2026-02-02T12:35:17.688Z" }, - { url = "https://files.pythonhosted.org/packages/40/cb/4a1bf994a3e869f0d39d10e11efb471b76d0ad70ecbfb591427a46c880c2/jiter-0.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4a638816427006c1e3f0013eb66d391d7a3acda99a7b0cf091eff4497ccea33a", size = 320296, upload-time = "2026-02-02T12:35:19.828Z" }, - { url = "https://files.pythonhosted.org/packages/09/82/acd71ca9b50ecebadc3979c541cd717cce2fe2bc86236f4fa597565d8f1a/jiter-0.13.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19928b5d1ce0ff8c1ee1b9bdef3b5bfc19e8304f1b904e436caf30bc15dc6cf5", size = 352742, upload-time = "2026-02-02T12:35:21.258Z" }, - { url = "https://files.pythonhosted.org/packages/71/03/d1fc996f3aecfd42eb70922edecfb6dd26421c874503e241153ad41df94f/jiter-0.13.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:309549b778b949d731a2f0e1594a3f805716be704a73bf3ad9a807eed5eb5721", size = 363145, upload-time = "2026-02-02T12:35:24.653Z" }, - { url = "https://files.pythonhosted.org/packages/f1/61/a30492366378cc7a93088858f8991acd7d959759fe6138c12a4644e58e81/jiter-0.13.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bcdabaea26cb04e25df3103ce47f97466627999260290349a88c8136ecae0060", size = 487683, upload-time = "2026-02-02T12:35:26.162Z" }, - { url = "https://files.pythonhosted.org/packages/20/4e/4223cffa9dbbbc96ed821c5aeb6bca510848c72c02086d1ed3f1da3d58a7/jiter-0.13.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a3a377af27b236abbf665a69b2bdd680e3b5a0bd2af825cd3b81245279a7606c", size = 373579, upload-time = "2026-02-02T12:35:27.582Z" }, - { url = "https://files.pythonhosted.org/packages/fe/c9/b0489a01329ab07a83812d9ebcffe7820a38163c6d9e7da644f926ff877c/jiter-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe49d3ff6db74321f144dff9addd4a5874d3105ac5ba7c5b77fac099cfae31ae", size = 362904, upload-time = "2026-02-02T12:35:28.925Z" }, - { url = "https://files.pythonhosted.org/packages/05/af/53e561352a44afcba9a9bc67ee1d320b05a370aed8df54eafe714c4e454d/jiter-0.13.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2113c17c9a67071b0f820733c0893ed1d467b5fcf4414068169e5c2cabddb1e2", size = 392380, upload-time = "2026-02-02T12:35:30.385Z" }, - { url = "https://files.pythonhosted.org/packages/76/2a/dd805c3afb8ed5b326c5ae49e725d1b1255b9754b1b77dbecdc621b20773/jiter-0.13.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ab1185ca5c8b9491b55ebf6c1e8866b8f68258612899693e24a92c5fdb9455d5", size = 517939, upload-time = "2026-02-02T12:35:31.865Z" }, - { url = "https://files.pythonhosted.org/packages/20/2a/7b67d76f55b8fe14c937e7640389612f05f9a4145fc28ae128aaa5e62257/jiter-0.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:9621ca242547edc16400981ca3231e0c91c0c4c1ab8573a596cd9bb3575d5c2b", size = 551696, upload-time = "2026-02-02T12:35:33.306Z" }, - { url = "https://files.pythonhosted.org/packages/85/9c/57cdd64dac8f4c6ab8f994fe0eb04dc9fd1db102856a4458fcf8a99dfa62/jiter-0.13.0-cp310-cp310-win32.whl", hash = "sha256:a7637d92b1c9d7a771e8c56f445c7f84396d48f2e756e5978840ecba2fac0894", size = 204592, upload-time = "2026-02-02T12:35:34.58Z" }, - { url = "https://files.pythonhosted.org/packages/a7/38/f4f3ea5788b8a5bae7510a678cdc747eda0c45ffe534f9878ff37e7cf3b3/jiter-0.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c1b609e5cbd2f52bb74fb721515745b407df26d7b800458bd97cb3b972c29e7d", size = 206016, upload-time = "2026-02-02T12:35:36.435Z" }, { url = "https://files.pythonhosted.org/packages/71/29/499f8c9eaa8a16751b1c0e45e6f5f1761d180da873d417996cc7bddc8eef/jiter-0.13.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ea026e70a9a28ebbdddcbcf0f1323128a8db66898a06eaad3a4e62d2f554d096", size = 311157, upload-time = "2026-02-02T12:35:37.758Z" }, { url = "https://files.pythonhosted.org/packages/50/f6/566364c777d2ab450b92100bea11333c64c38d32caf8dc378b48e5b20c46/jiter-0.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:66aa3e663840152d18cc8ff1e4faad3dd181373491b9cfdc6004b92198d67911", size = 319729, upload-time = "2026-02-02T12:35:39.246Z" }, { url = "https://files.pythonhosted.org/packages/73/dd/560f13ec5e4f116d8ad2658781646cca91b617ae3b8758d4a5076b278f70/jiter-0.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3524798e70655ff19aec58c7d05adb1f074fecff62da857ea9be2b908b6d701", size = 354766, upload-time = "2026-02-02T12:35:40.662Z" }, @@ -2949,19 +2654,6 @@ version = "1.4.9" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/5c/3c/85844f1b0feb11ee581ac23fe5fce65cd049a200c1446708cc1b7f922875/kiwisolver-1.4.9.tar.gz", hash = "sha256:c3b22c26c6fd6811b0ae8363b95ca8ce4ea3c202d3d0975b2914310ceb1bcc4d", size = 97564, upload-time = "2025-08-10T21:27:49.279Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c6/5d/8ce64e36d4e3aac5ca96996457dcf33e34e6051492399a3f1fec5657f30b/kiwisolver-1.4.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b4b4d74bda2b8ebf4da5bd42af11d02d04428b2c32846e4c2c93219df8a7987b", size = 124159, upload-time = "2025-08-10T21:25:35.472Z" }, - { url = "https://files.pythonhosted.org/packages/96/1e/22f63ec454874378175a5f435d6ea1363dd33fb2af832c6643e4ccea0dc8/kiwisolver-1.4.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fb3b8132019ea572f4611d770991000d7f58127560c4889729248eb5852a102f", size = 66578, upload-time = "2025-08-10T21:25:36.73Z" }, - { url = "https://files.pythonhosted.org/packages/41/4c/1925dcfff47a02d465121967b95151c82d11027d5ec5242771e580e731bd/kiwisolver-1.4.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:84fd60810829c27ae375114cd379da1fa65e6918e1da405f356a775d49a62bcf", size = 65312, upload-time = "2025-08-10T21:25:37.658Z" }, - { url = "https://files.pythonhosted.org/packages/d4/42/0f333164e6307a0687d1eb9ad256215aae2f4bd5d28f4653d6cd319a3ba3/kiwisolver-1.4.9-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b78efa4c6e804ecdf727e580dbb9cba85624d2e1c6b5cb059c66290063bd99a9", size = 1628458, upload-time = "2025-08-10T21:25:39.067Z" }, - { url = "https://files.pythonhosted.org/packages/86/b6/2dccb977d651943995a90bfe3495c2ab2ba5cd77093d9f2318a20c9a6f59/kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d4efec7bcf21671db6a3294ff301d2fc861c31faa3c8740d1a94689234d1b415", size = 1225640, upload-time = "2025-08-10T21:25:40.489Z" }, - { url = "https://files.pythonhosted.org/packages/50/2b/362ebd3eec46c850ccf2bfe3e30f2fc4c008750011f38a850f088c56a1c6/kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:90f47e70293fc3688b71271100a1a5453aa9944a81d27ff779c108372cf5567b", size = 1244074, upload-time = "2025-08-10T21:25:42.221Z" }, - { url = "https://files.pythonhosted.org/packages/6f/bb/f09a1e66dab8984773d13184a10a29fe67125337649d26bdef547024ed6b/kiwisolver-1.4.9-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8fdca1def57a2e88ef339de1737a1449d6dbf5fab184c54a1fca01d541317154", size = 1293036, upload-time = "2025-08-10T21:25:43.801Z" }, - { url = "https://files.pythonhosted.org/packages/ea/01/11ecf892f201cafda0f68fa59212edaea93e96c37884b747c181303fccd1/kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9cf554f21be770f5111a1690d42313e140355e687e05cf82cb23d0a721a64a48", size = 2175310, upload-time = "2025-08-10T21:25:45.045Z" }, - { url = "https://files.pythonhosted.org/packages/7f/5f/bfe11d5b934f500cc004314819ea92427e6e5462706a498c1d4fc052e08f/kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fc1795ac5cd0510207482c3d1d3ed781143383b8cfd36f5c645f3897ce066220", size = 2270943, upload-time = "2025-08-10T21:25:46.393Z" }, - { url = "https://files.pythonhosted.org/packages/3d/de/259f786bf71f1e03e73d87e2db1a9a3bcab64d7b4fd780167123161630ad/kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:ccd09f20ccdbbd341b21a67ab50a119b64a403b09288c27481575105283c1586", size = 2440488, upload-time = "2025-08-10T21:25:48.074Z" }, - { url = "https://files.pythonhosted.org/packages/1b/76/c989c278faf037c4d3421ec07a5c452cd3e09545d6dae7f87c15f54e4edf/kiwisolver-1.4.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:540c7c72324d864406a009d72f5d6856f49693db95d1fbb46cf86febef873634", size = 2246787, upload-time = "2025-08-10T21:25:49.442Z" }, - { url = "https://files.pythonhosted.org/packages/a2/55/c2898d84ca440852e560ca9f2a0d28e6e931ac0849b896d77231929900e7/kiwisolver-1.4.9-cp310-cp310-win_amd64.whl", hash = "sha256:ede8c6d533bc6601a47ad4046080d36b8fc99f81e6f1c17b0ac3c2dc91ac7611", size = 73730, upload-time = "2025-08-10T21:25:51.102Z" }, - { url = "https://files.pythonhosted.org/packages/e8/09/486d6ac523dd33b80b368247f238125d027964cfacb45c654841e88fb2ae/kiwisolver-1.4.9-cp310-cp310-win_arm64.whl", hash = "sha256:7b4da0d01ac866a57dd61ac258c5607b4cd677f63abaec7b148354d2b2cdd536", size = 65036, upload-time = "2025-08-10T21:25:52.063Z" }, { url = "https://files.pythonhosted.org/packages/6f/ab/c80b0d5a9d8a1a65f4f815f2afff9798b12c3b9f31f1d304dd233dd920e2/kiwisolver-1.4.9-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:eb14a5da6dc7642b0f3a18f13654847cd8b7a2550e2645a5bda677862b03ba16", size = 124167, upload-time = "2025-08-10T21:25:53.403Z" }, { url = "https://files.pythonhosted.org/packages/a0/c0/27fe1a68a39cf62472a300e2879ffc13c0538546c359b86f149cc19f6ac3/kiwisolver-1.4.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:39a219e1c81ae3b103643d2aedb90f1ef22650deb266ff12a19e7773f3e5f089", size = 66579, upload-time = "2025-08-10T21:25:54.79Z" }, { url = "https://files.pythonhosted.org/packages/31/a2/a12a503ac1fd4943c50f9822678e8015a790a13b5490354c68afb8489814/kiwisolver-1.4.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2405a7d98604b87f3fc28b1716783534b1b4b8510d8142adca34ee0bc3c87543", size = 65309, upload-time = "2025-08-10T21:25:55.76Z" }, @@ -3039,11 +2731,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/99/dd/841e9a66c4715477ea0abc78da039832fbb09dac5c35c58dc4c41a407b8a/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:aedff62918805fb62d43a4aa2ecd4482c380dc76cd31bd7c8878588a61bd0369", size = 2391835, upload-time = "2025-08-10T21:27:34.23Z" }, { url = "https://files.pythonhosted.org/packages/0c/28/4b2e5c47a0da96896fdfdb006340ade064afa1e63675d01ea5ac222b6d52/kiwisolver-1.4.9-cp314-cp314t-win_amd64.whl", hash = "sha256:1fa333e8b2ce4d9660f2cda9c0e1b6bafcfb2457a9d259faa82289e73ec24891", size = 79988, upload-time = "2025-08-10T21:27:35.587Z" }, { url = "https://files.pythonhosted.org/packages/80/be/3578e8afd18c88cdf9cb4cffde75a96d2be38c5a903f1ed0ceec061bd09e/kiwisolver-1.4.9-cp314-cp314t-win_arm64.whl", hash = "sha256:4a48a2ce79d65d363597ef7b567ce3d14d68783d2b2263d98db3d9477805ba32", size = 70260, upload-time = "2025-08-10T21:27:36.606Z" }, - { url = "https://files.pythonhosted.org/packages/a2/63/fde392691690f55b38d5dd7b3710f5353bf7a8e52de93a22968801ab8978/kiwisolver-1.4.9-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:4d1d9e582ad4d63062d34077a9a1e9f3c34088a2ec5135b1f7190c07cf366527", size = 60183, upload-time = "2025-08-10T21:27:37.669Z" }, - { url = "https://files.pythonhosted.org/packages/27/b1/6aad34edfdb7cced27f371866f211332bba215bfd918ad3322a58f480d8b/kiwisolver-1.4.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:deed0c7258ceb4c44ad5ec7d9918f9f14fd05b2be86378d86cf50e63d1e7b771", size = 58675, upload-time = "2025-08-10T21:27:39.031Z" }, - { url = "https://files.pythonhosted.org/packages/9d/1a/23d855a702bb35a76faed5ae2ba3de57d323f48b1f6b17ee2176c4849463/kiwisolver-1.4.9-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0a590506f303f512dff6b7f75fd2fd18e16943efee932008fe7140e5fa91d80e", size = 80277, upload-time = "2025-08-10T21:27:40.129Z" }, - { url = "https://files.pythonhosted.org/packages/5a/5b/5239e3c2b8fb5afa1e8508f721bb77325f740ab6994d963e61b2b7abcc1e/kiwisolver-1.4.9-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e09c2279a4d01f099f52d5c4b3d9e208e91edcbd1a175c9662a8b16e000fece9", size = 77994, upload-time = "2025-08-10T21:27:41.181Z" }, - { url = "https://files.pythonhosted.org/packages/f9/1c/5d4d468fb16f8410e596ed0eac02d2c68752aa7dc92997fe9d60a7147665/kiwisolver-1.4.9-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:c9e7cdf45d594ee04d5be1b24dd9d49f3d1590959b2271fb30b5ca2b262c00fb", size = 73744, upload-time = "2025-08-10T21:27:42.254Z" }, { url = "https://files.pythonhosted.org/packages/a3/0f/36d89194b5a32c054ce93e586d4049b6c2c22887b0eb229c61c68afd3078/kiwisolver-1.4.9-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:720e05574713db64c356e86732c0f3c5252818d05f9df320f0ad8380641acea5", size = 60104, upload-time = "2025-08-10T21:27:43.287Z" }, { url = "https://files.pythonhosted.org/packages/52/ba/4ed75f59e4658fd21fe7dde1fee0ac397c678ec3befba3fe6482d987af87/kiwisolver-1.4.9-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:17680d737d5335b552994a2008fab4c851bcd7de33094a82067ef3a576ff02fa", size = 58592, upload-time = "2025-08-10T21:27:44.314Z" }, { url = "https://files.pythonhosted.org/packages/33/01/a8ea7c5ea32a9b45ceeaee051a04c8ed4320f5add3c51bfa20879b765b70/kiwisolver-1.4.9-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:85b5352f94e490c028926ea567fc569c52ec79ce131dadb968d3853e809518c2", size = 80281, upload-time = "2025-08-10T21:27:45.369Z" }, @@ -3078,18 +2765,6 @@ version = "0.8.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/56/9c/b4b0c54d84da4a94b37bd44151e46d5e583c9534c7e02250b961b1b6d8a8/librt-0.8.1.tar.gz", hash = "sha256:be46a14693955b3bd96014ccbdb8339ee8c9346fbe11c1b78901b55125f14c73", size = 177471, upload-time = "2026-02-17T16:13:06.101Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7c/5f/63f5fa395c7a8a93558c0904ba8f1c8d1b997ca6a3de61bc7659970d66bf/librt-0.8.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:81fd938344fecb9373ba1b155968c8a329491d2ce38e7ddb76f30ffb938f12dc", size = 65697, upload-time = "2026-02-17T16:11:06.903Z" }, - { url = "https://files.pythonhosted.org/packages/ff/e0/0472cf37267b5920eff2f292ccfaede1886288ce35b7f3203d8de00abfe6/librt-0.8.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5db05697c82b3a2ec53f6e72b2ed373132b0c2e05135f0696784e97d7f5d48e7", size = 68376, upload-time = "2026-02-17T16:11:08.395Z" }, - { url = "https://files.pythonhosted.org/packages/c8/be/8bd1359fdcd27ab897cd5963294fa4a7c83b20a8564678e4fd12157e56a5/librt-0.8.1-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d56bc4011975f7460bea7b33e1ff425d2f1adf419935ff6707273c77f8a4ada6", size = 197084, upload-time = "2026-02-17T16:11:09.774Z" }, - { url = "https://files.pythonhosted.org/packages/e2/fe/163e33fdd091d0c2b102f8a60cc0a61fd730ad44e32617cd161e7cd67a01/librt-0.8.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5cdc0f588ff4b663ea96c26d2a230c525c6fc62b28314edaaaca8ed5af931ad0", size = 207337, upload-time = "2026-02-17T16:11:11.311Z" }, - { url = "https://files.pythonhosted.org/packages/01/99/f85130582f05dcf0c8902f3d629270231d2f4afdfc567f8305a952ac7f14/librt-0.8.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:97c2b54ff6717a7a563b72627990bec60d8029df17df423f0ed37d56a17a176b", size = 219980, upload-time = "2026-02-17T16:11:12.499Z" }, - { url = "https://files.pythonhosted.org/packages/6f/54/cb5e4d03659e043a26c74e08206412ac9a3742f0477d96f9761a55313b5f/librt-0.8.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8f1125e6bbf2f1657d9a2f3ccc4a2c9b0c8b176965bb565dd4d86be67eddb4b6", size = 212921, upload-time = "2026-02-17T16:11:14.484Z" }, - { url = "https://files.pythonhosted.org/packages/b1/81/a3a01e4240579c30f3487f6fed01eb4bc8ef0616da5b4ebac27ca19775f3/librt-0.8.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8f4bb453f408137d7581be309b2fbc6868a80e7ef60c88e689078ee3a296ae71", size = 221381, upload-time = "2026-02-17T16:11:17.459Z" }, - { url = "https://files.pythonhosted.org/packages/08/b0/fc2d54b4b1c6fb81e77288ff31ff25a2c1e62eaef4424a984f228839717b/librt-0.8.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:c336d61d2fe74a3195edc1646d53ff1cddd3a9600b09fa6ab75e5514ba4862a7", size = 216714, upload-time = "2026-02-17T16:11:19.197Z" }, - { url = "https://files.pythonhosted.org/packages/96/96/85daa73ffbd87e1fb287d7af6553ada66bf25a2a6b0de4764344a05469f6/librt-0.8.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:eb5656019db7c4deacf0c1a55a898c5bb8f989be904597fcb5232a2f4828fa05", size = 214777, upload-time = "2026-02-17T16:11:20.443Z" }, - { url = "https://files.pythonhosted.org/packages/12/9c/c3aa7a2360383f4bf4f04d98195f2739a579128720c603f4807f006a4225/librt-0.8.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c25d9e338d5bed46c1632f851babf3d13c78f49a225462017cf5e11e845c5891", size = 237398, upload-time = "2026-02-17T16:11:22.083Z" }, - { url = "https://files.pythonhosted.org/packages/61/19/d350ea89e5274665185dabc4bbb9c3536c3411f862881d316c8b8e00eb66/librt-0.8.1-cp310-cp310-win32.whl", hash = "sha256:aaab0e307e344cb28d800957ef3ec16605146ef0e59e059a60a176d19543d1b7", size = 54285, upload-time = "2026-02-17T16:11:23.27Z" }, - { url = "https://files.pythonhosted.org/packages/4f/d6/45d587d3d41c112e9543a0093d883eb57a24a03e41561c127818aa2a6bcc/librt-0.8.1-cp310-cp310-win_amd64.whl", hash = "sha256:56e04c14b696300d47b3bc5f1d10a00e86ae978886d0cee14e5714fafb5df5d2", size = 61352, upload-time = "2026-02-17T16:11:24.207Z" }, { url = "https://files.pythonhosted.org/packages/1d/01/0e748af5e4fee180cf7cd12bd12b0513ad23b045dccb2a83191bde82d168/librt-0.8.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:681dc2451d6d846794a828c16c22dc452d924e9f700a485b7ecb887a30aad1fd", size = 65315, upload-time = "2026-02-17T16:11:25.152Z" }, { url = "https://files.pythonhosted.org/packages/9d/4d/7184806efda571887c798d573ca4134c80ac8642dcdd32f12c31b939c595/librt-0.8.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a3b4350b13cc0e6f5bec8fa7caf29a8fb8cdc051a3bae45cfbfd7ce64f009965", size = 68021, upload-time = "2026-02-17T16:11:26.129Z" }, { url = "https://files.pythonhosted.org/packages/ae/88/c3c52d2a5d5101f28d3dc89298444626e7874aa904eed498464c2af17627/librt-0.8.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:ac1e7817fd0ed3d14fd7c5df91daed84c48e4c2a11ee99c0547f9f62fdae13da", size = 194500, upload-time = "2026-02-17T16:11:27.177Z" }, @@ -3258,17 +2933,6 @@ version = "3.0.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e8/4b/3541d44f3937ba468b75da9eebcae497dcf67adb65caa16760b0a6807ebb/markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559", size = 11631, upload-time = "2025-09-27T18:36:05.558Z" }, - { url = "https://files.pythonhosted.org/packages/98/1b/fbd8eed11021cabd9226c37342fa6ca4e8a98d8188a8d9b66740494960e4/markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419", size = 12057, upload-time = "2025-09-27T18:36:07.165Z" }, - { url = "https://files.pythonhosted.org/packages/40/01/e560d658dc0bb8ab762670ece35281dec7b6c1b33f5fbc09ebb57a185519/markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695", size = 22050, upload-time = "2025-09-27T18:36:08.005Z" }, - { url = "https://files.pythonhosted.org/packages/af/cd/ce6e848bbf2c32314c9b237839119c5a564a59725b53157c856e90937b7a/markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591", size = 20681, upload-time = "2025-09-27T18:36:08.881Z" }, - { url = "https://files.pythonhosted.org/packages/c9/2a/b5c12c809f1c3045c4d580b035a743d12fcde53cf685dbc44660826308da/markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c", size = 20705, upload-time = "2025-09-27T18:36:10.131Z" }, - { url = "https://files.pythonhosted.org/packages/cf/e3/9427a68c82728d0a88c50f890d0fc072a1484de2f3ac1ad0bfc1a7214fd5/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f", size = 21524, upload-time = "2025-09-27T18:36:11.324Z" }, - { url = "https://files.pythonhosted.org/packages/bc/36/23578f29e9e582a4d0278e009b38081dbe363c5e7165113fad546918a232/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6", size = 20282, upload-time = "2025-09-27T18:36:12.573Z" }, - { url = "https://files.pythonhosted.org/packages/56/21/dca11354e756ebd03e036bd8ad58d6d7168c80ce1fe5e75218e4945cbab7/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1", size = 20745, upload-time = "2025-09-27T18:36:13.504Z" }, - { url = "https://files.pythonhosted.org/packages/87/99/faba9369a7ad6e4d10b6a5fbf71fa2a188fe4a593b15f0963b73859a1bbd/markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa", size = 14571, upload-time = "2025-09-27T18:36:14.779Z" }, - { url = "https://files.pythonhosted.org/packages/d6/25/55dc3ab959917602c96985cb1253efaa4ff42f71194bddeb61eb7278b8be/markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8", size = 15056, upload-time = "2025-09-27T18:36:16.125Z" }, - { url = "https://files.pythonhosted.org/packages/d0/9e/0a02226640c255d1da0b8d12e24ac2aa6734da68bff14c05dd53b94a0fc3/markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1", size = 13932, upload-time = "2025-09-27T18:36:17.311Z" }, { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, @@ -3342,13 +3006,11 @@ name = "matplotlib" version = "3.10.8" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "contourpy", version = "1.3.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "contourpy", version = "1.3.3", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "contourpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "cycler", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "fonttools", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "kiwisolver", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "packaging", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pillow", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pyparsing", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -3356,12 +3018,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/8a/76/d3c6e3a13fe484ebe7718d14e269c9569c4eb0020a968a327acb3b9a8fe6/matplotlib-3.10.8.tar.gz", hash = "sha256:2299372c19d56bcd35cf05a2738308758d32b9eaed2371898d8f5bd33f084aa3", size = 34806269, upload-time = "2025-12-10T22:56:51.155Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/58/be/a30bd917018ad220c400169fba298f2bb7003c8ccbc0c3e24ae2aacad1e8/matplotlib-3.10.8-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:00270d217d6b20d14b584c521f810d60c5c78406dc289859776550df837dcda7", size = 8239828, upload-time = "2025-12-10T22:55:02.313Z" }, - { url = "https://files.pythonhosted.org/packages/58/27/ca01e043c4841078e82cf6e80a6993dfecd315c3d79f5f3153afbb8e1ec6/matplotlib-3.10.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37b3c1cc42aa184b3f738cfa18c1c1d72fd496d85467a6cf7b807936d39aa656", size = 8128050, upload-time = "2025-12-10T22:55:04.997Z" }, - { url = "https://files.pythonhosted.org/packages/cb/aa/7ab67f2b729ae6a91bcf9dcac0affb95fb8c56f7fd2b2af894ae0b0cf6fa/matplotlib-3.10.8-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ee40c27c795bda6a5292e9cff9890189d32f7e3a0bf04e0e3c9430c4a00c37df", size = 8700452, upload-time = "2025-12-10T22:55:07.47Z" }, - { url = "https://files.pythonhosted.org/packages/73/ae/2d5817b0acee3c49b7e7ccfbf5b273f284957cc8e270adf36375db353190/matplotlib-3.10.8-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a48f2b74020919552ea25d222d5cc6af9ca3f4eb43a93e14d068457f545c2a17", size = 9534928, upload-time = "2025-12-10T22:55:10.566Z" }, - { url = "https://files.pythonhosted.org/packages/c9/5b/8e66653e9f7c39cb2e5cab25fce4810daffa2bff02cbf5f3077cea9e942c/matplotlib-3.10.8-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f254d118d14a7f99d616271d6c3c27922c092dac11112670b157798b89bf4933", size = 9586377, upload-time = "2025-12-10T22:55:12.362Z" }, - { url = "https://files.pythonhosted.org/packages/e2/e2/fd0bbadf837f81edb0d208ba8f8cb552874c3b16e27cb91a31977d90875d/matplotlib-3.10.8-cp310-cp310-win_amd64.whl", hash = "sha256:f9b587c9c7274c1613a30afabf65a272114cd6cdbe67b3406f818c79d7ab2e2a", size = 8128127, upload-time = "2025-12-10T22:55:14.436Z" }, { url = "https://files.pythonhosted.org/packages/f8/86/de7e3a1cdcfc941483af70609edc06b83e7c8a0e0dc9ac325200a3f4d220/matplotlib-3.10.8-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6be43b667360fef5c754dda5d25a32e6307a03c204f3c0fc5468b78fa87b4160", size = 8251215, upload-time = "2025-12-10T22:55:16.175Z" }, { url = "https://files.pythonhosted.org/packages/fd/14/baad3222f424b19ce6ad243c71de1ad9ec6b2e4eb1e458a48fdc6d120401/matplotlib-3.10.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a2b336e2d91a3d7006864e0990c83b216fcdca64b5a6484912902cef87313d78", size = 8139625, upload-time = "2025-12-10T22:55:17.712Z" }, { url = "https://files.pythonhosted.org/packages/8f/a0/7024215e95d456de5883e6732e708d8187d9753a21d32f8ddb3befc0c445/matplotlib-3.10.8-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:efb30e3baaea72ce5928e32bab719ab4770099079d66726a62b11b1ef7273be4", size = 8712614, upload-time = "2025-12-10T22:55:20.8Z" }, @@ -3404,9 +3060,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4d/4b/e7beb6bbd49f6bae727a12b270a2654d13c397576d25bd6786e47033300f/matplotlib-3.10.8-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:595ba4d8fe983b88f0eec8c26a241e16d6376fe1979086232f481f8f3f67494c", size = 9614011, upload-time = "2025-12-10T22:56:33.85Z" }, { url = "https://files.pythonhosted.org/packages/7c/e6/76f2813d31f032e65f6f797e3f2f6e4aab95b65015924b1c51370395c28a/matplotlib-3.10.8-cp314-cp314t-win_amd64.whl", hash = "sha256:25d380fe8b1dc32cf8f0b1b448470a77afb195438bafdf1d858bfb876f3edf7b", size = 8362801, upload-time = "2025-12-10T22:56:36.107Z" }, { url = "https://files.pythonhosted.org/packages/5d/49/d651878698a0b67f23aa28e17f45a6d6dd3d3f933fa29087fa4ce5947b5a/matplotlib-3.10.8-cp314-cp314t-win_arm64.whl", hash = "sha256:113bb52413ea508ce954a02c10ffd0d565f9c3bc7f2eddc27dfe1731e71c7b5f", size = 8192560, upload-time = "2025-12-10T22:56:38.008Z" }, - { url = "https://files.pythonhosted.org/packages/f5/43/31d59500bb950b0d188e149a2e552040528c13d6e3d6e84d0cccac593dcd/matplotlib-3.10.8-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:f97aeb209c3d2511443f8797e3e5a569aebb040d4f8bc79aa3ee78a8fb9e3dd8", size = 8237252, upload-time = "2025-12-10T22:56:39.529Z" }, - { url = "https://files.pythonhosted.org/packages/0c/2c/615c09984f3c5f907f51c886538ad785cf72e0e11a3225de2c0f9442aecc/matplotlib-3.10.8-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fb061f596dad3a0f52b60dc6a5dec4a0c300dec41e058a7efe09256188d170b7", size = 8124693, upload-time = "2025-12-10T22:56:41.758Z" }, - { url = "https://files.pythonhosted.org/packages/91/e1/2757277a1c56041e1fc104b51a0f7b9a4afc8eb737865d63cababe30bc61/matplotlib-3.10.8-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:12d90df9183093fcd479f4172ac26b322b1248b15729cb57f42f71f24c7e37a3", size = 8702205, upload-time = "2025-12-10T22:56:43.415Z" }, { url = "https://files.pythonhosted.org/packages/04/30/3afaa31c757f34b7725ab9d2ba8b48b5e89c2019c003e7d0ead143aabc5a/matplotlib-3.10.8-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:6da7c2ce169267d0d066adcf63758f0604aa6c3eebf67458930f9d9b79ad1db1", size = 8249198, upload-time = "2025-12-10T22:56:45.584Z" }, { url = "https://files.pythonhosted.org/packages/48/2f/6334aec331f57485a642a7c8be03cb286f29111ae71c46c38b363230063c/matplotlib-3.10.8-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:9153c3292705be9f9c64498a8872118540c3f4123d1a1c840172edf262c8be4a", size = 8136817, upload-time = "2025-12-10T22:56:47.339Z" }, { url = "https://files.pythonhosted.org/packages/73/e4/6d6f14b2a759c622f191b2d67e9075a3f56aaccb3be4bb9bb6890030d0a0/matplotlib-3.10.8-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ae029229a57cd1e8fe542485f27e7ca7b23aa9e8944ddb4985d0bc444f1eca2", size = 8713867, upload-time = "2025-12-10T22:56:48.954Z" }, @@ -3514,15 +3167,10 @@ name = "ml-dtypes" version = "0.5.4" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0e/4a/c27b42ed9b1c7d13d9ba8b6905dece787d6259152f2309338aed29b2447b/ml_dtypes-0.5.4.tar.gz", hash = "sha256:8ab06a50fb9bf9666dd0fe5dfb4676fa2b0ac0f31ecff72a6c3af8e22c063453", size = 692314, upload-time = "2025-11-17T22:32:31.031Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/3a/c5b855752a70267ff729c349e650263adb3c206c29d28cc8ea7ace30a1d5/ml_dtypes-0.5.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b95e97e470fe60ed493fd9ae3911d8da4ebac16bd21f87ffa2b7c588bf22ea2c", size = 679735, upload-time = "2025-11-17T22:31:31.367Z" }, - { url = "https://files.pythonhosted.org/packages/41/79/7433f30ee04bd4faa303844048f55e1eb939131c8e5195a00a96a0939b64/ml_dtypes-0.5.4-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b4b801ebe0b477be666696bda493a9be8356f1f0057a57f1e35cd26928823e5a", size = 5051883, upload-time = "2025-11-17T22:31:33.658Z" }, - { url = "https://files.pythonhosted.org/packages/10/b1/8938e8830b0ee2e167fc75a094dea766a1152bde46752cd9bfc57ee78a82/ml_dtypes-0.5.4-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:388d399a2152dd79a3f0456a952284a99ee5c93d3e2f8dfe25977511e0515270", size = 5030369, upload-time = "2025-11-17T22:31:35.595Z" }, - { url = "https://files.pythonhosted.org/packages/c7/a3/51886727bd16e2f47587997b802dd56398692ce8c6c03c2e5bb32ecafe26/ml_dtypes-0.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:4ff7f3e7ca2972e7de850e7b8fcbb355304271e2933dd90814c1cb847414d6e2", size = 210738, upload-time = "2025-11-17T22:31:37.43Z" }, { url = "https://files.pythonhosted.org/packages/c6/5e/712092cfe7e5eb667b8ad9ca7c54442f21ed7ca8979745f1000e24cf8737/ml_dtypes-0.5.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6c7ecb74c4bd71db68a6bea1edf8da8c34f3d9fe218f038814fd1d310ac76c90", size = 679734, upload-time = "2025-11-17T22:31:39.223Z" }, { url = "https://files.pythonhosted.org/packages/4f/cf/912146dfd4b5c0eea956836c01dcd2fce6c9c844b2691f5152aca196ce4f/ml_dtypes-0.5.4-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bc11d7e8c44a65115d05e2ab9989d1e045125d7be8e05a071a48bc76eb6d6040", size = 5056165, upload-time = "2025-11-17T22:31:41.071Z" }, { url = "https://files.pythonhosted.org/packages/a9/80/19189ea605017473660e43762dc853d2797984b3c7bf30ce656099add30c/ml_dtypes-0.5.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:19b9a53598f21e453ea2fbda8aa783c20faff8e1eeb0d7ab899309a0053f1483", size = 5034975, upload-time = "2025-11-17T22:31:42.758Z" }, @@ -3594,29 +3242,8 @@ wheels = [ name = "multidict" version = "6.7.1" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, -] sdist = { url = "https://files.pythonhosted.org/packages/1a/c2/c2d94cbe6ac1753f3fc980da97b3d930efe1da3af3c9f5125354436c073d/multidict-6.7.1.tar.gz", hash = "sha256:ec6652a1bee61c53a3e5776b6049172c53b6aaba34f18c9ad04f82712bac623d", size = 102010, upload-time = "2026-01-26T02:46:45.979Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/84/0b/19348d4c98980c4851d2f943f8ebafdece2ae7ef737adcfa5994ce8e5f10/multidict-6.7.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c93c3db7ea657dd4637d57e74ab73de31bccefe144d3d4ce370052035bc85fb5", size = 77176, upload-time = "2026-01-26T02:42:59.784Z" }, - { url = "https://files.pythonhosted.org/packages/ef/04/9de3f8077852e3d438215c81e9b691244532d2e05b4270e89ce67b7d103c/multidict-6.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:974e72a2474600827abaeda71af0c53d9ebbc3c2eb7da37b37d7829ae31232d8", size = 44996, upload-time = "2026-01-26T02:43:01.674Z" }, - { url = "https://files.pythonhosted.org/packages/31/5c/08c7f7fe311f32e83f7621cd3f99d805f45519cd06fafb247628b861da7d/multidict-6.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdea2e7b2456cfb6694fb113066fd0ec7ea4d67e3a35e1f4cbeea0b448bf5872", size = 44631, upload-time = "2026-01-26T02:43:03.169Z" }, - { url = "https://files.pythonhosted.org/packages/b7/7f/0e3b1390ae772f27501199996b94b52ceeb64fe6f9120a32c6c3f6b781be/multidict-6.7.1-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17207077e29342fdc2c9a82e4b306f1127bf1ea91f8b71e02d4798a70bb99991", size = 242561, upload-time = "2026-01-26T02:43:04.733Z" }, - { url = "https://files.pythonhosted.org/packages/dd/f4/8719f4f167586af317b69dd3e90f913416c91ca610cac79a45c53f590312/multidict-6.7.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d4f49cb5661344764e4c7c7973e92a47a59b8fc19b6523649ec9dc4960e58a03", size = 242223, upload-time = "2026-01-26T02:43:06.695Z" }, - { url = "https://files.pythonhosted.org/packages/47/ab/7c36164cce64a6ad19c6d9a85377b7178ecf3b89f8fd589c73381a5eedfd/multidict-6.7.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a9fc4caa29e2e6ae408d1c450ac8bf19892c5fca83ee634ecd88a53332c59981", size = 222322, upload-time = "2026-01-26T02:43:08.472Z" }, - { url = "https://files.pythonhosted.org/packages/f5/79/a25add6fb38035b5337bc5734f296d9afc99163403bbcf56d4170f97eb62/multidict-6.7.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c5f0c21549ab432b57dcc82130f388d84ad8179824cc3f223d5e7cfbfd4143f6", size = 254005, upload-time = "2026-01-26T02:43:10.127Z" }, - { url = "https://files.pythonhosted.org/packages/4a/7b/64a87cf98e12f756fc8bd444b001232ffff2be37288f018ad0d3f0aae931/multidict-6.7.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7dfb78d966b2c906ae1d28ccf6e6712a3cd04407ee5088cd276fe8cb42186190", size = 251173, upload-time = "2026-01-26T02:43:11.731Z" }, - { url = "https://files.pythonhosted.org/packages/4b/ac/b605473de2bb404e742f2cc3583d12aedb2352a70e49ae8fce455b50c5aa/multidict-6.7.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9b0d9b91d1aa44db9c1f1ecd0d9d2ae610b2f4f856448664e01a3b35899f3f92", size = 243273, upload-time = "2026-01-26T02:43:13.063Z" }, - { url = "https://files.pythonhosted.org/packages/03/65/11492d6a0e259783720f3bc1d9ea55579a76f1407e31ed44045c99542004/multidict-6.7.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dd96c01a9dcd4889dcfcf9eb5544ca0c77603f239e3ffab0524ec17aea9a93ee", size = 238956, upload-time = "2026-01-26T02:43:14.843Z" }, - { url = "https://files.pythonhosted.org/packages/5f/a7/7ee591302af64e7c196fb63fe856c788993c1372df765102bd0448e7e165/multidict-6.7.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:067343c68cd6612d375710f895337b3a98a033c94f14b9a99eff902f205424e2", size = 233477, upload-time = "2026-01-26T02:43:16.025Z" }, - { url = "https://files.pythonhosted.org/packages/9c/99/c109962d58756c35fd9992fed7f2355303846ea2ff054bb5f5e9d6b888de/multidict-6.7.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5884a04f4ff56c6120f6ccf703bdeb8b5079d808ba604d4d53aec0d55dc33568", size = 243615, upload-time = "2026-01-26T02:43:17.84Z" }, - { url = "https://files.pythonhosted.org/packages/d5/5f/1973e7c771c86e93dcfe1c9cc55a5481b610f6614acfc28c0d326fe6bfad/multidict-6.7.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8affcf1c98b82bc901702eb73b6947a1bfa170823c153fe8a47b5f5f02e48e40", size = 249930, upload-time = "2026-01-26T02:43:19.06Z" }, - { url = "https://files.pythonhosted.org/packages/5d/a5/f170fc2268c3243853580203378cd522446b2df632061e0a5409817854c7/multidict-6.7.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0d17522c37d03e85c8098ec8431636309b2682cf12e58f4dbc76121fb50e4962", size = 243807, upload-time = "2026-01-26T02:43:20.286Z" }, - { url = "https://files.pythonhosted.org/packages/de/01/73856fab6d125e5bc652c3986b90e8699a95e84b48d72f39ade6c0e74a8c/multidict-6.7.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:24c0cf81544ca5e17cfcb6e482e7a82cd475925242b308b890c9452a074d4505", size = 239103, upload-time = "2026-01-26T02:43:21.508Z" }, - { url = "https://files.pythonhosted.org/packages/e7/46/f1220bd9944d8aa40d8ccff100eeeee19b505b857b6f603d6078cb5315b0/multidict-6.7.1-cp310-cp310-win32.whl", hash = "sha256:d82dd730a95e6643802f4454b8fdecdf08667881a9c5670db85bc5a56693f122", size = 41416, upload-time = "2026-01-26T02:43:22.703Z" }, - { url = "https://files.pythonhosted.org/packages/68/00/9b38e272a770303692fc406c36e1a4c740f401522d5787691eb38a8925a8/multidict-6.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:cf37cbe5ced48d417ba045aca1b21bafca67489452debcde94778a576666a1df", size = 46022, upload-time = "2026-01-26T02:43:23.77Z" }, - { url = "https://files.pythonhosted.org/packages/64/65/d8d42490c02ee07b6bbe00f7190d70bb4738b3cce7629aaf9f213ef730dd/multidict-6.7.1-cp310-cp310-win_arm64.whl", hash = "sha256:59bc83d3f66b41dac1e7460aac1d196edc70c9ba3094965c467715a70ecb46db", size = 43238, upload-time = "2026-01-26T02:43:24.882Z" }, { url = "https://files.pythonhosted.org/packages/ce/f1/a90635c4f88fb913fbf4ce660b83b7445b7a02615bda034b2f8eb38fd597/multidict-6.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7ff981b266af91d7b4b3793ca3382e53229088d193a85dfad6f5f4c27fc73e5d", size = 76626, upload-time = "2026-01-26T02:43:26.485Z" }, { url = "https://files.pythonhosted.org/packages/a6/9b/267e64eaf6fc637a15b35f5de31a566634a2740f97d8d094a69d34f524a4/multidict-6.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:844c5bca0b5444adb44a623fb0a1310c2f4cd41f402126bb269cd44c9b3f3e1e", size = 44706, upload-time = "2026-01-26T02:43:27.607Z" }, { url = "https://files.pythonhosted.org/packages/dd/a4/d45caf2b97b035c57267791ecfaafbd59c68212004b3842830954bb4b02e/multidict-6.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f2a0a924d4c2e9afcd7ec64f9de35fcd96915149b2216e1cb2c10a56df483855", size = 44356, upload-time = "2026-01-26T02:43:28.661Z" }, @@ -3736,17 +3363,10 @@ dependencies = [ { name = "librt", marker = "(platform_python_implementation != 'PyPy' and sys_platform == 'darwin') or (platform_python_implementation != 'PyPy' and sys_platform == 'linux') or (platform_python_implementation != 'PyPy' and sys_platform == 'win32')" }, { name = "mypy-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pathspec", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "tomli", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/f5/db/4efed9504bc01309ab9c2da7e352cc223569f05478012b5d9ece38fd44d2/mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba", size = 3582404, upload-time = "2025-12-15T05:03:48.42Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2f/63/e499890d8e39b1ff2df4c0c6ce5d371b6844ee22b8250687a99fd2f657a8/mypy-1.19.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5f05aa3d375b385734388e844bc01733bd33c644ab48e9684faa54e5389775ec", size = 13101333, upload-time = "2025-12-15T05:03:03.28Z" }, - { url = "https://files.pythonhosted.org/packages/72/4b/095626fc136fba96effc4fd4a82b41d688ab92124f8c4f7564bffe5cf1b0/mypy-1.19.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:022ea7279374af1a5d78dfcab853fe6a536eebfda4b59deab53cd21f6cd9f00b", size = 12164102, upload-time = "2025-12-15T05:02:33.611Z" }, - { url = "https://files.pythonhosted.org/packages/0c/5b/952928dd081bf88a83a5ccd49aaecfcd18fd0d2710c7ff07b8fb6f7032b9/mypy-1.19.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee4c11e460685c3e0c64a4c5de82ae143622410950d6be863303a1c4ba0e36d6", size = 12765799, upload-time = "2025-12-15T05:03:28.44Z" }, - { url = "https://files.pythonhosted.org/packages/2a/0d/93c2e4a287f74ef11a66fb6d49c7a9f05e47b0a4399040e6719b57f500d2/mypy-1.19.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de759aafbae8763283b2ee5869c7255391fbc4de3ff171f8f030b5ec48381b74", size = 13522149, upload-time = "2025-12-15T05:02:36.011Z" }, - { url = "https://files.pythonhosted.org/packages/7b/0e/33a294b56aaad2b338d203e3a1d8b453637ac36cb278b45005e0901cf148/mypy-1.19.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ab43590f9cd5108f41aacf9fca31841142c786827a74ab7cc8a2eacb634e09a1", size = 13810105, upload-time = "2025-12-15T05:02:40.327Z" }, - { url = "https://files.pythonhosted.org/packages/0e/fd/3e82603a0cb66b67c5e7abababce6bf1a929ddf67bf445e652684af5c5a0/mypy-1.19.1-cp310-cp310-win_amd64.whl", hash = "sha256:2899753e2f61e571b3971747e302d5f420c3fd09650e1951e99f823bc3089dac", size = 10057200, upload-time = "2025-12-15T05:02:51.012Z" }, { url = "https://files.pythonhosted.org/packages/ef/47/6b3ebabd5474d9cdc170d1342fbf9dddc1b0ec13ec90bf9004ee6f391c31/mypy-1.19.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d8dfc6ab58ca7dda47d9237349157500468e404b17213d44fc1cb77bce532288", size = 13028539, upload-time = "2025-12-15T05:03:44.129Z" }, { url = "https://files.pythonhosted.org/packages/5c/a6/ac7c7a88a3c9c54334f53a941b765e6ec6c4ebd65d3fe8cdcfbe0d0fd7db/mypy-1.19.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e3f276d8493c3c97930e354b2595a44a21348b320d859fb4a2b9f66da9ed27ab", size = 12083163, upload-time = "2025-12-15T05:03:37.679Z" }, { url = "https://files.pythonhosted.org/packages/67/af/3afa9cf880aa4a2c803798ac24f1d11ef72a0c8079689fac5cfd815e2830/mypy-1.19.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2abb24cf3f17864770d18d673c85235ba52456b36a06b6afc1e07c1fdcd3d0e6", size = 12687629, upload-time = "2025-12-15T05:02:31.526Z" }, @@ -3801,91 +3421,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" }, ] -[[package]] -name = "numpy" -version = "2.2.6" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11' and sys_platform == 'darwin'", - "python_full_version < '3.11' and sys_platform == 'linux'", - "python_full_version < '3.11' and sys_platform == 'win32'", -] -sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" }, - { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" }, - { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" }, - { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" }, - { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" }, - { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" }, - { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" }, - { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" }, - { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" }, - { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" }, - { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" }, - { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" }, - { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" }, - { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" }, - { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" }, - { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" }, - { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" }, - { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" }, - { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" }, - { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" }, - { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" }, - { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" }, - { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" }, - { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" }, - { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" }, - { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" }, - { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" }, - { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" }, - { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" }, - { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" }, - { url = "https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84", size = 20867828, upload-time = "2025-05-17T21:37:56.699Z" }, - { url = "https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b", size = 14143006, upload-time = "2025-05-17T21:38:18.291Z" }, - { url = "https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d", size = 5076765, upload-time = "2025-05-17T21:38:27.319Z" }, - { url = "https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566", size = 6617736, upload-time = "2025-05-17T21:38:38.141Z" }, - { url = "https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f", size = 14010719, upload-time = "2025-05-17T21:38:58.433Z" }, - { url = "https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f", size = 16526072, upload-time = "2025-05-17T21:39:22.638Z" }, - { url = "https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868", size = 15503213, upload-time = "2025-05-17T21:39:45.865Z" }, - { url = "https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d", size = 18316632, upload-time = "2025-05-17T21:40:13.331Z" }, - { url = "https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl", hash = "sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd", size = 6244532, upload-time = "2025-05-17T21:43:46.099Z" }, - { url = "https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl", hash = "sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c", size = 12610885, upload-time = "2025-05-17T21:44:05.145Z" }, - { url = "https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6", size = 20963467, upload-time = "2025-05-17T21:40:44Z" }, - { url = "https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda", size = 14225144, upload-time = "2025-05-17T21:41:05.695Z" }, - { url = "https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40", size = 5200217, upload-time = "2025-05-17T21:41:15.903Z" }, - { url = "https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8", size = 6712014, upload-time = "2025-05-17T21:41:27.321Z" }, - { url = "https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f", size = 14077935, upload-time = "2025-05-17T21:41:49.738Z" }, - { url = "https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa", size = 16600122, upload-time = "2025-05-17T21:42:14.046Z" }, - { url = "https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571", size = 15586143, upload-time = "2025-05-17T21:42:37.464Z" }, - { url = "https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1", size = 18385260, upload-time = "2025-05-17T21:43:05.189Z" }, - { url = "https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl", hash = "sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff", size = 6377225, upload-time = "2025-05-17T21:43:16.254Z" }, - { url = "https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl", hash = "sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06", size = 12771374, upload-time = "2025-05-17T21:43:35.479Z" }, - { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" }, - { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" }, - { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" }, - { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" }, -] - [[package]] name = "numpy" version = "2.4.2" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.14' and sys_platform == 'darwin'", - "python_full_version == '3.13.*' and sys_platform == 'darwin'", - "python_full_version == '3.12.*' and sys_platform == 'darwin'", - "python_full_version == '3.11.*' and sys_platform == 'darwin'", - "python_full_version >= '3.14' and sys_platform == 'linux'", - "python_full_version == '3.13.*' and sys_platform == 'linux'", - "python_full_version == '3.12.*' and sys_platform == 'linux'", - "python_full_version == '3.11.*' and sys_platform == 'linux'", - "python_full_version >= '3.14' and sys_platform == 'win32'", - "python_full_version == '3.13.*' and sys_platform == 'win32'", - "python_full_version == '3.12.*' and sys_platform == 'win32'", - "python_full_version == '3.11.*' and sys_platform == 'win32'", -] sdist = { url = "https://files.pythonhosted.org/packages/57/fd/0005efbd0af48e55eb3c7208af93f2862d4b1a56cd78e84309a2d959208d/numpy-2.4.2.tar.gz", hash = "sha256:659a6107e31a83c4e33f763942275fd278b21d095094044eb35569e86a21ddae", size = 20723651, upload-time = "2026-01-31T23:13:10.135Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/d3/44/71852273146957899753e69986246d6a176061ea183407e95418c2aa4d9a/numpy-2.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e7e88598032542bd49af7c4747541422884219056c268823ef6e5e89851c8825", size = 16955478, upload-time = "2026-01-31T23:10:25.623Z" }, @@ -4214,19 +3753,6 @@ version = "3.11.7" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/53/45/b268004f745ede84e5798b48ee12b05129d19235d0e15267aa57dcdb400b/orjson-3.11.7.tar.gz", hash = "sha256:9b1a67243945819ce55d24a30b59d6a168e86220452d2c96f4d1f093e71c0c49", size = 6144992, upload-time = "2026-02-02T15:38:49.29Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/de/1a/a373746fa6d0e116dd9e54371a7b54622c44d12296d5d0f3ad5e3ff33490/orjson-3.11.7-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:a02c833f38f36546ba65a452127633afce4cf0dd7296b753d3bb54e55e5c0174", size = 229140, upload-time = "2026-02-02T15:37:06.082Z" }, - { url = "https://files.pythonhosted.org/packages/52/a2/fa129e749d500f9b183e8a3446a193818a25f60261e9ce143ad61e975208/orjson-3.11.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b63c6e6738d7c3470ad01601e23376aa511e50e1f3931395b9f9c722406d1a67", size = 128670, upload-time = "2026-02-02T15:37:08.002Z" }, - { url = "https://files.pythonhosted.org/packages/08/93/1e82011cd1e0bd051ef9d35bed1aa7fb4ea1f0a055dc2c841b46b43a9ebd/orjson-3.11.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:043d3006b7d32c7e233b8cfb1f01c651013ea079e08dcef7189a29abd8befe11", size = 123832, upload-time = "2026-02-02T15:37:09.191Z" }, - { url = "https://files.pythonhosted.org/packages/fe/d8/a26b431ef962c7d55736674dddade876822f3e33223c1f47a36879350d04/orjson-3.11.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57036b27ac8a25d81112eb0cc9835cd4833c5b16e1467816adc0015f59e870dc", size = 129171, upload-time = "2026-02-02T15:37:11.112Z" }, - { url = "https://files.pythonhosted.org/packages/a7/19/f47819b84a580f490da260c3ee9ade214cf4cf78ac9ce8c1c758f80fdfc9/orjson-3.11.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:733ae23ada68b804b222c44affed76b39e30806d38660bf1eb200520d259cc16", size = 141967, upload-time = "2026-02-02T15:37:12.282Z" }, - { url = "https://files.pythonhosted.org/packages/5b/cd/37ece39a0777ba077fdcdbe4cccae3be8ed00290c14bf8afdc548befc260/orjson-3.11.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5fdfad2093bdd08245f2e204d977facd5f871c88c4a71230d5bcbd0e43bf6222", size = 130991, upload-time = "2026-02-02T15:37:13.465Z" }, - { url = "https://files.pythonhosted.org/packages/8f/ed/f2b5d66aa9b6b5c02ff5f120efc7b38c7c4962b21e6be0f00fd99a5c348e/orjson-3.11.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cededd6738e1c153530793998e31c05086582b08315db48ab66649768f326baa", size = 133674, upload-time = "2026-02-02T15:37:14.694Z" }, - { url = "https://files.pythonhosted.org/packages/c4/6e/baa83e68d1aa09fa8c3e5b2c087d01d0a0bd45256de719ed7bc22c07052d/orjson-3.11.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:14f440c7268c8f8633d1b3d443a434bd70cb15686117ea6beff8fdc8f5917a1e", size = 138722, upload-time = "2026-02-02T15:37:16.501Z" }, - { url = "https://files.pythonhosted.org/packages/0c/47/7f8ef4963b772cd56999b535e553f7eb5cd27e9dd6c049baee6f18bfa05d/orjson-3.11.7-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:3a2479753bbb95b0ebcf7969f562cdb9668e6d12416a35b0dda79febf89cdea2", size = 409056, upload-time = "2026-02-02T15:37:17.895Z" }, - { url = "https://files.pythonhosted.org/packages/38/eb/2df104dd2244b3618f25325a656f85cc3277f74bbd91224752410a78f3c7/orjson-3.11.7-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:71924496986275a737f38e3f22b4e0878882b3f7a310d2ff4dc96e812789120c", size = 144196, upload-time = "2026-02-02T15:37:19.349Z" }, - { url = "https://files.pythonhosted.org/packages/b6/2a/ee41de0aa3a6686598661eae2b4ebdff1340c65bfb17fcff8b87138aab21/orjson-3.11.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4a9eefdc70bf8bf9857f0290f973dec534ac84c35cd6a7f4083be43e7170a8f", size = 134979, upload-time = "2026-02-02T15:37:20.906Z" }, - { url = "https://files.pythonhosted.org/packages/4c/fa/92fc5d3d402b87a8b28277a9ed35386218a6a5287c7fe5ee9b9f02c53fb2/orjson-3.11.7-cp310-cp310-win32.whl", hash = "sha256:ae9e0b37a834cef7ce8f99de6498f8fad4a2c0bf6bfc3d02abd8ed56aa15b2de", size = 127968, upload-time = "2026-02-02T15:37:23.178Z" }, - { url = "https://files.pythonhosted.org/packages/07/29/a576bf36d73d60df06904d3844a9df08e25d59eba64363aaf8ec2f9bff41/orjson-3.11.7-cp310-cp310-win_amd64.whl", hash = "sha256:d772afdb22555f0c58cfc741bdae44180122b3616faa1ecadb595cd526e4c993", size = 125128, upload-time = "2026-02-02T15:37:24.329Z" }, { url = "https://files.pythonhosted.org/packages/37/02/da6cb01fc6087048d7f61522c327edf4250f1683a58a839fdcc435746dd5/orjson-3.11.7-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9487abc2c2086e7c8eb9a211d2ce8855bae0e92586279d0d27b341d5ad76c85c", size = 228664, upload-time = "2026-02-02T15:37:25.542Z" }, { url = "https://files.pythonhosted.org/packages/c1/c2/5885e7a5881dba9a9af51bc564e8967225a642b3e03d089289a35054e749/orjson-3.11.7-cp311-cp311-macosx_15_0_arm64.whl", hash = "sha256:79cacb0b52f6004caf92405a7e1f11e6e2de8bdf9019e4f76b44ba045125cd6b", size = 125344, upload-time = "2026-02-02T15:37:26.92Z" }, { url = "https://files.pythonhosted.org/packages/a4/1d/4e7688de0a92d1caf600dfd5fb70b4c5bfff51dfa61ac555072ef2d0d32a/orjson-3.11.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2e85fe4698b6a56d5e2ebf7ae87544d668eb6bde1ad1226c13f44663f20ec9e", size = 128404, upload-time = "2026-02-02T15:37:28.108Z" }, @@ -4298,94 +3824,14 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451, upload-time = "2024-11-08T09:47:44.722Z" }, ] -[[package]] -name = "pandas" -version = "2.3.3" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11' and sys_platform == 'darwin'", - "python_full_version < '3.11' and sys_platform == 'linux'", - "python_full_version < '3.11' and sys_platform == 'win32'", -] -dependencies = [ - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "python-dateutil", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "pytz", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "tzdata", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c", size = 11555763, upload-time = "2025-09-29T23:16:53.287Z" }, - { url = "https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a", size = 10801217, upload-time = "2025-09-29T23:17:04.522Z" }, - { url = "https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1", size = 12148791, upload-time = "2025-09-29T23:17:18.444Z" }, - { url = "https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838", size = 12769373, upload-time = "2025-09-29T23:17:35.846Z" }, - { url = "https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250", size = 13200444, upload-time = "2025-09-29T23:17:49.341Z" }, - { url = "https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4", size = 13858459, upload-time = "2025-09-29T23:18:03.722Z" }, - { url = "https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826", size = 11346086, upload-time = "2025-09-29T23:18:18.505Z" }, - { url = "https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523", size = 11578790, upload-time = "2025-09-29T23:18:30.065Z" }, - { url = "https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45", size = 10833831, upload-time = "2025-09-29T23:38:56.071Z" }, - { url = "https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66", size = 12199267, upload-time = "2025-09-29T23:18:41.627Z" }, - { url = "https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b", size = 12789281, upload-time = "2025-09-29T23:18:56.834Z" }, - { url = "https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791", size = 13240453, upload-time = "2025-09-29T23:19:09.247Z" }, - { url = "https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151", size = 13890361, upload-time = "2025-09-29T23:19:25.342Z" }, - { url = "https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c", size = 11348702, upload-time = "2025-09-29T23:19:38.296Z" }, - { url = "https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53", size = 11597846, upload-time = "2025-09-29T23:19:48.856Z" }, - { url = "https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35", size = 10729618, upload-time = "2025-09-29T23:39:08.659Z" }, - { url = "https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908", size = 11737212, upload-time = "2025-09-29T23:19:59.765Z" }, - { url = "https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89", size = 12362693, upload-time = "2025-09-29T23:20:14.098Z" }, - { url = "https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98", size = 12771002, upload-time = "2025-09-29T23:20:26.76Z" }, - { url = "https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084", size = 13450971, upload-time = "2025-09-29T23:20:41.344Z" }, - { url = "https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b", size = 10992722, upload-time = "2025-09-29T23:20:54.139Z" }, - { url = "https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713", size = 11544671, upload-time = "2025-09-29T23:21:05.024Z" }, - { url = "https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8", size = 10680807, upload-time = "2025-09-29T23:21:15.979Z" }, - { url = "https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d", size = 11709872, upload-time = "2025-09-29T23:21:27.165Z" }, - { url = "https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac", size = 12306371, upload-time = "2025-09-29T23:21:40.532Z" }, - { url = "https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c", size = 12765333, upload-time = "2025-09-29T23:21:55.77Z" }, - { url = "https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493", size = 13418120, upload-time = "2025-09-29T23:22:10.109Z" }, - { url = "https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee", size = 10993991, upload-time = "2025-09-29T23:25:04.889Z" }, - { url = "https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5", size = 12048227, upload-time = "2025-09-29T23:22:24.343Z" }, - { url = "https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21", size = 11411056, upload-time = "2025-09-29T23:22:37.762Z" }, - { url = "https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78", size = 11645189, upload-time = "2025-09-29T23:22:51.688Z" }, - { url = "https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110", size = 12121912, upload-time = "2025-09-29T23:23:05.042Z" }, - { url = "https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86", size = 12712160, upload-time = "2025-09-29T23:23:28.57Z" }, - { url = "https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc", size = 13199233, upload-time = "2025-09-29T23:24:24.876Z" }, - { url = "https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0", size = 11540635, upload-time = "2025-09-29T23:25:52.486Z" }, - { url = "https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593", size = 10759079, upload-time = "2025-09-29T23:26:33.204Z" }, - { url = "https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c", size = 11814049, upload-time = "2025-09-29T23:27:15.384Z" }, - { url = "https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b", size = 12332638, upload-time = "2025-09-29T23:27:51.625Z" }, - { url = "https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6", size = 12886834, upload-time = "2025-09-29T23:28:21.289Z" }, - { url = "https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3", size = 13409925, upload-time = "2025-09-29T23:28:58.261Z" }, - { url = "https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5", size = 11109071, upload-time = "2025-09-29T23:32:27.484Z" }, - { url = "https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec", size = 12048504, upload-time = "2025-09-29T23:29:31.47Z" }, - { url = "https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7", size = 11410702, upload-time = "2025-09-29T23:29:54.591Z" }, - { url = "https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450", size = 11634535, upload-time = "2025-09-29T23:30:21.003Z" }, - { url = "https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5", size = 12121582, upload-time = "2025-09-29T23:30:43.391Z" }, - { url = "https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788", size = 12699963, upload-time = "2025-09-29T23:31:10.009Z" }, - { url = "https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87", size = 13202175, upload-time = "2025-09-29T23:31:59.173Z" }, -] - [[package]] name = "pandas" version = "3.0.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.14' and sys_platform == 'darwin'", - "python_full_version == '3.13.*' and sys_platform == 'darwin'", - "python_full_version == '3.12.*' and sys_platform == 'darwin'", - "python_full_version == '3.11.*' and sys_platform == 'darwin'", - "python_full_version >= '3.14' and sys_platform == 'linux'", - "python_full_version == '3.13.*' and sys_platform == 'linux'", - "python_full_version == '3.12.*' and sys_platform == 'linux'", - "python_full_version == '3.11.*' and sys_platform == 'linux'", - "python_full_version >= '3.14' and sys_platform == 'win32'", - "python_full_version == '3.13.*' and sys_platform == 'win32'", - "python_full_version == '3.12.*' and sys_platform == 'win32'", - "python_full_version == '3.11.*' and sys_platform == 'win32'", -] dependencies = [ - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, - { name = "python-dateutil", marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, - { name = "tzdata", marker = "python_full_version >= '3.11' and sys_platform == 'win32'" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "python-dateutil", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "tzdata", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/2e/0c/b28ed414f080ee0ad153f848586d61d1878f91689950f037f976ce15f6c8/pandas-3.0.1.tar.gz", hash = "sha256:4186a699674af418f655dbd420ed87f50d56b4cd6603784279d9eef6627823c8", size = 4641901, upload-time = "2026-02-17T22:20:16.434Z" } wheels = [ @@ -4462,17 +3908,6 @@ version = "12.1.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/1f/42/5c74462b4fd957fcd7b13b04fb3205ff8349236ea74c7c375766d6c82288/pillow-12.1.1.tar.gz", hash = "sha256:9ad8fa5937ab05218e2b6a4cff30295ad35afd2f83ac592e68c0d871bb0fdbc4", size = 46980264, upload-time = "2026-02-11T04:23:07.146Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1d/30/5bd3d794762481f8c8ae9c80e7b76ecea73b916959eb587521358ef0b2f9/pillow-12.1.1-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:1f1625b72740fdda5d77b4def688eb8fd6490975d06b909fd19f13f391e077e0", size = 5304099, upload-time = "2026-02-11T04:20:06.13Z" }, - { url = "https://files.pythonhosted.org/packages/bd/c1/aab9e8f3eeb4490180e357955e15c2ef74b31f64790ff356c06fb6cf6d84/pillow-12.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:178aa072084bd88ec759052feca8e56cbb14a60b39322b99a049e58090479713", size = 4657880, upload-time = "2026-02-11T04:20:09.291Z" }, - { url = "https://files.pythonhosted.org/packages/f1/0a/9879e30d56815ad529d3985aeff5af4964202425c27261a6ada10f7cbf53/pillow-12.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b66e95d05ba806247aaa1561f080abc7975daf715c30780ff92a20e4ec546e1b", size = 6222587, upload-time = "2026-02-11T04:20:10.82Z" }, - { url = "https://files.pythonhosted.org/packages/5a/5f/a1b72ff7139e4f89014e8d451442c74a774d5c43cd938fb0a9f878576b37/pillow-12.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:89c7e895002bbe49cdc5426150377cbbc04767d7547ed145473f496dfa40408b", size = 8027678, upload-time = "2026-02-11T04:20:12.455Z" }, - { url = "https://files.pythonhosted.org/packages/e2/c2/c7cb187dac79a3d22c3ebeae727abee01e077c8c7d930791dc592f335153/pillow-12.1.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a5cbdcddad0af3da87cb16b60d23648bc3b51967eb07223e9fed77a82b457c4", size = 6335777, upload-time = "2026-02-11T04:20:14.441Z" }, - { url = "https://files.pythonhosted.org/packages/0c/7b/f9b09a7804ec7336effb96c26d37c29d27225783dc1501b7d62dcef6ae25/pillow-12.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9f51079765661884a486727f0729d29054242f74b46186026582b4e4769918e4", size = 7027140, upload-time = "2026-02-11T04:20:16.387Z" }, - { url = "https://files.pythonhosted.org/packages/98/b2/2fa3c391550bd421b10849d1a2144c44abcd966daadd2f7c12e19ea988c4/pillow-12.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:99c1506ea77c11531d75e3a412832a13a71c7ebc8192ab9e4b2e355555920e3e", size = 6449855, upload-time = "2026-02-11T04:20:18.554Z" }, - { url = "https://files.pythonhosted.org/packages/96/ff/9caf4b5b950c669263c39e96c78c0d74a342c71c4f43fd031bb5cb7ceac9/pillow-12.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:36341d06738a9f66c8287cf8b876d24b18db9bd8740fa0672c74e259ad408cff", size = 7151329, upload-time = "2026-02-11T04:20:20.646Z" }, - { url = "https://files.pythonhosted.org/packages/7b/f8/4b24841f582704da675ca535935bccb32b00a6da1226820845fac4a71136/pillow-12.1.1-cp310-cp310-win32.whl", hash = "sha256:6c52f062424c523d6c4db85518774cc3d50f5539dd6eed32b8f6229b26f24d40", size = 6325574, upload-time = "2026-02-11T04:20:22.43Z" }, - { url = "https://files.pythonhosted.org/packages/f8/f9/9f6b01c0881d7036063aa6612ef04c0e2cad96be21325a1e92d0203f8e91/pillow-12.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:c6008de247150668a705a6338156efb92334113421ceecf7438a12c9a12dab23", size = 7032347, upload-time = "2026-02-11T04:20:23.932Z" }, - { url = "https://files.pythonhosted.org/packages/79/13/c7922edded3dcdaf10c59297540b72785620abc0538872c819915746757d/pillow-12.1.1-cp310-cp310-win_arm64.whl", hash = "sha256:1a9b0ee305220b392e1124a764ee4265bd063e54a751a6b62eff69992f457fa9", size = 2453457, upload-time = "2026-02-11T04:20:25.392Z" }, { url = "https://files.pythonhosted.org/packages/2b/46/5da1ec4a5171ee7bf1a0efa064aba70ba3d6e0788ce3f5acd1375d23c8c0/pillow-12.1.1-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:e879bb6cd5c73848ef3b2b48b8af9ff08c5b71ecda8048b7dd22d8a33f60be32", size = 5304084, upload-time = "2026-02-11T04:20:27.501Z" }, { url = "https://files.pythonhosted.org/packages/78/93/a29e9bc02d1cf557a834da780ceccd54e02421627200696fcf805ebdc3fb/pillow-12.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:365b10bb9417dd4498c0e3b128018c4a624dc11c7b97d8cc54effe3b096f4c38", size = 4657866, upload-time = "2026-02-11T04:20:29.827Z" }, { url = "https://files.pythonhosted.org/packages/13/84/583a4558d492a179d31e4aae32eadce94b9acf49c0337c4ce0b70e0a01f2/pillow-12.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d4ce8e329c93845720cd2014659ca67eac35f6433fd3050393d85f3ecef0dad5", size = 6232148, upload-time = "2026-02-11T04:20:31.329Z" }, @@ -4592,7 +4027,6 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pastel", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pyyaml", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "tomli", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, ] sdist = { url = "https://files.pythonhosted.org/packages/05/9b/e717572686bbf23e17483389c1bf3a381ca2427c84c7e0af0cdc0f23fccc/poethepoet-0.42.1.tar.gz", hash = "sha256:205747e276062c2aaba8afd8a98838f8a3a0237b7ab94715fab8d82718aac14f", size = 93209, upload-time = "2026-02-26T22:57:50.883Z" } wheels = [ @@ -4661,8 +4095,8 @@ name = "powerfx" version = "0.0.34" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "cffi", marker = "(python_full_version < '3.14' and sys_platform == 'darwin') or (python_full_version < '3.14' and sys_platform == 'linux') or (python_full_version < '3.14' and sys_platform == 'win32')" }, - { name = "pythonnet", marker = "(python_full_version < '3.14' and sys_platform == 'darwin') or (python_full_version < '3.14' and sys_platform == 'linux') or (python_full_version < '3.14' and sys_platform == 'win32')" }, + { name = "cffi", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "pythonnet", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/9f/fb/6c4bf87e0c74ca1c563921ce89ca1c5785b7576bca932f7255cdf81082a7/powerfx-0.0.34.tar.gz", hash = "sha256:956992e7afd272657ed16d80f4cad24ec95d9e4a79fb9dfa4a068a09e136af32", size = 3237555, upload-time = "2025-12-22T15:50:59.682Z" } wheels = [ @@ -4699,21 +4133,6 @@ version = "0.4.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz", hash = "sha256:f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d", size = 46442, upload-time = "2025-10-08T19:49:02.291Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3c/0e/934b541323035566a9af292dba85a195f7b78179114f2c6ebb24551118a9/propcache-0.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c2d1fa3201efaf55d730400d945b5b3ab6e672e100ba0f9a409d950ab25d7db", size = 79534, upload-time = "2025-10-08T19:46:02.083Z" }, - { url = "https://files.pythonhosted.org/packages/a1/6b/db0d03d96726d995dc7171286c6ba9d8d14251f37433890f88368951a44e/propcache-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1eb2994229cc8ce7fe9b3db88f5465f5fd8651672840b2e426b88cdb1a30aac8", size = 45526, upload-time = "2025-10-08T19:46:03.884Z" }, - { url = "https://files.pythonhosted.org/packages/e4/c3/82728404aea669e1600f304f2609cde9e665c18df5a11cdd57ed73c1dceb/propcache-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:66c1f011f45a3b33d7bcb22daed4b29c0c9e2224758b6be00686731e1b46f925", size = 47263, upload-time = "2025-10-08T19:46:05.405Z" }, - { url = "https://files.pythonhosted.org/packages/df/1b/39313ddad2bf9187a1432654c38249bab4562ef535ef07f5eb6eb04d0b1b/propcache-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9a52009f2adffe195d0b605c25ec929d26b36ef986ba85244891dee3b294df21", size = 201012, upload-time = "2025-10-08T19:46:07.165Z" }, - { url = "https://files.pythonhosted.org/packages/5b/01/f1d0b57d136f294a142acf97f4ed58c8e5b974c21e543000968357115011/propcache-0.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5d4e2366a9c7b837555cf02fb9be2e3167d333aff716332ef1b7c3a142ec40c5", size = 209491, upload-time = "2025-10-08T19:46:08.909Z" }, - { url = "https://files.pythonhosted.org/packages/a1/c8/038d909c61c5bb039070b3fb02ad5cccdb1dde0d714792e251cdb17c9c05/propcache-0.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9d2b6caef873b4f09e26ea7e33d65f42b944837563a47a94719cc3544319a0db", size = 215319, upload-time = "2025-10-08T19:46:10.7Z" }, - { url = "https://files.pythonhosted.org/packages/08/57/8c87e93142b2c1fa2408e45695205a7ba05fb5db458c0bf5c06ba0e09ea6/propcache-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b16ec437a8c8a965ecf95739448dd938b5c7f56e67ea009f4300d8df05f32b7", size = 196856, upload-time = "2025-10-08T19:46:12.003Z" }, - { url = "https://files.pythonhosted.org/packages/42/df/5615fec76aa561987a534759b3686008a288e73107faa49a8ae5795a9f7a/propcache-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:296f4c8ed03ca7476813fe666c9ea97869a8d7aec972618671b33a38a5182ef4", size = 193241, upload-time = "2025-10-08T19:46:13.495Z" }, - { url = "https://files.pythonhosted.org/packages/d5/21/62949eb3a7a54afe8327011c90aca7e03547787a88fb8bd9726806482fea/propcache-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:1f0978529a418ebd1f49dad413a2b68af33f85d5c5ca5c6ca2a3bed375a7ac60", size = 190552, upload-time = "2025-10-08T19:46:14.938Z" }, - { url = "https://files.pythonhosted.org/packages/30/ee/ab4d727dd70806e5b4de96a798ae7ac6e4d42516f030ee60522474b6b332/propcache-0.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fd138803047fb4c062b1c1dd95462f5209456bfab55c734458f15d11da288f8f", size = 200113, upload-time = "2025-10-08T19:46:16.695Z" }, - { url = "https://files.pythonhosted.org/packages/8a/0b/38b46208e6711b016aa8966a3ac793eee0d05c7159d8342aa27fc0bc365e/propcache-0.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8c9b3cbe4584636d72ff556d9036e0c9317fa27b3ac1f0f558e7e84d1c9c5900", size = 200778, upload-time = "2025-10-08T19:46:18.023Z" }, - { url = "https://files.pythonhosted.org/packages/cf/81/5abec54355ed344476bee711e9f04815d4b00a311ab0535599204eecc257/propcache-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f93243fdc5657247533273ac4f86ae106cc6445a0efacb9a1bfe982fcfefd90c", size = 193047, upload-time = "2025-10-08T19:46:19.449Z" }, - { url = "https://files.pythonhosted.org/packages/ec/b6/1f237c04e32063cb034acd5f6ef34ef3a394f75502e72703545631ab1ef6/propcache-0.4.1-cp310-cp310-win32.whl", hash = "sha256:a0ee98db9c5f80785b266eb805016e36058ac72c51a064040f2bc43b61101cdb", size = 38093, upload-time = "2025-10-08T19:46:20.643Z" }, - { url = "https://files.pythonhosted.org/packages/a6/67/354aac4e0603a15f76439caf0427781bcd6797f370377f75a642133bc954/propcache-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:1cdb7988c4e5ac7f6d175a28a9aa0c94cb6f2ebe52756a3c0cda98d2809a9e37", size = 41638, upload-time = "2025-10-08T19:46:21.935Z" }, - { url = "https://files.pythonhosted.org/packages/e0/e1/74e55b9fd1a4c209ff1a9a824bf6c8b3d1fc5a1ac3eabe23462637466785/propcache-0.4.1-cp310-cp310-win_arm64.whl", hash = "sha256:d82ad62b19645419fe79dd63b3f9253e15b30e955c0170e5cebc350c1844e581", size = 38229, upload-time = "2025-10-08T19:46:23.368Z" }, { url = "https://files.pythonhosted.org/packages/8c/d4/4e2c9aaf7ac2242b9358f98dccd8f90f2605402f5afeff6c578682c2c491/propcache-0.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:60a8fda9644b7dfd5dece8c61d8a85e271cb958075bfc4e01083c148b61a7caf", size = 80208, upload-time = "2025-10-08T19:46:24.597Z" }, { url = "https://files.pythonhosted.org/packages/c2/21/d7b68e911f9c8e18e4ae43bdbc1e1e9bbd971f8866eb81608947b6f585ff/propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c30b53e7e6bda1d547cabb47c825f3843a0a1a42b0496087bb58d8fedf9f41b5", size = 45777, upload-time = "2025-10-08T19:46:25.733Z" }, { url = "https://files.pythonhosted.org/packages/d3/1d/11605e99ac8ea9435651ee71ab4cb4bf03f0949586246476a25aadfec54a/propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6918ecbd897443087a3b7cd978d56546a812517dcaaca51b49526720571fa93e", size = 47647, upload-time = "2025-10-08T19:46:27.304Z" }, @@ -4854,13 +4273,6 @@ version = "23.0.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/88/22/134986a4cc224d593c1afde5494d18ff629393d74cc2eddb176669f234a4/pyarrow-23.0.1.tar.gz", hash = "sha256:b8c5873e33440b2bc2f4a79d2b47017a89c5a24116c055625e6f2ee50523f019", size = 1167336, upload-time = "2026-02-16T10:14:12.39Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bc/a8/24e5dc6855f50a62936ceb004e6e9645e4219a8065f304145d7fb8a79d5d/pyarrow-23.0.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:3fab8f82571844eb3c460f90a75583801d14ca0cc32b1acc8c361650e006fd56", size = 34307390, upload-time = "2026-02-16T10:08:08.654Z" }, - { url = "https://files.pythonhosted.org/packages/bc/8e/4be5617b4aaae0287f621ad31c6036e5f63118cfca0dc57d42121ff49b51/pyarrow-23.0.1-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:3f91c038b95f71ddfc865f11d5876c42f343b4495535bd262c7b321b0b94507c", size = 35853761, upload-time = "2026-02-16T10:08:17.811Z" }, - { url = "https://files.pythonhosted.org/packages/2e/08/3e56a18819462210432ae37d10f5c8eed3828be1d6c751b6e6a2e93c286a/pyarrow-23.0.1-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:d0744403adabef53c985a7f8a082b502a368510c40d184df349a0a8754533258", size = 44493116, upload-time = "2026-02-16T10:08:25.792Z" }, - { url = "https://files.pythonhosted.org/packages/f8/82/c40b68001dbec8a3faa4c08cd8c200798ac732d2854537c5449dc859f55a/pyarrow-23.0.1-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:c33b5bf406284fd0bba436ed6f6c3ebe8e311722b441d89397c54f871c6863a2", size = 47564532, upload-time = "2026-02-16T10:08:34.27Z" }, - { url = "https://files.pythonhosted.org/packages/20/bc/73f611989116b6f53347581b02177f9f620efdf3cd3f405d0e83cdf53a83/pyarrow-23.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ddf743e82f69dcd6dbbcb63628895d7161e04e56794ef80550ac6f3315eeb1d5", size = 48183685, upload-time = "2026-02-16T10:08:42.889Z" }, - { url = "https://files.pythonhosted.org/packages/b0/cc/6c6b3ecdae2a8c3aced99956187e8302fc954cc2cca2a37cf2111dad16ce/pyarrow-23.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e052a211c5ac9848ae15d5ec875ed0943c0221e2fcfe69eee80b604b4e703222", size = 50605582, upload-time = "2026-02-16T10:08:51.641Z" }, - { url = "https://files.pythonhosted.org/packages/8d/94/d359e708672878d7638a04a0448edf7c707f9e5606cee11e15aaa5c7535a/pyarrow-23.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:5abde149bb3ce524782d838eb67ac095cd3fd6090eba051130589793f1a7f76d", size = 27521148, upload-time = "2026-02-16T10:08:58.077Z" }, { url = "https://files.pythonhosted.org/packages/b0/41/8e6b6ef7e225d4ceead8459427a52afdc23379768f54dd3566014d7618c1/pyarrow-23.0.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:6f0147ee9e0386f519c952cc670eb4a8b05caa594eeffe01af0e25f699e4e9bb", size = 34302230, upload-time = "2026-02-16T10:09:03.859Z" }, { url = "https://files.pythonhosted.org/packages/bf/4a/1472c00392f521fea03ae93408bf445cc7bfa1ab81683faf9bc188e36629/pyarrow-23.0.1-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:0ae6e17c828455b6265d590100c295193f93cc5675eb0af59e49dbd00d2de350", size = 35850050, upload-time = "2026-02-16T10:09:11.877Z" }, { url = "https://files.pythonhosted.org/packages/0c/b2/bd1f2f05ded56af7f54d702c8364c9c43cd6abb91b0e9933f3d77b4f4132/pyarrow-23.0.1-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:fed7020203e9ef273360b9e45be52a2a47d3103caf156a30ace5247ffb51bdbd", size = 44491918, upload-time = "2026-02-16T10:09:18.144Z" }, @@ -4976,19 +4388,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c6/90/32c9941e728d564b411d574d8ee0cf09b12ec978cb22b294995bae5549a5/pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146", size = 2107298, upload-time = "2025-11-04T13:39:04.116Z" }, - { url = "https://files.pythonhosted.org/packages/fb/a8/61c96a77fe28993d9a6fb0f4127e05430a267b235a124545d79fea46dd65/pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2", size = 1901475, upload-time = "2025-11-04T13:39:06.055Z" }, - { url = "https://files.pythonhosted.org/packages/5d/b6/338abf60225acc18cdc08b4faef592d0310923d19a87fba1faf05af5346e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97", size = 1918815, upload-time = "2025-11-04T13:39:10.41Z" }, - { url = "https://files.pythonhosted.org/packages/d1/1c/2ed0433e682983d8e8cba9c8d8ef274d4791ec6a6f24c58935b90e780e0a/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9", size = 2065567, upload-time = "2025-11-04T13:39:12.244Z" }, - { url = "https://files.pythonhosted.org/packages/b3/24/cf84974ee7d6eae06b9e63289b7b8f6549d416b5c199ca2d7ce13bbcf619/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52", size = 2230442, upload-time = "2025-11-04T13:39:13.962Z" }, - { url = "https://files.pythonhosted.org/packages/fd/21/4e287865504b3edc0136c89c9c09431be326168b1eb7841911cbc877a995/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941", size = 2350956, upload-time = "2025-11-04T13:39:15.889Z" }, - { url = "https://files.pythonhosted.org/packages/a8/76/7727ef2ffa4b62fcab916686a68a0426b9b790139720e1934e8ba797e238/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a", size = 2068253, upload-time = "2025-11-04T13:39:17.403Z" }, - { url = "https://files.pythonhosted.org/packages/d5/8c/a4abfc79604bcb4c748e18975c44f94f756f08fb04218d5cb87eb0d3a63e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c", size = 2177050, upload-time = "2025-11-04T13:39:19.351Z" }, - { url = "https://files.pythonhosted.org/packages/67/b1/de2e9a9a79b480f9cb0b6e8b6ba4c50b18d4e89852426364c66aa82bb7b3/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2", size = 2147178, upload-time = "2025-11-04T13:39:21Z" }, - { url = "https://files.pythonhosted.org/packages/16/c1/dfb33f837a47b20417500efaa0378adc6635b3c79e8369ff7a03c494b4ac/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556", size = 2341833, upload-time = "2025-11-04T13:39:22.606Z" }, - { url = "https://files.pythonhosted.org/packages/47/36/00f398642a0f4b815a9a558c4f1dca1b4020a7d49562807d7bc9ff279a6c/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49", size = 2321156, upload-time = "2025-11-04T13:39:25.843Z" }, - { url = "https://files.pythonhosted.org/packages/7e/70/cad3acd89fde2010807354d978725ae111ddf6d0ea46d1ea1775b5c1bd0c/pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba", size = 1989378, upload-time = "2025-11-04T13:39:27.92Z" }, - { url = "https://files.pythonhosted.org/packages/76/92/d338652464c6c367e5608e4488201702cd1cbb0f33f7b6a85a60fe5f3720/pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9", size = 2013622, upload-time = "2025-11-04T13:39:29.848Z" }, { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" }, { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" }, { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" }, @@ -5067,14 +4466,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" }, { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" }, { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" }, - { url = "https://files.pythonhosted.org/packages/e6/b0/1a2aa41e3b5a4ba11420aba2d091b2d17959c8d1519ece3627c371951e73/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8", size = 2103351, upload-time = "2025-11-04T13:43:02.058Z" }, - { url = "https://files.pythonhosted.org/packages/a4/ee/31b1f0020baaf6d091c87900ae05c6aeae101fa4e188e1613c80e4f1ea31/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a", size = 1925363, upload-time = "2025-11-04T13:43:05.159Z" }, - { url = "https://files.pythonhosted.org/packages/e1/89/ab8e86208467e467a80deaca4e434adac37b10a9d134cd2f99b28a01e483/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b", size = 2135615, upload-time = "2025-11-04T13:43:08.116Z" }, - { url = "https://files.pythonhosted.org/packages/99/0a/99a53d06dd0348b2008f2f30884b34719c323f16c3be4e6cc1203b74a91d/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2", size = 2175369, upload-time = "2025-11-04T13:43:12.49Z" }, - { url = "https://files.pythonhosted.org/packages/6d/94/30ca3b73c6d485b9bb0bc66e611cff4a7138ff9736b7e66bcf0852151636/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093", size = 2144218, upload-time = "2025-11-04T13:43:15.431Z" }, - { url = "https://files.pythonhosted.org/packages/87/57/31b4f8e12680b739a91f472b5671294236b82586889ef764b5fbc6669238/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a", size = 2329951, upload-time = "2025-11-04T13:43:18.062Z" }, - { url = "https://files.pythonhosted.org/packages/7d/73/3c2c8edef77b8f7310e6fb012dbc4b8551386ed575b9eb6fb2506e28a7eb/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963", size = 2318428, upload-time = "2025-11-04T13:43:20.679Z" }, - { url = "https://files.pythonhosted.org/packages/2f/02/8559b1f26ee0d502c74f9cca5c0d2fd97e967e083e006bbbb4e97f3a043a/pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a", size = 2147009, upload-time = "2025-11-04T13:43:23.286Z" }, { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" }, { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" }, { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" }, @@ -5199,12 +4590,10 @@ version = "9.0.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "exceptiongroup", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, { name = "iniconfig", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "packaging", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pluggy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pygments", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "tomli", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, ] sdist = { url = "https://files.pythonhosted.org/packages/d1/db/7ef3487e0fb0049ddb5ce41d3a49c235bf9ad299b6a25d5780a89f19230f/pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11", size = 1568901, upload-time = "2025-12-06T21:30:51.014Z" } wheels = [ @@ -5216,7 +4605,6 @@ name = "pytest-asyncio" version = "1.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "backports-asyncio-runner", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, { name = "pytest", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "(python_full_version < '3.13' and sys_platform == 'darwin') or (python_full_version < '3.13' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform == 'win32')" }, ] @@ -5325,7 +4713,7 @@ name = "pythonnet" version = "3.0.5" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "clr-loader", marker = "(python_full_version < '3.14' and sys_platform == 'darwin') or (python_full_version < '3.14' and sys_platform == 'linux') or (python_full_version < '3.14' and sys_platform == 'win32')" }, + { name = "clr-loader", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/9a/d6/1afd75edd932306ae9bd2c2d961d603dc2b52fcec51b04afea464f1f6646/pythonnet-3.0.5.tar.gz", hash = "sha256:48e43ca463941b3608b32b4e236db92d8d40db4c58a75ace902985f76dac21cf", size = 239212, upload-time = "2024-12-13T08:30:44.393Z" } wheels = [ @@ -5346,9 +4734,6 @@ name = "pywin32" version = "311" source = { registry = "https://pypi.org/simple" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7b/40/44efbb0dfbd33aca6a6483191dae0716070ed99e2ecb0c53683f400a0b4f/pywin32-311-cp310-cp310-win32.whl", hash = "sha256:d03ff496d2a0cd4a5893504789d4a15399133fe82517455e78bad62efbb7f0a3", size = 8760432, upload-time = "2025-07-14T20:13:05.9Z" }, - { url = "https://files.pythonhosted.org/packages/5e/bf/360243b1e953bd254a82f12653974be395ba880e7ec23e3731d9f73921cc/pywin32-311-cp310-cp310-win_amd64.whl", hash = "sha256:797c2772017851984b97180b0bebe4b620bb86328e8a884bb626156295a63b3b", size = 9590103, upload-time = "2025-07-14T20:13:07.698Z" }, - { url = "https://files.pythonhosted.org/packages/57/38/d290720e6f138086fb3d5ffe0b6caa019a791dd57866940c82e4eeaf2012/pywin32-311-cp310-cp310-win_arm64.whl", hash = "sha256:0502d1facf1fed4839a9a51ccbcc63d952cf318f78ffc00a7e78528ac27d7a2b", size = 8778557, upload-time = "2025-07-14T20:13:11.11Z" }, { url = "https://files.pythonhosted.org/packages/7c/af/449a6a91e5d6db51420875c54f6aff7c97a86a3b13a0b4f1a5c13b988de3/pywin32-311-cp311-cp311-win32.whl", hash = "sha256:184eb5e436dea364dcd3d2316d577d625c0351bf237c4e9a5fabbcfa5a58b151", size = 8697031, upload-time = "2025-07-14T20:13:13.266Z" }, { url = "https://files.pythonhosted.org/packages/51/8f/9bb81dd5bb77d22243d33c8397f09377056d5c687aa6d4042bea7fbf8364/pywin32-311-cp311-cp311-win_amd64.whl", hash = "sha256:3ce80b34b22b17ccbd937a6e78e7225d80c52f5ab9940fe0506a1a16f3dab503", size = 9508308, upload-time = "2025-07-14T20:13:15.147Z" }, { url = "https://files.pythonhosted.org/packages/44/7b/9c2ab54f74a138c491aba1b1cd0795ba61f144c711daea84a88b63dc0f6c/pywin32-311-cp311-cp311-win_arm64.whl", hash = "sha256:a733f1388e1a842abb67ffa8e7aad0e70ac519e09b0f6a784e65a136ec7cefd2", size = 8703930, upload-time = "2025-07-14T20:13:16.945Z" }, @@ -5369,15 +4754,6 @@ version = "6.0.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, - { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, - { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, - { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, - { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, - { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, - { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, - { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, - { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, @@ -5435,8 +4811,7 @@ dependencies = [ { name = "grpcio", version = "1.67.1", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.14' and sys_platform == 'darwin') or (python_full_version < '3.14' and sys_platform == 'linux') or (python_full_version < '3.14' and sys_platform == 'win32')" }, { name = "grpcio", version = "1.78.0", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.14' and sys_platform == 'darwin') or (python_full_version >= '3.14' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform == 'win32')" }, { name = "httpx", extra = ["http2"], marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "portalocker", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "protobuf", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pydantic", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -5466,8 +4841,7 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "jsonpath-ng", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "ml-dtypes", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pydantic", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "python-ulid", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pyyaml", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -5499,23 +4873,6 @@ version = "2026.2.28" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/8b/71/41455aa99a5a5ac1eaf311f5d8efd9ce6433c03ac1e0962de163350d0d97/regex-2026.2.28.tar.gz", hash = "sha256:a729e47d418ea11d03469f321aaf67cdee8954cde3ff2cf8403ab87951ad10f2", size = 415184, upload-time = "2026-02-28T02:19:42.792Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/70/b8/845a927e078f5e5cc55d29f57becbfde0003d52806544531ab3f2da4503c/regex-2026.2.28-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fc48c500838be6882b32748f60a15229d2dea96e59ef341eaa96ec83538f498d", size = 488461, upload-time = "2026-02-28T02:15:48.405Z" }, - { url = "https://files.pythonhosted.org/packages/32/f9/8a0034716684e38a729210ded6222249f29978b24b684f448162ef21f204/regex-2026.2.28-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2afa673660928d0b63d84353c6c08a8a476ddfc4a47e11742949d182e6863ce8", size = 290774, upload-time = "2026-02-28T02:15:51.738Z" }, - { url = "https://files.pythonhosted.org/packages/a6/ba/b27feefffbb199528dd32667cd172ed484d9c197618c575f01217fbe6103/regex-2026.2.28-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7ab218076eb0944549e7fe74cf0e2b83a82edb27e81cc87411f76240865e04d5", size = 288737, upload-time = "2026-02-28T02:15:53.534Z" }, - { url = "https://files.pythonhosted.org/packages/18/c5/65379448ca3cbfe774fcc33774dc8295b1ee97dc3237ae3d3c7b27423c9d/regex-2026.2.28-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:94d63db12e45a9b9f064bfe4800cefefc7e5f182052e4c1b774d46a40ab1d9bb", size = 782675, upload-time = "2026-02-28T02:15:55.488Z" }, - { url = "https://files.pythonhosted.org/packages/aa/30/6fa55bef48090f900fbd4649333791fc3e6467380b9e775e741beeb3231f/regex-2026.2.28-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:195237dc327858a7721bf8b0bbbef797554bc13563c3591e91cd0767bacbe359", size = 850514, upload-time = "2026-02-28T02:15:57.509Z" }, - { url = "https://files.pythonhosted.org/packages/a9/28/9ca180fb3787a54150209754ac06a42409913571fa94994f340b3bba4e1e/regex-2026.2.28-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b387a0d092dac157fb026d737dde35ff3e49ef27f285343e7c6401851239df27", size = 896612, upload-time = "2026-02-28T02:15:59.682Z" }, - { url = "https://files.pythonhosted.org/packages/46/b5/f30d7d3936d6deecc3ea7bea4f7d3c5ee5124e7c8de372226e436b330a55/regex-2026.2.28-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3935174fa4d9f70525a4367aaff3cb8bc0548129d114260c29d9dfa4a5b41692", size = 791691, upload-time = "2026-02-28T02:16:01.752Z" }, - { url = "https://files.pythonhosted.org/packages/f5/34/96631bcf446a56ba0b2a7f684358a76855dfe315b7c2f89b35388494ede0/regex-2026.2.28-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2b2b23587b26496ff5fd40df4278becdf386813ec00dc3533fa43a4cf0e2ad3c", size = 783111, upload-time = "2026-02-28T02:16:03.651Z" }, - { url = "https://files.pythonhosted.org/packages/39/54/f95cb7a85fe284d41cd2f3625e0f2ae30172b55dfd2af1d9b4eaef6259d7/regex-2026.2.28-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3b24bd7e9d85dc7c6a8bd2aa14ecd234274a0248335a02adeb25448aecdd420d", size = 767512, upload-time = "2026-02-28T02:16:05.616Z" }, - { url = "https://files.pythonhosted.org/packages/3d/af/a650f64a79c02a97f73f64d4e7fc4cc1984e64affab14075e7c1f9a2db34/regex-2026.2.28-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:bd477d5f79920338107f04aa645f094032d9e3030cc55be581df3d1ef61aa318", size = 773920, upload-time = "2026-02-28T02:16:08.325Z" }, - { url = "https://files.pythonhosted.org/packages/72/f8/3f9c2c2af37aedb3f5a1e7227f81bea065028785260d9cacc488e43e6997/regex-2026.2.28-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:b49eb78048c6354f49e91e4b77da21257fecb92256b6d599ae44403cab30b05b", size = 846681, upload-time = "2026-02-28T02:16:10.381Z" }, - { url = "https://files.pythonhosted.org/packages/54/12/8db04a334571359f4d127d8f89550917ec6561a2fddfd69cd91402b47482/regex-2026.2.28-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:a25c7701e4f7a70021db9aaf4a4a0a67033c6318752146e03d1b94d32006217e", size = 755565, upload-time = "2026-02-28T02:16:11.972Z" }, - { url = "https://files.pythonhosted.org/packages/da/bc/91c22f384d79324121b134c267a86ca90d11f8016aafb1dc5bee05890ee3/regex-2026.2.28-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:9dd450db6458387167e033cfa80887a34c99c81d26da1bf8b0b41bf8c9cac88e", size = 835789, upload-time = "2026-02-28T02:16:14.036Z" }, - { url = "https://files.pythonhosted.org/packages/46/a7/4cc94fd3af01dcfdf5a9ed75c8e15fd80fcd62cc46da7592b1749e9c35db/regex-2026.2.28-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2954379dd20752e82d22accf3ff465311cbb2bac6c1f92c4afd400e1757f7451", size = 780094, upload-time = "2026-02-28T02:16:15.468Z" }, - { url = "https://files.pythonhosted.org/packages/3c/21/e5a38f420af3c77cab4a65f0c3a55ec02ac9babf04479cfd282d356988a6/regex-2026.2.28-cp310-cp310-win32.whl", hash = "sha256:1f8b17be5c27a684ea6759983c13506bd77bfc7c0347dff41b18ce5ddd2ee09a", size = 266025, upload-time = "2026-02-28T02:16:16.828Z" }, - { url = "https://files.pythonhosted.org/packages/4d/0a/205c4c1466a36e04d90afcd01d8908bac327673050c7fe316b2416d99d3d/regex-2026.2.28-cp310-cp310-win_amd64.whl", hash = "sha256:dd8847c4978bc3c7e6c826fb745f5570e518b8459ac2892151ce6627c7bc00d5", size = 277965, upload-time = "2026-02-28T02:16:18.752Z" }, - { url = "https://files.pythonhosted.org/packages/c3/4d/29b58172f954b6ec2c5ed28529a65e9026ab96b4b7016bcd3858f1c31d3c/regex-2026.2.28-cp310-cp310-win_arm64.whl", hash = "sha256:73cdcdbba8028167ea81490c7f45280113e41db2c7afb65a276f4711fa3bcbff", size = 270336, upload-time = "2026-02-28T02:16:20.735Z" }, { url = "https://files.pythonhosted.org/packages/04/db/8cbfd0ba3f302f2d09dd0019a9fcab74b63fee77a76c937d0e33161fb8c1/regex-2026.2.28-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e621fb7c8dc147419b28e1702f58a0177ff8308a76fa295c71f3e7827849f5d9", size = 488462, upload-time = "2026-02-28T02:16:22.616Z" }, { url = "https://files.pythonhosted.org/packages/5d/10/ccc22c52802223f2368731964ddd117799e1390ffc39dbb31634a83022ee/regex-2026.2.28-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0d5bef2031cbf38757a0b0bc4298bb4824b6332d28edc16b39247228fbdbad97", size = 290774, upload-time = "2026-02-28T02:16:23.993Z" }, { url = "https://files.pythonhosted.org/packages/62/b9/6796b3bf3101e64117201aaa3a5a030ec677ecf34b3cd6141b5d5c6c67d5/regex-2026.2.28-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bcb399ed84eabf4282587ba151f2732ad8168e66f1d3f85b1d038868fe547703", size = 288724, upload-time = "2026-02-28T02:16:25.403Z" }, @@ -5648,20 +5005,6 @@ version = "0.30.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/20/af/3f2f423103f1113b36230496629986e0ef7e199d2aa8392452b484b38ced/rpds_py-0.30.0.tar.gz", hash = "sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84", size = 69469, upload-time = "2025-11-30T20:24:38.837Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/06/0c/0c411a0ec64ccb6d104dcabe0e713e05e153a9a2c3c2bd2b32ce412166fe/rpds_py-0.30.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:679ae98e00c0e8d68a7fda324e16b90fd5260945b45d3b824c892cec9eea3288", size = 370490, upload-time = "2025-11-30T20:21:33.256Z" }, - { url = "https://files.pythonhosted.org/packages/19/6a/4ba3d0fb7297ebae71171822554abe48d7cab29c28b8f9f2c04b79988c05/rpds_py-0.30.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4cc2206b76b4f576934f0ed374b10d7ca5f457858b157ca52064bdfc26b9fc00", size = 359751, upload-time = "2025-11-30T20:21:34.591Z" }, - { url = "https://files.pythonhosted.org/packages/cd/7c/e4933565ef7f7a0818985d87c15d9d273f1a649afa6a52ea35ad011195ea/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:389a2d49eded1896c3d48b0136ead37c48e221b391c052fba3f4055c367f60a6", size = 389696, upload-time = "2025-11-30T20:21:36.122Z" }, - { url = "https://files.pythonhosted.org/packages/5e/01/6271a2511ad0815f00f7ed4390cf2567bec1d4b1da39e2c27a41e6e3b4de/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:32c8528634e1bf7121f3de08fa85b138f4e0dc47657866630611b03967f041d7", size = 403136, upload-time = "2025-11-30T20:21:37.728Z" }, - { url = "https://files.pythonhosted.org/packages/55/64/c857eb7cd7541e9b4eee9d49c196e833128a55b89a9850a9c9ac33ccf897/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f207f69853edd6f6700b86efb84999651baf3789e78a466431df1331608e5324", size = 524699, upload-time = "2025-11-30T20:21:38.92Z" }, - { url = "https://files.pythonhosted.org/packages/9c/ed/94816543404078af9ab26159c44f9e98e20fe47e2126d5d32c9d9948d10a/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:67b02ec25ba7a9e8fa74c63b6ca44cf5707f2fbfadae3ee8e7494297d56aa9df", size = 412022, upload-time = "2025-11-30T20:21:40.407Z" }, - { url = "https://files.pythonhosted.org/packages/61/b5/707f6cf0066a6412aacc11d17920ea2e19e5b2f04081c64526eb35b5c6e7/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0e95f6819a19965ff420f65578bacb0b00f251fefe2c8b23347c37174271f3", size = 390522, upload-time = "2025-11-30T20:21:42.17Z" }, - { url = "https://files.pythonhosted.org/packages/13/4e/57a85fda37a229ff4226f8cbcf09f2a455d1ed20e802ce5b2b4a7f5ed053/rpds_py-0.30.0-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:a452763cc5198f2f98898eb98f7569649fe5da666c2dc6b5ddb10fde5a574221", size = 404579, upload-time = "2025-11-30T20:21:43.769Z" }, - { url = "https://files.pythonhosted.org/packages/f9/da/c9339293513ec680a721e0e16bf2bac3db6e5d7e922488de471308349bba/rpds_py-0.30.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e0b65193a413ccc930671c55153a03ee57cecb49e6227204b04fae512eb657a7", size = 421305, upload-time = "2025-11-30T20:21:44.994Z" }, - { url = "https://files.pythonhosted.org/packages/f9/be/522cb84751114f4ad9d822ff5a1aa3c98006341895d5f084779b99596e5c/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:858738e9c32147f78b3ac24dc0edb6610000e56dc0f700fd5f651d0a0f0eb9ff", size = 572503, upload-time = "2025-11-30T20:21:46.91Z" }, - { url = "https://files.pythonhosted.org/packages/a2/9b/de879f7e7ceddc973ea6e4629e9b380213a6938a249e94b0cdbcc325bb66/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:da279aa314f00acbb803da1e76fa18666778e8a8f83484fba94526da5de2cba7", size = 598322, upload-time = "2025-11-30T20:21:48.709Z" }, - { url = "https://files.pythonhosted.org/packages/48/ac/f01fc22efec3f37d8a914fc1b2fb9bcafd56a299edbe96406f3053edea5a/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7c64d38fb49b6cdeda16ab49e35fe0da2e1e9b34bc38bd78386530f218b37139", size = 560792, upload-time = "2025-11-30T20:21:50.024Z" }, - { url = "https://files.pythonhosted.org/packages/e2/da/4e2b19d0f131f35b6146425f846563d0ce036763e38913d917187307a671/rpds_py-0.30.0-cp310-cp310-win32.whl", hash = "sha256:6de2a32a1665b93233cde140ff8b3467bdb9e2af2b91079f0333a0974d12d464", size = 221901, upload-time = "2025-11-30T20:21:51.32Z" }, - { url = "https://files.pythonhosted.org/packages/96/cb/156d7a5cf4f78a7cc571465d8aec7a3c447c94f6749c5123f08438bcf7bc/rpds_py-0.30.0-cp310-cp310-win_amd64.whl", hash = "sha256:1726859cd0de969f88dc8673bdd954185b9104e05806be64bcd87badbe313169", size = 235823, upload-time = "2025-11-30T20:21:52.505Z" }, { url = "https://files.pythonhosted.org/packages/4d/6e/f964e88b3d2abee2a82c1ac8366da848fce1c6d834dc2132c3fda3970290/rpds_py-0.30.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a2bffea6a4ca9f01b3f8e548302470306689684e61602aa3d141e34da06cf425", size = 370157, upload-time = "2025-11-30T20:21:53.789Z" }, { url = "https://files.pythonhosted.org/packages/94/ba/24e5ebb7c1c82e74c4e4f33b2112a5573ddc703915b13a073737b59b86e0/rpds_py-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc4f992dfe1e2bc3ebc7444f6c7051b4bc13cd8e33e43511e8ffd13bf407010d", size = 359676, upload-time = "2025-11-30T20:21:55.475Z" }, { url = "https://files.pythonhosted.org/packages/84/86/04dbba1b087227747d64d80c3b74df946b986c57af0a9f0c98726d4d7a3b/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:422c3cb9856d80b09d30d2eb255d0754b23e090034e1deb4083f8004bd0761e4", size = 389938, upload-time = "2025-11-30T20:21:57.079Z" }, @@ -5827,78 +5170,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/48/f0/ae7ca09223a81a1d890b2557186ea015f6e0502e9b8cb8e1813f1d8cfa4e/s3transfer-0.14.0-py3-none-any.whl", hash = "sha256:ea3b790c7077558ed1f02a3072fb3cb992bbbd253392f4b6e9e8976941c7d456", size = 85712, upload-time = "2025-09-09T19:23:30.041Z" }, ] -[[package]] -name = "scikit-learn" -version = "1.7.2" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11' and sys_platform == 'darwin'", - "python_full_version < '3.11' and sys_platform == 'linux'", - "python_full_version < '3.11' and sys_platform == 'win32'", -] -dependencies = [ - { name = "joblib", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "scipy", version = "1.15.3", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "threadpoolctl", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/98/c2/a7855e41c9d285dfe86dc50b250978105dce513d6e459ea66a6aeb0e1e0c/scikit_learn-1.7.2.tar.gz", hash = "sha256:20e9e49ecd130598f1ca38a1d85090e1a600147b9c02fa6f15d69cb53d968fda", size = 7193136, upload-time = "2025-09-09T08:21:29.075Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ba/3e/daed796fd69cce768b8788401cc464ea90b306fb196ae1ffed0b98182859/scikit_learn-1.7.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b33579c10a3081d076ab403df4a4190da4f4432d443521674637677dc91e61f", size = 9336221, upload-time = "2025-09-09T08:20:19.328Z" }, - { url = "https://files.pythonhosted.org/packages/1c/ce/af9d99533b24c55ff4e18d9b7b4d9919bbc6cd8f22fe7a7be01519a347d5/scikit_learn-1.7.2-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:36749fb62b3d961b1ce4fedf08fa57a1986cd409eff2d783bca5d4b9b5fce51c", size = 8653834, upload-time = "2025-09-09T08:20:22.073Z" }, - { url = "https://files.pythonhosted.org/packages/58/0e/8c2a03d518fb6bd0b6b0d4b114c63d5f1db01ff0f9925d8eb10960d01c01/scikit_learn-1.7.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7a58814265dfc52b3295b1900cfb5701589d30a8bb026c7540f1e9d3499d5ec8", size = 9660938, upload-time = "2025-09-09T08:20:24.327Z" }, - { url = "https://files.pythonhosted.org/packages/2b/75/4311605069b5d220e7cf5adabb38535bd96f0079313cdbb04b291479b22a/scikit_learn-1.7.2-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a847fea807e278f821a0406ca01e387f97653e284ecbd9750e3ee7c90347f18", size = 9477818, upload-time = "2025-09-09T08:20:26.845Z" }, - { url = "https://files.pythonhosted.org/packages/7f/9b/87961813c34adbca21a6b3f6b2bea344c43b30217a6d24cc437c6147f3e8/scikit_learn-1.7.2-cp310-cp310-win_amd64.whl", hash = "sha256:ca250e6836d10e6f402436d6463d6c0e4d8e0234cfb6a9a47835bd392b852ce5", size = 8886969, upload-time = "2025-09-09T08:20:29.329Z" }, - { url = "https://files.pythonhosted.org/packages/43/83/564e141eef908a5863a54da8ca342a137f45a0bfb71d1d79704c9894c9d1/scikit_learn-1.7.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c7509693451651cd7361d30ce4e86a1347493554f172b1c72a39300fa2aea79e", size = 9331967, upload-time = "2025-09-09T08:20:32.421Z" }, - { url = "https://files.pythonhosted.org/packages/18/d6/ba863a4171ac9d7314c4d3fc251f015704a2caeee41ced89f321c049ed83/scikit_learn-1.7.2-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:0486c8f827c2e7b64837c731c8feff72c0bd2b998067a8a9cbc10643c31f0fe1", size = 8648645, upload-time = "2025-09-09T08:20:34.436Z" }, - { url = "https://files.pythonhosted.org/packages/ef/0e/97dbca66347b8cf0ea8b529e6bb9367e337ba2e8be0ef5c1a545232abfde/scikit_learn-1.7.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:89877e19a80c7b11a2891a27c21c4894fb18e2c2e077815bcade10d34287b20d", size = 9715424, upload-time = "2025-09-09T08:20:36.776Z" }, - { url = "https://files.pythonhosted.org/packages/f7/32/1f3b22e3207e1d2c883a7e09abb956362e7d1bd2f14458c7de258a26ac15/scikit_learn-1.7.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8da8bf89d4d79aaec192d2bda62f9b56ae4e5b4ef93b6a56b5de4977e375c1f1", size = 9509234, upload-time = "2025-09-09T08:20:38.957Z" }, - { url = "https://files.pythonhosted.org/packages/9f/71/34ddbd21f1da67c7a768146968b4d0220ee6831e4bcbad3e03dd3eae88b6/scikit_learn-1.7.2-cp311-cp311-win_amd64.whl", hash = "sha256:9b7ed8d58725030568523e937c43e56bc01cadb478fc43c042a9aca1dacb3ba1", size = 8894244, upload-time = "2025-09-09T08:20:41.166Z" }, - { url = "https://files.pythonhosted.org/packages/a7/aa/3996e2196075689afb9fce0410ebdb4a09099d7964d061d7213700204409/scikit_learn-1.7.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8d91a97fa2b706943822398ab943cde71858a50245e31bc71dba62aab1d60a96", size = 9259818, upload-time = "2025-09-09T08:20:43.19Z" }, - { url = "https://files.pythonhosted.org/packages/43/5d/779320063e88af9c4a7c2cf463ff11c21ac9c8bd730c4a294b0000b666c9/scikit_learn-1.7.2-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:acbc0f5fd2edd3432a22c69bed78e837c70cf896cd7993d71d51ba6708507476", size = 8636997, upload-time = "2025-09-09T08:20:45.468Z" }, - { url = "https://files.pythonhosted.org/packages/5c/d0/0c577d9325b05594fdd33aa970bf53fb673f051a45496842caee13cfd7fe/scikit_learn-1.7.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e5bf3d930aee75a65478df91ac1225ff89cd28e9ac7bd1196853a9229b6adb0b", size = 9478381, upload-time = "2025-09-09T08:20:47.982Z" }, - { url = "https://files.pythonhosted.org/packages/82/70/8bf44b933837ba8494ca0fc9a9ab60f1c13b062ad0197f60a56e2fc4c43e/scikit_learn-1.7.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b4d6e9deed1a47aca9fe2f267ab8e8fe82ee20b4526b2c0cd9e135cea10feb44", size = 9300296, upload-time = "2025-09-09T08:20:50.366Z" }, - { url = "https://files.pythonhosted.org/packages/c6/99/ed35197a158f1fdc2fe7c3680e9c70d0128f662e1fee4ed495f4b5e13db0/scikit_learn-1.7.2-cp312-cp312-win_amd64.whl", hash = "sha256:6088aa475f0785e01bcf8529f55280a3d7d298679f50c0bb70a2364a82d0b290", size = 8731256, upload-time = "2025-09-09T08:20:52.627Z" }, - { url = "https://files.pythonhosted.org/packages/ae/93/a3038cb0293037fd335f77f31fe053b89c72f17b1c8908c576c29d953e84/scikit_learn-1.7.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0b7dacaa05e5d76759fb071558a8b5130f4845166d88654a0f9bdf3eb57851b7", size = 9212382, upload-time = "2025-09-09T08:20:54.731Z" }, - { url = "https://files.pythonhosted.org/packages/40/dd/9a88879b0c1104259136146e4742026b52df8540c39fec21a6383f8292c7/scikit_learn-1.7.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:abebbd61ad9e1deed54cca45caea8ad5f79e1b93173dece40bb8e0c658dbe6fe", size = 8592042, upload-time = "2025-09-09T08:20:57.313Z" }, - { url = "https://files.pythonhosted.org/packages/46/af/c5e286471b7d10871b811b72ae794ac5fe2989c0a2df07f0ec723030f5f5/scikit_learn-1.7.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:502c18e39849c0ea1a5d681af1dbcf15f6cce601aebb657aabbfe84133c1907f", size = 9434180, upload-time = "2025-09-09T08:20:59.671Z" }, - { url = "https://files.pythonhosted.org/packages/f1/fd/df59faa53312d585023b2da27e866524ffb8faf87a68516c23896c718320/scikit_learn-1.7.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a4c328a71785382fe3fe676a9ecf2c86189249beff90bf85e22bdb7efaf9ae0", size = 9283660, upload-time = "2025-09-09T08:21:01.71Z" }, - { url = "https://files.pythonhosted.org/packages/a7/c7/03000262759d7b6f38c836ff9d512f438a70d8a8ddae68ee80de72dcfb63/scikit_learn-1.7.2-cp313-cp313-win_amd64.whl", hash = "sha256:63a9afd6f7b229aad94618c01c252ce9e6fa97918c5ca19c9a17a087d819440c", size = 8702057, upload-time = "2025-09-09T08:21:04.234Z" }, - { url = "https://files.pythonhosted.org/packages/55/87/ef5eb1f267084532c8e4aef98a28b6ffe7425acbfd64b5e2f2e066bc29b3/scikit_learn-1.7.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:9acb6c5e867447b4e1390930e3944a005e2cb115922e693c08a323421a6966e8", size = 9558731, upload-time = "2025-09-09T08:21:06.381Z" }, - { url = "https://files.pythonhosted.org/packages/93/f8/6c1e3fc14b10118068d7938878a9f3f4e6d7b74a8ddb1e5bed65159ccda8/scikit_learn-1.7.2-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:2a41e2a0ef45063e654152ec9d8bcfc39f7afce35b08902bfe290c2498a67a6a", size = 9038852, upload-time = "2025-09-09T08:21:08.628Z" }, - { url = "https://files.pythonhosted.org/packages/83/87/066cafc896ee540c34becf95d30375fe5cbe93c3b75a0ee9aa852cd60021/scikit_learn-1.7.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:98335fb98509b73385b3ab2bd0639b1f610541d3988ee675c670371d6a87aa7c", size = 9527094, upload-time = "2025-09-09T08:21:11.486Z" }, - { url = "https://files.pythonhosted.org/packages/9c/2b/4903e1ccafa1f6453b1ab78413938c8800633988c838aa0be386cbb33072/scikit_learn-1.7.2-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:191e5550980d45449126e23ed1d5e9e24b2c68329ee1f691a3987476e115e09c", size = 9367436, upload-time = "2025-09-09T08:21:13.602Z" }, - { url = "https://files.pythonhosted.org/packages/b5/aa/8444be3cfb10451617ff9d177b3c190288f4563e6c50ff02728be67ad094/scikit_learn-1.7.2-cp313-cp313t-win_amd64.whl", hash = "sha256:57dc4deb1d3762c75d685507fbd0bc17160144b2f2ba4ccea5dc285ab0d0e973", size = 9275749, upload-time = "2025-09-09T08:21:15.96Z" }, - { url = "https://files.pythonhosted.org/packages/d9/82/dee5acf66837852e8e68df6d8d3a6cb22d3df997b733b032f513d95205b7/scikit_learn-1.7.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fa8f63940e29c82d1e67a45d5297bdebbcb585f5a5a50c4914cc2e852ab77f33", size = 9208906, upload-time = "2025-09-09T08:21:18.557Z" }, - { url = "https://files.pythonhosted.org/packages/3c/30/9029e54e17b87cb7d50d51a5926429c683d5b4c1732f0507a6c3bed9bf65/scikit_learn-1.7.2-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:f95dc55b7902b91331fa4e5845dd5bde0580c9cd9612b1b2791b7e80c3d32615", size = 8627836, upload-time = "2025-09-09T08:21:20.695Z" }, - { url = "https://files.pythonhosted.org/packages/60/18/4a52c635c71b536879f4b971c2cedf32c35ee78f48367885ed8025d1f7ee/scikit_learn-1.7.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9656e4a53e54578ad10a434dc1f993330568cfee176dff07112b8785fb413106", size = 9426236, upload-time = "2025-09-09T08:21:22.645Z" }, - { url = "https://files.pythonhosted.org/packages/99/7e/290362f6ab582128c53445458a5befd471ed1ea37953d5bcf80604619250/scikit_learn-1.7.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96dc05a854add0e50d3f47a1ef21a10a595016da5b007c7d9cd9d0bffd1fcc61", size = 9312593, upload-time = "2025-09-09T08:21:24.65Z" }, - { url = "https://files.pythonhosted.org/packages/8e/87/24f541b6d62b1794939ae6422f8023703bbf6900378b2b34e0b4384dfefd/scikit_learn-1.7.2-cp314-cp314-win_amd64.whl", hash = "sha256:bb24510ed3f9f61476181e4db51ce801e2ba37541def12dc9333b946fc7a9cf8", size = 8820007, upload-time = "2025-09-09T08:21:26.713Z" }, -] - [[package]] name = "scikit-learn" version = "1.8.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.14' and sys_platform == 'darwin'", - "python_full_version == '3.13.*' and sys_platform == 'darwin'", - "python_full_version == '3.12.*' and sys_platform == 'darwin'", - "python_full_version == '3.11.*' and sys_platform == 'darwin'", - "python_full_version >= '3.14' and sys_platform == 'linux'", - "python_full_version == '3.13.*' and sys_platform == 'linux'", - "python_full_version == '3.12.*' and sys_platform == 'linux'", - "python_full_version == '3.11.*' and sys_platform == 'linux'", - "python_full_version >= '3.14' and sys_platform == 'win32'", - "python_full_version == '3.13.*' and sys_platform == 'win32'", - "python_full_version == '3.12.*' and sys_platform == 'win32'", - "python_full_version == '3.11.*' and sys_platform == 'win32'", -] dependencies = [ - { name = "joblib", marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, - { name = "scipy", version = "1.17.1", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, - { name = "threadpoolctl", marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "joblib", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "scipy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "threadpoolctl", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0e/d4/40988bf3b8e34feec1d0e6a051446b1f66225f8529b9309becaeef62b6c4/scikit_learn-1.8.0.tar.gz", hash = "sha256:9bccbb3b40e3de10351f8f5068e105d0f4083b1a65fa07b6634fbc401a6287fd", size = 7335585, upload-time = "2025-12-10T07:08:53.618Z" } wheels = [ @@ -5940,87 +5220,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/60/22/d7b2ebe4704a5e50790ba089d5c2ae308ab6bb852719e6c3bd4f04c3a363/scikit_learn-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:f28dd15c6bb0b66ba09728cf09fd8736c304be29409bd8445a080c1280619e8c", size = 8002647, upload-time = "2025-12-10T07:08:51.601Z" }, ] -[[package]] -name = "scipy" -version = "1.15.3" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11' and sys_platform == 'darwin'", - "python_full_version < '3.11' and sys_platform == 'linux'", - "python_full_version < '3.11' and sys_platform == 'win32'", -] -dependencies = [ - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/0f/37/6964b830433e654ec7485e45a00fc9a27cf868d622838f6b6d9c5ec0d532/scipy-1.15.3.tar.gz", hash = "sha256:eae3cf522bc7df64b42cad3925c876e1b0b6c35c1337c93e12c0f366f55b0eaf", size = 59419214, upload-time = "2025-05-08T16:13:05.955Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/78/2f/4966032c5f8cc7e6a60f1b2e0ad686293b9474b65246b0c642e3ef3badd0/scipy-1.15.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:a345928c86d535060c9c2b25e71e87c39ab2f22fc96e9636bd74d1dbf9de448c", size = 38702770, upload-time = "2025-05-08T16:04:20.849Z" }, - { url = "https://files.pythonhosted.org/packages/a0/6e/0c3bf90fae0e910c274db43304ebe25a6b391327f3f10b5dcc638c090795/scipy-1.15.3-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:ad3432cb0f9ed87477a8d97f03b763fd1d57709f1bbde3c9369b1dff5503b253", size = 30094511, upload-time = "2025-05-08T16:04:27.103Z" }, - { url = "https://files.pythonhosted.org/packages/ea/b1/4deb37252311c1acff7f101f6453f0440794f51b6eacb1aad4459a134081/scipy-1.15.3-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:aef683a9ae6eb00728a542b796f52a5477b78252edede72b8327a886ab63293f", size = 22368151, upload-time = "2025-05-08T16:04:31.731Z" }, - { url = "https://files.pythonhosted.org/packages/38/7d/f457626e3cd3c29b3a49ca115a304cebb8cc6f31b04678f03b216899d3c6/scipy-1.15.3-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:1c832e1bd78dea67d5c16f786681b28dd695a8cb1fb90af2e27580d3d0967e92", size = 25121732, upload-time = "2025-05-08T16:04:36.596Z" }, - { url = "https://files.pythonhosted.org/packages/db/0a/92b1de4a7adc7a15dcf5bddc6e191f6f29ee663b30511ce20467ef9b82e4/scipy-1.15.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:263961f658ce2165bbd7b99fa5135195c3a12d9bef045345016b8b50c315cb82", size = 35547617, upload-time = "2025-05-08T16:04:43.546Z" }, - { url = "https://files.pythonhosted.org/packages/8e/6d/41991e503e51fc1134502694c5fa7a1671501a17ffa12716a4a9151af3df/scipy-1.15.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2abc762b0811e09a0d3258abee2d98e0c703eee49464ce0069590846f31d40", size = 37662964, upload-time = "2025-05-08T16:04:49.431Z" }, - { url = "https://files.pythonhosted.org/packages/25/e1/3df8f83cb15f3500478c889be8fb18700813b95e9e087328230b98d547ff/scipy-1.15.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ed7284b21a7a0c8f1b6e5977ac05396c0d008b89e05498c8b7e8f4a1423bba0e", size = 37238749, upload-time = "2025-05-08T16:04:55.215Z" }, - { url = "https://files.pythonhosted.org/packages/93/3e/b3257cf446f2a3533ed7809757039016b74cd6f38271de91682aa844cfc5/scipy-1.15.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5380741e53df2c566f4d234b100a484b420af85deb39ea35a1cc1be84ff53a5c", size = 40022383, upload-time = "2025-05-08T16:05:01.914Z" }, - { url = "https://files.pythonhosted.org/packages/d1/84/55bc4881973d3f79b479a5a2e2df61c8c9a04fcb986a213ac9c02cfb659b/scipy-1.15.3-cp310-cp310-win_amd64.whl", hash = "sha256:9d61e97b186a57350f6d6fd72640f9e99d5a4a2b8fbf4b9ee9a841eab327dc13", size = 41259201, upload-time = "2025-05-08T16:05:08.166Z" }, - { url = "https://files.pythonhosted.org/packages/96/ab/5cc9f80f28f6a7dff646c5756e559823614a42b1939d86dd0ed550470210/scipy-1.15.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:993439ce220d25e3696d1b23b233dd010169b62f6456488567e830654ee37a6b", size = 38714255, upload-time = "2025-05-08T16:05:14.596Z" }, - { url = "https://files.pythonhosted.org/packages/4a/4a/66ba30abe5ad1a3ad15bfb0b59d22174012e8056ff448cb1644deccbfed2/scipy-1.15.3-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:34716e281f181a02341ddeaad584205bd2fd3c242063bd3423d61ac259ca7eba", size = 30111035, upload-time = "2025-05-08T16:05:20.152Z" }, - { url = "https://files.pythonhosted.org/packages/4b/fa/a7e5b95afd80d24313307f03624acc65801846fa75599034f8ceb9e2cbf6/scipy-1.15.3-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3b0334816afb8b91dab859281b1b9786934392aa3d527cd847e41bb6f45bee65", size = 22384499, upload-time = "2025-05-08T16:05:24.494Z" }, - { url = "https://files.pythonhosted.org/packages/17/99/f3aaddccf3588bb4aea70ba35328c204cadd89517a1612ecfda5b2dd9d7a/scipy-1.15.3-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:6db907c7368e3092e24919b5e31c76998b0ce1684d51a90943cb0ed1b4ffd6c1", size = 25152602, upload-time = "2025-05-08T16:05:29.313Z" }, - { url = "https://files.pythonhosted.org/packages/56/c5/1032cdb565f146109212153339f9cb8b993701e9fe56b1c97699eee12586/scipy-1.15.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:721d6b4ef5dc82ca8968c25b111e307083d7ca9091bc38163fb89243e85e3889", size = 35503415, upload-time = "2025-05-08T16:05:34.699Z" }, - { url = "https://files.pythonhosted.org/packages/bd/37/89f19c8c05505d0601ed5650156e50eb881ae3918786c8fd7262b4ee66d3/scipy-1.15.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39cb9c62e471b1bb3750066ecc3a3f3052b37751c7c3dfd0fd7e48900ed52982", size = 37652622, upload-time = "2025-05-08T16:05:40.762Z" }, - { url = "https://files.pythonhosted.org/packages/7e/31/be59513aa9695519b18e1851bb9e487de66f2d31f835201f1b42f5d4d475/scipy-1.15.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:795c46999bae845966368a3c013e0e00947932d68e235702b5c3f6ea799aa8c9", size = 37244796, upload-time = "2025-05-08T16:05:48.119Z" }, - { url = "https://files.pythonhosted.org/packages/10/c0/4f5f3eeccc235632aab79b27a74a9130c6c35df358129f7ac8b29f562ac7/scipy-1.15.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:18aaacb735ab38b38db42cb01f6b92a2d0d4b6aabefeb07f02849e47f8fb3594", size = 40047684, upload-time = "2025-05-08T16:05:54.22Z" }, - { url = "https://files.pythonhosted.org/packages/ab/a7/0ddaf514ce8a8714f6ed243a2b391b41dbb65251affe21ee3077ec45ea9a/scipy-1.15.3-cp311-cp311-win_amd64.whl", hash = "sha256:ae48a786a28412d744c62fd7816a4118ef97e5be0bee968ce8f0a2fba7acf3bb", size = 41246504, upload-time = "2025-05-08T16:06:00.437Z" }, - { url = "https://files.pythonhosted.org/packages/37/4b/683aa044c4162e10ed7a7ea30527f2cbd92e6999c10a8ed8edb253836e9c/scipy-1.15.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6ac6310fdbfb7aa6612408bd2f07295bcbd3fda00d2d702178434751fe48e019", size = 38766735, upload-time = "2025-05-08T16:06:06.471Z" }, - { url = "https://files.pythonhosted.org/packages/7b/7e/f30be3d03de07f25dc0ec926d1681fed5c732d759ac8f51079708c79e680/scipy-1.15.3-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:185cd3d6d05ca4b44a8f1595af87f9c372bb6acf9c808e99aa3e9aa03bd98cf6", size = 30173284, upload-time = "2025-05-08T16:06:11.686Z" }, - { url = "https://files.pythonhosted.org/packages/07/9c/0ddb0d0abdabe0d181c1793db51f02cd59e4901da6f9f7848e1f96759f0d/scipy-1.15.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:05dc6abcd105e1a29f95eada46d4a3f251743cfd7d3ae8ddb4088047f24ea477", size = 22446958, upload-time = "2025-05-08T16:06:15.97Z" }, - { url = "https://files.pythonhosted.org/packages/af/43/0bce905a965f36c58ff80d8bea33f1f9351b05fad4beaad4eae34699b7a1/scipy-1.15.3-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:06efcba926324df1696931a57a176c80848ccd67ce6ad020c810736bfd58eb1c", size = 25242454, upload-time = "2025-05-08T16:06:20.394Z" }, - { url = "https://files.pythonhosted.org/packages/56/30/a6f08f84ee5b7b28b4c597aca4cbe545535c39fe911845a96414700b64ba/scipy-1.15.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c05045d8b9bfd807ee1b9f38761993297b10b245f012b11b13b91ba8945f7e45", size = 35210199, upload-time = "2025-05-08T16:06:26.159Z" }, - { url = "https://files.pythonhosted.org/packages/0b/1f/03f52c282437a168ee2c7c14a1a0d0781a9a4a8962d84ac05c06b4c5b555/scipy-1.15.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:271e3713e645149ea5ea3e97b57fdab61ce61333f97cfae392c28ba786f9bb49", size = 37309455, upload-time = "2025-05-08T16:06:32.778Z" }, - { url = "https://files.pythonhosted.org/packages/89/b1/fbb53137f42c4bf630b1ffdfc2151a62d1d1b903b249f030d2b1c0280af8/scipy-1.15.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6cfd56fc1a8e53f6e89ba3a7a7251f7396412d655bca2aa5611c8ec9a6784a1e", size = 36885140, upload-time = "2025-05-08T16:06:39.249Z" }, - { url = "https://files.pythonhosted.org/packages/2e/2e/025e39e339f5090df1ff266d021892694dbb7e63568edcfe43f892fa381d/scipy-1.15.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0ff17c0bb1cb32952c09217d8d1eed9b53d1463e5f1dd6052c7857f83127d539", size = 39710549, upload-time = "2025-05-08T16:06:45.729Z" }, - { url = "https://files.pythonhosted.org/packages/e6/eb/3bf6ea8ab7f1503dca3a10df2e4b9c3f6b3316df07f6c0ded94b281c7101/scipy-1.15.3-cp312-cp312-win_amd64.whl", hash = "sha256:52092bc0472cfd17df49ff17e70624345efece4e1a12b23783a1ac59a1b728ed", size = 40966184, upload-time = "2025-05-08T16:06:52.623Z" }, - { url = "https://files.pythonhosted.org/packages/73/18/ec27848c9baae6e0d6573eda6e01a602e5649ee72c27c3a8aad673ebecfd/scipy-1.15.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2c620736bcc334782e24d173c0fdbb7590a0a436d2fdf39310a8902505008759", size = 38728256, upload-time = "2025-05-08T16:06:58.696Z" }, - { url = "https://files.pythonhosted.org/packages/74/cd/1aef2184948728b4b6e21267d53b3339762c285a46a274ebb7863c9e4742/scipy-1.15.3-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:7e11270a000969409d37ed399585ee530b9ef6aa99d50c019de4cb01e8e54e62", size = 30109540, upload-time = "2025-05-08T16:07:04.209Z" }, - { url = "https://files.pythonhosted.org/packages/5b/d8/59e452c0a255ec352bd0a833537a3bc1bfb679944c4938ab375b0a6b3a3e/scipy-1.15.3-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:8c9ed3ba2c8a2ce098163a9bdb26f891746d02136995df25227a20e71c396ebb", size = 22383115, upload-time = "2025-05-08T16:07:08.998Z" }, - { url = "https://files.pythonhosted.org/packages/08/f5/456f56bbbfccf696263b47095291040655e3cbaf05d063bdc7c7517f32ac/scipy-1.15.3-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:0bdd905264c0c9cfa74a4772cdb2070171790381a5c4d312c973382fc6eaf730", size = 25163884, upload-time = "2025-05-08T16:07:14.091Z" }, - { url = "https://files.pythonhosted.org/packages/a2/66/a9618b6a435a0f0c0b8a6d0a2efb32d4ec5a85f023c2b79d39512040355b/scipy-1.15.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79167bba085c31f38603e11a267d862957cbb3ce018d8b38f79ac043bc92d825", size = 35174018, upload-time = "2025-05-08T16:07:19.427Z" }, - { url = "https://files.pythonhosted.org/packages/b5/09/c5b6734a50ad4882432b6bb7c02baf757f5b2f256041da5df242e2d7e6b6/scipy-1.15.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9deabd6d547aee2c9a81dee6cc96c6d7e9a9b1953f74850c179f91fdc729cb7", size = 37269716, upload-time = "2025-05-08T16:07:25.712Z" }, - { url = "https://files.pythonhosted.org/packages/77/0a/eac00ff741f23bcabd352731ed9b8995a0a60ef57f5fd788d611d43d69a1/scipy-1.15.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dde4fc32993071ac0c7dd2d82569e544f0bdaff66269cb475e0f369adad13f11", size = 36872342, upload-time = "2025-05-08T16:07:31.468Z" }, - { url = "https://files.pythonhosted.org/packages/fe/54/4379be86dd74b6ad81551689107360d9a3e18f24d20767a2d5b9253a3f0a/scipy-1.15.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f77f853d584e72e874d87357ad70f44b437331507d1c311457bed8ed2b956126", size = 39670869, upload-time = "2025-05-08T16:07:38.002Z" }, - { url = "https://files.pythonhosted.org/packages/87/2e/892ad2862ba54f084ffe8cc4a22667eaf9c2bcec6d2bff1d15713c6c0703/scipy-1.15.3-cp313-cp313-win_amd64.whl", hash = "sha256:b90ab29d0c37ec9bf55424c064312930ca5f4bde15ee8619ee44e69319aab163", size = 40988851, upload-time = "2025-05-08T16:08:33.671Z" }, - { url = "https://files.pythonhosted.org/packages/1b/e9/7a879c137f7e55b30d75d90ce3eb468197646bc7b443ac036ae3fe109055/scipy-1.15.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3ac07623267feb3ae308487c260ac684b32ea35fd81e12845039952f558047b8", size = 38863011, upload-time = "2025-05-08T16:07:44.039Z" }, - { url = "https://files.pythonhosted.org/packages/51/d1/226a806bbd69f62ce5ef5f3ffadc35286e9fbc802f606a07eb83bf2359de/scipy-1.15.3-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:6487aa99c2a3d509a5227d9a5e889ff05830a06b2ce08ec30df6d79db5fcd5c5", size = 30266407, upload-time = "2025-05-08T16:07:49.891Z" }, - { url = "https://files.pythonhosted.org/packages/e5/9b/f32d1d6093ab9eeabbd839b0f7619c62e46cc4b7b6dbf05b6e615bbd4400/scipy-1.15.3-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:50f9e62461c95d933d5c5ef4a1f2ebf9a2b4e83b0db374cb3f1de104d935922e", size = 22540030, upload-time = "2025-05-08T16:07:54.121Z" }, - { url = "https://files.pythonhosted.org/packages/e7/29/c278f699b095c1a884f29fda126340fcc201461ee8bfea5c8bdb1c7c958b/scipy-1.15.3-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:14ed70039d182f411ffc74789a16df3835e05dc469b898233a245cdfd7f162cb", size = 25218709, upload-time = "2025-05-08T16:07:58.506Z" }, - { url = "https://files.pythonhosted.org/packages/24/18/9e5374b617aba742a990581373cd6b68a2945d65cc588482749ef2e64467/scipy-1.15.3-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a769105537aa07a69468a0eefcd121be52006db61cdd8cac8a0e68980bbb723", size = 34809045, upload-time = "2025-05-08T16:08:03.929Z" }, - { url = "https://files.pythonhosted.org/packages/e1/fe/9c4361e7ba2927074360856db6135ef4904d505e9b3afbbcb073c4008328/scipy-1.15.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9db984639887e3dffb3928d118145ffe40eff2fa40cb241a306ec57c219ebbbb", size = 36703062, upload-time = "2025-05-08T16:08:09.558Z" }, - { url = "https://files.pythonhosted.org/packages/b7/8e/038ccfe29d272b30086b25a4960f757f97122cb2ec42e62b460d02fe98e9/scipy-1.15.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:40e54d5c7e7ebf1aa596c374c49fa3135f04648a0caabcb66c52884b943f02b4", size = 36393132, upload-time = "2025-05-08T16:08:15.34Z" }, - { url = "https://files.pythonhosted.org/packages/10/7e/5c12285452970be5bdbe8352c619250b97ebf7917d7a9a9e96b8a8140f17/scipy-1.15.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5e721fed53187e71d0ccf382b6bf977644c533e506c4d33c3fb24de89f5c3ed5", size = 38979503, upload-time = "2025-05-08T16:08:21.513Z" }, - { url = "https://files.pythonhosted.org/packages/81/06/0a5e5349474e1cbc5757975b21bd4fad0e72ebf138c5592f191646154e06/scipy-1.15.3-cp313-cp313t-win_amd64.whl", hash = "sha256:76ad1fb5f8752eabf0fa02e4cc0336b4e8f021e2d5f061ed37d6d264db35e3ca", size = 40308097, upload-time = "2025-05-08T16:08:27.627Z" }, -] - [[package]] name = "scipy" version = "1.17.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.14' and sys_platform == 'darwin'", - "python_full_version == '3.13.*' and sys_platform == 'darwin'", - "python_full_version == '3.12.*' and sys_platform == 'darwin'", - "python_full_version == '3.11.*' and sys_platform == 'darwin'", - "python_full_version >= '3.14' and sys_platform == 'linux'", - "python_full_version == '3.13.*' and sys_platform == 'linux'", - "python_full_version == '3.12.*' and sys_platform == 'linux'", - "python_full_version == '3.11.*' and sys_platform == 'linux'", - "python_full_version >= '3.14' and sys_platform == 'win32'", - "python_full_version == '3.13.*' and sys_platform == 'win32'", - "python_full_version == '3.12.*' and sys_platform == 'win32'", - "python_full_version == '3.11.*' and sys_platform == 'win32'", -] dependencies = [ - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/7a/97/5a3609c4f8d58b039179648e62dd220f89864f56f7357f5d4f45c29eb2cc/scipy-1.17.1.tar.gz", hash = "sha256:95d8e012d8cb8816c226aef832200b1d45109ed4464303e997c5b13122b297c0", size = 30573822, upload-time = "2026-02-23T00:26:24.851Z" } wheels = [ @@ -6092,10 +5297,8 @@ version = "0.13.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "matplotlib", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "numpy", version = "2.4.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, - { name = "pandas", version = "2.3.3", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "pandas", version = "3.0.1", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "numpy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, + { name = "pandas", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/86/59/a451d7420a77ab0b98f7affa3a1d78a313d2f7281a57afb1a34bae8ab412/seaborn-0.13.2.tar.gz", hash = "sha256:93e60a40988f4d65e9f4885df477e2fdaff6b73a9ded434c1ab356dd57eefff7", size = 1457696, upload-time = "2024-01-25T13:21:52.551Z" } wheels = [ @@ -6108,16 +5311,6 @@ version = "1.3.7" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/8d/48/49393a96a2eef1ab418b17475fb92b8fcfad83d099e678751b05472e69de/setproctitle-1.3.7.tar.gz", hash = "sha256:bc2bc917691c1537d5b9bca1468437176809c7e11e5694ca79a9ca12345dcb9e", size = 27002, upload-time = "2025-09-05T12:51:25.278Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f2/48/fb401ec8c4953d519d05c87feca816ad668b8258448ff60579ac7a1c1386/setproctitle-1.3.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cf555b6299f10a6eb44e4f96d2f5a3884c70ce25dc5c8796aaa2f7b40e72cb1b", size = 18079, upload-time = "2025-09-05T12:49:07.732Z" }, - { url = "https://files.pythonhosted.org/packages/cc/a3/c2b0333c2716fb3b4c9a973dd113366ac51b4f8d56b500f4f8f704b4817a/setproctitle-1.3.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:690b4776f9c15aaf1023bb07d7c5b797681a17af98a4a69e76a1d504e41108b7", size = 13099, upload-time = "2025-09-05T12:49:09.222Z" }, - { url = "https://files.pythonhosted.org/packages/0e/f8/17bda581c517678260e6541b600eeb67745f53596dc077174141ba2f6702/setproctitle-1.3.7-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:00afa6fc507967d8c9d592a887cdc6c1f5742ceac6a4354d111ca0214847732c", size = 31793, upload-time = "2025-09-05T12:49:10.297Z" }, - { url = "https://files.pythonhosted.org/packages/27/d1/76a33ae80d4e788ecab9eb9b53db03e81cfc95367ec7e3fbf4989962fedd/setproctitle-1.3.7-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9e02667f6b9fc1238ba753c0f4b0a37ae184ce8f3bbbc38e115d99646b3f4cd3", size = 32779, upload-time = "2025-09-05T12:49:12.157Z" }, - { url = "https://files.pythonhosted.org/packages/59/27/1a07c38121967061564f5e0884414a5ab11a783260450172d4fc68c15621/setproctitle-1.3.7-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:83fcd271567d133eb9532d3b067c8a75be175b2b3b271e2812921a05303a693f", size = 34578, upload-time = "2025-09-05T12:49:13.393Z" }, - { url = "https://files.pythonhosted.org/packages/d8/d4/725e6353935962d8bb12cbf7e7abba1d0d738c7f6935f90239d8e1ccf913/setproctitle-1.3.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13fe37951dda1a45c35d77d06e3da5d90e4f875c4918a7312b3b4556cfa7ff64", size = 32030, upload-time = "2025-09-05T12:49:15.362Z" }, - { url = "https://files.pythonhosted.org/packages/67/24/e4677ae8e1cb0d549ab558b12db10c175a889be0974c589c428fece5433e/setproctitle-1.3.7-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:a05509cfb2059e5d2ddff701d38e474169e9ce2a298cf1b6fd5f3a213a553fe5", size = 33363, upload-time = "2025-09-05T12:49:16.829Z" }, - { url = "https://files.pythonhosted.org/packages/55/d4/69ce66e4373a48fdbb37489f3ded476bb393e27f514968c3a69a67343ae0/setproctitle-1.3.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6da835e76ae18574859224a75db6e15c4c2aaa66d300a57efeaa4c97ca4c7381", size = 31508, upload-time = "2025-09-05T12:49:18.032Z" }, - { url = "https://files.pythonhosted.org/packages/4b/5a/42c1ed0e9665d068146a68326529b5686a1881c8b9197c2664db4baf6aeb/setproctitle-1.3.7-cp310-cp310-win32.whl", hash = "sha256:9e803d1b1e20240a93bac0bc1025363f7f80cb7eab67dfe21efc0686cc59ad7c", size = 12558, upload-time = "2025-09-05T12:49:19.742Z" }, - { url = "https://files.pythonhosted.org/packages/dc/fe/dd206cc19a25561921456f6cb12b405635319299b6f366e0bebe872abc18/setproctitle-1.3.7-cp310-cp310-win_amd64.whl", hash = "sha256:a97200acc6b64ec4cada52c2ecaf1fba1ef9429ce9c542f8a7db5bcaa9dcbd95", size = 13245, upload-time = "2025-09-05T12:49:21.023Z" }, { url = "https://files.pythonhosted.org/packages/04/cd/1b7ba5cad635510720ce19d7122154df96a2387d2a74217be552887c93e5/setproctitle-1.3.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a600eeb4145fb0ee6c287cb82a2884bd4ec5bbb076921e287039dcc7b7cc6dd0", size = 18085, upload-time = "2025-09-05T12:49:22.183Z" }, { url = "https://files.pythonhosted.org/packages/8f/1a/b2da0a620490aae355f9d72072ac13e901a9fec809a6a24fc6493a8f3c35/setproctitle-1.3.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:97a090fed480471bb175689859532709e28c085087e344bca45cf318034f70c4", size = 13097, upload-time = "2025-09-05T12:49:23.322Z" }, { url = "https://files.pythonhosted.org/packages/18/2e/bd03ff02432a181c1787f6fc2a678f53b7dacdd5ded69c318fe1619556e8/setproctitle-1.3.7-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1607b963e7b53e24ec8a2cb4e0ab3ae591d7c6bf0a160feef0551da63452b37f", size = 32191, upload-time = "2025-09-05T12:49:24.567Z" }, @@ -6178,9 +5371,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e7/e3/54b496ac724e60e61cc3447f02690105901ca6d90da0377dffe49ff99fc7/setproctitle-1.3.7-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:1fae595d032b30dab4d659bece20debd202229fce12b55abab978b7f30783d73", size = 33958, upload-time = "2025-09-05T12:50:39.841Z" }, { url = "https://files.pythonhosted.org/packages/ea/a8/c84bb045ebf8c6fdc7f7532319e86f8380d14bbd3084e6348df56bdfe6fd/setproctitle-1.3.7-cp314-cp314t-win32.whl", hash = "sha256:02432f26f5d1329ab22279ff863c83589894977063f59e6c4b4845804a08f8c2", size = 12745, upload-time = "2025-09-05T12:50:41.377Z" }, { url = "https://files.pythonhosted.org/packages/08/b6/3a5a4f9952972791a9114ac01dfc123f0df79903577a3e0a7a404a695586/setproctitle-1.3.7-cp314-cp314t-win_amd64.whl", hash = "sha256:cbc388e3d86da1f766d8fc2e12682e446064c01cea9f88a88647cfe7c011de6a", size = 13469, upload-time = "2025-09-05T12:50:42.67Z" }, - { url = "https://files.pythonhosted.org/packages/34/8a/aff5506ce89bc3168cb492b18ba45573158d528184e8a9759a05a09088a9/setproctitle-1.3.7-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:eb440c5644a448e6203935ed60466ec8d0df7278cd22dc6cf782d07911bcbea6", size = 12654, upload-time = "2025-09-05T12:51:17.141Z" }, - { url = "https://files.pythonhosted.org/packages/41/89/5b6f2faedd6ced3d3c085a5efbd91380fb1f61f4c12bc42acad37932f4e9/setproctitle-1.3.7-pp310-pypy310_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:502b902a0e4c69031b87870ff4986c290ebbb12d6038a70639f09c331b18efb2", size = 14284, upload-time = "2025-09-05T12:51:18.393Z" }, - { url = "https://files.pythonhosted.org/packages/0a/c0/4312fed3ca393a29589603fd48f17937b4ed0638b923bac75a728382e730/setproctitle-1.3.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:f6f268caeabb37ccd824d749e7ce0ec6337c4ed954adba33ec0d90cc46b0ab78", size = 13282, upload-time = "2025-09-05T12:51:19.703Z" }, { url = "https://files.pythonhosted.org/packages/c3/5b/5e1c117ac84e3cefcf8d7a7f6b2461795a87e20869da065a5c087149060b/setproctitle-1.3.7-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:b1cac6a4b0252b8811d60b6d8d0f157c0fdfed379ac89c25a914e6346cf355a1", size = 12587, upload-time = "2025-09-05T12:51:21.195Z" }, { url = "https://files.pythonhosted.org/packages/73/02/b9eadc226195dcfa90eed37afe56b5dd6fa2f0e5220ab8b7867b8862b926/setproctitle-1.3.7-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f1704c9e041f2b1dc38f5be4552e141e1432fba3dd52c72eeffd5bc2db04dc65", size = 14286, upload-time = "2025-09-05T12:51:22.61Z" }, { url = "https://files.pythonhosted.org/packages/28/26/1be1d2a53c2a91ec48fa2ff4a409b395f836798adf194d99de9c059419ea/setproctitle-1.3.7-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:b08b61976ffa548bd5349ce54404bf6b2d51bd74d4f1b241ed1b0f25bce09c3a", size = 13282, upload-time = "2025-09-05T12:51:24.094Z" }, @@ -6250,13 +5440,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/1f/73/b4a9737255583b5fa858e0bb8e116eb94b88c910164ed2ed719147bde3de/sqlalchemy-2.0.48.tar.gz", hash = "sha256:5ca74f37f3369b45e1f6b7b06afb182af1fd5dde009e4ffd831830d98cbe5fe7", size = 9886075, upload-time = "2026-03-02T15:28:51.474Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/67/1235676e93dd3b742a4a8eddfae49eea46c85e3eed29f0da446a8dd57500/sqlalchemy-2.0.48-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7001dc9d5f6bb4deb756d5928eaefe1930f6f4179da3924cbd95ee0e9f4dce89", size = 2157384, upload-time = "2026-03-02T15:38:26.781Z" }, - { url = "https://files.pythonhosted.org/packages/4d/d7/fa728b856daa18c10e1390e76f26f64ac890c947008284387451d56ca3d0/sqlalchemy-2.0.48-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1a89ce07ad2d4b8cfc30bd5889ec40613e028ed80ef47da7d9dd2ce969ad30e0", size = 3236981, upload-time = "2026-03-02T15:58:53.53Z" }, - { url = "https://files.pythonhosted.org/packages/5c/ad/6c4395649a212a6c603a72c5b9ab5dce3135a1546cfdffa3c427e71fd535/sqlalchemy-2.0.48-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10853a53a4a00417a00913d270dddda75815fcb80675874285f41051c094d7dd", size = 3235232, upload-time = "2026-03-02T15:52:25.654Z" }, - { url = "https://files.pythonhosted.org/packages/01/f4/58f845e511ac0509765a6f85eb24924c1ef0d54fb50de9d15b28c3601458/sqlalchemy-2.0.48-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:fac0fa4e4f55f118fd87177dacb1c6522fe39c28d498d259014020fec9164c29", size = 3188106, upload-time = "2026-03-02T15:58:55.193Z" }, - { url = "https://files.pythonhosted.org/packages/3f/f9/6dcc7bfa5f5794c3a095e78cd1de8269dfb5584dfd4c2c00a50d3c1ade44/sqlalchemy-2.0.48-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3713e21ea67bca727eecd4a24bf68bcd414c403faae4989442be60994301ded0", size = 3209522, upload-time = "2026-03-02T15:52:27.407Z" }, - { url = "https://files.pythonhosted.org/packages/d7/5a/b632875ab35874d42657f079529f0745410604645c269a8c21fb4272ff7a/sqlalchemy-2.0.48-cp310-cp310-win32.whl", hash = "sha256:d404dc897ce10e565d647795861762aa2d06ca3f4a728c5e9a835096c7059018", size = 2117695, upload-time = "2026-03-02T15:46:51.389Z" }, - { url = "https://files.pythonhosted.org/packages/de/03/9752eb2a41afdd8568e41ac3c3128e32a0a73eada5ab80483083604a56d1/sqlalchemy-2.0.48-cp310-cp310-win_amd64.whl", hash = "sha256:841a94c66577661c1f088ac958cd767d7c9bf507698f45afffe7a4017049de76", size = 2140928, upload-time = "2026-03-02T15:46:52.992Z" }, { url = "https://files.pythonhosted.org/packages/d7/6d/b8b78b5b80f3c3ab3f7fa90faa195ec3401f6d884b60221260fd4d51864c/sqlalchemy-2.0.48-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b4c575df7368b3b13e0cebf01d4679f9a28ed2ae6c1cd0b1d5beffb6b2007dc", size = 2157184, upload-time = "2026-03-02T15:38:28.161Z" }, { url = "https://files.pythonhosted.org/packages/21/4b/4f3d4a43743ab58b95b9ddf5580a265b593d017693df9e08bd55780af5bb/sqlalchemy-2.0.48-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e83e3f959aaa1c9df95c22c528096d94848a1bc819f5d0ebf7ee3df0ca63db6c", size = 3313555, upload-time = "2026-03-02T15:58:57.21Z" }, { url = "https://files.pythonhosted.org/packages/21/dd/3b7c53f1dbbf736fd27041aee68f8ac52226b610f914085b1652c2323442/sqlalchemy-2.0.48-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f7b7243850edd0b8b97043f04748f31de50cf426e939def5c16bedb540698f7", size = 3313057, upload-time = "2026-03-02T15:52:29.366Z" }, @@ -6361,8 +5544,7 @@ dependencies = [ { name = "litellm", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "loguru", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "matplotlib", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "pandas", version = "2.3.3", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "pandas", version = "3.0.1", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "pandas", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "plotly", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "psutil", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pydantic-argparse", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -6371,8 +5553,7 @@ dependencies = [ { name = "redis", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "rich", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "ruff", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "scikit-learn", version = "1.7.2", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, - { name = "scikit-learn", version = "1.8.0", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version >= '3.11' and sys_platform == 'darwin') or (python_full_version >= '3.11' and sys_platform == 'linux') or (python_full_version >= '3.11' and sys_platform == 'win32')" }, + { name = "scikit-learn", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "seaborn", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "tabulate", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "tenacity", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -6418,13 +5599,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/7d/ab/4d017d0f76ec3171d469d80fc03dfbb4e48a4bcaddaa831b31d526f05edc/tiktoken-0.12.0.tar.gz", hash = "sha256:b18ba7ee2b093863978fcb14f74b3707cdc8d4d4d3836853ce7ec60772139931", size = 37806, upload-time = "2025-10-06T20:22:45.419Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/89/b3/2cb7c17b6c4cf8ca983204255d3f1d95eda7213e247e6947a0ee2c747a2c/tiktoken-0.12.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3de02f5a491cfd179aec916eddb70331814bd6bf764075d39e21d5862e533970", size = 1051991, upload-time = "2025-10-06T20:21:34.098Z" }, - { url = "https://files.pythonhosted.org/packages/27/0f/df139f1df5f6167194ee5ab24634582ba9a1b62c6b996472b0277ec80f66/tiktoken-0.12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b6cfb6d9b7b54d20af21a912bfe63a2727d9cfa8fbda642fd8322c70340aad16", size = 995798, upload-time = "2025-10-06T20:21:35.579Z" }, - { url = "https://files.pythonhosted.org/packages/ef/5d/26a691f28ab220d5edc09b9b787399b130f24327ef824de15e5d85ef21aa/tiktoken-0.12.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:cde24cdb1b8a08368f709124f15b36ab5524aac5fa830cc3fdce9c03d4fb8030", size = 1129865, upload-time = "2025-10-06T20:21:36.675Z" }, - { url = "https://files.pythonhosted.org/packages/b2/94/443fab3d4e5ebecac895712abd3849b8da93b7b7dec61c7db5c9c7ebe40c/tiktoken-0.12.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:6de0da39f605992649b9cfa6f84071e3f9ef2cec458d08c5feb1b6f0ff62e134", size = 1152856, upload-time = "2025-10-06T20:21:37.873Z" }, - { url = "https://files.pythonhosted.org/packages/54/35/388f941251b2521c70dd4c5958e598ea6d2c88e28445d2fb8189eecc1dfc/tiktoken-0.12.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:6faa0534e0eefbcafaccb75927a4a380463a2eaa7e26000f0173b920e98b720a", size = 1195308, upload-time = "2025-10-06T20:21:39.577Z" }, - { url = "https://files.pythonhosted.org/packages/f8/00/c6681c7f833dd410576183715a530437a9873fa910265817081f65f9105f/tiktoken-0.12.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:82991e04fc860afb933efb63957affc7ad54f83e2216fe7d319007dab1ba5892", size = 1255697, upload-time = "2025-10-06T20:21:41.154Z" }, - { url = "https://files.pythonhosted.org/packages/5f/d2/82e795a6a9bafa034bf26a58e68fe9a89eeaaa610d51dbeb22106ba04f0a/tiktoken-0.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:6fb2995b487c2e31acf0a9e17647e3b242235a20832642bb7a9d1a181c0c1bb1", size = 879375, upload-time = "2025-10-06T20:21:43.201Z" }, { url = "https://files.pythonhosted.org/packages/de/46/21ea696b21f1d6d1efec8639c204bdf20fde8bafb351e1355c72c5d7de52/tiktoken-0.12.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6e227c7f96925003487c33b1b32265fad2fbcec2b7cf4817afb76d416f40f6bb", size = 1051565, upload-time = "2025-10-06T20:21:44.566Z" }, { url = "https://files.pythonhosted.org/packages/c9/d9/35c5d2d9e22bb2a5f74ba48266fb56c63d76ae6f66e02feb628671c0283e/tiktoken-0.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c06cf0fcc24c2cb2adb5e185c7082a82cba29c17575e828518c2f11a01f445aa", size = 995284, upload-time = "2025-10-06T20:21:45.622Z" }, { url = "https://files.pythonhosted.org/packages/01/84/961106c37b8e49b9fdcf33fe007bb3a8fdcc380c528b20cc7fbba80578b8/tiktoken-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:f18f249b041851954217e9fd8e5c00b024ab2315ffda5ed77665a05fa91f42dc", size = 1129201, upload-time = "2025-10-06T20:21:47.074Z" }, @@ -6493,10 +5667,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fd/18/a545c4ea42af3df6effd7d13d250ba77a0a86fb20393143bbb9a92e434d4/tokenizers-0.22.2-cp39-abi3-win32.whl", hash = "sha256:a6bf3f88c554a2b653af81f3204491c818ae2ac6fbc09e76ef4773351292bc92", size = 2502363, upload-time = "2026-01-05T10:45:20.593Z" }, { url = "https://files.pythonhosted.org/packages/65/71/0670843133a43d43070abeb1949abfdef12a86d490bea9cd9e18e37c5ff7/tokenizers-0.22.2-cp39-abi3-win_amd64.whl", hash = "sha256:c9ea31edff2968b44a88f97d784c2f16dc0729b8b143ed004699ebca91f05c48", size = 2747786, upload-time = "2026-01-05T10:45:18.411Z" }, { url = "https://files.pythonhosted.org/packages/72/f4/0de46cfa12cdcbcd464cc59fde36912af405696f687e53a091fb432f694c/tokenizers-0.22.2-cp39-abi3-win_arm64.whl", hash = "sha256:9ce725d22864a1e965217204946f830c37876eee3b2ba6fc6255e8e903d5fcbc", size = 2612133, upload-time = "2026-01-05T10:45:17.232Z" }, - { url = "https://files.pythonhosted.org/packages/84/04/655b79dbcc9b3ac5f1479f18e931a344af67e5b7d3b251d2dcdcd7558592/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:753d47ebd4542742ef9261d9da92cd545b2cacbb48349a1225466745bb866ec4", size = 3282301, upload-time = "2026-01-05T10:40:34.858Z" }, - { url = "https://files.pythonhosted.org/packages/46/cd/e4851401f3d8f6f45d8480262ab6a5c8cb9c4302a790a35aa14eeed6d2fd/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e10bf9113d209be7cd046d40fbabbaf3278ff6d18eb4da4c500443185dc1896c", size = 3161308, upload-time = "2026-01-05T10:40:40.737Z" }, - { url = "https://files.pythonhosted.org/packages/6f/6e/55553992a89982cd12d4a66dddb5e02126c58677ea3931efcbe601d419db/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:64d94e84f6660764e64e7e0b22baa72f6cd942279fdbb21d46abd70d179f0195", size = 3718964, upload-time = "2026-01-05T10:40:46.56Z" }, - { url = "https://files.pythonhosted.org/packages/59/8c/b1c87148aa15e099243ec9f0cf9d0e970cc2234c3257d558c25a2c5304e6/tokenizers-0.22.2-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f01a9c019878532f98927d2bacb79bbb404b43d3437455522a00a30718cdedb5", size = 3373542, upload-time = "2026-01-05T10:40:52.803Z" }, ] [[package]] @@ -6711,7 +5881,6 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "h11", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, - { name = "typing-extensions", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform == 'win32')" }, ] sdist = { url = "https://files.pythonhosted.org/packages/cb/ce/f06b84e2697fef4688ca63bdb2fdf113ca0a3be33f94488f2cadb690b0cf/uvicorn-0.38.0.tar.gz", hash = "sha256:fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d", size = 80605, upload-time = "2025-10-18T13:46:44.63Z" } wheels = [ @@ -6724,12 +5893,6 @@ version = "0.21.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/af/c0/854216d09d33c543f12a44b393c402e89a920b1a0a7dc634c42de91b9cf6/uvloop-0.21.0.tar.gz", hash = "sha256:3bf12b0fda68447806a7ad847bfa591613177275d35b6724b1ee573faa3704e3", size = 2492741, upload-time = "2024-10-14T23:38:35.489Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3d/76/44a55515e8c9505aa1420aebacf4dd82552e5e15691654894e90d0bd051a/uvloop-0.21.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ec7e6b09a6fdded42403182ab6b832b71f4edaf7f37a9a0e371a01db5f0cb45f", size = 1442019, upload-time = "2024-10-14T23:37:20.068Z" }, - { url = "https://files.pythonhosted.org/packages/35/5a/62d5800358a78cc25c8a6c72ef8b10851bdb8cca22e14d9c74167b7f86da/uvloop-0.21.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:196274f2adb9689a289ad7d65700d37df0c0930fd8e4e743fa4834e850d7719d", size = 801898, upload-time = "2024-10-14T23:37:22.663Z" }, - { url = "https://files.pythonhosted.org/packages/f3/96/63695e0ebd7da6c741ccd4489b5947394435e198a1382349c17b1146bb97/uvloop-0.21.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f38b2e090258d051d68a5b14d1da7203a3c3677321cf32a95a6f4db4dd8b6f26", size = 3827735, upload-time = "2024-10-14T23:37:25.129Z" }, - { url = "https://files.pythonhosted.org/packages/61/e0/f0f8ec84979068ffae132c58c79af1de9cceeb664076beea86d941af1a30/uvloop-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87c43e0f13022b998eb9b973b5e97200c8b90823454d4bc06ab33829e09fb9bb", size = 3825126, upload-time = "2024-10-14T23:37:27.59Z" }, - { url = "https://files.pythonhosted.org/packages/bf/fe/5e94a977d058a54a19df95f12f7161ab6e323ad49f4dabc28822eb2df7ea/uvloop-0.21.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:10d66943def5fcb6e7b37310eb6b5639fd2ccbc38df1177262b0640c3ca68c1f", size = 3705789, upload-time = "2024-10-14T23:37:29.385Z" }, - { url = "https://files.pythonhosted.org/packages/26/dd/c7179618e46092a77e036650c1f056041a028a35c4d76945089fcfc38af8/uvloop-0.21.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:67dd654b8ca23aed0a8e99010b4c34aca62f4b7fce88f39d452ed7622c94845c", size = 3800523, upload-time = "2024-10-14T23:37:32.048Z" }, { url = "https://files.pythonhosted.org/packages/57/a7/4cf0334105c1160dd6819f3297f8700fda7fc30ab4f61fbf3e725acbc7cc/uvloop-0.21.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c0f3fa6200b3108919f8bdabb9a7f87f20e7097ea3c543754cabc7d717d95cf8", size = 1447410, upload-time = "2024-10-14T23:37:33.612Z" }, { url = "https://files.pythonhosted.org/packages/8c/7c/1517b0bbc2dbe784b563d6ab54f2ef88c890fdad77232c98ed490aa07132/uvloop-0.21.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0878c2640cf341b269b7e128b1a5fed890adc4455513ca710d77d5e93aa6d6a0", size = 805476, upload-time = "2024-10-14T23:37:36.11Z" }, { url = "https://files.pythonhosted.org/packages/ee/ea/0bfae1aceb82a503f358d8d2fa126ca9dbdb2ba9c7866974faec1cb5875c/uvloop-0.21.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9fb766bb57b7388745d8bcc53a359b116b8a04c83a2288069809d2b3466c37e", size = 3960855, upload-time = "2024-10-14T23:37:37.683Z" }, @@ -6756,9 +5919,6 @@ version = "6.0.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220, upload-time = "2024-11-01T14:07:13.037Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0c/56/90994d789c61df619bfc5ce2ecdabd5eeff564e1eb47512bd01b5e019569/watchdog-6.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26", size = 96390, upload-time = "2024-11-01T14:06:24.793Z" }, - { url = "https://files.pythonhosted.org/packages/55/46/9a67ee697342ddf3c6daa97e3a587a56d6c4052f881ed926a849fcf7371c/watchdog-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112", size = 88389, upload-time = "2024-11-01T14:06:27.112Z" }, - { url = "https://files.pythonhosted.org/packages/44/65/91b0985747c52064d8701e1075eb96f8c40a79df889e59a399453adfb882/watchdog-6.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c897ac1b55c5a1461e16dae288d22bb2e412ba9807df8397a635d88f671d36c3", size = 89020, upload-time = "2024-11-01T14:06:29.876Z" }, { url = "https://files.pythonhosted.org/packages/e0/24/d9be5cd6642a6aa68352ded4b4b10fb0d7889cb7f45814fb92cecd35f101/watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c", size = 96393, upload-time = "2024-11-01T14:06:31.756Z" }, { url = "https://files.pythonhosted.org/packages/63/7a/6013b0d8dbc56adca7fdd4f0beed381c59f6752341b12fa0886fa7afc78b/watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2", size = 88392, upload-time = "2024-11-01T14:06:32.99Z" }, { url = "https://files.pythonhosted.org/packages/d1/40/b75381494851556de56281e053700e46bff5b37bf4c7267e858640af5a7f/watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c", size = 89019, upload-time = "2024-11-01T14:06:34.963Z" }, @@ -6768,8 +5928,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480, upload-time = "2024-11-01T14:06:42.952Z" }, { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451, upload-time = "2024-11-01T14:06:45.084Z" }, { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057, upload-time = "2024-11-01T14:06:47.324Z" }, - { url = "https://files.pythonhosted.org/packages/30/ad/d17b5d42e28a8b91f8ed01cb949da092827afb9995d4559fd448d0472763/watchdog-6.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c7ac31a19f4545dd92fc25d200694098f42c9a8e391bc00bdd362c5736dbf881", size = 87902, upload-time = "2024-11-01T14:06:53.119Z" }, - { url = "https://files.pythonhosted.org/packages/5c/ca/c3649991d140ff6ab67bfc85ab42b165ead119c9e12211e08089d763ece5/watchdog-6.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9513f27a1a582d9808cf21a07dae516f0fab1cf2d7683a742c498b93eedabb11", size = 88380, upload-time = "2024-11-01T14:06:55.19Z" }, { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079, upload-time = "2024-11-01T14:06:59.472Z" }, { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078, upload-time = "2024-11-01T14:07:01.431Z" }, { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076, upload-time = "2024-11-01T14:07:02.568Z" }, @@ -6788,17 +5946,6 @@ version = "15.0.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee", size = 177016, upload-time = "2025-03-05T20:03:41.606Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/da/6462a9f510c0c49837bbc9345aca92d767a56c1fb2939e1579df1e1cdcf7/websockets-15.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d63efaa0cd96cf0c5fe4d581521d9fa87744540d4bc999ae6e08595a1014b45b", size = 175423, upload-time = "2025-03-05T20:01:35.363Z" }, - { url = "https://files.pythonhosted.org/packages/1c/9f/9d11c1a4eb046a9e106483b9ff69bce7ac880443f00e5ce64261b47b07e7/websockets-15.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac60e3b188ec7574cb761b08d50fcedf9d77f1530352db4eef1707fe9dee7205", size = 173080, upload-time = "2025-03-05T20:01:37.304Z" }, - { url = "https://files.pythonhosted.org/packages/d5/4f/b462242432d93ea45f297b6179c7333dd0402b855a912a04e7fc61c0d71f/websockets-15.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5756779642579d902eed757b21b0164cd6fe338506a8083eb58af5c372e39d9a", size = 173329, upload-time = "2025-03-05T20:01:39.668Z" }, - { url = "https://files.pythonhosted.org/packages/6e/0c/6afa1f4644d7ed50284ac59cc70ef8abd44ccf7d45850d989ea7310538d0/websockets-15.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdfe3e2a29e4db3659dbd5bbf04560cea53dd9610273917799f1cde46aa725e", size = 182312, upload-time = "2025-03-05T20:01:41.815Z" }, - { url = "https://files.pythonhosted.org/packages/dd/d4/ffc8bd1350b229ca7a4db2a3e1c482cf87cea1baccd0ef3e72bc720caeec/websockets-15.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c2529b320eb9e35af0fa3016c187dffb84a3ecc572bcee7c3ce302bfeba52bf", size = 181319, upload-time = "2025-03-05T20:01:43.967Z" }, - { url = "https://files.pythonhosted.org/packages/97/3a/5323a6bb94917af13bbb34009fac01e55c51dfde354f63692bf2533ffbc2/websockets-15.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac1e5c9054fe23226fb11e05a6e630837f074174c4c2f0fe442996112a6de4fb", size = 181631, upload-time = "2025-03-05T20:01:46.104Z" }, - { url = "https://files.pythonhosted.org/packages/a6/cc/1aeb0f7cee59ef065724041bb7ed667b6ab1eeffe5141696cccec2687b66/websockets-15.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5df592cd503496351d6dc14f7cdad49f268d8e618f80dce0cd5a36b93c3fc08d", size = 182016, upload-time = "2025-03-05T20:01:47.603Z" }, - { url = "https://files.pythonhosted.org/packages/79/f9/c86f8f7af208e4161a7f7e02774e9d0a81c632ae76db2ff22549e1718a51/websockets-15.0.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a34631031a8f05657e8e90903e656959234f3a04552259458aac0b0f9ae6fd9", size = 181426, upload-time = "2025-03-05T20:01:48.949Z" }, - { url = "https://files.pythonhosted.org/packages/c7/b9/828b0bc6753db905b91df6ae477c0b14a141090df64fb17f8a9d7e3516cf/websockets-15.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d00075aa65772e7ce9e990cab3ff1de702aa09be3940d1dc88d5abf1ab8a09c", size = 181360, upload-time = "2025-03-05T20:01:50.938Z" }, - { url = "https://files.pythonhosted.org/packages/89/fb/250f5533ec468ba6327055b7d98b9df056fb1ce623b8b6aaafb30b55d02e/websockets-15.0.1-cp310-cp310-win32.whl", hash = "sha256:1234d4ef35db82f5446dca8e35a7da7964d02c127b095e172e54397fb6a6c256", size = 176388, upload-time = "2025-03-05T20:01:52.213Z" }, - { url = "https://files.pythonhosted.org/packages/1c/46/aca7082012768bb98e5608f01658ff3ac8437e563eca41cf068bd5849a5e/websockets-15.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:39c1fec2c11dc8d89bba6b2bf1556af381611a173ac2b511cf7231622058af41", size = 176830, upload-time = "2025-03-05T20:01:53.922Z" }, { url = "https://files.pythonhosted.org/packages/9f/32/18fcd5919c293a398db67443acd33fde142f283853076049824fc58e6f75/websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431", size = 175423, upload-time = "2025-03-05T20:01:56.276Z" }, { url = "https://files.pythonhosted.org/packages/76/70/ba1ad96b07869275ef42e2ce21f07a5b0148936688c2baf7e4a1f60d5058/websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57", size = 173082, upload-time = "2025-03-05T20:01:57.563Z" }, { url = "https://files.pythonhosted.org/packages/86/f2/10b55821dd40eb696ce4704a87d57774696f9451108cff0d2824c97e0f97/websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905", size = 173330, upload-time = "2025-03-05T20:01:59.063Z" }, @@ -6832,12 +5979,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/33/2b/1f168cb6041853eef0362fb9554c3824367c5560cbdaad89ac40f8c2edfc/websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4", size = 182195, upload-time = "2025-03-05T20:02:51.561Z" }, { url = "https://files.pythonhosted.org/packages/86/eb/20b6cdf273913d0ad05a6a14aed4b9a85591c18a987a3d47f20fa13dcc47/websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa", size = 176393, upload-time = "2025-03-05T20:02:53.814Z" }, { url = "https://files.pythonhosted.org/packages/1b/6c/c65773d6cab416a64d191d6ee8a8b1c68a09970ea6909d16965d26bfed1e/websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561", size = 176837, upload-time = "2025-03-05T20:02:55.237Z" }, - { url = "https://files.pythonhosted.org/packages/02/9e/d40f779fa16f74d3468357197af8d6ad07e7c5a27ea1ca74ceb38986f77a/websockets-15.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0c9e74d766f2818bb95f84c25be4dea09841ac0f734d1966f415e4edfc4ef1c3", size = 173109, upload-time = "2025-03-05T20:03:17.769Z" }, - { url = "https://files.pythonhosted.org/packages/bc/cd/5b887b8585a593073fd92f7c23ecd3985cd2c3175025a91b0d69b0551372/websockets-15.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1009ee0c7739c08a0cd59de430d6de452a55e42d6b522de7aa15e6f67db0b8e1", size = 173343, upload-time = "2025-03-05T20:03:19.094Z" }, - { url = "https://files.pythonhosted.org/packages/fe/ae/d34f7556890341e900a95acf4886833646306269f899d58ad62f588bf410/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d1f20b1c7a2fa82367e04982e708723ba0e7b8d43aa643d3dcd404d74f1475", size = 174599, upload-time = "2025-03-05T20:03:21.1Z" }, - { url = "https://files.pythonhosted.org/packages/71/e6/5fd43993a87db364ec60fc1d608273a1a465c0caba69176dd160e197ce42/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f29d80eb9a9263b8d109135351caf568cc3f80b9928bccde535c235de55c22d9", size = 174207, upload-time = "2025-03-05T20:03:23.221Z" }, - { url = "https://files.pythonhosted.org/packages/2b/fb/c492d6daa5ec067c2988ac80c61359ace5c4c674c532985ac5a123436cec/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b359ed09954d7c18bbc1680f380c7301f92c60bf924171629c5db97febb12f04", size = 174155, upload-time = "2025-03-05T20:03:25.321Z" }, - { url = "https://files.pythonhosted.org/packages/68/a1/dcb68430b1d00b698ae7a7e0194433bce4f07ded185f0ee5fb21e2a2e91e/websockets-15.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cad21560da69f4ce7658ca2cb83138fb4cf695a2ba3e475e0559e05991aa8122", size = 176884, upload-time = "2025-03-05T20:03:27.934Z" }, { url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743, upload-time = "2025-03-05T20:03:39.41Z" }, ] @@ -6868,16 +6009,6 @@ version = "1.17.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz", hash = "sha256:f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0", size = 55547, upload-time = "2025-08-12T05:53:21.714Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3f/23/bb82321b86411eb51e5a5db3fb8f8032fd30bd7c2d74bfe936136b2fa1d6/wrapt-1.17.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88bbae4d40d5a46142e70d58bf664a89b6b4befaea7b2ecc14e03cedb8e06c04", size = 53482, upload-time = "2025-08-12T05:51:44.467Z" }, - { url = "https://files.pythonhosted.org/packages/45/69/f3c47642b79485a30a59c63f6d739ed779fb4cc8323205d047d741d55220/wrapt-1.17.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6b13af258d6a9ad602d57d889f83b9d5543acd471eee12eb51f5b01f8eb1bc2", size = 38676, upload-time = "2025-08-12T05:51:32.636Z" }, - { url = "https://files.pythonhosted.org/packages/d1/71/e7e7f5670c1eafd9e990438e69d8fb46fa91a50785332e06b560c869454f/wrapt-1.17.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd341868a4b6714a5962c1af0bd44f7c404ef78720c7de4892901e540417111c", size = 38957, upload-time = "2025-08-12T05:51:54.655Z" }, - { url = "https://files.pythonhosted.org/packages/de/17/9f8f86755c191d6779d7ddead1a53c7a8aa18bccb7cea8e7e72dfa6a8a09/wrapt-1.17.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f9b2601381be482f70e5d1051a5965c25fb3625455a2bf520b5a077b22afb775", size = 81975, upload-time = "2025-08-12T05:52:30.109Z" }, - { url = "https://files.pythonhosted.org/packages/f2/15/dd576273491f9f43dd09fce517f6c2ce6eb4fe21681726068db0d0467096/wrapt-1.17.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:343e44b2a8e60e06a7e0d29c1671a0d9951f59174f3709962b5143f60a2a98bd", size = 83149, upload-time = "2025-08-12T05:52:09.316Z" }, - { url = "https://files.pythonhosted.org/packages/0c/c4/5eb4ce0d4814521fee7aa806264bf7a114e748ad05110441cd5b8a5c744b/wrapt-1.17.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:33486899acd2d7d3066156b03465b949da3fd41a5da6e394ec49d271baefcf05", size = 82209, upload-time = "2025-08-12T05:52:10.331Z" }, - { url = "https://files.pythonhosted.org/packages/31/4b/819e9e0eb5c8dc86f60dfc42aa4e2c0d6c3db8732bce93cc752e604bb5f5/wrapt-1.17.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e6f40a8aa5a92f150bdb3e1c44b7e98fb7113955b2e5394122fa5532fec4b418", size = 81551, upload-time = "2025-08-12T05:52:31.137Z" }, - { url = "https://files.pythonhosted.org/packages/f8/83/ed6baf89ba3a56694700139698cf703aac9f0f9eb03dab92f57551bd5385/wrapt-1.17.3-cp310-cp310-win32.whl", hash = "sha256:a36692b8491d30a8c75f1dfee65bef119d6f39ea84ee04d9f9311f83c5ad9390", size = 36464, upload-time = "2025-08-12T05:53:01.204Z" }, - { url = "https://files.pythonhosted.org/packages/2f/90/ee61d36862340ad7e9d15a02529df6b948676b9a5829fd5e16640156627d/wrapt-1.17.3-cp310-cp310-win_amd64.whl", hash = "sha256:afd964fd43b10c12213574db492cb8f73b2f0826c8df07a68288f8f19af2ebe6", size = 38748, upload-time = "2025-08-12T05:53:00.209Z" }, - { url = "https://files.pythonhosted.org/packages/bd/c3/cefe0bd330d389c9983ced15d326f45373f4073c9f4a8c2f99b50bfea329/wrapt-1.17.3-cp310-cp310-win_arm64.whl", hash = "sha256:af338aa93554be859173c39c85243970dc6a289fa907402289eeae7543e1ae18", size = 36810, upload-time = "2025-08-12T05:52:51.906Z" }, { url = "https://files.pythonhosted.org/packages/52/db/00e2a219213856074a213503fdac0511203dceefff26e1daa15250cc01a0/wrapt-1.17.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:273a736c4645e63ac582c60a56b0acb529ef07f78e08dc6bfadf6a46b19c0da7", size = 53482, upload-time = "2025-08-12T05:51:45.79Z" }, { url = "https://files.pythonhosted.org/packages/5e/30/ca3c4a5eba478408572096fe9ce36e6e915994dd26a4e9e98b4f729c06d9/wrapt-1.17.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5531d911795e3f935a9c23eb1c8c03c211661a5060aab167065896bbf62a5f85", size = 38674, upload-time = "2025-08-12T05:51:34.629Z" }, { url = "https://files.pythonhosted.org/packages/31/25/3e8cc2c46b5329c5957cec959cb76a10718e1a513309c31399a4dad07eb3/wrapt-1.17.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0610b46293c59a3adbae3dee552b648b984176f8562ee0dba099a56cfbe4df1f", size = 38959, upload-time = "2025-08-12T05:51:56.074Z" }, @@ -6942,24 +6073,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/23/6e/beb1beec874a72f23815c1434518bfc4ed2175065173fb138c3705f658d4/yarl-1.23.0.tar.gz", hash = "sha256:53b1ea6ca88ebd4420379c330aea57e258408dd0df9af0992e5de2078dc9f5d5", size = 194676, upload-time = "2026-03-01T22:07:53.373Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8b/0d/9cc638702f6fc3c7a3685bcc8cf2a9ed7d6206e932a49f5242658047ef51/yarl-1.23.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cff6d44cb13d39db2663a22b22305d10855efa0fa8015ddeacc40bc59b9d8107", size = 123764, upload-time = "2026-03-01T22:04:09.7Z" }, - { url = "https://files.pythonhosted.org/packages/7a/35/5a553687c5793df5429cd1db45909d4f3af7eee90014888c208d086a44f0/yarl-1.23.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e4c53f8347cd4200f0d70a48ad059cabaf24f5adc6ba08622a23423bc7efa10d", size = 86282, upload-time = "2026-03-01T22:04:11.892Z" }, - { url = "https://files.pythonhosted.org/packages/68/2e/c5a2234238f8ce37a8312b52801ee74117f576b1539eec8404a480434acc/yarl-1.23.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a6940a074fb3c48356ed0158a3ca5699c955ee4185b4d7d619be3c327143e05", size = 86053, upload-time = "2026-03-01T22:04:13.292Z" }, - { url = "https://files.pythonhosted.org/packages/74/3f/bbd8ff36fb038622797ffbaf7db314918bb4d76f1cc8a4f9ca7a55fe5195/yarl-1.23.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ed5f69ce7be7902e5c70ea19eb72d20abf7d725ab5d49777d696e32d4fc1811d", size = 99395, upload-time = "2026-03-01T22:04:15.133Z" }, - { url = "https://files.pythonhosted.org/packages/77/04/9516bc4e269d2a3ec9c6779fcdeac51ce5b3a9b0156f06ac7152e5bba864/yarl-1.23.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:389871e65468400d6283c0308e791a640b5ab5c83bcee02a2f51295f95e09748", size = 92143, upload-time = "2026-03-01T22:04:16.829Z" }, - { url = "https://files.pythonhosted.org/packages/c7/63/88802d1f6b1cb1fc67d67a58cd0cf8a1790de4ce7946e434240f1d60ab4a/yarl-1.23.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dda608c88cf709b1d406bdfcd84d8d63cff7c9e577a403c6108ce8ce9dcc8764", size = 107643, upload-time = "2026-03-01T22:04:18.519Z" }, - { url = "https://files.pythonhosted.org/packages/8e/db/4f9b838f4d8bdd6f0f385aed8bbf21c71ed11a0b9983305c302cbd557815/yarl-1.23.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8c4fe09e0780c6c3bf2b7d4af02ee2394439d11a523bbcf095cf4747c2932007", size = 108700, upload-time = "2026-03-01T22:04:20.373Z" }, - { url = "https://files.pythonhosted.org/packages/50/12/95a1d33f04a79c402664070d43b8b9f72dc18914e135b345b611b0b1f8cc/yarl-1.23.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:31c9921eb8bd12633b41ad27686bbb0b1a2a9b8452bfdf221e34f311e9942ed4", size = 102769, upload-time = "2026-03-01T22:04:23.055Z" }, - { url = "https://files.pythonhosted.org/packages/86/65/91a0285f51321369fd1a8308aa19207520c5f0587772cfc2e03fc2467e90/yarl-1.23.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5f10fd85e4b75967468af655228fbfd212bdf66db1c0d135065ce288982eda26", size = 101114, upload-time = "2026-03-01T22:04:25.031Z" }, - { url = "https://files.pythonhosted.org/packages/58/80/c7c8244fc3e5bc483dc71a09560f43b619fab29301a0f0a8f936e42865c7/yarl-1.23.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dbf507e9ef5688bada447a24d68b4b58dd389ba93b7afc065a2ba892bea54769", size = 98883, upload-time = "2026-03-01T22:04:27.281Z" }, - { url = "https://files.pythonhosted.org/packages/86/e7/71ca9cc9ca79c0b7d491216177d1aed559d632947b8ffb0ee60f7d8b23e3/yarl-1.23.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:85e9beda1f591bc73e77ea1c51965c68e98dafd0fec72cdd745f77d727466716", size = 94172, upload-time = "2026-03-01T22:04:28.554Z" }, - { url = "https://files.pythonhosted.org/packages/6a/3f/6c6c8a0fe29c26fb2db2e8d32195bb84ec1bfb8f1d32e7f73b787fcf349b/yarl-1.23.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:0e1fdaa14ef51366d7757b45bde294e95f6c8c049194e793eedb8387c86d5993", size = 107010, upload-time = "2026-03-01T22:04:30.385Z" }, - { url = "https://files.pythonhosted.org/packages/56/38/12730c05e5ad40a76374d440ed8b0899729a96c250516d91c620a6e38fc2/yarl-1.23.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:75e3026ab649bf48f9a10c0134512638725b521340293f202a69b567518d94e0", size = 100285, upload-time = "2026-03-01T22:04:31.752Z" }, - { url = "https://files.pythonhosted.org/packages/34/92/6a7be9239f2347234e027284e7a5f74b1140cc86575e7b469d13fba1ebfe/yarl-1.23.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:80e6d33a3d42a7549b409f199857b4fb54e2103fc44fb87605b6663b7a7ff750", size = 108230, upload-time = "2026-03-01T22:04:33.844Z" }, - { url = "https://files.pythonhosted.org/packages/5e/81/4aebccfa9376bd98b9d8bfad20621a57d3e8cfc5b8631c1fa5f62cdd03f4/yarl-1.23.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5ec2f42d41ccbd5df0270d7df31618a8ee267bfa50997f5d720ddba86c4a83a6", size = 103008, upload-time = "2026-03-01T22:04:35.856Z" }, - { url = "https://files.pythonhosted.org/packages/38/0f/0b4e3edcec794a86b853b0c6396c0a888d72dfce19b2d88c02ac289fb6c1/yarl-1.23.0-cp310-cp310-win32.whl", hash = "sha256:debe9c4f41c32990771be5c22b56f810659f9ddf3d63f67abfdcaa2c6c9c5c1d", size = 83073, upload-time = "2026-03-01T22:04:38.268Z" }, - { url = "https://files.pythonhosted.org/packages/a0/71/ad95c33da18897e4c636528bbc24a1dd23fe16797de8bc4ec667b8db0ba4/yarl-1.23.0-cp310-cp310-win_amd64.whl", hash = "sha256:ab5f043cb8a2d71c981c09c510da013bc79fd661f5c60139f00dd3c3cc4f2ffb", size = 87328, upload-time = "2026-03-01T22:04:39.558Z" }, - { url = "https://files.pythonhosted.org/packages/e2/14/dfa369523c79bccf9c9c746b0a63eb31f65db9418ac01275f7950962e504/yarl-1.23.0-cp310-cp310-win_arm64.whl", hash = "sha256:263cd4f47159c09b8b685890af949195b51d1aa82ba451c5847ca9bc6413c220", size = 82463, upload-time = "2026-03-01T22:04:41.454Z" }, { url = "https://files.pythonhosted.org/packages/a2/aa/60da938b8f0997ba3a911263c40d82b6f645a67902a490b46f3355e10fae/yarl-1.23.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b35d13d549077713e4414f927cdc388d62e543987c572baee613bf82f11a4b99", size = 123641, upload-time = "2026-03-01T22:04:42.841Z" }, { url = "https://files.pythonhosted.org/packages/24/84/e237607faf4e099dbb8a4f511cfd5efcb5f75918baad200ff7380635631b/yarl-1.23.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cbb0fef01f0c6b38cb0f39b1f78fc90b807e0e3c86a7ff3ce74ad77ce5c7880c", size = 86248, upload-time = "2026-03-01T22:04:44.757Z" }, { url = "https://files.pythonhosted.org/packages/b2/0d/71ceabc14c146ba8ee3804ca7b3d42b1664c8440439de5214d366fec7d3a/yarl-1.23.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc52310451fc7c629e13c4e061cbe2dd01684d91f2f8ee2821b083c58bd72432", size = 85988, upload-time = "2026-03-01T22:04:46.365Z" }, From 23d6d91c8f320353c7e587a632260a832d4b1583 Mon Sep 17 00:00:00 2001 From: Eduard van Valkenburg Date: Mon, 9 Mar 2026 11:12:47 +0100 Subject: [PATCH 14/44] Python: [Breaking] Upgrade to azure-ai-projects 2.0+ (#4536) * Prepare azure-ai-projects 2.0 GA compatibility Add allow_preview support for internal AIProjectClient creation, keep backward compatibility for renamed SDK model classes, and align Azure AI/core paths and tests for GA validation workflows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * upgrade to ai-project==2.0.0 * Python: remove azure-ai-projects keyword-guard paths Assume azure-ai-projects 2.0+ in Azure AI client/provider/responses code paths by removing _supports_keyword_argument gating and related fallback branching. Also fix pyright typing in FoundryMemoryProvider memory store calls by using ResponseInputItemParam-typed items. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * check fixes * Python: remove unsupported foundry_features option Drop foundry_features from Azure AI client and provider surfaces because azure-ai-projects 2.0.0 does not expose that create_version parameter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Python: add allow_preview to Foundry memory provider Propagate allow_preview when FoundryMemoryProvider constructs an AIProjectClient and update tests accordingly. Also finish wiring allow_preview through AzureAIClient-facing surfaces and related docs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * aligning docstrings * udpated lock --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- python/AGENTS.md | 7 + .../agent_framework_azure_ai/_client.py | 31 +- .../_foundry_memory_provider.py | 22 +- .../_project_provider.py | 18 +- .../agent_framework_azure_ai/_shared.py | 14 +- .../azure-ai/tests/test_azure_ai_client.py | 4 +- .../tests/test_foundry_memory_provider.py | 2 + .../packages/core/agent_framework/_skills.py | 4 +- .../azure/_responses_client.py | 32 +- python/packages/core/pyproject.toml | 2 +- .../tests/workflow/test_function_executor.py | 6 +- .../_workflows/_executors_tools.py | 3 +- .../models/_discovery_models.py | 2 +- .../02-agents/providers/azure_ai/README.md | 2 +- python/uv.lock | 498 +++++++++--------- 15 files changed, 326 insertions(+), 321 deletions(-) diff --git a/python/AGENTS.md b/python/AGENTS.md index 1a7e430195..7ec268dcd1 100644 --- a/python/AGENTS.md +++ b/python/AGENTS.md @@ -20,6 +20,13 @@ When making changes to a package, check if the following need updates: - The package's `AGENTS.md` file (adding/removing/renaming public APIs, architecture changes, import path changes) - The agent skills in `.github/skills/` if conventions, commands, or workflows change +## Pull Request Description Guidance + +When preparing a PR description: +- Follow the repository PR template at `.github/pull_request_template.md` and keep its structure/headings. +- Describe the net change relative to `main` (this is implied; do not call it out explicitly as "vs main"). +- Do not add ad-hoc validation sections (for example, "Validation" or "Tests run"); CI/CD and the template checklist cover validation status. + ## Quick Reference Run `uv run poe` from the `python/` directory to see available commands. See [DEV_SETUP.md](DEV_SETUP.md) for detailed usage. diff --git a/python/packages/azure-ai/agent_framework_azure_ai/_client.py b/python/packages/azure-ai/agent_framework_azure_ai/_client.py index 26fb0c390a..ba5dd8aad7 100644 --- a/python/packages/azure-ai/agent_framework_azure_ai/_client.py +++ b/python/packages/azure-ai/agent_framework_azure_ai/_client.py @@ -37,9 +37,8 @@ from agent_framework.openai._responses_client import RawOpenAIResponsesClient from azure.ai.projects.aio import AIProjectClient from azure.ai.projects.models import ( ApproximateLocation, - CodeInterpreterContainerAuto, + AutoCodeInterpreterToolParam, CodeInterpreterTool, - FoundryFeaturesOptInKeys, ImageGenTool, MCPTool, PromptAgentDefinition, @@ -66,7 +65,6 @@ if sys.version_info >= (3, 11): else: from typing_extensions import Self, TypedDict # type: ignore # pragma: no cover - logger = logging.getLogger("agent_framework.azure") @@ -79,9 +77,6 @@ class AzureAIProjectAgentOptions(OpenAIResponsesOptions, total=False): reasoning: Reasoning # type: ignore[misc] """Configuration for enabling reasoning capabilities (requires azure.ai.projects.models.Reasoning).""" - foundry_features: FoundryFeaturesOptInKeys | str - """Optional Foundry preview feature opt-in for agent version creation.""" - AzureAIClientOptionsT = TypeVar( "AzureAIClientOptionsT", @@ -123,6 +118,7 @@ class RawAzureAIClient(RawOpenAIResponsesClient[AzureAIClientOptionsT], Generic[ model_deployment_name: str | None = None, credential: AzureCredentialTypes | None = None, use_latest_version: bool | None = None, + allow_preview: bool | None = None, env_file_path: str | None = None, env_file_encoding: str | None = None, **kwargs: Any, @@ -148,6 +144,7 @@ class RawAzureAIClient(RawOpenAIResponsesClient[AzureAIClientOptionsT], Generic[ AsyncTokenCredential, or a callable token provider. use_latest_version: Boolean flag that indicates whether to use latest agent version if it exists in the service. + allow_preview: Enables preview opt-in on internally-created ``AIProjectClient``. env_file_path: Path to environment file for loading settings. env_file_encoding: Encoding of the environment file. kwargs: Additional keyword arguments passed to the parent class. @@ -208,11 +205,14 @@ class RawAzureAIClient(RawOpenAIResponsesClient[AzureAIClientOptionsT], Generic[ # Use provided credential if not credential: raise ValueError("Azure credential is required when project_client is not provided.") - project_client = AIProjectClient( - endpoint=resolved_endpoint, - credential=credential, # type: ignore[arg-type] - user_agent=AGENT_FRAMEWORK_USER_AGENT, - ) + project_client_kwargs: dict[str, Any] = { + "endpoint": resolved_endpoint, + "credential": credential, # type: ignore[arg-type] + "user_agent": AGENT_FRAMEWORK_USER_AGENT, + } + if allow_preview is not None: + project_client_kwargs["allow_preview"] = allow_preview + project_client = AIProjectClient(**project_client_kwargs) should_close_client = True # Initialize parent @@ -413,8 +413,6 @@ class RawAzureAIClient(RawOpenAIResponsesClient[AzureAIClientOptionsT], Generic[ "definition": PromptAgentDefinition(**args), "description": self.agent_description, } - if foundry_features := run_options.get("foundry_features"): - create_version_kwargs["foundry_features"] = foundry_features created_agent = await self.project_client.agents.create_version(**create_version_kwargs) @@ -513,7 +511,7 @@ class RawAzureAIClient(RawOpenAIResponsesClient[AzureAIClientOptionsT], Generic[ "temperature": ("temperature",), "top_p": ("top_p",), "reasoning": ("reasoning",), - "foundry_features": ("foundry_features",), + "allow_preview": ("allow_preview",), } for run_keys in agent_level_option_to_run_keys.values(): @@ -939,7 +937,7 @@ class RawAzureAIClient(RawOpenAIResponsesClient[AzureAIClientOptionsT], Generic[ if file_ids is None and isinstance(container, dict): file_ids = container.get("file_ids") resolved = resolve_file_ids(file_ids) - tool_container = CodeInterpreterContainerAuto(file_ids=resolved) + tool_container = AutoCodeInterpreterToolParam(file_ids=resolved) return CodeInterpreterTool(container=tool_container, **kwargs) @staticmethod @@ -1244,6 +1242,7 @@ class AzureAIClient( model_deployment_name: str | None = None, credential: AzureCredentialTypes | None = None, use_latest_version: bool | None = None, + allow_preview: bool | None = None, middleware: Sequence[ChatAndFunctionMiddlewareTypes] | None = None, function_invocation_configuration: FunctionInvocationConfiguration | None = None, env_file_path: str | None = None, @@ -1268,6 +1267,7 @@ class AzureAIClient( or AsyncTokenCredential. use_latest_version: Boolean flag that indicates whether to use latest agent version if it exists in the service. + allow_preview: Enables preview opt-in on internally-created ``AIProjectClient`` middleware: Optional sequence of chat middlewares to include. function_invocation_configuration: Optional function invocation configuration. env_file_path: Path to environment file for loading settings. @@ -1318,6 +1318,7 @@ class AzureAIClient( model_deployment_name=model_deployment_name, credential=credential, use_latest_version=use_latest_version, + allow_preview=allow_preview, middleware=middleware, function_invocation_configuration=function_invocation_configuration, env_file_path=env_file_path, diff --git a/python/packages/azure-ai/agent_framework_azure_ai/_foundry_memory_provider.py b/python/packages/azure-ai/agent_framework_azure_ai/_foundry_memory_provider.py index d02eb31bb6..fe5ab47ac5 100644 --- a/python/packages/azure-ai/agent_framework_azure_ai/_foundry_memory_provider.py +++ b/python/packages/azure-ai/agent_framework_azure_ai/_foundry_memory_provider.py @@ -18,6 +18,7 @@ from agent_framework._sessions import AgentSession, BaseContextProvider, Session from agent_framework._settings import load_settings from agent_framework.azure._entra_id_authentication import AzureCredentialTypes from azure.ai.projects.aio import AIProjectClient +from openai.types.responses import ResponseInputItemParam from ._shared import AzureAISettings @@ -58,6 +59,7 @@ class FoundryMemoryProvider(BaseContextProvider): project_client: AIProjectClient | None = None, project_endpoint: str | None = None, credential: AzureCredentialTypes | None = None, + allow_preview: bool | None = None, memory_store_name: str, scope: str | None = None, context_prompt: str | None = None, @@ -74,6 +76,7 @@ class FoundryMemoryProvider(BaseContextProvider): credential: Azure credential for authentication. Accepts a TokenCredential, AsyncTokenCredential, or a callable token provider. Required when project_client is not provided. + allow_preview: Enables preview opt-in on internally-created ``AIProjectClient``. memory_store_name: The name of the memory store to use. scope: The namespace that logically groups and isolates memories (e.g., user ID). If None, `session_id` will be used. @@ -100,11 +103,14 @@ class FoundryMemoryProvider(BaseContextProvider): ) if not credential: raise ValueError("Azure credential is required when project_client is not provided.") - project_client = AIProjectClient( - endpoint=resolved_endpoint, - credential=credential, # type: ignore[arg-type] - user_agent=AGENT_FRAMEWORK_USER_AGENT, - ) + project_client_kwargs: dict[str, Any] = { + "endpoint": resolved_endpoint, + "credential": credential, # type: ignore[arg-type] + "user_agent": AGENT_FRAMEWORK_USER_AGENT, + } + if allow_preview is not None: + project_client_kwargs["allow_preview"] = allow_preview + project_client = AIProjectClient(**project_client_kwargs) if not memory_store_name: raise ValueError("memory_store_name is required") @@ -169,8 +175,8 @@ class FoundryMemoryProvider(BaseContextProvider): return # Convert input messages to memory search item format - items = [ - {"type": "text", "text": msg.text} + items: list[ResponseInputItemParam] = [ + {"type": "message", "role": "user", "content": msg.text} for msg in context.input_messages if msg and msg.text and msg.text.strip() ] @@ -224,7 +230,7 @@ class FoundryMemoryProvider(BaseContextProvider): messages_to_store.extend(context.response.messages) # Filter and convert messages to memory update item format - items: list[dict[str, str]] = [] + items: list[ResponseInputItemParam] = [] for message in messages_to_store: if message.role in {"user", "assistant", "system"} and message.text and message.text.strip(): if message.role == "user": diff --git a/python/packages/azure-ai/agent_framework_azure_ai/_project_provider.py b/python/packages/azure-ai/agent_framework_azure_ai/_project_provider.py index 335a7f16ec..82e6a1d5b7 100644 --- a/python/packages/azure-ai/agent_framework_azure_ai/_project_provider.py +++ b/python/packages/azure-ai/agent_framework_azure_ai/_project_provider.py @@ -102,6 +102,7 @@ class AzureAIProjectAgentProvider(Generic[OptionsCoT]): project_endpoint: str | None = None, model: str | None = None, credential: AzureCredentialTypes | None = None, + allow_preview: bool | None = None, env_file_path: str | None = None, env_file_encoding: str | None = None, ) -> None: @@ -117,6 +118,7 @@ class AzureAIProjectAgentProvider(Generic[OptionsCoT]): credential: Azure credential for authentication. Accepts a TokenCredential, AsyncTokenCredential, or a callable token provider. Required when project_client is not provided. + allow_preview: Enables preview opt-in on internally-created ``AIProjectClient``. env_file_path: Path to environment file for loading settings. env_file_encoding: Encoding of the environment file. @@ -146,11 +148,14 @@ class AzureAIProjectAgentProvider(Generic[OptionsCoT]): if not credential: raise ValueError("Azure credential is required when project_client is not provided.") - project_client = AIProjectClient( - endpoint=resolved_endpoint, - credential=credential, # type: ignore[arg-type] - user_agent=AGENT_FRAMEWORK_USER_AGENT, - ) + project_client_kwargs: dict[str, Any] = { + "endpoint": resolved_endpoint, + "credential": credential, # type: ignore[arg-type] + "user_agent": AGENT_FRAMEWORK_USER_AGENT, + } + if allow_preview is not None: + project_client_kwargs["allow_preview"] = allow_preview + project_client = AIProjectClient(**project_client_kwargs) self._should_close_client = True self._project_client = project_client @@ -199,7 +204,6 @@ class AzureAIProjectAgentProvider(Generic[OptionsCoT]): response_format = opts.get("response_format") rai_config = opts.get("rai_config") reasoning = opts.get("reasoning") - foundry_features = opts.get("foundry_features") args: dict[str, Any] = {"model": resolved_model} @@ -246,8 +250,6 @@ class AzureAIProjectAgentProvider(Generic[OptionsCoT]): "definition": PromptAgentDefinition(**args), "description": description, } - if foundry_features: - create_version_kwargs["foundry_features"] = foundry_features created_agent = await self._project_client.agents.create_version(**create_version_kwargs) diff --git a/python/packages/azure-ai/agent_framework_azure_ai/_shared.py b/python/packages/azure-ai/agent_framework_azure_ai/_shared.py index 59289d2746..35b665e932 100644 --- a/python/packages/azure-ai/agent_framework_azure_ai/_shared.py +++ b/python/packages/azure-ai/agent_framework_azure_ai/_shared.py @@ -19,9 +19,9 @@ from azure.ai.agents.models import ( from azure.ai.projects.models import ( CodeInterpreterTool, MCPTool, - TextResponseFormatConfigurationResponseFormatJsonObject, - TextResponseFormatConfigurationResponseFormatText, + TextResponseFormatJsonObject, TextResponseFormatJsonSchema, + TextResponseFormatText, Tool, WebSearchPreviewTool, ) @@ -479,11 +479,7 @@ def _prepare_mcp_tool_dict_for_azure_ai(tool_dict: dict[str, Any]) -> MCPTool: def create_text_format_config( response_format: type[BaseModel] | Mapping[str, Any], -) -> ( - TextResponseFormatJsonSchema - | TextResponseFormatConfigurationResponseFormatJsonObject - | TextResponseFormatConfigurationResponseFormatText -): +) -> TextResponseFormatJsonSchema | TextResponseFormatJsonObject | TextResponseFormatText: """Convert response_format into Azure text format configuration.""" if isinstance(response_format, type) and issubclass(response_format, BaseModel): schema = response_format.model_json_schema() @@ -513,9 +509,9 @@ def create_text_format_config( config_kwargs["description"] = format_config["description"] return TextResponseFormatJsonSchema(**config_kwargs) if format_type == "json_object": - return TextResponseFormatConfigurationResponseFormatJsonObject() + return TextResponseFormatJsonObject() if format_type == "text": - return TextResponseFormatConfigurationResponseFormatText() + return TextResponseFormatText() raise IntegrationInvalidRequestException("response_format must be a Pydantic model or mapping.") diff --git a/python/packages/azure-ai/tests/test_azure_ai_client.py b/python/packages/azure-ai/tests/test_azure_ai_client.py index 8760197284..f0246f40b2 100644 --- a/python/packages/azure-ai/tests/test_azure_ai_client.py +++ b/python/packages/azure-ai/tests/test_azure_ai_client.py @@ -28,7 +28,7 @@ from agent_framework.openai._responses_client import RawOpenAIResponsesClient from azure.ai.projects.aio import AIProjectClient from azure.ai.projects.models import ( ApproximateLocation, - CodeInterpreterContainerAuto, + AutoCodeInterpreterToolParam, CodeInterpreterTool, FileSearchTool, ImageGenTool, @@ -1296,7 +1296,7 @@ def test_from_azure_ai_tools_mcp() -> None: def test_from_azure_ai_tools_code_interpreter() -> None: """Test from_azure_ai_tools with Code Interpreter tool.""" - ci_tool = CodeInterpreterTool(container=CodeInterpreterContainerAuto(file_ids=["file-1"])) + ci_tool = CodeInterpreterTool(container=AutoCodeInterpreterToolParam(file_ids=["file-1"])) parsed_tools = from_azure_ai_tools([ci_tool]) assert len(parsed_tools) == 1 assert parsed_tools[0]["type"] == "code_interpreter" diff --git a/python/packages/azure-ai/tests/test_foundry_memory_provider.py b/python/packages/azure-ai/tests/test_foundry_memory_provider.py index 943a528968..9788ee25e8 100644 --- a/python/packages/azure-ai/tests/test_foundry_memory_provider.py +++ b/python/packages/azure-ai/tests/test_foundry_memory_provider.py @@ -86,6 +86,7 @@ class TestInit: provider = FoundryMemoryProvider( project_endpoint="https://test.project.endpoint", credential=mock_credential, # type: ignore[arg-type] + allow_preview=True, memory_store_name="test_store", scope="user_123", ) @@ -93,6 +94,7 @@ class TestInit: mock_ai_project_client.assert_called_once_with( endpoint="https://test.project.endpoint", credential=mock_credential, + allow_preview=True, user_agent=AGENT_FRAMEWORK_USER_AGENT, ) diff --git a/python/packages/core/agent_framework/_skills.py b/python/packages/core/agent_framework/_skills.py index c7d59d789e..fc71329a5f 100644 --- a/python/packages/core/agent_framework/_skills.py +++ b/python/packages/core/agent_framework/_skills.py @@ -112,9 +112,7 @@ class SkillResource: self._accepts_kwargs: bool = False if function is not None: sig = inspect.signature(function) - self._accepts_kwargs = any( - p.kind == inspect.Parameter.VAR_KEYWORD for p in sig.parameters.values() - ) + self._accepts_kwargs = any(p.kind == inspect.Parameter.VAR_KEYWORD for p in sig.parameters.values()) class Skill: diff --git a/python/packages/core/agent_framework/azure/_responses_client.py b/python/packages/core/agent_framework/azure/_responses_client.py index a420108ce0..192576bd04 100644 --- a/python/packages/core/agent_framework/azure/_responses_client.py +++ b/python/packages/core/agent_framework/azure/_responses_client.py @@ -73,6 +73,7 @@ class AzureOpenAIResponsesClient( # type: ignore[misc] async_client: AsyncOpenAI | None = None, project_client: Any | None = None, project_endpoint: str | None = None, + allow_preview: bool | None = None, env_file_path: str | None = None, env_file_encoding: str | None = None, instruction_role: str | None = None, @@ -120,6 +121,7 @@ class AzureOpenAIResponsesClient( # type: ignore[misc] project_endpoint: The Azure AI Foundry project endpoint URL. When provided with ``credential``, an ``AIProjectClient`` will be created and used to obtain the OpenAI client. Requires the ``azure-ai-projects`` package. + allow_preview: Enables preview opt-in on internally-created ``AIProjectClient``. env_file_path: Use the environment settings file as a fallback to using env vars. env_file_encoding: The encoding of the environment settings file, defaults to 'utf-8'. instruction_role: The role to use for 'instruction' messages, for example, summarization @@ -189,6 +191,7 @@ class AzureOpenAIResponsesClient( # type: ignore[misc] project_client=project_client, project_endpoint=project_endpoint, credential=credential, + allow_preview=allow_preview, ) azure_openai_settings = load_settings( @@ -246,21 +249,9 @@ class AzureOpenAIResponsesClient( # type: ignore[misc] project_client: AIProjectClient | None, project_endpoint: str | None, credential: AzureCredentialTypes | AzureTokenProvider | None, + allow_preview: bool | None = None, ) -> AsyncOpenAI: - """Create an AsyncOpenAI client from an Azure AI Foundry project. - - Args: - project_client: An existing AIProjectClient to use. - project_endpoint: The Azure AI Foundry project endpoint URL. - credential: Azure credential for authentication. - - Returns: - An AsyncAzureOpenAI client obtained from the project client. - - Raises: - ValueError: If required parameters are missing or - the azure-ai-projects package is not installed. - """ + """Create an AsyncOpenAI client from an Azure AI Foundry project.""" if project_client is not None: return project_client.get_openai_client() @@ -268,11 +259,14 @@ class AzureOpenAIResponsesClient( # type: ignore[misc] raise ValueError("Azure AI project endpoint is required when project_client is not provided.") if not credential: raise ValueError("Azure credential is required when using project_endpoint without a project_client.") - project_client = AIProjectClient( - endpoint=project_endpoint, - credential=credential, # type: ignore[arg-type] - user_agent=AGENT_FRAMEWORK_USER_AGENT, - ) + project_client_kwargs: dict[str, Any] = { + "endpoint": project_endpoint, + "credential": credential, # type: ignore[arg-type] + "user_agent": AGENT_FRAMEWORK_USER_AGENT, + } + if allow_preview is not None: + project_client_kwargs["allow_preview"] = allow_preview + project_client = AIProjectClient(**project_client_kwargs) return project_client.get_openai_client() @override diff --git a/python/packages/core/pyproject.toml b/python/packages/core/pyproject.toml index a789986898..b51fb6321d 100644 --- a/python/packages/core/pyproject.toml +++ b/python/packages/core/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ # connectors and functions "openai>=1.99.0", "azure-identity>=1,<2", - "azure-ai-projects == 2.0.0b4", + "azure-ai-projects>=2.0.0,<3.0", "mcp[ws]>=1.24.0,<2", "packaging>=24.1", ] diff --git a/python/packages/core/tests/workflow/test_function_executor.py b/python/packages/core/tests/workflow/test_function_executor.py index 8bb3f94d29..2ac083d943 100644 --- a/python/packages/core/tests/workflow/test_function_executor.py +++ b/python/packages/core/tests/workflow/test_function_executor.py @@ -544,19 +544,19 @@ class TestFunctionExecutor: static_wrapped = staticmethod(my_async_func) # Direct check on descriptor object fails (this is the bug) - assert not asyncio.iscoroutinefunction(static_wrapped) + assert not asyncio.iscoroutinefunction(static_wrapped) # type: ignore[reportDeprecated] assert isinstance(static_wrapped, staticmethod) # But unwrapping __func__ reveals the async function unwrapped = static_wrapped.__func__ - assert asyncio.iscoroutinefunction(unwrapped) + assert asyncio.iscoroutinefunction(unwrapped) # type: ignore[reportDeprecated] # When accessed via class attribute, Python's descriptor protocol # automatically unwraps it, so it works: class C: async_static = static_wrapped - assert asyncio.iscoroutinefunction(C.async_static) # Works via descriptor protocol + assert asyncio.iscoroutinefunction(C.async_static) # type: ignore[reportDeprecated] # Works via descriptor protocol class TestExecutorExplicitTypes: diff --git a/python/packages/declarative/agent_framework_declarative/_workflows/_executors_tools.py b/python/packages/declarative/agent_framework_declarative/_workflows/_executors_tools.py index 85aa4f6a5a..34396a85c2 100644 --- a/python/packages/declarative/agent_framework_declarative/_workflows/_executors_tools.py +++ b/python/packages/declarative/agent_framework_declarative/_workflows/_executors_tools.py @@ -15,11 +15,10 @@ import json import logging import uuid from abc import abstractmethod -from collections.abc import Mapping +from collections.abc import Callable, Mapping from dataclasses import dataclass, field from inspect import isawaitable from typing import Any, cast -from collections.abc import Callable from agent_framework import ( Content, diff --git a/python/packages/devui/agent_framework_devui/models/_discovery_models.py b/python/packages/devui/agent_framework_devui/models/_discovery_models.py index 47e6d1bdcc..1e1f19e04d 100644 --- a/python/packages/devui/agent_framework_devui/models/_discovery_models.py +++ b/python/packages/devui/agent_framework_devui/models/_discovery_models.py @@ -5,8 +5,8 @@ from __future__ import annotations import re -from typing import Any, cast from collections.abc import Callable +from typing import Any, cast from pydantic import BaseModel, Field, field_validator diff --git a/python/samples/02-agents/providers/azure_ai/README.md b/python/samples/02-agents/providers/azure_ai/README.md index d49147989f..3a73350f24 100644 --- a/python/samples/02-agents/providers/azure_ai/README.md +++ b/python/samples/02-agents/providers/azure_ai/README.md @@ -1,6 +1,6 @@ # Azure AI Agent Examples -This folder contains examples demonstrating different ways to create and use agents with the Azure AI client from the `agent_framework.azure` package. These examples use the `AzureAIClient` with the `azure-ai-projects` 2.x (V2) API surface (see [changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-projects/CHANGELOG.md#200b1-2025-11-11)). For V1 (`azure-ai-agents` 1.x) samples using `AzureAIAgentClient`, see the [Azure AI V1 examples folder](../azure_ai_agent/). +This folder contains examples demonstrating different ways to create and use agents with the Azure AI client from the `agent_framework.azure` package. These examples use the `AzureAIClient` with the `azure-ai-projects` 2.x (V2) API surface (see [changelog](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-projects/CHANGELOG.md#200b1-2025-11-11)). For V1 (`azure-ai-agents` 1.x) samples using `AzureAIAgentClient`, see the [Azure AI V1 examples folder](../azure_ai_agent/). When using preview-only agent creation features on GA SDK versions, create `AIProjectClient` with `allow_preview=True`. ## Examples diff --git a/python/uv.lock b/python/uv.lock index 81a0a89291..e82f8e7a3c 100644 --- a/python/uv.lock +++ b/python/uv.lock @@ -391,14 +391,14 @@ requires-dist = [ { name = "agent-framework-devui", marker = "extra == 'all'", editable = "packages/devui" }, { name = "agent-framework-durabletask", marker = "extra == 'all'", editable = "packages/durabletask" }, { name = "agent-framework-foundry-local", marker = "extra == 'all'", editable = "packages/foundry_local" }, - { name = "agent-framework-github-copilot", marker = "extra == 'all'", editable = "packages/github_copilot" }, + { name = "agent-framework-github-copilot", marker = "python_full_version >= '3.11' and extra == 'all'", editable = "packages/github_copilot" }, { name = "agent-framework-lab", marker = "extra == 'all'", editable = "packages/lab" }, { name = "agent-framework-mem0", marker = "extra == 'all'", editable = "packages/mem0" }, { name = "agent-framework-ollama", marker = "extra == 'all'", editable = "packages/ollama" }, { name = "agent-framework-orchestrations", marker = "extra == 'all'", editable = "packages/orchestrations" }, { name = "agent-framework-purview", marker = "extra == 'all'", editable = "packages/purview" }, { name = "agent-framework-redis", marker = "extra == 'all'", editable = "packages/redis" }, - { name = "azure-ai-projects", specifier = "==2.0.0b4" }, + { name = "azure-ai-projects", specifier = ">=2.0.0,<3.0" }, { name = "azure-identity", specifier = ">=1,<2" }, { name = "mcp", extras = ["ws"], specifier = ">=1.24.0,<2" }, { name = "openai", specifier = ">=1.99.0" }, @@ -989,7 +989,7 @@ wheels = [ [[package]] name = "azure-ai-projects" -version = "2.0.0b4" +version = "2.0.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "azure-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -999,9 +999,9 @@ dependencies = [ { name = "openai", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/24/e9/1cb8e95a19fbf174cfd7b30368a011b3e17503928b7801b8d9129b7cc59b/azure_ai_projects-2.0.0b4.tar.gz", hash = "sha256:b6082eacf0a11db59ad4c48cb7962f5204b9a0391000bc22421236f229ff783a", size = 477764, upload-time = "2026-02-24T17:57:52.489Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/3d/6a7d04f61f3befc74a6f09ad7a0c02e8c701fc6db91ad7151c46da44a902/azure_ai_projects-2.0.0.tar.gz", hash = "sha256:0892f075cf287d747be54c25bea93dc9406ad100d44efc2fdaadb26586ecf4ff", size = 491449, upload-time = "2026-03-06T05:59:51.645Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/27/6e/6445d510a8cb6a54f57e4344c14d825c37c5146fa69ccf9d9d15a29d23e2/azure_ai_projects-2.0.0b4-py3-none-any.whl", hash = "sha256:f4cf1615bd815744ddce304b97eea9456b7f6f0bd8725547c4e54e3a67534635", size = 231920, upload-time = "2026-02-24T17:57:53.917Z" }, + { url = "https://files.pythonhosted.org/packages/20/af/7b218cccab8e22af44844bfc16275b55c1fa48ed494145614b9852950fe6/azure_ai_projects-2.0.0-py3-none-any.whl", hash = "sha256:e655e0e495d0c76077d95cc8e0d606fcdbf3f4dbdf1a8379cbd4bea1e34c401d", size = 236354, upload-time = "2026-03-06T05:59:53.536Z" }, ] [[package]] @@ -1242,91 +1242,91 @@ wheels = [ [[package]] name = "charset-normalizer" -version = "3.4.4" +version = "3.4.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" } +sdist = { url = "https://files.pythonhosted.org/packages/1d/35/02daf95b9cd686320bb622eb148792655c9412dbb9b67abb5694e5910a24/charset_normalizer-3.4.5.tar.gz", hash = "sha256:95adae7b6c42a6c5b5b559b1a99149f090a57128155daeea91732c8d970d8644", size = 134804, upload-time = "2026-03-06T06:03:19.46Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ed/27/c6491ff4954e58a10f69ad90aca8a1b6fe9c5d3c6f380907af3c37435b59/charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", size = 206988, upload-time = "2025-10-14T04:40:33.79Z" }, - { url = "https://files.pythonhosted.org/packages/94/59/2e87300fe67ab820b5428580a53cad894272dbb97f38a7a814a2a1ac1011/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", size = 147324, upload-time = "2025-10-14T04:40:34.961Z" }, - { url = "https://files.pythonhosted.org/packages/07/fb/0cf61dc84b2b088391830f6274cb57c82e4da8bbc2efeac8c025edb88772/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", size = 142742, upload-time = "2025-10-14T04:40:36.105Z" }, - { url = "https://files.pythonhosted.org/packages/62/8b/171935adf2312cd745d290ed93cf16cf0dfe320863ab7cbeeae1dcd6535f/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc", size = 160863, upload-time = "2025-10-14T04:40:37.188Z" }, - { url = "https://files.pythonhosted.org/packages/09/73/ad875b192bda14f2173bfc1bc9a55e009808484a4b256748d931b6948442/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897", size = 157837, upload-time = "2025-10-14T04:40:38.435Z" }, - { url = "https://files.pythonhosted.org/packages/6d/fc/de9cce525b2c5b94b47c70a4b4fb19f871b24995c728e957ee68ab1671ea/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381", size = 151550, upload-time = "2025-10-14T04:40:40.053Z" }, - { url = "https://files.pythonhosted.org/packages/55/c2/43edd615fdfba8c6f2dfbd459b25a6b3b551f24ea21981e23fb768503ce1/charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815", size = 149162, upload-time = "2025-10-14T04:40:41.163Z" }, - { url = "https://files.pythonhosted.org/packages/03/86/bde4ad8b4d0e9429a4e82c1e8f5c659993a9a863ad62c7df05cf7b678d75/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0", size = 150019, upload-time = "2025-10-14T04:40:42.276Z" }, - { url = "https://files.pythonhosted.org/packages/1f/86/a151eb2af293a7e7bac3a739b81072585ce36ccfb4493039f49f1d3cae8c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161", size = 143310, upload-time = "2025-10-14T04:40:43.439Z" }, - { url = "https://files.pythonhosted.org/packages/b5/fe/43dae6144a7e07b87478fdfc4dbe9efd5defb0e7ec29f5f58a55aeef7bf7/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4", size = 162022, upload-time = "2025-10-14T04:40:44.547Z" }, - { url = "https://files.pythonhosted.org/packages/80/e6/7aab83774f5d2bca81f42ac58d04caf44f0cc2b65fc6db2b3b2e8a05f3b3/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89", size = 149383, upload-time = "2025-10-14T04:40:46.018Z" }, - { url = "https://files.pythonhosted.org/packages/4f/e8/b289173b4edae05c0dde07f69f8db476a0b511eac556dfe0d6bda3c43384/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569", size = 159098, upload-time = "2025-10-14T04:40:47.081Z" }, - { url = "https://files.pythonhosted.org/packages/d8/df/fe699727754cae3f8478493c7f45f777b17c3ef0600e28abfec8619eb49c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224", size = 152991, upload-time = "2025-10-14T04:40:48.246Z" }, - { url = "https://files.pythonhosted.org/packages/1a/86/584869fe4ddb6ffa3bd9f491b87a01568797fb9bd8933f557dba9771beaf/charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a", size = 99456, upload-time = "2025-10-14T04:40:49.376Z" }, - { url = "https://files.pythonhosted.org/packages/65/f6/62fdd5feb60530f50f7e38b4f6a1d5203f4d16ff4f9f0952962c044e919a/charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016", size = 106978, upload-time = "2025-10-14T04:40:50.844Z" }, - { url = "https://files.pythonhosted.org/packages/7a/9d/0710916e6c82948b3be62d9d398cb4fcf4e97b56d6a6aeccd66c4b2f2bd5/charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1", size = 99969, upload-time = "2025-10-14T04:40:52.272Z" }, - { url = "https://files.pythonhosted.org/packages/f3/85/1637cd4af66fa687396e757dec650f28025f2a2f5a5531a3208dc0ec43f2/charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", size = 208425, upload-time = "2025-10-14T04:40:53.353Z" }, - { url = "https://files.pythonhosted.org/packages/9d/6a/04130023fef2a0d9c62d0bae2649b69f7b7d8d24ea5536feef50551029df/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", size = 148162, upload-time = "2025-10-14T04:40:54.558Z" }, - { url = "https://files.pythonhosted.org/packages/78/29/62328d79aa60da22c9e0b9a66539feae06ca0f5a4171ac4f7dc285b83688/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", size = 144558, upload-time = "2025-10-14T04:40:55.677Z" }, - { url = "https://files.pythonhosted.org/packages/86/bb/b32194a4bf15b88403537c2e120b817c61cd4ecffa9b6876e941c3ee38fe/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", size = 161497, upload-time = "2025-10-14T04:40:57.217Z" }, - { url = "https://files.pythonhosted.org/packages/19/89/a54c82b253d5b9b111dc74aca196ba5ccfcca8242d0fb64146d4d3183ff1/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", size = 159240, upload-time = "2025-10-14T04:40:58.358Z" }, - { url = "https://files.pythonhosted.org/packages/c0/10/d20b513afe03acc89ec33948320a5544d31f21b05368436d580dec4e234d/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", size = 153471, upload-time = "2025-10-14T04:40:59.468Z" }, - { url = "https://files.pythonhosted.org/packages/61/fa/fbf177b55bdd727010f9c0a3c49eefa1d10f960e5f09d1d887bf93c2e698/charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", size = 150864, upload-time = "2025-10-14T04:41:00.623Z" }, - { url = "https://files.pythonhosted.org/packages/05/12/9fbc6a4d39c0198adeebbde20b619790e9236557ca59fc40e0e3cebe6f40/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", size = 150647, upload-time = "2025-10-14T04:41:01.754Z" }, - { url = "https://files.pythonhosted.org/packages/ad/1f/6a9a593d52e3e8c5d2b167daf8c6b968808efb57ef4c210acb907c365bc4/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", size = 145110, upload-time = "2025-10-14T04:41:03.231Z" }, - { url = "https://files.pythonhosted.org/packages/30/42/9a52c609e72471b0fc54386dc63c3781a387bb4fe61c20231a4ebcd58bdd/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", size = 162839, upload-time = "2025-10-14T04:41:04.715Z" }, - { url = "https://files.pythonhosted.org/packages/c4/5b/c0682bbf9f11597073052628ddd38344a3d673fda35a36773f7d19344b23/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", size = 150667, upload-time = "2025-10-14T04:41:05.827Z" }, - { url = "https://files.pythonhosted.org/packages/e4/24/a41afeab6f990cf2daf6cb8c67419b63b48cf518e4f56022230840c9bfb2/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", size = 160535, upload-time = "2025-10-14T04:41:06.938Z" }, - { url = "https://files.pythonhosted.org/packages/2a/e5/6a4ce77ed243c4a50a1fecca6aaaab419628c818a49434be428fe24c9957/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", size = 154816, upload-time = "2025-10-14T04:41:08.101Z" }, - { url = "https://files.pythonhosted.org/packages/a8/ef/89297262b8092b312d29cdb2517cb1237e51db8ecef2e9af5edbe7b683b1/charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", size = 99694, upload-time = "2025-10-14T04:41:09.23Z" }, - { url = "https://files.pythonhosted.org/packages/3d/2d/1e5ed9dd3b3803994c155cd9aacb60c82c331bad84daf75bcb9c91b3295e/charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", size = 107131, upload-time = "2025-10-14T04:41:10.467Z" }, - { url = "https://files.pythonhosted.org/packages/d0/d9/0ed4c7098a861482a7b6a95603edce4c0d9db2311af23da1fb2b75ec26fc/charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", size = 100390, upload-time = "2025-10-14T04:41:11.915Z" }, - { url = "https://files.pythonhosted.org/packages/97/45/4b3a1239bbacd321068ea6e7ac28875b03ab8bc0aa0966452db17cd36714/charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", size = 208091, upload-time = "2025-10-14T04:41:13.346Z" }, - { url = "https://files.pythonhosted.org/packages/7d/62/73a6d7450829655a35bb88a88fca7d736f9882a27eacdca2c6d505b57e2e/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", size = 147936, upload-time = "2025-10-14T04:41:14.461Z" }, - { url = "https://files.pythonhosted.org/packages/89/c5/adb8c8b3d6625bef6d88b251bbb0d95f8205831b987631ab0c8bb5d937c2/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", size = 144180, upload-time = "2025-10-14T04:41:15.588Z" }, - { url = "https://files.pythonhosted.org/packages/91/ed/9706e4070682d1cc219050b6048bfd293ccf67b3d4f5a4f39207453d4b99/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", size = 161346, upload-time = "2025-10-14T04:41:16.738Z" }, - { url = "https://files.pythonhosted.org/packages/d5/0d/031f0d95e4972901a2f6f09ef055751805ff541511dc1252ba3ca1f80cf5/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", size = 158874, upload-time = "2025-10-14T04:41:17.923Z" }, - { url = "https://files.pythonhosted.org/packages/f5/83/6ab5883f57c9c801ce5e5677242328aa45592be8a00644310a008d04f922/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", size = 153076, upload-time = "2025-10-14T04:41:19.106Z" }, - { url = "https://files.pythonhosted.org/packages/75/1e/5ff781ddf5260e387d6419959ee89ef13878229732732ee73cdae01800f2/charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", size = 150601, upload-time = "2025-10-14T04:41:20.245Z" }, - { url = "https://files.pythonhosted.org/packages/d7/57/71be810965493d3510a6ca79b90c19e48696fb1ff964da319334b12677f0/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", size = 150376, upload-time = "2025-10-14T04:41:21.398Z" }, - { url = "https://files.pythonhosted.org/packages/e5/d5/c3d057a78c181d007014feb7e9f2e65905a6c4ef182c0ddf0de2924edd65/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", size = 144825, upload-time = "2025-10-14T04:41:22.583Z" }, - { url = "https://files.pythonhosted.org/packages/e6/8c/d0406294828d4976f275ffbe66f00266c4b3136b7506941d87c00cab5272/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", size = 162583, upload-time = "2025-10-14T04:41:23.754Z" }, - { url = "https://files.pythonhosted.org/packages/d7/24/e2aa1f18c8f15c4c0e932d9287b8609dd30ad56dbe41d926bd846e22fb8d/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", size = 150366, upload-time = "2025-10-14T04:41:25.27Z" }, - { url = "https://files.pythonhosted.org/packages/e4/5b/1e6160c7739aad1e2df054300cc618b06bf784a7a164b0f238360721ab86/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", size = 160300, upload-time = "2025-10-14T04:41:26.725Z" }, - { url = "https://files.pythonhosted.org/packages/7a/10/f882167cd207fbdd743e55534d5d9620e095089d176d55cb22d5322f2afd/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", size = 154465, upload-time = "2025-10-14T04:41:28.322Z" }, - { url = "https://files.pythonhosted.org/packages/89/66/c7a9e1b7429be72123441bfdbaf2bc13faab3f90b933f664db506dea5915/charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", size = 99404, upload-time = "2025-10-14T04:41:29.95Z" }, - { url = "https://files.pythonhosted.org/packages/c4/26/b9924fa27db384bdcd97ab83b4f0a8058d96ad9626ead570674d5e737d90/charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", size = 107092, upload-time = "2025-10-14T04:41:31.188Z" }, - { url = "https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", size = 100408, upload-time = "2025-10-14T04:41:32.624Z" }, - { url = "https://files.pythonhosted.org/packages/2a/35/7051599bd493e62411d6ede36fd5af83a38f37c4767b92884df7301db25d/charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", size = 207746, upload-time = "2025-10-14T04:41:33.773Z" }, - { url = "https://files.pythonhosted.org/packages/10/9a/97c8d48ef10d6cd4fcead2415523221624bf58bcf68a802721a6bc807c8f/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", size = 147889, upload-time = "2025-10-14T04:41:34.897Z" }, - { url = "https://files.pythonhosted.org/packages/10/bf/979224a919a1b606c82bd2c5fa49b5c6d5727aa47b4312bb27b1734f53cd/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", size = 143641, upload-time = "2025-10-14T04:41:36.116Z" }, - { url = "https://files.pythonhosted.org/packages/ba/33/0ad65587441fc730dc7bd90e9716b30b4702dc7b617e6ba4997dc8651495/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", size = 160779, upload-time = "2025-10-14T04:41:37.229Z" }, - { url = "https://files.pythonhosted.org/packages/67/ed/331d6b249259ee71ddea93f6f2f0a56cfebd46938bde6fcc6f7b9a3d0e09/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", size = 159035, upload-time = "2025-10-14T04:41:38.368Z" }, - { url = "https://files.pythonhosted.org/packages/67/ff/f6b948ca32e4f2a4576aa129d8bed61f2e0543bf9f5f2b7fc3758ed005c9/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", size = 152542, upload-time = "2025-10-14T04:41:39.862Z" }, - { url = "https://files.pythonhosted.org/packages/16/85/276033dcbcc369eb176594de22728541a925b2632f9716428c851b149e83/charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", size = 149524, upload-time = "2025-10-14T04:41:41.319Z" }, - { url = "https://files.pythonhosted.org/packages/9e/f2/6a2a1f722b6aba37050e626530a46a68f74e63683947a8acff92569f979a/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", size = 150395, upload-time = "2025-10-14T04:41:42.539Z" }, - { url = "https://files.pythonhosted.org/packages/60/bb/2186cb2f2bbaea6338cad15ce23a67f9b0672929744381e28b0592676824/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", size = 143680, upload-time = "2025-10-14T04:41:43.661Z" }, - { url = "https://files.pythonhosted.org/packages/7d/a5/bf6f13b772fbb2a90360eb620d52ed8f796f3c5caee8398c3b2eb7b1c60d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", size = 162045, upload-time = "2025-10-14T04:41:44.821Z" }, - { url = "https://files.pythonhosted.org/packages/df/c5/d1be898bf0dc3ef9030c3825e5d3b83f2c528d207d246cbabe245966808d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", size = 149687, upload-time = "2025-10-14T04:41:46.442Z" }, - { url = "https://files.pythonhosted.org/packages/a5/42/90c1f7b9341eef50c8a1cb3f098ac43b0508413f33affd762855f67a410e/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", size = 160014, upload-time = "2025-10-14T04:41:47.631Z" }, - { url = "https://files.pythonhosted.org/packages/76/be/4d3ee471e8145d12795ab655ece37baed0929462a86e72372fd25859047c/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", size = 154044, upload-time = "2025-10-14T04:41:48.81Z" }, - { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" }, - { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" }, - { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" }, - { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" }, + { url = "https://files.pythonhosted.org/packages/8f/9e/bcec3b22c64ecec47d39bf5167c2613efd41898c019dccd4183f6aa5d6a7/charset_normalizer-3.4.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:610f72c0ee565dfb8ae1241b666119582fdbfe7c0975c175be719f940e110694", size = 279531, upload-time = "2026-03-06T06:00:52.252Z" }, + { url = "https://files.pythonhosted.org/packages/58/12/81fd25f7e7078ab5d1eedbb0fac44be4904ae3370a3bf4533c8f2d159acd/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:60d68e820af339df4ae8358c7a2e7596badeb61e544438e489035f9fbf3246a5", size = 188006, upload-time = "2026-03-06T06:00:53.8Z" }, + { url = "https://files.pythonhosted.org/packages/ae/6e/f2d30e8c27c1b0736a6520311982cf5286cfc7f6cac77d7bc1325e3a23f2/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:10b473fc8dca1c3ad8559985794815f06ca3fc71942c969129070f2c3cdf7281", size = 205085, upload-time = "2026-03-06T06:00:55.311Z" }, + { url = "https://files.pythonhosted.org/packages/d0/90/d12cefcb53b5931e2cf792a33718d7126efb116a320eaa0742c7059a95e4/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d4eb8ac7469b2a5d64b5b8c04f84d8bf3ad340f4514b98523805cbf46e3b3923", size = 200545, upload-time = "2026-03-06T06:00:56.532Z" }, + { url = "https://files.pythonhosted.org/packages/03/f4/44d3b830a20e89ff82a3134912d9a1cf6084d64f3b95dcad40f74449a654/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bcb3227c3d9aaf73eaaab1db7ccd80a8995c509ee9941e2aae060ca6e4e5d81", size = 193863, upload-time = "2026-03-06T06:00:57.823Z" }, + { url = "https://files.pythonhosted.org/packages/25/4b/f212119c18a6320a9d4a730d1b4057875cdeabf21b3614f76549042ef8a8/charset_normalizer-3.4.5-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:75ee9c1cce2911581a70a3c0919d8bccf5b1cbc9b0e5171400ec736b4b569497", size = 181827, upload-time = "2026-03-06T06:00:59.323Z" }, + { url = "https://files.pythonhosted.org/packages/74/00/b26158e48b425a202a92965f8069e8a63d9af1481dfa206825d7f74d2a3c/charset_normalizer-3.4.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1d1401945cb77787dbd3af2446ff2d75912327c4c3a1526ab7955ecf8600687c", size = 191085, upload-time = "2026-03-06T06:01:00.546Z" }, + { url = "https://files.pythonhosted.org/packages/c4/c2/1c1737bf6fd40335fe53d28fe49afd99ee4143cc57a845e99635ce0b9b6d/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a45e504f5e1be0bd385935a8e1507c442349ca36f511a47057a71c9d1d6ea9e", size = 190688, upload-time = "2026-03-06T06:01:02.479Z" }, + { url = "https://files.pythonhosted.org/packages/5a/3d/abb5c22dc2ef493cd56522f811246a63c5427c08f3e3e50ab663de27fcf4/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:e09f671a54ce70b79a1fc1dc6da3072b7ef7251fadb894ed92d9aa8218465a5f", size = 183077, upload-time = "2026-03-06T06:01:04.231Z" }, + { url = "https://files.pythonhosted.org/packages/44/33/5298ad4d419a58e25b3508e87f2758d1442ff00c2471f8e0403dab8edad5/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d01de5e768328646e6a3fa9e562706f8f6641708c115c62588aef2b941a4f88e", size = 206706, upload-time = "2026-03-06T06:01:05.773Z" }, + { url = "https://files.pythonhosted.org/packages/7b/17/51e7895ac0f87c3b91d276a449ef09f5532a7529818f59646d7a55089432/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:131716d6786ad5e3dc542f5cc6f397ba3339dc0fb87f87ac30e550e8987756af", size = 191665, upload-time = "2026-03-06T06:01:07.473Z" }, + { url = "https://files.pythonhosted.org/packages/90/8f/cce9adf1883e98906dbae380d769b4852bb0fa0004bc7d7a2243418d3ea8/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a374cc0b88aa710e8865dc1bd6edb3743c59f27830f0293ab101e4cf3ce9f85", size = 201950, upload-time = "2026-03-06T06:01:08.973Z" }, + { url = "https://files.pythonhosted.org/packages/08/ca/bce99cd5c397a52919e2769d126723f27a4c037130374c051c00470bcd38/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d31f0d1671e1534e395f9eb84a68e0fb670e1edb1fe819a9d7f564ae3bc4e53f", size = 195830, upload-time = "2026-03-06T06:01:10.155Z" }, + { url = "https://files.pythonhosted.org/packages/87/4f/2e3d023a06911f1281f97b8f036edc9872167036ca6f55cc874a0be6c12c/charset_normalizer-3.4.5-cp311-cp311-win32.whl", hash = "sha256:cace89841c0599d736d3d74a27bc5821288bb47c5441923277afc6059d7fbcb4", size = 132029, upload-time = "2026-03-06T06:01:11.706Z" }, + { url = "https://files.pythonhosted.org/packages/fe/1f/a853b73d386521fd44b7f67ded6b17b7b2367067d9106a5c4b44f9a34274/charset_normalizer-3.4.5-cp311-cp311-win_amd64.whl", hash = "sha256:f8102ae93c0bc863b1d41ea0f4499c20a83229f52ed870850892df555187154a", size = 142404, upload-time = "2026-03-06T06:01:12.865Z" }, + { url = "https://files.pythonhosted.org/packages/b4/10/dba36f76b71c38e9d391abe0fd8a5b818790e053c431adecfc98c35cd2a9/charset_normalizer-3.4.5-cp311-cp311-win_arm64.whl", hash = "sha256:ed98364e1c262cf5f9363c3eca8c2df37024f52a8fa1180a3610014f26eac51c", size = 132796, upload-time = "2026-03-06T06:01:14.106Z" }, + { url = "https://files.pythonhosted.org/packages/9c/b6/9ee9c1a608916ca5feae81a344dffbaa53b26b90be58cc2159e3332d44ec/charset_normalizer-3.4.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed97c282ee4f994ef814042423a529df9497e3c666dca19be1d4cd1129dc7ade", size = 280976, upload-time = "2026-03-06T06:01:15.276Z" }, + { url = "https://files.pythonhosted.org/packages/f8/d8/a54f7c0b96f1df3563e9190f04daf981e365a9b397eedfdfb5dbef7e5c6c/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0294916d6ccf2d069727d65973c3a1ca477d68708db25fd758dd28b0827cff54", size = 189356, upload-time = "2026-03-06T06:01:16.511Z" }, + { url = "https://files.pythonhosted.org/packages/42/69/2bf7f76ce1446759a5787cb87d38f6a61eb47dbbdf035cfebf6347292a65/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dc57a0baa3eeedd99fafaef7511b5a6ef4581494e8168ee086031744e2679467", size = 206369, upload-time = "2026-03-06T06:01:17.853Z" }, + { url = "https://files.pythonhosted.org/packages/10/9c/949d1a46dab56b959d9a87272482195f1840b515a3380e39986989a893ae/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ed1a9a204f317ef879b32f9af507d47e49cd5e7f8e8d5d96358c98373314fc60", size = 203285, upload-time = "2026-03-06T06:01:19.473Z" }, + { url = "https://files.pythonhosted.org/packages/67/5c/ae30362a88b4da237d71ea214a8c7eb915db3eec941adda511729ac25fa2/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7ad83b8f9379176c841f8865884f3514d905bcd2a9a3b210eaa446e7d2223e4d", size = 196274, upload-time = "2026-03-06T06:01:20.728Z" }, + { url = "https://files.pythonhosted.org/packages/b2/07/c9f2cb0e46cb6d64fdcc4f95953747b843bb2181bda678dc4e699b8f0f9a/charset_normalizer-3.4.5-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:a118e2e0b5ae6b0120d5efa5f866e58f2bb826067a646431da4d6a2bdae7950e", size = 184715, upload-time = "2026-03-06T06:01:22.194Z" }, + { url = "https://files.pythonhosted.org/packages/36/64/6b0ca95c44fddf692cd06d642b28f63009d0ce325fad6e9b2b4d0ef86a52/charset_normalizer-3.4.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:754f96058e61a5e22e91483f823e07df16416ce76afa4ebf306f8e1d1296d43f", size = 193426, upload-time = "2026-03-06T06:01:23.795Z" }, + { url = "https://files.pythonhosted.org/packages/50/bc/a730690d726403743795ca3f5bb2baf67838c5fea78236098f324b965e40/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0c300cefd9b0970381a46394902cd18eaf2aa00163f999590ace991989dcd0fc", size = 191780, upload-time = "2026-03-06T06:01:25.053Z" }, + { url = "https://files.pythonhosted.org/packages/97/4f/6c0bc9af68222b22951552d73df4532b5be6447cee32d58e7e8c74ecbb7b/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c108f8619e504140569ee7de3f97d234f0fbae338a7f9f360455071ef9855a95", size = 185805, upload-time = "2026-03-06T06:01:26.294Z" }, + { url = "https://files.pythonhosted.org/packages/dd/b9/a523fb9b0ee90814b503452b2600e4cbc118cd68714d57041564886e7325/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d1028de43596a315e2720a9849ee79007ab742c06ad8b45a50db8cdb7ed4a82a", size = 208342, upload-time = "2026-03-06T06:01:27.55Z" }, + { url = "https://files.pythonhosted.org/packages/4d/61/c59e761dee4464050713e50e27b58266cc8e209e518c0b378c1580c959ba/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:19092dde50335accf365cce21998a1c6dd8eafd42c7b226eb54b2747cdce2fac", size = 193661, upload-time = "2026-03-06T06:01:29.051Z" }, + { url = "https://files.pythonhosted.org/packages/1c/43/729fa30aad69783f755c5ad8649da17ee095311ca42024742701e202dc59/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4354e401eb6dab9aed3c7b4030514328a6c748d05e1c3e19175008ca7de84fb1", size = 204819, upload-time = "2026-03-06T06:01:30.298Z" }, + { url = "https://files.pythonhosted.org/packages/87/33/d9b442ce5a91b96fc0840455a9e49a611bbadae6122778d0a6a79683dd31/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a68766a3c58fde7f9aaa22b3786276f62ab2f594efb02d0a1421b6282e852e98", size = 198080, upload-time = "2026-03-06T06:01:31.478Z" }, + { url = "https://files.pythonhosted.org/packages/56/5a/b8b5a23134978ee9885cee2d6995f4c27cc41f9baded0a9685eabc5338f0/charset_normalizer-3.4.5-cp312-cp312-win32.whl", hash = "sha256:1827734a5b308b65ac54e86a618de66f935a4f63a8a462ff1e19a6788d6c2262", size = 132630, upload-time = "2026-03-06T06:01:33.056Z" }, + { url = "https://files.pythonhosted.org/packages/70/53/e44a4c07e8904500aec95865dc3f6464dc3586a039ef0df606eb3ac38e35/charset_normalizer-3.4.5-cp312-cp312-win_amd64.whl", hash = "sha256:728c6a963dfab66ef865f49286e45239384249672cd598576765acc2a640a636", size = 142856, upload-time = "2026-03-06T06:01:34.489Z" }, + { url = "https://files.pythonhosted.org/packages/ea/aa/c5628f7cad591b1cf45790b7a61483c3e36cf41349c98af7813c483fd6e8/charset_normalizer-3.4.5-cp312-cp312-win_arm64.whl", hash = "sha256:75dfd1afe0b1647449e852f4fb428195a7ed0588947218f7ba929f6538487f02", size = 132982, upload-time = "2026-03-06T06:01:35.641Z" }, + { url = "https://files.pythonhosted.org/packages/f5/48/9f34ec4bb24aa3fdba1890c1bddb97c8a4be1bd84ef5c42ac2352563ad05/charset_normalizer-3.4.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ac59c15e3f1465f722607800c68713f9fbc2f672b9eb649fe831da4019ae9b23", size = 280788, upload-time = "2026-03-06T06:01:37.126Z" }, + { url = "https://files.pythonhosted.org/packages/0e/09/6003e7ffeb90cc0560da893e3208396a44c210c5ee42efff539639def59b/charset_normalizer-3.4.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:165c7b21d19365464e8f70e5ce5e12524c58b48c78c1f5a57524603c1ab003f8", size = 188890, upload-time = "2026-03-06T06:01:38.73Z" }, + { url = "https://files.pythonhosted.org/packages/42/1e/02706edf19e390680daa694d17e2b8eab4b5f7ac285e2a51168b4b22ee6b/charset_normalizer-3.4.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:28269983f25a4da0425743d0d257a2d6921ea7d9b83599d4039486ec5b9f911d", size = 206136, upload-time = "2026-03-06T06:01:40.016Z" }, + { url = "https://files.pythonhosted.org/packages/c7/87/942c3def1b37baf3cf786bad01249190f3ca3d5e63a84f831e704977de1f/charset_normalizer-3.4.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d27ce22ec453564770d29d03a9506d449efbb9fa13c00842262b2f6801c48cce", size = 202551, upload-time = "2026-03-06T06:01:41.522Z" }, + { url = "https://files.pythonhosted.org/packages/94/0a/af49691938dfe175d71b8a929bd7e4ace2809c0c5134e28bc535660d5262/charset_normalizer-3.4.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0625665e4ebdddb553ab185de5db7054393af8879fb0c87bd5690d14379d6819", size = 195572, upload-time = "2026-03-06T06:01:43.208Z" }, + { url = "https://files.pythonhosted.org/packages/20/ea/dfb1792a8050a8e694cfbde1570ff97ff74e48afd874152d38163d1df9ae/charset_normalizer-3.4.5-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:c23eb3263356d94858655b3e63f85ac5d50970c6e8febcdde7830209139cc37d", size = 184438, upload-time = "2026-03-06T06:01:44.755Z" }, + { url = "https://files.pythonhosted.org/packages/72/12/c281e2067466e3ddd0595bfaea58a6946765ace5c72dfa3edc2f5f118026/charset_normalizer-3.4.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e6302ca4ae283deb0af68d2fbf467474b8b6aedcd3dab4db187e07f94c109763", size = 193035, upload-time = "2026-03-06T06:01:46.051Z" }, + { url = "https://files.pythonhosted.org/packages/ba/4f/3792c056e7708e10464bad0438a44708886fb8f92e3c3d29ec5e2d964d42/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e51ae7d81c825761d941962450f50d041db028b7278e7b08930b4541b3e45cb9", size = 191340, upload-time = "2026-03-06T06:01:47.547Z" }, + { url = "https://files.pythonhosted.org/packages/e7/86/80ddba897127b5c7a9bccc481b0cd36c8fefa485d113262f0fe4332f0bf4/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:597d10dec876923e5c59e48dbd366e852eacb2b806029491d307daea6b917d7c", size = 185464, upload-time = "2026-03-06T06:01:48.764Z" }, + { url = "https://files.pythonhosted.org/packages/4d/00/b5eff85ba198faacab83e0e4b6f0648155f072278e3b392a82478f8b988b/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5cffde4032a197bd3b42fd0b9509ec60fb70918d6970e4cc773f20fc9180ca67", size = 208014, upload-time = "2026-03-06T06:01:50.371Z" }, + { url = "https://files.pythonhosted.org/packages/c8/11/d36f70be01597fd30850dde8a1269ebc8efadd23ba5785808454f2389bde/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:2da4eedcb6338e2321e831a0165759c0c620e37f8cd044a263ff67493be8ffb3", size = 193297, upload-time = "2026-03-06T06:01:51.933Z" }, + { url = "https://files.pythonhosted.org/packages/1a/1d/259eb0a53d4910536c7c2abb9cb25f4153548efb42800c6a9456764649c0/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:65a126fb4b070d05340a84fc709dd9e7c75d9b063b610ece8a60197a291d0adf", size = 204321, upload-time = "2026-03-06T06:01:53.887Z" }, + { url = "https://files.pythonhosted.org/packages/84/31/faa6c5b9d3688715e1ed1bb9d124c384fe2fc1633a409e503ffe1c6398c1/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c7a80a9242963416bd81f99349d5f3fce1843c303bd404f204918b6d75a75fd6", size = 197509, upload-time = "2026-03-06T06:01:56.439Z" }, + { url = "https://files.pythonhosted.org/packages/fd/a5/c7d9dd1503ffc08950b3260f5d39ec2366dd08254f0900ecbcf3a6197c7c/charset_normalizer-3.4.5-cp313-cp313-win32.whl", hash = "sha256:f1d725b754e967e648046f00c4facc42d414840f5ccc670c5670f59f83693e4f", size = 132284, upload-time = "2026-03-06T06:01:57.812Z" }, + { url = "https://files.pythonhosted.org/packages/b9/0f/57072b253af40c8aa6636e6de7d75985624c1eb392815b2f934199340a89/charset_normalizer-3.4.5-cp313-cp313-win_amd64.whl", hash = "sha256:e37bd100d2c5d3ba35db9c7c5ba5a9228cbcffe5c4778dc824b164e5257813d7", size = 142630, upload-time = "2026-03-06T06:01:59.062Z" }, + { url = "https://files.pythonhosted.org/packages/31/41/1c4b7cc9f13bd9d369ce3bc993e13d374ce25fa38a2663644283ecf422c1/charset_normalizer-3.4.5-cp313-cp313-win_arm64.whl", hash = "sha256:93b3b2cc5cf1b8743660ce77a4f45f3f6d1172068207c1defc779a36eea6bb36", size = 133254, upload-time = "2026-03-06T06:02:00.281Z" }, + { url = "https://files.pythonhosted.org/packages/43/be/0f0fd9bb4a7fa4fb5067fb7d9ac693d4e928d306f80a0d02bde43a7c4aee/charset_normalizer-3.4.5-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8197abe5ca1ffb7d91e78360f915eef5addff270f8a71c1fc5be24a56f3e4873", size = 280232, upload-time = "2026-03-06T06:02:01.508Z" }, + { url = "https://files.pythonhosted.org/packages/28/02/983b5445e4bef49cd8c9da73a8e029f0825f39b74a06d201bfaa2e55142a/charset_normalizer-3.4.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a2aecdb364b8a1802afdc7f9327d55dad5366bc97d8502d0f5854e50712dbc5f", size = 189688, upload-time = "2026-03-06T06:02:02.857Z" }, + { url = "https://files.pythonhosted.org/packages/d0/88/152745c5166437687028027dc080e2daed6fe11cfa95a22f4602591c42db/charset_normalizer-3.4.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a66aa5022bf81ab4b1bebfb009db4fd68e0c6d4307a1ce5ef6a26e5878dfc9e4", size = 206833, upload-time = "2026-03-06T06:02:05.127Z" }, + { url = "https://files.pythonhosted.org/packages/cb/0f/ebc15c8b02af2f19be9678d6eed115feeeccc45ce1f4b098d986c13e8769/charset_normalizer-3.4.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d77f97e515688bd615c1d1f795d540f32542d514242067adcb8ef532504cb9ee", size = 202879, upload-time = "2026-03-06T06:02:06.446Z" }, + { url = "https://files.pythonhosted.org/packages/38/9c/71336bff6934418dc8d1e8a1644176ac9088068bc571da612767619c97b3/charset_normalizer-3.4.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01a1ed54b953303ca7e310fafe0fe347aab348bd81834a0bcd602eb538f89d66", size = 195764, upload-time = "2026-03-06T06:02:08.763Z" }, + { url = "https://files.pythonhosted.org/packages/b7/95/ce92fde4f98615661871bc282a856cf9b8a15f686ba0af012984660d480b/charset_normalizer-3.4.5-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:b2d37d78297b39a9eb9eb92c0f6df98c706467282055419df141389b23f93362", size = 183728, upload-time = "2026-03-06T06:02:10.137Z" }, + { url = "https://files.pythonhosted.org/packages/1c/e7/f5b4588d94e747ce45ae680f0f242bc2d98dbd4eccfab73e6160b6893893/charset_normalizer-3.4.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e71bbb595973622b817c042bd943c3f3667e9c9983ce3d205f973f486fec98a7", size = 192937, upload-time = "2026-03-06T06:02:11.663Z" }, + { url = "https://files.pythonhosted.org/packages/f9/29/9d94ed6b929bf9f48bf6ede6e7474576499f07c4c5e878fb186083622716/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4cd966c2559f501c6fd69294d082c2934c8dd4719deb32c22961a5ac6db0df1d", size = 192040, upload-time = "2026-03-06T06:02:13.489Z" }, + { url = "https://files.pythonhosted.org/packages/15/d2/1a093a1cf827957f9445f2fe7298bcc16f8fc5e05c1ed2ad1af0b239035e/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:d5e52d127045d6ae01a1e821acfad2f3a1866c54d0e837828538fabe8d9d1bd6", size = 184107, upload-time = "2026-03-06T06:02:14.83Z" }, + { url = "https://files.pythonhosted.org/packages/0f/7d/82068ce16bd36135df7b97f6333c5d808b94e01d4599a682e2337ed5fd14/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:30a2b1a48478c3428d047ed9690d57c23038dac838a87ad624c85c0a78ebeb39", size = 208310, upload-time = "2026-03-06T06:02:16.165Z" }, + { url = "https://files.pythonhosted.org/packages/84/4e/4dfb52307bb6af4a5c9e73e482d171b81d36f522b21ccd28a49656baa680/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:d8ed79b8f6372ca4254955005830fd61c1ccdd8c0fac6603e2c145c61dd95db6", size = 192918, upload-time = "2026-03-06T06:02:18.144Z" }, + { url = "https://files.pythonhosted.org/packages/08/a4/159ff7da662cf7201502ca89980b8f06acf3e887b278956646a8aeb178ab/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c5af897b45fa606b12464ccbe0014bbf8c09191e0a66aab6aa9d5cf6e77e0c94", size = 204615, upload-time = "2026-03-06T06:02:19.821Z" }, + { url = "https://files.pythonhosted.org/packages/d6/62/0dd6172203cb6b429ffffc9935001fde42e5250d57f07b0c28c6046deb6b/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1088345bcc93c58d8d8f3d783eca4a6e7a7752bbff26c3eee7e73c597c191c2e", size = 197784, upload-time = "2026-03-06T06:02:21.86Z" }, + { url = "https://files.pythonhosted.org/packages/c7/5e/1aab5cb737039b9c59e63627dc8bbc0d02562a14f831cc450e5f91d84ce1/charset_normalizer-3.4.5-cp314-cp314-win32.whl", hash = "sha256:ee57b926940ba00bca7ba7041e665cc956e55ef482f851b9b65acb20d867e7a2", size = 133009, upload-time = "2026-03-06T06:02:23.289Z" }, + { url = "https://files.pythonhosted.org/packages/40/65/e7c6c77d7aaa4c0d7974f2e403e17f0ed2cb0fc135f77d686b916bf1eead/charset_normalizer-3.4.5-cp314-cp314-win_amd64.whl", hash = "sha256:4481e6da1830c8a1cc0b746b47f603b653dadb690bcd851d039ffaefe70533aa", size = 143511, upload-time = "2026-03-06T06:02:26.195Z" }, + { url = "https://files.pythonhosted.org/packages/ba/91/52b0841c71f152f563b8e072896c14e3d83b195c188b338d3cc2e582d1d4/charset_normalizer-3.4.5-cp314-cp314-win_arm64.whl", hash = "sha256:97ab7787092eb9b50fb47fa04f24c75b768a606af1bcba1957f07f128a7219e4", size = 133775, upload-time = "2026-03-06T06:02:27.473Z" }, + { url = "https://files.pythonhosted.org/packages/c5/60/3a621758945513adfd4db86827a5bafcc615f913dbd0b4c2ed64a65731be/charset_normalizer-3.4.5-py3-none-any.whl", hash = "sha256:9db5e3fcdcee89a78c04dffb3fe33c79f77bd741a624946db2591c81b2fc85b0", size = 55455, upload-time = "2026-03-06T06:03:17.827Z" }, ] [[package]] name = "claude-agent-sdk" -version = "0.1.45" +version = "0.1.48" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "mcp", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/46/e2/c5d5c4743ece496492a930bb75b878c830a9a9878ae3327b2d292647a8fa/claude_agent_sdk-0.1.45.tar.gz", hash = "sha256:97c1e981431b5af1e08c34731906ab8d4a58fe0774a04df0ea9587dcabc85151", size = 62436, upload-time = "2026-03-03T17:21:08.595Z" } +sdist = { url = "https://files.pythonhosted.org/packages/6c/dd/2818538efd18ed4ef72d4775efa75bb36cbea0fa418eda51df85ee9c2424/claude_agent_sdk-0.1.48.tar.gz", hash = "sha256:ee294d3f02936c0b826119ffbefcf88c67731cf8c2d2cb7111ccc97f76344272", size = 87375, upload-time = "2026-03-07T00:21:37.087Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/20/29/a28b6dfac54dfceddaa47e16c2b9cb61cc2ace4b4a1de064ab6d76debcbd/claude_agent_sdk-0.1.45-py3-none-macosx_11_0_arm64.whl", hash = "sha256:26a5cc60c3a394f5b814f6b2f67650819cbcd38c405bbdc11582b3e097b3a770", size = 57761380, upload-time = "2026-03-03T17:20:55.066Z" }, - { url = "https://files.pythonhosted.org/packages/aa/7c/a803cc6e40de8b13cc822c66fd96c96d88f994983c2622d80cb8b708bb30/claude_agent_sdk-0.1.45-py3-none-manylinux_2_17_aarch64.whl", hash = "sha256:decc741b53e0b2c10a64fd84c15acca1102077d9f99941c54905172cd95160c9", size = 73402101, upload-time = "2026-03-03T17:20:58.604Z" }, - { url = "https://files.pythonhosted.org/packages/32/51/bdb9832728189673c60c605854c2153e17dce384a64a6dc88cdbb254ce86/claude_agent_sdk-0.1.45-py3-none-manylinux_2_17_x86_64.whl", hash = "sha256:7d48dcf4178c704e4ccbf3f1f4ebf20b3de3f03d0592086c1f3abd16b8ca441e", size = 74091498, upload-time = "2026-03-03T17:21:02.332Z" }, - { url = "https://files.pythonhosted.org/packages/13/37/02e60d7f93aedc8f63f9404cbf2a48bf5d47c27ccb9c0a0f03c803882fa5/claude_agent_sdk-0.1.45-py3-none-win_amd64.whl", hash = "sha256:d1cf34995109c513d8daabcae7208edc260b553b53462a9ac06a7c40e240a288", size = 75784070, upload-time = "2026-03-03T17:21:05.573Z" }, + { url = "https://files.pythonhosted.org/packages/c3/cf/bbbdee52ee0c63c8709b0ac03ce3c1da5bdc37def5da0eca63363448744f/claude_agent_sdk-0.1.48-py3-none-macosx_11_0_arm64.whl", hash = "sha256:5761ff1d362e0f17c2b1bfd890d1c897f0aa81091e37bbd15b7d06f05ced552d", size = 57559306, upload-time = "2026-03-07T00:21:20.011Z" }, + { url = "https://files.pythonhosted.org/packages/57/d1/2179154b88d4cf6ba1cf6a15066ee8e96257aaeb1330e625e809ba2f28eb/claude_agent_sdk-0.1.48-py3-none-manylinux_2_17_aarch64.whl", hash = "sha256:39c1307daa17e42fa8a71180bb20af8a789d72d3891fc93519ff15540badcb83", size = 73980309, upload-time = "2026-03-07T00:21:24.592Z" }, + { url = "https://files.pythonhosted.org/packages/dc/99/55b0cd3bf54a7449e744d23cf50be104e9445cf623e1ed75722112aa6264/claude_agent_sdk-0.1.48-py3-none-manylinux_2_17_x86_64.whl", hash = "sha256:543d70acba468eccfff836965a14b8ac88cf90809aeeb88431dfcea3ee9a2fa9", size = 74583686, upload-time = "2026-03-07T00:21:28.969Z" }, + { url = "https://files.pythonhosted.org/packages/c8/f6/4851bd9a238b7aadba7639eb906aca7da32a51f01563fa4488469c608b3a/claude_agent_sdk-0.1.48-py3-none-win_amd64.whl", hash = "sha256:0d37e60bd2b17efc3f927dccef080f14897ab62cd1d0d67a4abc8a0e2d4f1006", size = 74956045, upload-time = "2026-03-07T00:21:33.475Z" }, ] [[package]] @@ -2100,28 +2100,28 @@ wheels = [ [[package]] name = "google-auth" -version = "2.48.0" +version = "2.49.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cryptography", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pyasn1-modules", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "rsa", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/0c/41/242044323fbd746615884b1c16639749e73665b718209946ebad7ba8a813/google_auth-2.48.0.tar.gz", hash = "sha256:4f7e706b0cd3208a3d940a19a822c37a476ddba5450156c3e6624a71f7c841ce", size = 326522, upload-time = "2026-01-26T19:22:47.157Z" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/59/7371175bfd949abfb1170aa076352131d7281bd9449c0f978604fc4431c3/google_auth-2.49.0.tar.gz", hash = "sha256:9cc2d9259d3700d7a257681f81052db6737495a1a46b610597f4b8bafe5286ae", size = 333444, upload-time = "2026-03-06T21:53:06.07Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/83/1d/d6466de3a5249d35e832a52834115ca9d1d0de6abc22065f049707516d47/google_auth-2.48.0-py3-none-any.whl", hash = "sha256:2e2a537873d449434252a9632c28bfc268b0adb1e53f9fb62afc5333a975903f", size = 236499, upload-time = "2026-01-26T19:22:45.099Z" }, + { url = "https://files.pythonhosted.org/packages/37/45/de64b823b639103de4b63dd193480dce99526bd36be6530c2dba85bf7817/google_auth-2.49.0-py3-none-any.whl", hash = "sha256:f893ef7307f19cf53700b7e2f61b5a6affe3aa0edf9943b13788920ab92d8d87", size = 240676, upload-time = "2026-03-06T21:52:38.304Z" }, ] [[package]] name = "googleapis-common-protos" -version = "1.72.0" +version = "1.73.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "protobuf", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e5/7b/adfd75544c415c487b33061fe7ae526165241c1ea133f9a9125a56b39fd8/googleapis_common_protos-1.72.0.tar.gz", hash = "sha256:e55a601c1b32b52d7a3e65f43563e2aa61bcd737998ee672ac9b951cd49319f5", size = 147433, upload-time = "2025-11-06T18:29:24.087Z" } +sdist = { url = "https://files.pythonhosted.org/packages/99/96/a0205167fa0154f4a542fd6925bdc63d039d88dab3588b875078107e6f06/googleapis_common_protos-1.73.0.tar.gz", hash = "sha256:778d07cd4fbeff84c6f7c72102f0daf98fa2bfd3fa8bea426edc545588da0b5a", size = 147323, upload-time = "2026-03-06T21:53:09.727Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c4/ab/09169d5a4612a5f92490806649ac8d41e3ec9129c636754575b3553f4ea4/googleapis_common_protos-1.72.0-py3-none-any.whl", hash = "sha256:4299c5a82d5ae1a9702ada957347726b167f9f8d1fc352477702a1e851ff4038", size = 297515, upload-time = "2025-11-06T18:29:13.14Z" }, + { url = "https://files.pythonhosted.org/packages/69/28/23eea8acd65972bbfe295ce3666b28ac510dfcb115fac089d3edb0feb00a/googleapis_common_protos-1.73.0-py3-none-any.whl", hash = "sha256:dfdaaa2e860f242046be561e6d6cb5c5f1541ae02cfbcb034371aadb2942b4e8", size = 297578, upload-time = "2026-03-06T21:52:33.933Z" }, ] [[package]] @@ -2422,7 +2422,7 @@ wheels = [ [[package]] name = "huggingface-hub" -version = "1.5.0" +version = "1.6.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "filelock", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -2435,9 +2435,9 @@ dependencies = [ { name = "typer", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ae/76/b5efb3033d8499b17f9386beaf60f64c461798e1ee16d10bc9c0077beba5/huggingface_hub-1.5.0.tar.gz", hash = "sha256:f281838db29265880fb543de7a23b0f81d3504675de82044307ea3c6c62f799d", size = 695872, upload-time = "2026-02-26T15:35:32.745Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d5/7a/304cec37112382c4fe29a43bcb0d5891f922785d18745883d2aa4eb74e4b/huggingface_hub-1.6.0.tar.gz", hash = "sha256:d931ddad8ba8dfc1e816bf254810eb6f38e5c32f60d4184b5885662a3b167325", size = 717071, upload-time = "2026-03-06T14:19:18.524Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/74/2bc951622e2dbba1af9a460d93c51d15e458becd486e62c29cc0ccb08178/huggingface_hub-1.5.0-py3-none-any.whl", hash = "sha256:c9c0b3ab95a777fc91666111f3b3ede71c0cdced3614c553a64e98920585c4ee", size = 596261, upload-time = "2026-02-26T15:35:31.1Z" }, + { url = "https://files.pythonhosted.org/packages/92/e3/e3a44f54c8e2f28983fcf07f13d4260b37bd6a0d3a081041bc60b91d230e/huggingface_hub-1.6.0-py3-none-any.whl", hash = "sha256:ef40e2d5cb85e48b2c067020fa5142168342d5108a1b267478ed384ecbf18961", size = 612874, upload-time = "2026-03-06T14:19:16.844Z" }, ] [[package]] @@ -3106,7 +3106,7 @@ wheels = [ [[package]] name = "mem0ai" -version = "1.0.4" +version = "1.0.5" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "openai", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -3117,9 +3117,9 @@ dependencies = [ { name = "qdrant-client", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "sqlalchemy", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/51/be/bb17c05e5a752ca79df2fbdcef83c7eaa249004029da9fd9488def574806/mem0ai-1.0.4.tar.gz", hash = "sha256:c6201130be46c9dc2b5cf0836e7811fd604430bb39c55c9c454045722d1ed21b", size = 182968, upload-time = "2026-02-17T22:34:46.247Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f3/79/2307e5fe1610d2ad0d08688af10cd5163861390deeb070f83449c0b65417/mem0ai-1.0.5.tar.gz", hash = "sha256:0835a0001ecac40ba2667bbf17629329c1b2f33eaa585e93a6be54d868a82f79", size = 182982, upload-time = "2026-03-03T22:27:09.488Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b0/da/67f023b4269d77336bce950c7419ebd554272a5bfe1bc9c8ed79e8907eaa/mem0ai-1.0.4-py3-none-any.whl", hash = "sha256:06b31a2d98364ff6ae35abe4ee2ad2aea60fe43b20bad09c3ec6c1a9c031b753", size = 275979, upload-time = "2026-02-17T22:34:43.887Z" }, + { url = "https://files.pythonhosted.org/packages/78/0e/43ec9f125ebe6e8390805aa56237ee7165fc4f2b796122644cb0043e6631/mem0ai-1.0.5-py3-none-any.whl", hash = "sha256:0526814d2ec9134e21a628cc04ae0e6dc1779a579af92c481cb9fd7f7b8d17aa", size = 275991, upload-time = "2026-03-03T22:27:07.73Z" }, ] [[package]] @@ -3214,16 +3214,16 @@ wheels = [ [[package]] name = "msal" -version = "1.35.0" +version = "1.35.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cryptography", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "pyjwt", extra = ["crypto"], marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "requests", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/95/ec/52e6c9ad90ad7eb3035f5e511123e89d1ecc7617f0c94653264848623c12/msal-1.35.0.tar.gz", hash = "sha256:76ab7513dbdac88d76abdc6a50110f082b7ed3ff1080aca938c53fc88bc75b51", size = 164057, upload-time = "2026-02-24T10:58:28.415Z" } +sdist = { url = "https://files.pythonhosted.org/packages/3c/aa/5a646093ac218e4a329391d5a31e5092a89db7d2ef1637a90b82cd0b6f94/msal-1.35.1.tar.gz", hash = "sha256:70cac18ab80a053bff86219ba64cfe3da1f307c74b009e2da57ef040eb1b5656", size = 165658, upload-time = "2026-03-04T23:38:51.812Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/56/26/5463e615de18ad8b80d75d14c612ef3c866fcc07c1c52e8eac7948984214/msal-1.35.0-py3-none-any.whl", hash = "sha256:baf268172d2b736e5d409689424d2f321b4142cab231b4b96594c86762e7e01d", size = 120082, upload-time = "2026-02-24T10:58:27.219Z" }, + { url = "https://files.pythonhosted.org/packages/96/86/16815fddf056ca998853c6dc525397edf0b43559bb4073a80d2bc7fe8009/msal-1.35.1-py3-none-any.whl", hash = "sha256:8f4e82f34b10c19e326ec69f44dc6b30171f2f7098f3720ea8a9f0c11832caa3", size = 119909, upload-time = "2026-03-04T23:38:50.452Z" }, ] [[package]] @@ -3423,81 +3423,81 @@ wheels = [ [[package]] name = "numpy" -version = "2.4.2" +version = "2.4.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/57/fd/0005efbd0af48e55eb3c7208af93f2862d4b1a56cd78e84309a2d959208d/numpy-2.4.2.tar.gz", hash = "sha256:659a6107e31a83c4e33f763942275fd278b21d095094044eb35569e86a21ddae", size = 20723651, upload-time = "2026-01-31T23:13:10.135Z" } +sdist = { url = "https://files.pythonhosted.org/packages/10/8b/c265f4823726ab832de836cdd184d0986dcf94480f81e8739692a7ac7af2/numpy-2.4.3.tar.gz", hash = "sha256:483a201202b73495f00dbc83796c6ae63137a9bdade074f7648b3e32613412dd", size = 20727743, upload-time = "2026-03-09T07:58:53.426Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d3/44/71852273146957899753e69986246d6a176061ea183407e95418c2aa4d9a/numpy-2.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e7e88598032542bd49af7c4747541422884219056c268823ef6e5e89851c8825", size = 16955478, upload-time = "2026-01-31T23:10:25.623Z" }, - { url = "https://files.pythonhosted.org/packages/74/41/5d17d4058bd0cd96bcbd4d9ff0fb2e21f52702aab9a72e4a594efa18692f/numpy-2.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7edc794af8b36ca37ef5fcb5e0d128c7e0595c7b96a2318d1badb6fcd8ee86b1", size = 14965467, upload-time = "2026-01-31T23:10:28.186Z" }, - { url = "https://files.pythonhosted.org/packages/49/48/fb1ce8136c19452ed15f033f8aee91d5defe515094e330ce368a0647846f/numpy-2.4.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:6e9f61981ace1360e42737e2bae58b27bf28a1b27e781721047d84bd754d32e7", size = 5475172, upload-time = "2026-01-31T23:10:30.848Z" }, - { url = "https://files.pythonhosted.org/packages/40/a9/3feb49f17bbd1300dd2570432961f5c8a4ffeff1db6f02c7273bd020a4c9/numpy-2.4.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:cb7bbb88aa74908950d979eeaa24dbdf1a865e3c7e45ff0121d8f70387b55f73", size = 6805145, upload-time = "2026-01-31T23:10:32.352Z" }, - { url = "https://files.pythonhosted.org/packages/3f/39/fdf35cbd6d6e2fcad42fcf85ac04a85a0d0fbfbf34b30721c98d602fd70a/numpy-2.4.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4f069069931240b3fc703f1e23df63443dbd6390614c8c44a87d96cd0ec81eb1", size = 15966084, upload-time = "2026-01-31T23:10:34.502Z" }, - { url = "https://files.pythonhosted.org/packages/1b/46/6fa4ea94f1ddf969b2ee941290cca6f1bfac92b53c76ae5f44afe17ceb69/numpy-2.4.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c02ef4401a506fb60b411467ad501e1429a3487abca4664871d9ae0b46c8ba32", size = 16899477, upload-time = "2026-01-31T23:10:37.075Z" }, - { url = "https://files.pythonhosted.org/packages/09/a1/2a424e162b1a14a5bd860a464ab4e07513916a64ab1683fae262f735ccd2/numpy-2.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2653de5c24910e49c2b106499803124dde62a5a1fe0eedeaecf4309a5f639390", size = 17323429, upload-time = "2026-01-31T23:10:39.704Z" }, - { url = "https://files.pythonhosted.org/packages/ce/a2/73014149ff250628df72c58204822ac01d768697913881aacf839ff78680/numpy-2.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1ae241bbfc6ae276f94a170b14785e561cb5e7f626b6688cf076af4110887413", size = 18635109, upload-time = "2026-01-31T23:10:41.924Z" }, - { url = "https://files.pythonhosted.org/packages/6c/0c/73e8be2f1accd56df74abc1c5e18527822067dced5ec0861b5bb882c2ce0/numpy-2.4.2-cp311-cp311-win32.whl", hash = "sha256:df1b10187212b198dd45fa943d8985a3c8cf854aed4923796e0e019e113a1bda", size = 6237915, upload-time = "2026-01-31T23:10:45.26Z" }, - { url = "https://files.pythonhosted.org/packages/76/ae/e0265e0163cf127c24c3969d29f1c4c64551a1e375d95a13d32eab25d364/numpy-2.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:b9c618d56a29c9cb1c4da979e9899be7578d2e0b3c24d52079c166324c9e8695", size = 12607972, upload-time = "2026-01-31T23:10:47.021Z" }, - { url = "https://files.pythonhosted.org/packages/29/a5/c43029af9b8014d6ea157f192652c50042e8911f4300f8f6ed3336bf437f/numpy-2.4.2-cp311-cp311-win_arm64.whl", hash = "sha256:47c5a6ed21d9452b10227e5e8a0e1c22979811cad7dcc19d8e3e2fb8fa03f1a3", size = 10485763, upload-time = "2026-01-31T23:10:50.087Z" }, - { url = "https://files.pythonhosted.org/packages/51/6e/6f394c9c77668153e14d4da83bcc247beb5952f6ead7699a1a2992613bea/numpy-2.4.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:21982668592194c609de53ba4933a7471880ccbaadcc52352694a59ecc860b3a", size = 16667963, upload-time = "2026-01-31T23:10:52.147Z" }, - { url = "https://files.pythonhosted.org/packages/1f/f8/55483431f2b2fd015ae6ed4fe62288823ce908437ed49db5a03d15151678/numpy-2.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40397bda92382fcec844066efb11f13e1c9a3e2a8e8f318fb72ed8b6db9f60f1", size = 14693571, upload-time = "2026-01-31T23:10:54.789Z" }, - { url = "https://files.pythonhosted.org/packages/2f/20/18026832b1845cdc82248208dd929ca14c9d8f2bac391f67440707fff27c/numpy-2.4.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:b3a24467af63c67829bfaa61eecf18d5432d4f11992688537be59ecd6ad32f5e", size = 5203469, upload-time = "2026-01-31T23:10:57.343Z" }, - { url = "https://files.pythonhosted.org/packages/7d/33/2eb97c8a77daaba34eaa3fa7241a14ac5f51c46a6bd5911361b644c4a1e2/numpy-2.4.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:805cc8de9fd6e7a22da5aed858e0ab16be5a4db6c873dde1d7451c541553aa27", size = 6550820, upload-time = "2026-01-31T23:10:59.429Z" }, - { url = "https://files.pythonhosted.org/packages/b1/91/b97fdfd12dc75b02c44e26c6638241cc004d4079a0321a69c62f51470c4c/numpy-2.4.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d82351358ffbcdcd7b686b90742a9b86632d6c1c051016484fa0b326a0a1548", size = 15663067, upload-time = "2026-01-31T23:11:01.291Z" }, - { url = "https://files.pythonhosted.org/packages/f5/c6/a18e59f3f0b8071cc85cbc8d80cd02d68aa9710170b2553a117203d46936/numpy-2.4.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e35d3e0144137d9fdae62912e869136164534d64a169f86438bc9561b6ad49f", size = 16619782, upload-time = "2026-01-31T23:11:03.669Z" }, - { url = "https://files.pythonhosted.org/packages/b7/83/9751502164601a79e18847309f5ceec0b1446d7b6aa12305759b72cf98b2/numpy-2.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:adb6ed2ad29b9e15321d167d152ee909ec73395901b70936f029c3bc6d7f4460", size = 17013128, upload-time = "2026-01-31T23:11:05.913Z" }, - { url = "https://files.pythonhosted.org/packages/61/c4/c4066322256ec740acc1c8923a10047818691d2f8aec254798f3dd90f5f2/numpy-2.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8906e71fd8afcb76580404e2a950caef2685df3d2a57fe82a86ac8d33cc007ba", size = 18345324, upload-time = "2026-01-31T23:11:08.248Z" }, - { url = "https://files.pythonhosted.org/packages/ab/af/6157aa6da728fa4525a755bfad486ae7e3f76d4c1864138003eb84328497/numpy-2.4.2-cp312-cp312-win32.whl", hash = "sha256:ec055f6dae239a6299cace477b479cca2fc125c5675482daf1dd886933a1076f", size = 5960282, upload-time = "2026-01-31T23:11:10.497Z" }, - { url = "https://files.pythonhosted.org/packages/92/0f/7ceaaeaacb40567071e94dbf2c9480c0ae453d5bb4f52bea3892c39dc83c/numpy-2.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:209fae046e62d0ce6435fcfe3b1a10537e858249b3d9b05829e2a05218296a85", size = 12314210, upload-time = "2026-01-31T23:11:12.176Z" }, - { url = "https://files.pythonhosted.org/packages/2f/a3/56c5c604fae6dd40fa2ed3040d005fca97e91bd320d232ac9931d77ba13c/numpy-2.4.2-cp312-cp312-win_arm64.whl", hash = "sha256:fbde1b0c6e81d56f5dccd95dd4a711d9b95df1ae4009a60887e56b27e8d903fa", size = 10220171, upload-time = "2026-01-31T23:11:14.684Z" }, - { url = "https://files.pythonhosted.org/packages/a1/22/815b9fe25d1d7ae7d492152adbc7226d3eff731dffc38fe970589fcaaa38/numpy-2.4.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:25f2059807faea4b077a2b6837391b5d830864b3543627f381821c646f31a63c", size = 16663696, upload-time = "2026-01-31T23:11:17.516Z" }, - { url = "https://files.pythonhosted.org/packages/09/f0/817d03a03f93ba9c6c8993de509277d84e69f9453601915e4a69554102a1/numpy-2.4.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bd3a7a9f5847d2fb8c2c6d1c862fa109c31a9abeca1a3c2bd5a64572955b2979", size = 14688322, upload-time = "2026-01-31T23:11:19.883Z" }, - { url = "https://files.pythonhosted.org/packages/da/b4/f805ab79293c728b9a99438775ce51885fd4f31b76178767cfc718701a39/numpy-2.4.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:8e4549f8a3c6d13d55041925e912bfd834285ef1dd64d6bc7d542583355e2e98", size = 5198157, upload-time = "2026-01-31T23:11:22.375Z" }, - { url = "https://files.pythonhosted.org/packages/74/09/826e4289844eccdcd64aac27d13b0fd3f32039915dd5b9ba01baae1f436c/numpy-2.4.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:aea4f66ff44dfddf8c2cffd66ba6538c5ec67d389285292fe428cb2c738c8aef", size = 6546330, upload-time = "2026-01-31T23:11:23.958Z" }, - { url = "https://files.pythonhosted.org/packages/19/fb/cbfdbfa3057a10aea5422c558ac57538e6acc87ec1669e666d32ac198da7/numpy-2.4.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3cd545784805de05aafe1dde61752ea49a359ccba9760c1e5d1c88a93bbf2b7", size = 15660968, upload-time = "2026-01-31T23:11:25.713Z" }, - { url = "https://files.pythonhosted.org/packages/04/dc/46066ce18d01645541f0186877377b9371b8fa8017fa8262002b4ef22612/numpy-2.4.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d0d9b7c93578baafcbc5f0b83eaf17b79d345c6f36917ba0c67f45226911d499", size = 16607311, upload-time = "2026-01-31T23:11:28.117Z" }, - { url = "https://files.pythonhosted.org/packages/14/d9/4b5adfc39a43fa6bf918c6d544bc60c05236cc2f6339847fc5b35e6cb5b0/numpy-2.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f74f0f7779cc7ae07d1810aab8ac6b1464c3eafb9e283a40da7309d5e6e48fbb", size = 17012850, upload-time = "2026-01-31T23:11:30.888Z" }, - { url = "https://files.pythonhosted.org/packages/b7/20/adb6e6adde6d0130046e6fdfb7675cc62bc2f6b7b02239a09eb58435753d/numpy-2.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c7ac672d699bf36275c035e16b65539931347d68b70667d28984c9fb34e07fa7", size = 18334210, upload-time = "2026-01-31T23:11:33.214Z" }, - { url = "https://files.pythonhosted.org/packages/78/0e/0a73b3dff26803a8c02baa76398015ea2a5434d9b8265a7898a6028c1591/numpy-2.4.2-cp313-cp313-win32.whl", hash = "sha256:8e9afaeb0beff068b4d9cd20d322ba0ee1cecfb0b08db145e4ab4dd44a6b5110", size = 5958199, upload-time = "2026-01-31T23:11:35.385Z" }, - { url = "https://files.pythonhosted.org/packages/43/bc/6352f343522fcb2c04dbaf94cb30cca6fd32c1a750c06ad6231b4293708c/numpy-2.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:7df2de1e4fba69a51c06c28f5a3de36731eb9639feb8e1cf7e4a7b0daf4cf622", size = 12310848, upload-time = "2026-01-31T23:11:38.001Z" }, - { url = "https://files.pythonhosted.org/packages/6e/8d/6da186483e308da5da1cc6918ce913dcfe14ffde98e710bfeff2a6158d4e/numpy-2.4.2-cp313-cp313-win_arm64.whl", hash = "sha256:0fece1d1f0a89c16b03442eae5c56dc0be0c7883b5d388e0c03f53019a4bfd71", size = 10221082, upload-time = "2026-01-31T23:11:40.392Z" }, - { url = "https://files.pythonhosted.org/packages/25/a1/9510aa43555b44781968935c7548a8926274f815de42ad3997e9e83680dd/numpy-2.4.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5633c0da313330fd20c484c78cdd3f9b175b55e1a766c4a174230c6b70ad8262", size = 14815866, upload-time = "2026-01-31T23:11:42.495Z" }, - { url = "https://files.pythonhosted.org/packages/36/30/6bbb5e76631a5ae46e7923dd16ca9d3f1c93cfa8d4ed79a129814a9d8db3/numpy-2.4.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:d9f64d786b3b1dd742c946c42d15b07497ed14af1a1f3ce840cce27daa0ce913", size = 5325631, upload-time = "2026-01-31T23:11:44.7Z" }, - { url = "https://files.pythonhosted.org/packages/46/00/3a490938800c1923b567b3a15cd17896e68052e2145d8662aaf3e1ffc58f/numpy-2.4.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:b21041e8cb6a1eb5312dd1d2f80a94d91efffb7a06b70597d44f1bd2dfc315ab", size = 6646254, upload-time = "2026-01-31T23:11:46.341Z" }, - { url = "https://files.pythonhosted.org/packages/d3/e9/fac0890149898a9b609caa5af7455a948b544746e4b8fe7c212c8edd71f8/numpy-2.4.2-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:00ab83c56211a1d7c07c25e3217ea6695e50a3e2f255053686b081dc0b091a82", size = 15720138, upload-time = "2026-01-31T23:11:48.082Z" }, - { url = "https://files.pythonhosted.org/packages/ea/5c/08887c54e68e1e28df53709f1893ce92932cc6f01f7c3d4dc952f61ffd4e/numpy-2.4.2-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2fb882da679409066b4603579619341c6d6898fc83a8995199d5249f986e8e8f", size = 16655398, upload-time = "2026-01-31T23:11:50.293Z" }, - { url = "https://files.pythonhosted.org/packages/4d/89/253db0fa0e66e9129c745e4ef25631dc37d5f1314dad2b53e907b8538e6d/numpy-2.4.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:66cb9422236317f9d44b67b4d18f44efe6e9c7f8794ac0462978513359461554", size = 17079064, upload-time = "2026-01-31T23:11:52.927Z" }, - { url = "https://files.pythonhosted.org/packages/2a/d5/cbade46ce97c59c6c3da525e8d95b7abe8a42974a1dc5c1d489c10433e88/numpy-2.4.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:0f01dcf33e73d80bd8dc0f20a71303abbafa26a19e23f6b68d1aa9990af90257", size = 18379680, upload-time = "2026-01-31T23:11:55.22Z" }, - { url = "https://files.pythonhosted.org/packages/40/62/48f99ae172a4b63d981babe683685030e8a3df4f246c893ea5c6ef99f018/numpy-2.4.2-cp313-cp313t-win32.whl", hash = "sha256:52b913ec40ff7ae845687b0b34d8d93b60cb66dcee06996dd5c99f2fc9328657", size = 6082433, upload-time = "2026-01-31T23:11:58.096Z" }, - { url = "https://files.pythonhosted.org/packages/07/38/e054a61cfe48ad9f1ed0d188e78b7e26859d0b60ef21cd9de4897cdb5326/numpy-2.4.2-cp313-cp313t-win_amd64.whl", hash = "sha256:5eea80d908b2c1f91486eb95b3fb6fab187e569ec9752ab7d9333d2e66bf2d6b", size = 12451181, upload-time = "2026-01-31T23:11:59.782Z" }, - { url = "https://files.pythonhosted.org/packages/6e/a4/a05c3a6418575e185dd84d0b9680b6bb2e2dc3e4202f036b7b4e22d6e9dc/numpy-2.4.2-cp313-cp313t-win_arm64.whl", hash = "sha256:fd49860271d52127d61197bb50b64f58454e9f578cb4b2c001a6de8b1f50b0b1", size = 10290756, upload-time = "2026-01-31T23:12:02.438Z" }, - { url = "https://files.pythonhosted.org/packages/18/88/b7df6050bf18fdcfb7046286c6535cabbdd2064a3440fca3f069d319c16e/numpy-2.4.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:444be170853f1f9d528428eceb55f12918e4fda5d8805480f36a002f1415e09b", size = 16663092, upload-time = "2026-01-31T23:12:04.521Z" }, - { url = "https://files.pythonhosted.org/packages/25/7a/1fee4329abc705a469a4afe6e69b1ef7e915117747886327104a8493a955/numpy-2.4.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d1240d50adff70c2a88217698ca844723068533f3f5c5fa6ee2e3220e3bdb000", size = 14698770, upload-time = "2026-01-31T23:12:06.96Z" }, - { url = "https://files.pythonhosted.org/packages/fb/0b/f9e49ba6c923678ad5bc38181c08ac5e53b7a5754dbca8e581aa1a56b1ff/numpy-2.4.2-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:7cdde6de52fb6664b00b056341265441192d1291c130e99183ec0d4b110ff8b1", size = 5208562, upload-time = "2026-01-31T23:12:09.632Z" }, - { url = "https://files.pythonhosted.org/packages/7d/12/d7de8f6f53f9bb76997e5e4c069eda2051e3fe134e9181671c4391677bb2/numpy-2.4.2-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:cda077c2e5b780200b6b3e09d0b42205a3d1c68f30c6dceb90401c13bff8fe74", size = 6543710, upload-time = "2026-01-31T23:12:11.969Z" }, - { url = "https://files.pythonhosted.org/packages/09/63/c66418c2e0268a31a4cf8a8b512685748200f8e8e8ec6c507ce14e773529/numpy-2.4.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d30291931c915b2ab5717c2974bb95ee891a1cf22ebc16a8006bd59cd210d40a", size = 15677205, upload-time = "2026-01-31T23:12:14.33Z" }, - { url = "https://files.pythonhosted.org/packages/5d/6c/7f237821c9642fb2a04d2f1e88b4295677144ca93285fd76eff3bcba858d/numpy-2.4.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bba37bc29d4d85761deed3954a1bc62be7cf462b9510b51d367b769a8c8df325", size = 16611738, upload-time = "2026-01-31T23:12:16.525Z" }, - { url = "https://files.pythonhosted.org/packages/c2/a7/39c4cdda9f019b609b5c473899d87abff092fc908cfe4d1ecb2fcff453b0/numpy-2.4.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b2f0073ed0868db1dcd86e052d37279eef185b9c8db5bf61f30f46adac63c909", size = 17028888, upload-time = "2026-01-31T23:12:19.306Z" }, - { url = "https://files.pythonhosted.org/packages/da/b3/e84bb64bdfea967cc10950d71090ec2d84b49bc691df0025dddb7c26e8e3/numpy-2.4.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:7f54844851cdb630ceb623dcec4db3240d1ac13d4990532446761baede94996a", size = 18339556, upload-time = "2026-01-31T23:12:21.816Z" }, - { url = "https://files.pythonhosted.org/packages/88/f5/954a291bc1192a27081706862ac62bb5920fbecfbaa302f64682aa90beed/numpy-2.4.2-cp314-cp314-win32.whl", hash = "sha256:12e26134a0331d8dbd9351620f037ec470b7c75929cb8a1537f6bfe411152a1a", size = 6006899, upload-time = "2026-01-31T23:12:24.14Z" }, - { url = "https://files.pythonhosted.org/packages/05/cb/eff72a91b2efdd1bc98b3b8759f6a1654aa87612fc86e3d87d6fe4f948c4/numpy-2.4.2-cp314-cp314-win_amd64.whl", hash = "sha256:068cdb2d0d644cdb45670810894f6a0600797a69c05f1ac478e8d31670b8ee75", size = 12443072, upload-time = "2026-01-31T23:12:26.33Z" }, - { url = "https://files.pythonhosted.org/packages/37/75/62726948db36a56428fce4ba80a115716dc4fad6a3a4352487f8bb950966/numpy-2.4.2-cp314-cp314-win_arm64.whl", hash = "sha256:6ed0be1ee58eef41231a5c943d7d1375f093142702d5723ca2eb07db9b934b05", size = 10494886, upload-time = "2026-01-31T23:12:28.488Z" }, - { url = "https://files.pythonhosted.org/packages/36/2f/ee93744f1e0661dc267e4b21940870cabfae187c092e1433b77b09b50ac4/numpy-2.4.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:98f16a80e917003a12c0580f97b5f875853ebc33e2eaa4bccfc8201ac6869308", size = 14818567, upload-time = "2026-01-31T23:12:30.709Z" }, - { url = "https://files.pythonhosted.org/packages/a7/24/6535212add7d76ff938d8bdc654f53f88d35cddedf807a599e180dcb8e66/numpy-2.4.2-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:20abd069b9cda45874498b245c8015b18ace6de8546bf50dfa8cea1696ed06ef", size = 5328372, upload-time = "2026-01-31T23:12:32.962Z" }, - { url = "https://files.pythonhosted.org/packages/5e/9d/c48f0a035725f925634bf6b8994253b43f2047f6778a54147d7e213bc5a7/numpy-2.4.2-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:e98c97502435b53741540a5717a6749ac2ada901056c7db951d33e11c885cc7d", size = 6649306, upload-time = "2026-01-31T23:12:34.797Z" }, - { url = "https://files.pythonhosted.org/packages/81/05/7c73a9574cd4a53a25907bad38b59ac83919c0ddc8234ec157f344d57d9a/numpy-2.4.2-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:da6cad4e82cb893db4b69105c604d805e0c3ce11501a55b5e9f9083b47d2ffe8", size = 15722394, upload-time = "2026-01-31T23:12:36.565Z" }, - { url = "https://files.pythonhosted.org/packages/35/fa/4de10089f21fc7d18442c4a767ab156b25c2a6eaf187c0db6d9ecdaeb43f/numpy-2.4.2-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e4424677ce4b47fe73c8b5556d876571f7c6945d264201180db2dc34f676ab5", size = 16653343, upload-time = "2026-01-31T23:12:39.188Z" }, - { url = "https://files.pythonhosted.org/packages/b8/f9/d33e4ffc857f3763a57aa85650f2e82486832d7492280ac21ba9efda80da/numpy-2.4.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2b8f157c8a6f20eb657e240f8985cc135598b2b46985c5bccbde7616dc9c6b1e", size = 17078045, upload-time = "2026-01-31T23:12:42.041Z" }, - { url = "https://files.pythonhosted.org/packages/c8/b8/54bdb43b6225badbea6389fa038c4ef868c44f5890f95dd530a218706da3/numpy-2.4.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5daf6f3914a733336dab21a05cdec343144600e964d2fcdabaac0c0269874b2a", size = 18380024, upload-time = "2026-01-31T23:12:44.331Z" }, - { url = "https://files.pythonhosted.org/packages/a5/55/6e1a61ded7af8df04016d81b5b02daa59f2ea9252ee0397cb9f631efe9e5/numpy-2.4.2-cp314-cp314t-win32.whl", hash = "sha256:8c50dd1fc8826f5b26a5ee4d77ca55d88a895f4e4819c7ecc2a9f5905047a443", size = 6153937, upload-time = "2026-01-31T23:12:47.229Z" }, - { url = "https://files.pythonhosted.org/packages/45/aa/fa6118d1ed6d776b0983f3ceac9b1a5558e80df9365b1c3aa6d42bf9eee4/numpy-2.4.2-cp314-cp314t-win_amd64.whl", hash = "sha256:fcf92bee92742edd401ba41135185866f7026c502617f422eb432cfeca4fe236", size = 12631844, upload-time = "2026-01-31T23:12:48.997Z" }, - { url = "https://files.pythonhosted.org/packages/32/0a/2ec5deea6dcd158f254a7b372fb09cfba5719419c8d66343bab35237b3fb/numpy-2.4.2-cp314-cp314t-win_arm64.whl", hash = "sha256:1f92f53998a17265194018d1cc321b2e96e900ca52d54c7c77837b71b9465181", size = 10565379, upload-time = "2026-01-31T23:12:51.345Z" }, - { url = "https://files.pythonhosted.org/packages/f4/f8/50e14d36d915ef64d8f8bc4a087fc8264d82c785eda6711f80ab7e620335/numpy-2.4.2-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:89f7268c009bc492f506abd6f5265defa7cb3f7487dc21d357c3d290add45082", size = 16833179, upload-time = "2026-01-31T23:12:53.5Z" }, - { url = "https://files.pythonhosted.org/packages/17/17/809b5cad63812058a8189e91a1e2d55a5a18fd04611dbad244e8aeae465c/numpy-2.4.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:e6dee3bb76aa4009d5a912180bf5b2de012532998d094acee25d9cb8dee3e44a", size = 14889755, upload-time = "2026-01-31T23:12:55.933Z" }, - { url = "https://files.pythonhosted.org/packages/3e/ea/181b9bcf7627fc8371720316c24db888dcb9829b1c0270abf3d288b2e29b/numpy-2.4.2-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:cd2bd2bbed13e213d6b55dc1d035a4f91748a7d3edc9480c13898b0353708920", size = 5399500, upload-time = "2026-01-31T23:12:58.671Z" }, - { url = "https://files.pythonhosted.org/packages/33/9f/413adf3fc955541ff5536b78fcf0754680b3c6d95103230252a2c9408d23/numpy-2.4.2-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:cf28c0c1d4c4bf00f509fa7eb02c58d7caf221b50b467bcb0d9bbf1584d5c821", size = 6714252, upload-time = "2026-01-31T23:13:00.518Z" }, - { url = "https://files.pythonhosted.org/packages/91/da/643aad274e29ccbdf42ecd94dafe524b81c87bcb56b83872d54827f10543/numpy-2.4.2-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e04ae107ac591763a47398bb45b568fc38f02dbc4aa44c063f67a131f99346cb", size = 15797142, upload-time = "2026-01-31T23:13:02.219Z" }, - { url = "https://files.pythonhosted.org/packages/66/27/965b8525e9cb5dc16481b30a1b3c21e50c7ebf6e9dbd48d0c4d0d5089c7e/numpy-2.4.2-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:602f65afdef699cda27ec0b9224ae5dc43e328f4c24c689deaf77133dbee74d0", size = 16727979, upload-time = "2026-01-31T23:13:04.62Z" }, - { url = "https://files.pythonhosted.org/packages/de/e5/b7d20451657664b07986c2f6e3be564433f5dcaf3482d68eaecd79afaf03/numpy-2.4.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:be71bf1edb48ebbbf7f6337b5bfd2f895d1902f6335a5830b20141fc126ffba0", size = 12502577, upload-time = "2026-01-31T23:13:07.08Z" }, + { url = "https://files.pythonhosted.org/packages/f9/51/5093a2df15c4dc19da3f79d1021e891f5dcf1d9d1db6ba38891d5590f3fe/numpy-2.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:33b3bf58ee84b172c067f56aeadc7ee9ab6de69c5e800ab5b10295d54c581adb", size = 16957183, upload-time = "2026-03-09T07:55:57.774Z" }, + { url = "https://files.pythonhosted.org/packages/b5/7c/c061f3de0630941073d2598dc271ac2f6cbcf5c83c74a5870fea07488333/numpy-2.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8ba7b51e71c05aa1f9bc3641463cd82308eab40ce0d5c7e1fd4038cbf9938147", size = 14968734, upload-time = "2026-03-09T07:56:00.494Z" }, + { url = "https://files.pythonhosted.org/packages/ef/27/d26c85cbcd86b26e4f125b0668e7a7c0542d19dd7d23ee12e87b550e95b5/numpy-2.4.3-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:a1988292870c7cb9d0ebb4cc96b4d447513a9644801de54606dc7aabf2b7d920", size = 5475288, upload-time = "2026-03-09T07:56:02.857Z" }, + { url = "https://files.pythonhosted.org/packages/2b/09/3c4abbc1dcd8010bf1a611d174c7aa689fc505585ec806111b4406f6f1b1/numpy-2.4.3-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:23b46bb6d8ecb68b58c09944483c135ae5f0e9b8d8858ece5e4ead783771d2a9", size = 6805253, upload-time = "2026-03-09T07:56:04.53Z" }, + { url = "https://files.pythonhosted.org/packages/21/bc/e7aa3f6817e40c3f517d407742337cbb8e6fc4b83ce0b55ab780c829243b/numpy-2.4.3-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a016db5c5dba78fa8fe9f5d80d6708f9c42ab087a739803c0ac83a43d686a470", size = 15969479, upload-time = "2026-03-09T07:56:06.638Z" }, + { url = "https://files.pythonhosted.org/packages/78/51/9f5d7a41f0b51649ddf2f2320595e15e122a40610b233d51928dd6c92353/numpy-2.4.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:715de7f82e192e8cae5a507a347d97ad17598f8e026152ca97233e3666daaa71", size = 16901035, upload-time = "2026-03-09T07:56:09.405Z" }, + { url = "https://files.pythonhosted.org/packages/64/6e/b221dd847d7181bc5ee4857bfb026182ef69499f9305eb1371cbb1aea626/numpy-2.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2ddb7919366ee468342b91dea2352824c25b55814a987847b6c52003a7c97f15", size = 17325657, upload-time = "2026-03-09T07:56:12.067Z" }, + { url = "https://files.pythonhosted.org/packages/eb/b8/8f3fd2da596e1063964b758b5e3c970aed1949a05200d7e3d46a9d46d643/numpy-2.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a315e5234d88067f2d97e1f2ef670a7569df445d55400f1e33d117418d008d52", size = 18635512, upload-time = "2026-03-09T07:56:14.629Z" }, + { url = "https://files.pythonhosted.org/packages/5c/24/2993b775c37e39d2f8ab4125b44337ab0b2ba106c100980b7c274a22bee7/numpy-2.4.3-cp311-cp311-win32.whl", hash = "sha256:2b3f8d2c4589b1a2028d2a770b0fc4d1f332fb5e01521f4de3199a896d158ddd", size = 6238100, upload-time = "2026-03-09T07:56:17.243Z" }, + { url = "https://files.pythonhosted.org/packages/76/1d/edccf27adedb754db7c4511d5eac8b83f004ae948fe2d3509e8b78097d4c/numpy-2.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:77e76d932c49a75617c6d13464e41203cd410956614d0a0e999b25e9e8d27eec", size = 12609816, upload-time = "2026-03-09T07:56:19.089Z" }, + { url = "https://files.pythonhosted.org/packages/92/82/190b99153480076c8dce85f4cfe7d53ea84444145ffa54cb58dcd460d66b/numpy-2.4.3-cp311-cp311-win_arm64.whl", hash = "sha256:eb610595dd91560905c132c709412b512135a60f1851ccbd2c959e136431ff67", size = 10485757, upload-time = "2026-03-09T07:56:21.753Z" }, + { url = "https://files.pythonhosted.org/packages/a9/ed/6388632536f9788cea23a3a1b629f25b43eaacd7d7377e5d6bc7b9deb69b/numpy-2.4.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:61b0cbabbb6126c8df63b9a3a0c4b1f44ebca5e12ff6997b80fcf267fb3150ef", size = 16669628, upload-time = "2026-03-09T07:56:24.252Z" }, + { url = "https://files.pythonhosted.org/packages/74/1b/ee2abfc68e1ce728b2958b6ba831d65c62e1b13ce3017c13943f8f9b5b2e/numpy-2.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7395e69ff32526710748f92cd8c9849b361830968ea3e24a676f272653e8983e", size = 14696872, upload-time = "2026-03-09T07:56:26.991Z" }, + { url = "https://files.pythonhosted.org/packages/ba/d1/780400e915ff5638166f11ca9dc2c5815189f3d7cf6f8759a1685e586413/numpy-2.4.3-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:abdce0f71dcb4a00e4e77f3faf05e4616ceccfe72ccaa07f47ee79cda3b7b0f4", size = 5203489, upload-time = "2026-03-09T07:56:29.414Z" }, + { url = "https://files.pythonhosted.org/packages/0b/bb/baffa907e9da4cc34a6e556d6d90e032f6d7a75ea47968ea92b4858826c4/numpy-2.4.3-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:48da3a4ee1336454b07497ff7ec83903efa5505792c4e6d9bf83d99dc07a1e18", size = 6550814, upload-time = "2026-03-09T07:56:32.225Z" }, + { url = "https://files.pythonhosted.org/packages/7b/12/8c9f0c6c95f76aeb20fc4a699c33e9f827fa0d0f857747c73bb7b17af945/numpy-2.4.3-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:32e3bef222ad6b052280311d1d60db8e259e4947052c3ae7dd6817451fc8a4c5", size = 15666601, upload-time = "2026-03-09T07:56:34.461Z" }, + { url = "https://files.pythonhosted.org/packages/bd/79/cc665495e4d57d0aa6fbcc0aa57aa82671dfc78fbf95fe733ed86d98f52a/numpy-2.4.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e7dd01a46700b1967487141a66ac1a3cf0dd8ebf1f08db37d46389401512ca97", size = 16621358, upload-time = "2026-03-09T07:56:36.852Z" }, + { url = "https://files.pythonhosted.org/packages/a8/40/b4ecb7224af1065c3539f5ecfff879d090de09608ad1008f02c05c770cb3/numpy-2.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:76f0f283506c28b12bba319c0fab98217e9f9b54e6160e9c79e9f7348ba32e9c", size = 17016135, upload-time = "2026-03-09T07:56:39.337Z" }, + { url = "https://files.pythonhosted.org/packages/f7/b1/6a88e888052eed951afed7a142dcdf3b149a030ca59b4c71eef085858e43/numpy-2.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:737f630a337364665aba3b5a77e56a68cc42d350edd010c345d65a3efa3addcc", size = 18345816, upload-time = "2026-03-09T07:56:42.31Z" }, + { url = "https://files.pythonhosted.org/packages/f3/8f/103a60c5f8c3d7fc678c19cd7b2476110da689ccb80bc18050efbaeae183/numpy-2.4.3-cp312-cp312-win32.whl", hash = "sha256:26952e18d82a1dbbc2f008d402021baa8d6fc8e84347a2072a25e08b46d698b9", size = 5960132, upload-time = "2026-03-09T07:56:44.851Z" }, + { url = "https://files.pythonhosted.org/packages/d7/7c/f5ee1bf6ed888494978046a809df2882aad35d414b622893322df7286879/numpy-2.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:65f3c2455188f09678355f5cae1f959a06b778bc66d535da07bf2ef20cd319d5", size = 12316144, upload-time = "2026-03-09T07:56:47.057Z" }, + { url = "https://files.pythonhosted.org/packages/71/46/8d1cb3f7a00f2fb6394140e7e6623696e54c6318a9d9691bb4904672cf42/numpy-2.4.3-cp312-cp312-win_arm64.whl", hash = "sha256:2abad5c7fef172b3377502bde47892439bae394a71bc329f31df0fd829b41a9e", size = 10220364, upload-time = "2026-03-09T07:56:49.849Z" }, + { url = "https://files.pythonhosted.org/packages/b6/d0/1fe47a98ce0df229238b77611340aff92d52691bcbc10583303181abf7fc/numpy-2.4.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b346845443716c8e542d54112966383b448f4a3ba5c66409771b8c0889485dd3", size = 16665297, upload-time = "2026-03-09T07:56:52.296Z" }, + { url = "https://files.pythonhosted.org/packages/27/d9/4e7c3f0e68dfa91f21c6fb6cf839bc829ec920688b1ce7ec722b1a6202fb/numpy-2.4.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2629289168f4897a3c4e23dc98d6f1731f0fc0fe52fb9db19f974041e4cc12b9", size = 14691853, upload-time = "2026-03-09T07:56:54.992Z" }, + { url = "https://files.pythonhosted.org/packages/3a/66/bd096b13a87549683812b53ab211e6d413497f84e794fb3c39191948da97/numpy-2.4.3-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:bb2e3cf95854233799013779216c57e153c1ee67a0bf92138acca0e429aefaee", size = 5198435, upload-time = "2026-03-09T07:56:57.184Z" }, + { url = "https://files.pythonhosted.org/packages/a2/2f/687722910b5a5601de2135c891108f51dfc873d8e43c8ed9f4ebb440b4a2/numpy-2.4.3-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:7f3408ff897f8ab07a07fbe2823d7aee6ff644c097cc1f90382511fe982f647f", size = 6546347, upload-time = "2026-03-09T07:56:59.531Z" }, + { url = "https://files.pythonhosted.org/packages/bf/ec/7971c4e98d86c564750393fab8d7d83d0a9432a9d78bb8a163a6dc59967a/numpy-2.4.3-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:decb0eb8a53c3b009b0962378065589685d66b23467ef5dac16cbe818afde27f", size = 15664626, upload-time = "2026-03-09T07:57:01.385Z" }, + { url = "https://files.pythonhosted.org/packages/7e/eb/7daecbea84ec935b7fc732e18f532073064a3816f0932a40a17f3349185f/numpy-2.4.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d5f51900414fc9204a0e0da158ba2ac52b75656e7dce7e77fb9f84bfa343b4cc", size = 16608916, upload-time = "2026-03-09T07:57:04.008Z" }, + { url = "https://files.pythonhosted.org/packages/df/58/2a2b4a817ffd7472dca4421d9f0776898b364154e30c95f42195041dc03b/numpy-2.4.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6bd06731541f89cdc01b261ba2c9e037f1543df7472517836b78dfb15bd6e476", size = 17015824, upload-time = "2026-03-09T07:57:06.347Z" }, + { url = "https://files.pythonhosted.org/packages/4a/ca/627a828d44e78a418c55f82dd4caea8ea4a8ef24e5144d9e71016e52fb40/numpy-2.4.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:22654fe6be0e5206f553a9250762c653d3698e46686eee53b399ab90da59bd92", size = 18334581, upload-time = "2026-03-09T07:57:09.114Z" }, + { url = "https://files.pythonhosted.org/packages/cd/c0/76f93962fc79955fcba30a429b62304332345f22d4daec1cb33653425643/numpy-2.4.3-cp313-cp313-win32.whl", hash = "sha256:d71e379452a2f670ccb689ec801b1218cd3983e253105d6e83780967e899d687", size = 5958618, upload-time = "2026-03-09T07:57:11.432Z" }, + { url = "https://files.pythonhosted.org/packages/b1/3c/88af0040119209b9b5cb59485fa48b76f372c73068dbf9254784b975ac53/numpy-2.4.3-cp313-cp313-win_amd64.whl", hash = "sha256:0a60e17a14d640f49146cb38e3f105f571318db7826d9b6fef7e4dce758faecd", size = 12312824, upload-time = "2026-03-09T07:57:13.586Z" }, + { url = "https://files.pythonhosted.org/packages/58/ce/3d07743aced3d173f877c3ef6a454c2174ba42b584ab0b7e6d99374f51ed/numpy-2.4.3-cp313-cp313-win_arm64.whl", hash = "sha256:c9619741e9da2059cd9c3f206110b97583c7152c1dc9f8aafd4beb450ac1c89d", size = 10221218, upload-time = "2026-03-09T07:57:16.183Z" }, + { url = "https://files.pythonhosted.org/packages/62/09/d96b02a91d09e9d97862f4fc8bfebf5400f567d8eb1fe4b0cc4795679c15/numpy-2.4.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:7aa4e54f6469300ebca1d9eb80acd5253cdfa36f2c03d79a35883687da430875", size = 14819570, upload-time = "2026-03-09T07:57:18.564Z" }, + { url = "https://files.pythonhosted.org/packages/b5/ca/0b1aba3905fdfa3373d523b2b15b19029f4f3031c87f4066bd9d20ef6c6b/numpy-2.4.3-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:d1b90d840b25874cf5cd20c219af10bac3667db3876d9a495609273ebe679070", size = 5326113, upload-time = "2026-03-09T07:57:21.052Z" }, + { url = "https://files.pythonhosted.org/packages/c0/63/406e0fd32fcaeb94180fd6a4c41e55736d676c54346b7efbce548b94a914/numpy-2.4.3-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:a749547700de0a20a6718293396ec237bb38218049cfce788e08fcb716e8cf73", size = 6646370, upload-time = "2026-03-09T07:57:22.804Z" }, + { url = "https://files.pythonhosted.org/packages/b6/d0/10f7dc157d4b37af92720a196be6f54f889e90dcd30dce9dc657ed92c257/numpy-2.4.3-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:94f3c4a151a2e529adf49c1d54f0f57ff8f9b233ee4d44af623a81553ab86368", size = 15723499, upload-time = "2026-03-09T07:57:24.693Z" }, + { url = "https://files.pythonhosted.org/packages/66/f1/d1c2bf1161396629701bc284d958dc1efa3a5a542aab83cf11ee6eb4cba5/numpy-2.4.3-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22c31dc07025123aedf7f2db9e91783df13f1776dc52c6b22c620870dc0fab22", size = 16657164, upload-time = "2026-03-09T07:57:27.676Z" }, + { url = "https://files.pythonhosted.org/packages/1a/be/cca19230b740af199ac47331a21c71e7a3d0ba59661350483c1600d28c37/numpy-2.4.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:148d59127ac95979d6f07e4d460f934ebdd6eed641db9c0db6c73026f2b2101a", size = 17081544, upload-time = "2026-03-09T07:57:30.664Z" }, + { url = "https://files.pythonhosted.org/packages/b9/c5/9602b0cbb703a0936fb40f8a95407e8171935b15846de2f0776e08af04c7/numpy-2.4.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a97cbf7e905c435865c2d939af3d93f99d18eaaa3cabe4256f4304fb51604349", size = 18380290, upload-time = "2026-03-09T07:57:33.763Z" }, + { url = "https://files.pythonhosted.org/packages/ed/81/9f24708953cd30be9ee36ec4778f4b112b45165812f2ada4cc5ea1c1f254/numpy-2.4.3-cp313-cp313t-win32.whl", hash = "sha256:be3b8487d725a77acccc9924f65fd8bce9af7fac8c9820df1049424a2115af6c", size = 6082814, upload-time = "2026-03-09T07:57:36.491Z" }, + { url = "https://files.pythonhosted.org/packages/e2/9e/52f6eaa13e1a799f0ab79066c17f7016a4a8ae0c1aefa58c82b4dab690b4/numpy-2.4.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1ec84fd7c8e652b0f4aaaf2e6e9cc8eaa9b1b80a537e06b2e3a2fb176eedcb26", size = 12452673, upload-time = "2026-03-09T07:57:38.281Z" }, + { url = "https://files.pythonhosted.org/packages/c4/04/b8cece6ead0b30c9fbd99bb835ad7ea0112ac5f39f069788c5558e3b1ab2/numpy-2.4.3-cp313-cp313t-win_arm64.whl", hash = "sha256:120df8c0a81ebbf5b9020c91439fccd85f5e018a927a39f624845be194a2be02", size = 10290907, upload-time = "2026-03-09T07:57:40.747Z" }, + { url = "https://files.pythonhosted.org/packages/70/ae/3936f79adebf8caf81bd7a599b90a561334a658be4dcc7b6329ebf4ee8de/numpy-2.4.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:5884ce5c7acfae1e4e1b6fde43797d10aa506074d25b531b4f54bde33c0c31d4", size = 16664563, upload-time = "2026-03-09T07:57:43.817Z" }, + { url = "https://files.pythonhosted.org/packages/9b/62/760f2b55866b496bb1fa7da2a6db076bef908110e568b02fcfc1422e2a3a/numpy-2.4.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:297837823f5bc572c5f9379b0c9f3a3365f08492cbdc33bcc3af174372ebb168", size = 14702161, upload-time = "2026-03-09T07:57:46.169Z" }, + { url = "https://files.pythonhosted.org/packages/32/af/a7a39464e2c0a21526fb4fb76e346fb172ebc92f6d1c7a07c2c139cc17b1/numpy-2.4.3-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:a111698b4a3f8dcbe54c64a7708f049355abd603e619013c346553c1fd4ca90b", size = 5208738, upload-time = "2026-03-09T07:57:48.506Z" }, + { url = "https://files.pythonhosted.org/packages/29/8c/2a0cf86a59558fa078d83805589c2de490f29ed4fb336c14313a161d358a/numpy-2.4.3-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:4bd4741a6a676770e0e97fe9ab2e51de01183df3dcbcec591d26d331a40de950", size = 6543618, upload-time = "2026-03-09T07:57:50.591Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b8/612ce010c0728b1c363fa4ea3aa4c22fe1c5da1de008486f8c2f5cb92fae/numpy-2.4.3-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:54f29b877279d51e210e0c80709ee14ccbbad647810e8f3d375561c45ef613dd", size = 15680676, upload-time = "2026-03-09T07:57:52.34Z" }, + { url = "https://files.pythonhosted.org/packages/a9/7e/4f120ecc54ba26ddf3dc348eeb9eb063f421de65c05fc961941798feea18/numpy-2.4.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:679f2a834bae9020f81534671c56fd0cc76dd7e5182f57131478e23d0dc59e24", size = 16613492, upload-time = "2026-03-09T07:57:54.91Z" }, + { url = "https://files.pythonhosted.org/packages/2c/86/1b6020db73be330c4b45d5c6ee4295d59cfeef0e3ea323959d053e5a6909/numpy-2.4.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:d84f0f881cb2225c2dfd7f78a10a5645d487a496c6668d6cc39f0f114164f3d0", size = 17031789, upload-time = "2026-03-09T07:57:57.641Z" }, + { url = "https://files.pythonhosted.org/packages/07/3a/3b90463bf41ebc21d1b7e06079f03070334374208c0f9a1f05e4ae8455e7/numpy-2.4.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d213c7e6e8d211888cc359bab7199670a00f5b82c0978b9d1c75baf1eddbeac0", size = 18339941, upload-time = "2026-03-09T07:58:00.577Z" }, + { url = "https://files.pythonhosted.org/packages/a8/74/6d736c4cd962259fd8bae9be27363eb4883a2f9069763747347544c2a487/numpy-2.4.3-cp314-cp314-win32.whl", hash = "sha256:52077feedeff7c76ed7c9f1a0428558e50825347b7545bbb8523da2cd55c547a", size = 6007503, upload-time = "2026-03-09T07:58:03.331Z" }, + { url = "https://files.pythonhosted.org/packages/48/39/c56ef87af669364356bb011922ef0734fc49dad51964568634c72a009488/numpy-2.4.3-cp314-cp314-win_amd64.whl", hash = "sha256:0448e7f9caefb34b4b7dd2b77f21e8906e5d6f0365ad525f9f4f530b13df2afc", size = 12444915, upload-time = "2026-03-09T07:58:06.353Z" }, + { url = "https://files.pythonhosted.org/packages/9d/1f/ab8528e38d295fd349310807496fabb7cf9fe2e1f70b97bc20a483ea9d4a/numpy-2.4.3-cp314-cp314-win_arm64.whl", hash = "sha256:b44fd60341c4d9783039598efadd03617fa28d041fc37d22b62d08f2027fa0e7", size = 10494875, upload-time = "2026-03-09T07:58:08.734Z" }, + { url = "https://files.pythonhosted.org/packages/e6/ef/b7c35e4d5ef141b836658ab21a66d1a573e15b335b1d111d31f26c8ef80f/numpy-2.4.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0a195f4216be9305a73c0e91c9b026a35f2161237cf1c6de9b681637772ea657", size = 14822225, upload-time = "2026-03-09T07:58:11.034Z" }, + { url = "https://files.pythonhosted.org/packages/cd/8d/7730fa9278cf6648639946cc816e7cc89f0d891602584697923375f801ed/numpy-2.4.3-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:cd32fbacb9fd1bf041bf8e89e4576b6f00b895f06d00914820ae06a616bdfef7", size = 5328769, upload-time = "2026-03-09T07:58:13.67Z" }, + { url = "https://files.pythonhosted.org/packages/47/01/d2a137317c958b074d338807c1b6a383406cdf8b8e53b075d804cc3d211d/numpy-2.4.3-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:2e03c05abaee1f672e9d67bc858f300b5ccba1c21397211e8d77d98350972093", size = 6649461, upload-time = "2026-03-09T07:58:15.912Z" }, + { url = "https://files.pythonhosted.org/packages/5c/34/812ce12bc0f00272a4b0ec0d713cd237cb390666eb6206323d1cc9cedbb2/numpy-2.4.3-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7d1ce23cce91fcea443320a9d0ece9b9305d4368875bab09538f7a5b4131938a", size = 15725809, upload-time = "2026-03-09T07:58:17.787Z" }, + { url = "https://files.pythonhosted.org/packages/25/c0/2aed473a4823e905e765fee3dc2cbf504bd3e68ccb1150fbdabd5c39f527/numpy-2.4.3-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c59020932feb24ed49ffd03704fbab89f22aa9c0d4b180ff45542fe8918f5611", size = 16655242, upload-time = "2026-03-09T07:58:20.476Z" }, + { url = "https://files.pythonhosted.org/packages/f2/c8/7e052b2fc87aa0e86de23f20e2c42bd261c624748aa8efd2c78f7bb8d8c6/numpy-2.4.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:9684823a78a6cd6ad7511fc5e25b07947d1d5b5e2812c93fe99d7d4195130720", size = 17080660, upload-time = "2026-03-09T07:58:23.067Z" }, + { url = "https://files.pythonhosted.org/packages/f3/3d/0876746044db2adcb11549f214d104f2e1be00f07a67edbb4e2812094847/numpy-2.4.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0200b25c687033316fb39f0ff4e3e690e8957a2c3c8d22499891ec58c37a3eb5", size = 18380384, upload-time = "2026-03-09T07:58:25.839Z" }, + { url = "https://files.pythonhosted.org/packages/07/12/8160bea39da3335737b10308df4f484235fd297f556745f13092aa039d3b/numpy-2.4.3-cp314-cp314t-win32.whl", hash = "sha256:5e10da9e93247e554bb1d22f8edc51847ddd7dde52d85ce31024c1b4312bfba0", size = 6154547, upload-time = "2026-03-09T07:58:28.289Z" }, + { url = "https://files.pythonhosted.org/packages/42/f3/76534f61f80d74cc9cdf2e570d3d4eeb92c2280a27c39b0aaf471eda7b48/numpy-2.4.3-cp314-cp314t-win_amd64.whl", hash = "sha256:45f003dbdffb997a03da2d1d0cb41fbd24a87507fb41605c0420a3db5bd4667b", size = 12633645, upload-time = "2026-03-09T07:58:30.384Z" }, + { url = "https://files.pythonhosted.org/packages/1f/b6/7c0d4334c15983cec7f92a69e8ce9b1e6f31857e5ee3a413ac424e6bd63d/numpy-2.4.3-cp314-cp314t-win_arm64.whl", hash = "sha256:4d382735cecd7bcf090172489a525cd7d4087bc331f7df9f60ddc9a296cf208e", size = 10565454, upload-time = "2026-03-09T07:58:33.031Z" }, + { url = "https://files.pythonhosted.org/packages/64/e4/4dab9fb43c83719c29241c535d9e07be73bea4bc0c6686c5816d8e1b6689/numpy-2.4.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:c6b124bfcafb9e8d3ed09130dbee44848c20b3e758b6bbf006e641778927c028", size = 16834892, upload-time = "2026-03-09T07:58:35.334Z" }, + { url = "https://files.pythonhosted.org/packages/c9/29/f8b6d4af90fed3dfda84ebc0df06c9833d38880c79ce954e5b661758aa31/numpy-2.4.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:76dbb9d4e43c16cf9aa711fcd8de1e2eeb27539dcefb60a1d5e9f12fae1d1ed8", size = 14893070, upload-time = "2026-03-09T07:58:37.7Z" }, + { url = "https://files.pythonhosted.org/packages/9a/04/a19b3c91dbec0a49269407f15d5753673a09832daed40c45e8150e6fa558/numpy-2.4.3-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:29363fbfa6f8ee855d7569c96ce524845e3d726d6c19b29eceec7dd555dab152", size = 5399609, upload-time = "2026-03-09T07:58:39.853Z" }, + { url = "https://files.pythonhosted.org/packages/79/34/4d73603f5420eab89ea8a67097b31364bf7c30f811d4dd84b1659c7476d9/numpy-2.4.3-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:bc71942c789ef415a37f0d4eab90341425a00d538cd0642445d30b41023d3395", size = 6714355, upload-time = "2026-03-09T07:58:42.365Z" }, + { url = "https://files.pythonhosted.org/packages/58/ad/1100d7229bb248394939a12a8074d485b655e8ed44207d328fdd7fcebc7b/numpy-2.4.3-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7e58765ad74dcebd3ef0208a5078fba32dc8ec3578fe84a604432950cd043d79", size = 15800434, upload-time = "2026-03-09T07:58:44.837Z" }, + { url = "https://files.pythonhosted.org/packages/0c/fd/16d710c085d28ba4feaf29ac60c936c9d662e390344f94a6beaa2ac9899b/numpy-2.4.3-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e236dbda4e1d319d681afcbb136c0c4a8e0f1a5c58ceec2adebb547357fe857", size = 16729409, upload-time = "2026-03-09T07:58:47.972Z" }, + { url = "https://files.pythonhosted.org/packages/57/a7/b35835e278c18b85206834b3aa3abe68e77a98769c59233d1f6300284781/numpy-2.4.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:4b42639cdde6d24e732ff823a3fa5b701d8acad89c4142bc1d0bd6dc85200ba5", size = 12504685, upload-time = "2026-03-09T07:58:50.525Z" }, ] [[package]] @@ -3524,7 +3524,7 @@ wheels = [ [[package]] name = "openai" -version = "2.24.0" +version = "2.26.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -3536,14 +3536,14 @@ dependencies = [ { name = "tqdm", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/55/13/17e87641b89b74552ed408a92b231283786523edddc95f3545809fab673c/openai-2.24.0.tar.gz", hash = "sha256:1e5769f540dbd01cb33bc4716a23e67b9d695161a734aff9c5f925e2bf99a673", size = 658717, upload-time = "2026-02-24T20:02:07.958Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/91/2a06c4e9597c338cac1e5e5a8dd6f29e1836fc229c4c523529dca387fda8/openai-2.26.0.tar.gz", hash = "sha256:b41f37c140ae0034a6e92b0c509376d907f3a66109935fba2c1b471a7c05a8fb", size = 666702, upload-time = "2026-03-05T23:17:35.874Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c9/30/844dc675ee6902579b8eef01ed23917cc9319a1c9c0c14ec6e39340c96d0/openai-2.24.0-py3-none-any.whl", hash = "sha256:fed30480d7d6c884303287bde864980a4b137b60553ffbcf9ab4a233b7a73d94", size = 1120122, upload-time = "2026-02-24T20:02:05.669Z" }, + { url = "https://files.pythonhosted.org/packages/c6/2e/3f73e8ca53718952222cacd0cf7eecc9db439d020f0c1fe7ae717e4e199a/openai-2.26.0-py3-none-any.whl", hash = "sha256:6151bf8f83802f036117f06cc8a57b3a4da60da9926826cc96747888b57f394f", size = 1136409, upload-time = "2026-03-05T23:17:34.072Z" }, ] [[package]] name = "openai-agents" -version = "0.10.3" +version = "0.11.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "griffe", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -3554,14 +3554,14 @@ dependencies = [ { name = "types-requests", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ef/ed/9e6b019c659d9d98f926002304c68d3104d551b4cfec947a05e4dadc62ae/openai_agents-0.10.3.tar.gz", hash = "sha256:a54d12bd826e67f2dae428fe33e2f0137fdfe8874c5b2ba63f1951b245688abb", size = 2456278, upload-time = "2026-03-02T05:14:15.44Z" } +sdist = { url = "https://files.pythonhosted.org/packages/08/5e/79875ab7f0f2da8247d76616001ab3a82f6b128262a5c69367530689e69c/openai_agents-0.11.1.tar.gz", hash = "sha256:b2bec1a780a2e2f2419e9688931eb65649bb5283f99e946018d4f1b67d4e95ca", size = 2582366, upload-time = "2026-03-09T06:34:07.701Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5b/16/b3fffdc42ef31cc66e1663ab2c7e171f1e4067197341bd68522cc3deeeb0/openai_agents-0.10.3-py3-none-any.whl", hash = "sha256:c36909ddc86af3829abbe36f39afa22221495f264b567f91373a2c2500f26729", size = 403593, upload-time = "2026-03-02T05:14:13.515Z" }, + { url = "https://files.pythonhosted.org/packages/f7/e9/d8d8a39a2e3c5fb1a538a13a6928f4223ff6664b8ba2a6137187b0f69370/openai_agents-0.11.1-py3-none-any.whl", hash = "sha256:4fda67bfe2aab4a1cd4a701d4e8d3d1eb849ba66aeea51295dbedf8a9e52cdb1", size = 434624, upload-time = "2026-03-09T06:34:05.653Z" }, ] [[package]] name = "openai-chatkit" -version = "1.6.2" +version = "1.6.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "jinja2", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -3570,52 +3570,52 @@ dependencies = [ { name = "pydantic", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "uvicorn", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/40/87/87826ce30c34a9d3c71eecdd96f7add26a57cba2ec0e6fbf933e321f2254/openai_chatkit-1.6.2.tar.gz", hash = "sha256:fd91e8bf0e14244dc86f20c5f93f8386beff3aa1afbcd6f1fec7c1f52de856c6", size = 61562, upload-time = "2026-02-20T20:57:20.228Z" } +sdist = { url = "https://files.pythonhosted.org/packages/05/46/b15fd77f7df12a2cabd8475de6226ce04d1cec7b283b21e8f0f52edc63a7/openai_chatkit-1.6.3.tar.gz", hash = "sha256:f16e347f39c376a78dddb5ceaf5398a4bb700c0145bfa7cb899d65135972956e", size = 61822, upload-time = "2026-03-04T19:30:19.564Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/14/50/0043bc560068f810b42f7cc14cdf5c7e0c8521f5bffd157adb1ae3c9303c/openai_chatkit-1.6.2-py3-none-any.whl", hash = "sha256:9cd64c49539780be5411a8907b4f67e156949b6d73e8bdbade60254aca8a537e", size = 42566, upload-time = "2026-02-20T20:57:19.088Z" }, + { url = "https://files.pythonhosted.org/packages/52/5e/e06a4bec431083c282dea5729b0947b940900a4014216835182048078877/openai_chatkit-1.6.3-py3-none-any.whl", hash = "sha256:642ecdf810eda3619964f316e393f252741130a5500dc3a357d501f8657b3941", size = 42578, upload-time = "2026-03-04T19:30:18.314Z" }, ] [[package]] name = "opentelemetry-api" -version = "1.39.1" +version = "1.40.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "importlib-metadata", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/97/b9/3161be15bb8e3ad01be8be5a968a9237c3027c5be504362ff800fca3e442/opentelemetry_api-1.39.1.tar.gz", hash = "sha256:fbde8c80e1b937a2c61f20347e91c0c18a1940cecf012d62e65a7caf08967c9c", size = 65767, upload-time = "2025-12-11T13:32:39.182Z" } +sdist = { url = "https://files.pythonhosted.org/packages/2c/1d/4049a9e8698361cc1a1aa03a6c59e4fa4c71e0c0f94a30f988a6876a2ae6/opentelemetry_api-1.40.0.tar.gz", hash = "sha256:159be641c0b04d11e9ecd576906462773eb97ae1b657730f0ecf64d32071569f", size = 70851, upload-time = "2026-03-04T14:17:21.555Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/cf/df/d3f1ddf4bb4cb50ed9b1139cc7b1c54c34a1e7ce8fd1b9a37c0d1551a6bd/opentelemetry_api-1.39.1-py3-none-any.whl", hash = "sha256:2edd8463432a7f8443edce90972169b195e7d6a05500cd29e6d13898187c9950", size = 66356, upload-time = "2025-12-11T13:32:17.304Z" }, + { url = "https://files.pythonhosted.org/packages/5f/bf/93795954016c522008da367da292adceed71cca6ee1717e1d64c83089099/opentelemetry_api-1.40.0-py3-none-any.whl", hash = "sha256:82dd69331ae74b06f6a874704be0cfaa49a1650e1537d4a813b86ecef7d0ecf9", size = 68676, upload-time = "2026-03-04T14:17:01.24Z" }, ] [[package]] name = "opentelemetry-exporter-otlp" -version = "1.39.1" +version = "1.40.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-exporter-otlp-proto-grpc", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "opentelemetry-exporter-otlp-proto-http", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/30/9c/3ab1db90f32da200dba332658f2bbe602369e3d19f6aba394031a42635be/opentelemetry_exporter_otlp-1.39.1.tar.gz", hash = "sha256:7cf7470e9fd0060c8a38a23e4f695ac686c06a48ad97f8d4867bc9b420180b9c", size = 6147, upload-time = "2025-12-11T13:32:40.309Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/37/b6708e0eff5c5fb9aba2e0ea09f7f3bcbfd12a592d2a780241b5f6014df7/opentelemetry_exporter_otlp-1.40.0.tar.gz", hash = "sha256:7caa0870b95e2fcb59d64e16e2b639ecffb07771b6cd0000b5d12e5e4fef765a", size = 6152, upload-time = "2026-03-04T14:17:23.235Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/00/6c/bdc82a066e6fb1dcf9e8cc8d4e026358fe0f8690700cc6369a6bf9bd17a7/opentelemetry_exporter_otlp-1.39.1-py3-none-any.whl", hash = "sha256:68ae69775291f04f000eb4b698ff16ff685fdebe5cb52871bc4e87938a7b00fe", size = 7019, upload-time = "2025-12-11T13:32:19.387Z" }, + { url = "https://files.pythonhosted.org/packages/2d/fc/aea77c28d9f3ffef2fdafdc3f4a235aee4091d262ddabd25882f47ce5c5f/opentelemetry_exporter_otlp-1.40.0-py3-none-any.whl", hash = "sha256:48c87e539ec9afb30dc443775a1334cc5487de2f72a770a4c00b1610bf6c697d", size = 7023, upload-time = "2026-03-04T14:17:03.612Z" }, ] [[package]] name = "opentelemetry-exporter-otlp-proto-common" -version = "1.39.1" +version = "1.40.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-proto", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e9/9d/22d241b66f7bbde88a3bfa6847a351d2c46b84de23e71222c6aae25c7050/opentelemetry_exporter_otlp_proto_common-1.39.1.tar.gz", hash = "sha256:763370d4737a59741c89a67b50f9e39271639ee4afc999dadfe768541c027464", size = 20409, upload-time = "2025-12-11T13:32:40.885Z" } +sdist = { url = "https://files.pythonhosted.org/packages/51/bc/1559d46557fe6eca0b46c88d4c2676285f1f3be2e8d06bb5d15fbffc814a/opentelemetry_exporter_otlp_proto_common-1.40.0.tar.gz", hash = "sha256:1cbee86a4064790b362a86601ee7934f368b81cd4cc2f2e163902a6e7818a0fa", size = 20416, upload-time = "2026-03-04T14:17:23.801Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8c/02/ffc3e143d89a27ac21fd557365b98bd0653b98de8a101151d5805b5d4c33/opentelemetry_exporter_otlp_proto_common-1.39.1-py3-none-any.whl", hash = "sha256:08f8a5862d64cc3435105686d0216c1365dc5701f86844a8cd56597d0c764fde", size = 18366, upload-time = "2025-12-11T13:32:20.2Z" }, + { url = "https://files.pythonhosted.org/packages/8b/ca/8f122055c97a932311a3f640273f084e738008933503d0c2563cd5d591fc/opentelemetry_exporter_otlp_proto_common-1.40.0-py3-none-any.whl", hash = "sha256:7081ff453835a82417bf38dccf122c827c3cbc94f2079b03bba02a3165f25149", size = 18369, upload-time = "2026-03-04T14:17:04.796Z" }, ] [[package]] name = "opentelemetry-exporter-otlp-proto-grpc" -version = "1.39.1" +version = "1.40.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "googleapis-common-protos", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -3627,14 +3627,14 @@ dependencies = [ { name = "opentelemetry-sdk", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/53/48/b329fed2c610c2c32c9366d9dc597202c9d1e58e631c137ba15248d8850f/opentelemetry_exporter_otlp_proto_grpc-1.39.1.tar.gz", hash = "sha256:772eb1c9287485d625e4dbe9c879898e5253fea111d9181140f51291b5fec3ad", size = 24650, upload-time = "2025-12-11T13:32:41.429Z" } +sdist = { url = "https://files.pythonhosted.org/packages/8f/7f/b9e60435cfcc7590fa87436edad6822240dddbc184643a2a005301cc31f4/opentelemetry_exporter_otlp_proto_grpc-1.40.0.tar.gz", hash = "sha256:bd4015183e40b635b3dab8da528b27161ba83bf4ef545776b196f0fb4ec47740", size = 25759, upload-time = "2026-03-04T14:17:24.4Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/81/a3/cc9b66575bd6597b98b886a2067eea2693408d2d5f39dad9ab7fc264f5f3/opentelemetry_exporter_otlp_proto_grpc-1.39.1-py3-none-any.whl", hash = "sha256:fa1c136a05c7e9b4c09f739469cbdb927ea20b34088ab1d959a849b5cc589c18", size = 19766, upload-time = "2025-12-11T13:32:21.027Z" }, + { url = "https://files.pythonhosted.org/packages/96/6f/7ee0980afcbdcd2d40362da16f7f9796bd083bf7f0b8e038abfbc0300f5d/opentelemetry_exporter_otlp_proto_grpc-1.40.0-py3-none-any.whl", hash = "sha256:2aa0ca53483fe0cf6405087a7491472b70335bc5c7944378a0a8e72e86995c52", size = 20304, upload-time = "2026-03-04T14:17:05.942Z" }, ] [[package]] name = "opentelemetry-exporter-otlp-proto-http" -version = "1.39.1" +version = "1.40.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "googleapis-common-protos", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -3645,14 +3645,14 @@ dependencies = [ { name = "requests", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/80/04/2a08fa9c0214ae38880df01e8bfae12b067ec0793446578575e5080d6545/opentelemetry_exporter_otlp_proto_http-1.39.1.tar.gz", hash = "sha256:31bdab9745c709ce90a49a0624c2bd445d31a28ba34275951a6a362d16a0b9cb", size = 17288, upload-time = "2025-12-11T13:32:42.029Z" } +sdist = { url = "https://files.pythonhosted.org/packages/2e/fa/73d50e2c15c56be4d000c98e24221d494674b0cc95524e2a8cb3856d95a4/opentelemetry_exporter_otlp_proto_http-1.40.0.tar.gz", hash = "sha256:db48f5e0f33217588bbc00274a31517ba830da576e59503507c839b38fa0869c", size = 17772, upload-time = "2026-03-04T14:17:25.324Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/95/f1/b27d3e2e003cd9a3592c43d099d2ed8d0a947c15281bf8463a256db0b46c/opentelemetry_exporter_otlp_proto_http-1.39.1-py3-none-any.whl", hash = "sha256:d9f5207183dd752a412c4cd564ca8875ececba13be6e9c6c370ffb752fd59985", size = 19641, upload-time = "2025-12-11T13:32:22.248Z" }, + { url = "https://files.pythonhosted.org/packages/a0/3a/8865d6754e61c9fb170cdd530a124a53769ee5f740236064816eb0ca7301/opentelemetry_exporter_otlp_proto_http-1.40.0-py3-none-any.whl", hash = "sha256:a8d1dab28f504c5d96577d6509f80a8150e44e8f45f82cdbe0e34c99ab040069", size = 19960, upload-time = "2026-03-04T14:17:07.153Z" }, ] [[package]] name = "opentelemetry-instrumentation" -version = "0.60b1" +version = "0.61b0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-api", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -3660,48 +3660,48 @@ dependencies = [ { name = "packaging", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "wrapt", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/41/0f/7e6b713ac117c1f5e4e3300748af699b9902a2e5e34c9cf443dde25a01fa/opentelemetry_instrumentation-0.60b1.tar.gz", hash = "sha256:57ddc7974c6eb35865af0426d1a17132b88b2ed8586897fee187fd5b8944bd6a", size = 31706, upload-time = "2025-12-11T13:36:42.515Z" } +sdist = { url = "https://files.pythonhosted.org/packages/da/37/6bf8e66bfcee5d3c6515b79cb2ee9ad05fe573c20f7ceb288d0e7eeec28c/opentelemetry_instrumentation-0.61b0.tar.gz", hash = "sha256:cb21b48db738c9de196eba6b805b4ff9de3b7f187e4bbf9a466fa170514f1fc7", size = 32606, upload-time = "2026-03-04T14:20:16.825Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/77/d2/6788e83c5c86a2690101681aeef27eeb2a6bf22df52d3f263a22cee20915/opentelemetry_instrumentation-0.60b1-py3-none-any.whl", hash = "sha256:04480db952b48fb1ed0073f822f0ee26012b7be7c3eac1a3793122737c78632d", size = 33096, upload-time = "2025-12-11T13:35:33.067Z" }, + { url = "https://files.pythonhosted.org/packages/d8/3e/f6f10f178b6316de67f0dfdbbb699a24fbe8917cf1743c1595fb9dcdd461/opentelemetry_instrumentation-0.61b0-py3-none-any.whl", hash = "sha256:92a93a280e69788e8f88391247cc530fd81f16f2b011979d4d6398f805cfbc63", size = 33448, upload-time = "2026-03-04T14:19:02.447Z" }, ] [[package]] name = "opentelemetry-proto" -version = "1.39.1" +version = "1.40.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "protobuf", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/49/1d/f25d76d8260c156c40c97c9ed4511ec0f9ce353f8108ca6e7561f82a06b2/opentelemetry_proto-1.39.1.tar.gz", hash = "sha256:6c8e05144fc0d3ed4d22c2289c6b126e03bcd0e6a7da0f16cedd2e1c2772e2c8", size = 46152, upload-time = "2025-12-11T13:32:48.681Z" } +sdist = { url = "https://files.pythonhosted.org/packages/4c/77/dd38991db037fdfce45849491cb61de5ab000f49824a00230afb112a4392/opentelemetry_proto-1.40.0.tar.gz", hash = "sha256:03f639ca129ba513f5819810f5b1f42bcb371391405d99c168fe6937c62febcd", size = 45667, upload-time = "2026-03-04T14:17:31.194Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/51/95/b40c96a7b5203005a0b03d8ce8cd212ff23f1793d5ba289c87a097571b18/opentelemetry_proto-1.39.1-py3-none-any.whl", hash = "sha256:22cdc78efd3b3765d09e68bfbd010d4fc254c9818afd0b6b423387d9dee46007", size = 72535, upload-time = "2025-12-11T13:32:33.866Z" }, + { url = "https://files.pythonhosted.org/packages/b9/b2/189b2577dde745b15625b3214302605b1353436219d42b7912e77fa8dc24/opentelemetry_proto-1.40.0-py3-none-any.whl", hash = "sha256:266c4385d88923a23d63e353e9761af0f47a6ed0d486979777fe4de59dc9b25f", size = 72073, upload-time = "2026-03-04T14:17:16.673Z" }, ] [[package]] name = "opentelemetry-sdk" -version = "1.39.1" +version = "1.40.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-api", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "opentelemetry-semantic-conventions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/eb/fb/c76080c9ba07e1e8235d24cdcc4d125ef7aa3edf23eb4e497c2e50889adc/opentelemetry_sdk-1.39.1.tar.gz", hash = "sha256:cf4d4563caf7bff906c9f7967e2be22d0d6b349b908be0d90fb21c8e9c995cc6", size = 171460, upload-time = "2025-12-11T13:32:49.369Z" } +sdist = { url = "https://files.pythonhosted.org/packages/58/fd/3c3125b20ba18ce2155ba9ea74acb0ae5d25f8cd39cfd37455601b7955cc/opentelemetry_sdk-1.40.0.tar.gz", hash = "sha256:18e9f5ec20d859d268c7cb3c5198c8d105d073714db3de50b593b8c1345a48f2", size = 184252, upload-time = "2026-03-04T14:17:31.87Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7c/98/e91cf858f203d86f4eccdf763dcf01cf03f1dae80c3750f7e635bfa206b6/opentelemetry_sdk-1.39.1-py3-none-any.whl", hash = "sha256:4d5482c478513ecb0a5d938dcc61394e647066e0cc2676bee9f3af3f3f45f01c", size = 132565, upload-time = "2025-12-11T13:32:35.069Z" }, + { url = "https://files.pythonhosted.org/packages/2c/c5/6a852903d8bfac758c6dc6e9a68b015d3c33f2f1be5e9591e0f4b69c7e0a/opentelemetry_sdk-1.40.0-py3-none-any.whl", hash = "sha256:787d2154a71f4b3d81f20524a8ce061b7db667d24e46753f32a7bc48f1c1f3f1", size = 141951, upload-time = "2026-03-04T14:17:17.961Z" }, ] [[package]] name = "opentelemetry-semantic-conventions" -version = "0.60b1" +version = "0.61b0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-api", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/91/df/553f93ed38bf22f4b999d9be9c185adb558982214f33eae539d3b5cd0858/opentelemetry_semantic_conventions-0.60b1.tar.gz", hash = "sha256:87c228b5a0669b748c76d76df6c364c369c28f1c465e50f661e39737e84bc953", size = 137935, upload-time = "2025-12-11T13:32:50.487Z" } +sdist = { url = "https://files.pythonhosted.org/packages/6d/c0/4ae7973f3c2cfd2b6e321f1675626f0dab0a97027cc7a297474c9c8f3d04/opentelemetry_semantic_conventions-0.61b0.tar.gz", hash = "sha256:072f65473c5d7c6dc0355b27d6c9d1a679d63b6d4b4b16a9773062cb7e31192a", size = 145755, upload-time = "2026-03-04T14:17:32.664Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7a/5e/5958555e09635d09b75de3c4f8b9cae7335ca545d77392ffe7331534c402/opentelemetry_semantic_conventions-0.60b1-py3-none-any.whl", hash = "sha256:9fa8c8b0c110da289809292b0591220d3a7b53c1526a23021e977d68597893fb", size = 219982, upload-time = "2025-12-11T13:32:36.955Z" }, + { url = "https://files.pythonhosted.org/packages/b2/37/cc6a55e448deaa9b27377d087da8615a3416d8ad523d5960b78dbeadd02a/opentelemetry_semantic_conventions-0.61b0-py3-none-any.whl", hash = "sha256:fa530a96be229795f8cef353739b618148b0fe2b4b3f005e60e262926c4d38e2", size = 231621, upload-time = "2026-03-04T14:17:19.33Z" }, ] [[package]] @@ -4075,7 +4075,7 @@ wheels = [ [[package]] name = "posthog" -version = "7.9.6" +version = "7.9.7" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "backoff", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -4085,9 +4085,9 @@ dependencies = [ { name = "six", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/dc/1b/92ec2f7e598a969d3f58cad96c187fbf3d1b38b4b0d1e05c403054553dae/posthog-7.9.6.tar.gz", hash = "sha256:4e0ecb63885ce522d6c7ad4593871771995931764ae83914c364db0ad5de2bbf", size = 175454, upload-time = "2026-03-02T21:29:01.729Z" } +sdist = { url = "https://files.pythonhosted.org/packages/16/08/e5064ae25749367f38f6d204ce876a045ecf4fd01ed0e66477364925416c/posthog-7.9.7.tar.gz", hash = "sha256:35dcaf4acc37b386b5ebcd6037cc80821e88d359627c0f61537c667c52359483", size = 175634, upload-time = "2026-03-05T22:09:51.979Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/27/5b/3ece09ecbbbfb2f783e510b54d7170c1322a93bd404aa9b923a84827b5fa/posthog-7.9.6-py3-none-any.whl", hash = "sha256:b1ceda033c9a6660c5d21e2b1c0b4113aaa0969ff02914bf23942c99f602b0f7", size = 201145, upload-time = "2026-03-02T21:29:00.136Z" }, + { url = "https://files.pythonhosted.org/packages/ed/8a/3e4dd145d7d5aaad856d522c61475c51ee80b512b6446bfb3966b2dedf66/posthog-7.9.7-py3-none-any.whl", hash = "sha256:204e47c27dcc230d0bc9b323709c36f98f86e79fa8190caea3b1fbc3c999b1a0", size = 201316, upload-time = "2026-03-05T22:09:50.18Z" }, ] [[package]] @@ -5135,27 +5135,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.4" +version = "0.15.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/da/31/d6e536cdebb6568ae75a7f00e4b4819ae0ad2640c3604c305a0428680b0c/ruff-0.15.4.tar.gz", hash = "sha256:3412195319e42d634470cc97aa9803d07e9d5c9223b99bcb1518f0c725f26ae1", size = 4569550, upload-time = "2026-02-26T20:04:14.959Z" } +sdist = { url = "https://files.pythonhosted.org/packages/77/9b/840e0039e65fcf12758adf684d2289024d6140cde9268cc59887dc55189c/ruff-0.15.5.tar.gz", hash = "sha256:7c3601d3b6d76dce18c5c824fc8d06f4eef33d6df0c21ec7799510cde0f159a2", size = 4574214, upload-time = "2026-03-05T20:06:34.946Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f2/82/c11a03cfec3a4d26a0ea1e571f0f44be5993b923f905eeddfc397c13d360/ruff-0.15.4-py3-none-linux_armv6l.whl", hash = "sha256:a1810931c41606c686bae8b5b9a8072adac2f611bb433c0ba476acba17a332e0", size = 10453333, upload-time = "2026-02-26T20:04:20.093Z" }, - { url = "https://files.pythonhosted.org/packages/ce/5d/6a1f271f6e31dffb31855996493641edc3eef8077b883eaf007a2f1c2976/ruff-0.15.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5a1632c66672b8b4d3e1d1782859e98d6e0b4e70829530666644286600a33992", size = 10853356, upload-time = "2026-02-26T20:04:05.808Z" }, - { url = "https://files.pythonhosted.org/packages/b1/d8/0fab9f8842b83b1a9c2bf81b85063f65e93fb512e60effa95b0be49bfc54/ruff-0.15.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a4386ba2cd6c0f4ff75252845906acc7c7c8e1ac567b7bc3d373686ac8c222ba", size = 10187434, upload-time = "2026-02-26T20:03:54.656Z" }, - { url = "https://files.pythonhosted.org/packages/85/cc/cc220fd9394eff5db8d94dec199eec56dd6c9f3651d8869d024867a91030/ruff-0.15.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2496488bdfd3732747558b6f95ae427ff066d1fcd054daf75f5a50674411e75", size = 10535456, upload-time = "2026-02-26T20:03:52.738Z" }, - { url = "https://files.pythonhosted.org/packages/fa/0f/bced38fa5cf24373ec767713c8e4cadc90247f3863605fb030e597878661/ruff-0.15.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3f1c4893841ff2d54cbda1b2860fa3260173df5ddd7b95d370186f8a5e66a4ac", size = 10287772, upload-time = "2026-02-26T20:04:08.138Z" }, - { url = "https://files.pythonhosted.org/packages/2b/90/58a1802d84fed15f8f281925b21ab3cecd813bde52a8ca033a4de8ab0e7a/ruff-0.15.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:820b8766bd65503b6c30aaa6331e8ef3a6e564f7999c844e9a547c40179e440a", size = 11049051, upload-time = "2026-02-26T20:04:03.53Z" }, - { url = "https://files.pythonhosted.org/packages/d2/ac/b7ad36703c35f3866584564dc15f12f91cb1a26a897dc2fd13d7cb3ae1af/ruff-0.15.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9fb74bab47139c1751f900f857fa503987253c3ef89129b24ed375e72873e85", size = 11890494, upload-time = "2026-02-26T20:04:10.497Z" }, - { url = "https://files.pythonhosted.org/packages/93/3d/3eb2f47a39a8b0da99faf9c54d3eb24720add1e886a5309d4d1be73a6380/ruff-0.15.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f80c98765949c518142b3a50a5db89343aa90f2c2bf7799de9986498ae6176db", size = 11326221, upload-time = "2026-02-26T20:04:12.84Z" }, - { url = "https://files.pythonhosted.org/packages/ff/90/bf134f4c1e5243e62690e09d63c55df948a74084c8ac3e48a88468314da6/ruff-0.15.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:451a2e224151729b3b6c9ffb36aed9091b2996fe4bdbd11f47e27d8f2e8888ec", size = 11168459, upload-time = "2026-02-26T20:04:00.969Z" }, - { url = "https://files.pythonhosted.org/packages/b5/e5/a64d27688789b06b5d55162aafc32059bb8c989c61a5139a36e1368285eb/ruff-0.15.4-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a8f157f2e583c513c4f5f896163a93198297371f34c04220daf40d133fdd4f7f", size = 11104366, upload-time = "2026-02-26T20:03:48.099Z" }, - { url = "https://files.pythonhosted.org/packages/f1/f6/32d1dcb66a2559763fc3027bdd65836cad9eb09d90f2ed6a63d8e9252b02/ruff-0.15.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:917cc68503357021f541e69b35361c99387cdbbf99bd0ea4aa6f28ca99ff5338", size = 10510887, upload-time = "2026-02-26T20:03:45.771Z" }, - { url = "https://files.pythonhosted.org/packages/ff/92/22d1ced50971c5b6433aed166fcef8c9343f567a94cf2b9d9089f6aa80fe/ruff-0.15.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e9737c8161da79fd7cfec19f1e35620375bd8b2a50c3e77fa3d2c16f574105cc", size = 10285939, upload-time = "2026-02-26T20:04:22.42Z" }, - { url = "https://files.pythonhosted.org/packages/e6/f4/7c20aec3143837641a02509a4668fb146a642fd1211846634edc17eb5563/ruff-0.15.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:291258c917539e18f6ba40482fe31d6f5ac023994ee11d7bdafd716f2aab8a68", size = 10765471, upload-time = "2026-02-26T20:03:58.924Z" }, - { url = "https://files.pythonhosted.org/packages/d0/09/6d2f7586f09a16120aebdff8f64d962d7c4348313c77ebb29c566cefc357/ruff-0.15.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:3f83c45911da6f2cd5936c436cf86b9f09f09165f033a99dcf7477e34041cbc3", size = 11263382, upload-time = "2026-02-26T20:04:24.424Z" }, - { url = "https://files.pythonhosted.org/packages/1b/fa/2ef715a1cd329ef47c1a050e10dee91a9054b7ce2fcfdd6a06d139afb7ec/ruff-0.15.4-py3-none-win32.whl", hash = "sha256:65594a2d557d4ee9f02834fcdf0a28daa8b3b9f6cb2cb93846025a36db47ef22", size = 10506664, upload-time = "2026-02-26T20:03:50.56Z" }, - { url = "https://files.pythonhosted.org/packages/d0/a8/c688ef7e29983976820d18710f955751d9f4d4eb69df658af3d006e2ba3e/ruff-0.15.4-py3-none-win_amd64.whl", hash = "sha256:04196ad44f0df220c2ece5b0e959c2f37c777375ec744397d21d15b50a75264f", size = 11651048, upload-time = "2026-02-26T20:04:17.191Z" }, - { url = "https://files.pythonhosted.org/packages/3e/0a/9e1be9035b37448ce2e68c978f0591da94389ade5a5abafa4cf99985d1b2/ruff-0.15.4-py3-none-win_arm64.whl", hash = "sha256:60d5177e8cfc70e51b9c5fad936c634872a74209f934c1e79107d11787ad5453", size = 10966776, upload-time = "2026-02-26T20:03:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/47/20/5369c3ce21588c708bcbe517a8fbe1a8dfdb5dfd5137e14790b1da71612c/ruff-0.15.5-py3-none-linux_armv6l.whl", hash = "sha256:4ae44c42281f42e3b06b988e442d344a5b9b72450ff3c892e30d11b29a96a57c", size = 10478185, upload-time = "2026-03-05T20:06:29.093Z" }, + { url = "https://files.pythonhosted.org/packages/44/ed/e81dd668547da281e5dce710cf0bc60193f8d3d43833e8241d006720e42b/ruff-0.15.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6edd3792d408ebcf61adabc01822da687579a1a023f297618ac27a5b51ef0080", size = 10859201, upload-time = "2026-03-05T20:06:32.632Z" }, + { url = "https://files.pythonhosted.org/packages/c4/8f/533075f00aaf19b07c5cd6aa6e5d89424b06b3b3f4583bfa9c640a079059/ruff-0.15.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:89f463f7c8205a9f8dea9d658d59eff49db05f88f89cc3047fb1a02d9f344010", size = 10184752, upload-time = "2026-03-05T20:06:40.312Z" }, + { url = "https://files.pythonhosted.org/packages/66/0e/ba49e2c3fa0395b3152bad634c7432f7edfc509c133b8f4529053ff024fb/ruff-0.15.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba786a8295c6574c1116704cf0b9e6563de3432ac888d8f83685654fe528fd65", size = 10534857, upload-time = "2026-03-05T20:06:19.581Z" }, + { url = "https://files.pythonhosted.org/packages/59/71/39234440f27a226475a0659561adb0d784b4d247dfe7f43ffc12dd02e288/ruff-0.15.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fd4b801e57955fe9f02b31d20375ab3a5c4415f2e5105b79fb94cf2642c91440", size = 10309120, upload-time = "2026-03-05T20:06:00.435Z" }, + { url = "https://files.pythonhosted.org/packages/f5/87/4140aa86a93df032156982b726f4952aaec4a883bb98cb6ef73c347da253/ruff-0.15.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:391f7c73388f3d8c11b794dbbc2959a5b5afe66642c142a6effa90b45f6f5204", size = 11047428, upload-time = "2026-03-05T20:05:51.867Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f7/4953e7e3287676f78fbe85e3a0ca414c5ca81237b7575bdadc00229ac240/ruff-0.15.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8dc18f30302e379fe1e998548b0f5e9f4dff907f52f73ad6da419ea9c19d66c8", size = 11914251, upload-time = "2026-03-05T20:06:22.887Z" }, + { url = "https://files.pythonhosted.org/packages/77/46/0f7c865c10cf896ccf5a939c3e84e1cfaeed608ff5249584799a74d33835/ruff-0.15.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1cc6e7f90087e2d27f98dc34ed1b3ab7c8f0d273cc5431415454e22c0bd2a681", size = 11333801, upload-time = "2026-03-05T20:05:57.168Z" }, + { url = "https://files.pythonhosted.org/packages/d3/01/a10fe54b653061585e655f5286c2662ebddb68831ed3eaebfb0eb08c0a16/ruff-0.15.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1cb7169f53c1ddb06e71a9aebd7e98fc0fea936b39afb36d8e86d36ecc2636a", size = 11206821, upload-time = "2026-03-05T20:06:03.441Z" }, + { url = "https://files.pythonhosted.org/packages/7a/0d/2132ceaf20c5e8699aa83da2706ecb5c5dcdf78b453f77edca7fb70f8a93/ruff-0.15.5-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:9b037924500a31ee17389b5c8c4d88874cc6ea8e42f12e9c61a3d754ff72f1ca", size = 11133326, upload-time = "2026-03-05T20:06:25.655Z" }, + { url = "https://files.pythonhosted.org/packages/72/cb/2e5259a7eb2a0f87c08c0fe5bf5825a1e4b90883a52685524596bfc93072/ruff-0.15.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:65bb414e5b4eadd95a8c1e4804f6772bbe8995889f203a01f77ddf2d790929dd", size = 10510820, upload-time = "2026-03-05T20:06:37.79Z" }, + { url = "https://files.pythonhosted.org/packages/ff/20/b67ce78f9e6c59ffbdb5b4503d0090e749b5f2d31b599b554698a80d861c/ruff-0.15.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d20aa469ae3b57033519c559e9bc9cd9e782842e39be05b50e852c7c981fa01d", size = 10302395, upload-time = "2026-03-05T20:05:54.504Z" }, + { url = "https://files.pythonhosted.org/packages/5f/e5/719f1acccd31b720d477751558ed74e9c88134adcc377e5e886af89d3072/ruff-0.15.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:15388dd28c9161cdb8eda68993533acc870aa4e646a0a277aa166de9ad5a8752", size = 10754069, upload-time = "2026-03-05T20:06:06.422Z" }, + { url = "https://files.pythonhosted.org/packages/c3/9c/d1db14469e32d98f3ca27079dbd30b7b44dbb5317d06ab36718dee3baf03/ruff-0.15.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b30da330cbd03bed0c21420b6b953158f60c74c54c5f4c1dabbdf3a57bf355d2", size = 11304315, upload-time = "2026-03-05T20:06:10.867Z" }, + { url = "https://files.pythonhosted.org/packages/28/3a/950367aee7c69027f4f422059227b290ed780366b6aecee5de5039d50fa8/ruff-0.15.5-py3-none-win32.whl", hash = "sha256:732e5ee1f98ba5b3679029989a06ca39a950cced52143a0ea82a2102cb592b74", size = 10551676, upload-time = "2026-03-05T20:06:13.705Z" }, + { url = "https://files.pythonhosted.org/packages/b8/00/bf077a505b4e649bdd3c47ff8ec967735ce2544c8e4a43aba42ee9bf935d/ruff-0.15.5-py3-none-win_amd64.whl", hash = "sha256:821d41c5fa9e19117616c35eaa3f4b75046ec76c65e7ae20a333e9a8696bc7fe", size = 11678972, upload-time = "2026-03-05T20:06:45.379Z" }, + { url = "https://files.pythonhosted.org/packages/fe/4e/cd76eca6db6115604b7626668e891c9dd03330384082e33662fb0f113614/ruff-0.15.5-py3-none-win_arm64.whl", hash = "sha256:b498d1c60d2fe5c10c45ec3f698901065772730b411f164ae270bb6bfcc4740b", size = 10965572, upload-time = "2026-03-05T20:06:16.984Z" }, ] [[package]] @@ -5523,11 +5523,11 @@ wheels = [ [[package]] name = "tabulate" -version = "0.9.0" +version = "0.10.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c", size = 81090, upload-time = "2022-10-06T17:21:48.54Z" } +sdist = { url = "https://files.pythonhosted.org/packages/46/58/8c37dea7bbf769b20d58e7ace7e5edfe65b849442b00ffcdd56be88697c6/tabulate-0.10.0.tar.gz", hash = "sha256:e2cfde8f79420f6deeffdeda9aaec3b6bc5abce947655d17ac662b126e48a60d", size = 91754, upload-time = "2026-03-04T18:55:34.402Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/40/44/4a5f08c96eb108af5cb50b41f76142f0afa346dfa99d5296fe7202a11854/tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f", size = 35252, upload-time = "2022-10-06T17:21:44.262Z" }, + { url = "https://files.pythonhosted.org/packages/99/55/db07de81b5c630da5cbf5c7df646580ca26dfaefa593667fc6f2fe016d2e/tabulate-0.10.0-py3-none-any.whl", hash = "sha256:f0b0622e567335c8fabaaa659f1b33bcb6ddfe2e496071b743aa113f8774f2d3", size = 39814, upload-time = "2026-03-04T18:55:31.284Z" }, ] [[package]] @@ -5770,11 +5770,11 @@ wheels = [ [[package]] name = "types-python-dateutil" -version = "2.9.0.20260302" +version = "2.9.0.20260305" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/06/7d/4eb84ea2d4ea72b14f180ed2a5c2e7ac3c8e9fd425f7d69a6516cf127f3b/types_python_dateutil-2.9.0.20260302.tar.gz", hash = "sha256:05a3580c790e6ccad228411ed45245ed739c81e78ba49b1cfdbeb075f42bcab0", size = 16885, upload-time = "2026-03-02T04:02:05.012Z" } +sdist = { url = "https://files.pythonhosted.org/packages/1d/c7/025c624f347e10476b439a6619a95f1d200250ea88e7ccea6e09e48a7544/types_python_dateutil-2.9.0.20260305.tar.gz", hash = "sha256:389717c9f64d8f769f36d55a01873915b37e97e52ce21928198d210fbd393c8b", size = 16885, upload-time = "2026-03-05T04:00:47.409Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ee/91/80dca6ca3da5078de2a808b648aec2a27c83b3dee1b832ae394a683ebe51/types_python_dateutil-2.9.0.20260302-py3-none-any.whl", hash = "sha256:6e7e65e190fb78c267e58a7426b00f0dd41a6dfb02c12aab910263cfa0bcc3ca", size = 18334, upload-time = "2026-03-02T04:02:04.01Z" }, + { url = "https://files.pythonhosted.org/packages/0a/77/8c0d1ec97f0d9707ad3d8fa270ab8964e7b31b076d2f641c94987395cc75/types_python_dateutil-2.9.0.20260305-py3-none-any.whl", hash = "sha256:a3be9ca444d38cadabd756cfbb29780d8b338ae2a3020e73c266a83cc3025dd7", size = 18419, upload-time = "2026-03-05T04:00:46.392Z" }, ] [[package]] @@ -5851,27 +5851,27 @@ wheels = [ [[package]] name = "uv" -version = "0.10.7" +version = "0.10.9" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7c/ec/b324a43b55fe59577505478a396cb1d2758487a2e2270c81ccfa4ac6c96d/uv-0.10.7.tar.gz", hash = "sha256:7c3b0133c2d6bd725d5a35ec5e109ebf0d75389943abe826f3d9ea6d6667a375", size = 3922193, upload-time = "2026-02-27T12:33:58.525Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f2/59/235fa08a6b56de82a45a385dc2bf724502f720f0a9692a1a8cb24aab3e6f/uv-0.10.9.tar.gz", hash = "sha256:31e76ae92e70fec47c3efab0c8094035ad7a578454482415b496fa39fc4d685c", size = 3945685, upload-time = "2026-03-06T21:21:16.219Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f3/1b/decff24553325561850d70b75c737076e6fcbcfbf233011a27a33f06e4d9/uv-0.10.7-py3-none-linux_armv6l.whl", hash = "sha256:6a0af6c7a90fd2053edfa2c8ee719078ea906a2d9f4798d3fb3c03378726209a", size = 22497542, upload-time = "2026-02-27T12:33:39.425Z" }, - { url = "https://files.pythonhosted.org/packages/fc/b5/51152c87921bc2576fecb982df4a02ac9cfd7fc934e28114a1232b99eed4/uv-0.10.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:3b7db0cab77232a7c8856062904fc3b9db22383f1dec7e97a9588fb6c8470f6a", size = 21558860, upload-time = "2026-02-27T12:34:03.362Z" }, - { url = "https://files.pythonhosted.org/packages/5e/15/8365dc2ded350a4ee5fcbbf9b15195cb2b45855114f2a154b5effb6fa791/uv-0.10.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d872d2ff9c9dfba989b5f05f599715bc0f19b94cd0dbf8ae4ad22f8879a66c8c", size = 20212775, upload-time = "2026-02-27T12:33:55.365Z" }, - { url = "https://files.pythonhosted.org/packages/53/a0/ccf25e897f3907b5a6fd899007ff9a80b5bbf151b3a75a375881005611fd/uv-0.10.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:d9b40d03693efda80a41e5d18ac997efdf1094b27fb75471c1a8f51a9ebeffb3", size = 22015584, upload-time = "2026-02-27T12:33:47.374Z" }, - { url = "https://files.pythonhosted.org/packages/fa/3a/5099747954e7774768572d30917bb6bda6b8d465d7a3c49c9bbf7af2a812/uv-0.10.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:e74fe4df9cf31fe84f20b84a0054874635077d31ce20e7de35ff0dd64d498d7b", size = 22100376, upload-time = "2026-02-27T12:34:06.169Z" }, - { url = "https://files.pythonhosted.org/packages/0c/1a/75897fd966b871803cf78019fa31757ced0d54af5ffd7f57bce8b01d64f3/uv-0.10.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9c76659fc8bb618dd35cd83b2f479c6f880555a16630a454a251045c4c118ea4", size = 22105202, upload-time = "2026-02-27T12:34:16.972Z" }, - { url = "https://files.pythonhosted.org/packages/b5/1e/0b8caedd66ca911533e18fd051da79a213c792404138812c66043d529b9e/uv-0.10.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d160cceb9468024ca40dc57a180289dfd2024d98e42f2284b9ec44355723b0a", size = 23335601, upload-time = "2026-02-27T12:34:11.161Z" }, - { url = "https://files.pythonhosted.org/packages/69/94/b741af277e39a92e0da07fe48c338eee1429c2607e7a192e41345208bb24/uv-0.10.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c775975d891cb60cf10f00953e61e643fcb9a9139e94c9ef5c805fe36e90477f", size = 24152851, upload-time = "2026-02-27T12:33:33.904Z" }, - { url = "https://files.pythonhosted.org/packages/27/b2/da351ccd02f0fb1aec5f992b886bea1374cce44276a78904348e2669dd78/uv-0.10.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a709e75583231cc1f39567fb3d8d9b4077ff94a64046eb242726300144ed1a4a", size = 23276444, upload-time = "2026-02-27T12:33:36.891Z" }, - { url = "https://files.pythonhosted.org/packages/71/a9/2735cc9dc39457c9cf64d1ce2ba5a9a8ecbb103d0fb64b052bf33ba3d669/uv-0.10.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89de2504407dcf04aece914c6ca3b9d8e60cf9ff39a13031c1df1f7c040cea81", size = 23218464, upload-time = "2026-02-27T12:34:00.904Z" }, - { url = "https://files.pythonhosted.org/packages/20/5f/5f204e9c3f04f5fc844d2f98d80a7de64b6b304af869644ab478d909f6ff/uv-0.10.7-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:9945de1d11c4a5ad77e9c4f36f8b5f9e7c9c3c32999b8bc0e7e579145c3b641c", size = 22092562, upload-time = "2026-02-27T12:34:14.155Z" }, - { url = "https://files.pythonhosted.org/packages/dd/a4/16bebf106e3289a29cc1e1482d551c49bd220983e9b4bc5960142389ad3f/uv-0.10.7-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:dbe43527f478e2ffa420516aa465f82057763936bbea56f814fd054a9b7f961f", size = 22851312, upload-time = "2026-02-27T12:34:08.651Z" }, - { url = "https://files.pythonhosted.org/packages/d1/7a/953b1da589225d98ca8668412f665c3192f6deed2a0f4bb782b0df18f611/uv-0.10.7-py3-none-musllinux_1_1_i686.whl", hash = "sha256:c0783f327631141501bdc5f31dd2b4c748df7e7f5dc5cdbfc0fbb82da86cc9ca", size = 22543775, upload-time = "2026-02-27T12:33:30.935Z" }, - { url = "https://files.pythonhosted.org/packages/8b/67/e133afdabf76e43989448be1c2ef607f13afc32aa1ee9f6897115dec8417/uv-0.10.7-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:eba438899010522812d3497af586e6eedc94fa2b0ced028f51812f0c10aafb30", size = 23431187, upload-time = "2026-02-27T12:33:42.131Z" }, - { url = "https://files.pythonhosted.org/packages/ba/40/6ffb58ec88a33d6cbe9a606966f9558807f37a50f7be7dc756824df2d04c/uv-0.10.7-py3-none-win32.whl", hash = "sha256:b56d1818aafb2701d92e94f552126fe71d30a13f28712d99345ef5cafc53d874", size = 21524397, upload-time = "2026-02-27T12:33:44.579Z" }, - { url = "https://files.pythonhosted.org/packages/e3/1f/74f4d625db838f716a555908d41777b6357bacc141ddef117a01855e5ef9/uv-0.10.7-py3-none-win_amd64.whl", hash = "sha256:ad0d0ddd9f5407ad8699e3b20fe6c18406cd606336743e246b16914801cfd8b0", size = 23999929, upload-time = "2026-02-27T12:33:49.839Z" }, - { url = "https://files.pythonhosted.org/packages/48/4e/20cbfbcb1a0f48c5c1ca94f6baa0fa00754aafda365da9160c15e3b9c277/uv-0.10.7-py3-none-win_arm64.whl", hash = "sha256:edf732de80c1a9701180ef8c7a2fa926a995712e4a34ae8c025e090f797c2e0b", size = 22353084, upload-time = "2026-02-27T12:33:52.792Z" }, + { url = "https://files.pythonhosted.org/packages/2f/6d/f87f1530d5db4132776d49dddd88b1c77bc08fa7b32bf585b366204e6fc2/uv-0.10.9-py3-none-linux_armv6l.whl", hash = "sha256:0649f83fa0f44f18627c00b2a9a60e5c3486a34799b2c874f2b3945b76048a67", size = 22617914, upload-time = "2026-03-06T21:20:48.282Z" }, + { url = "https://files.pythonhosted.org/packages/6f/34/2e5cd576d312eb1131b615f49ee95ff6efb740965324843617adae729cf2/uv-0.10.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:880dd4cffe4bd184e8871ddf4c7d3c3b042e1f16d2682310644aa8d61eaea3e6", size = 21778779, upload-time = "2026-03-06T21:21:01.804Z" }, + { url = "https://files.pythonhosted.org/packages/89/35/684f641de4de2b20db7d2163c735b2bb211e3b3c84c241706d6448e5e868/uv-0.10.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a7a784254380552398a6baf4149faf5b31a4003275f685c28421cf8197178a08", size = 20384301, upload-time = "2026-03-06T21:21:04.089Z" }, + { url = "https://files.pythonhosted.org/packages/eb/5c/7170cfd1b4af09b435abc5a89ff315af130cf4a5082e5eb1206ee46bba67/uv-0.10.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:5ea0e8598fa012cfa4480ecad4d112bc70f514157c3cc1555a7611c7b6b1ab0a", size = 22226893, upload-time = "2026-03-06T21:20:50.902Z" }, + { url = "https://files.pythonhosted.org/packages/43/5c/68a17934dc8a2897fd7928b1c03c965373a820dc182aad96f1be6cce33a1/uv-0.10.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:2d6b5367e9bf87eca51c0f2ecda26a1ff931e41409977b4f0a420de2f3e617cf", size = 22233832, upload-time = "2026-03-06T21:21:11.748Z" }, + { url = "https://files.pythonhosted.org/packages/00/10/d262172ac59b669ca9c006bcbdb49c1a168cc314a5de576a4bb476dfab4c/uv-0.10.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd04e34db27f9a1d5a0871980edc9f910bb11afbc4abca8234d5a363cbe63c04", size = 22192193, upload-time = "2026-03-06T21:20:59.48Z" }, + { url = "https://files.pythonhosted.org/packages/a2/e6/f75fef1e3e5b0cf3592a4c35ed5128164ef2e6bd6a2570a0782c0baf6d4b/uv-0.10.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:547deb57311fc64e4a6b8336228fca4cb4dcbeabdc6e85f14f7804dcd0bc8cd2", size = 23571687, upload-time = "2026-03-06T21:20:45.403Z" }, + { url = "https://files.pythonhosted.org/packages/31/28/4b1ee6f4aa0e1b935e66b6018691258d1b702ef9c5d8c71e853564ad0a3a/uv-0.10.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e0091b6d0b666640d7407a433860184f77667077b73564e86d49c2a851f073a8", size = 24418225, upload-time = "2026-03-06T21:21:09.459Z" }, + { url = "https://files.pythonhosted.org/packages/39/a2/5e67987f8d55eeecca7d8f4e94ac3e973fa1e8aaf426fcb8f442e9f7e2bc/uv-0.10.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81b2286e6fd869e3507971f39d14829c03e2e31caa8ecc6347b0ffacabb95a5b", size = 23555724, upload-time = "2026-03-06T21:20:54.085Z" }, + { url = "https://files.pythonhosted.org/packages/79/34/b104c413079874493eed7bf11838b47b697cf1f0ed7e9de374ea37b4e4e0/uv-0.10.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7c9d6deb30edbc22123be75479f99fb476613eaf38a8034c0e98bba24a344179", size = 23438145, upload-time = "2026-03-06T21:21:26.866Z" }, + { url = "https://files.pythonhosted.org/packages/27/8a/cad762b3e9bfb961b68b2ae43a258a92b522918958954b50b09dcb14bb4e/uv-0.10.9-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:24b1ce6d626e06c4582946b6af07b08a032fcccd81fe54c3db3ed2d1c63a97dc", size = 22326765, upload-time = "2026-03-06T21:21:14.283Z" }, + { url = "https://files.pythonhosted.org/packages/a7/62/7e066f197f3eb8f8f71e25d703a29c89849c9c047240c1223e29bc0a37e4/uv-0.10.9-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:fa3401780273d96a2960dbeab58452ce1b387ad8c5da25be6221c0188519e21d", size = 23215175, upload-time = "2026-03-06T21:21:29.673Z" }, + { url = "https://files.pythonhosted.org/packages/7e/06/51db93b5edb8b0202c0ec6caf3f24384f5abdfc180b6376a3710223fd56f/uv-0.10.9-py3-none-musllinux_1_1_i686.whl", hash = "sha256:8f94a31832d2b4c565312ea17a71b8dd2f971e5aa570c5b796a27b2c9fcdb163", size = 22784507, upload-time = "2026-03-06T21:21:20.676Z" }, + { url = "https://files.pythonhosted.org/packages/96/34/1db511d9259c1f32e5e094133546e5723e183a9ba2c64f7ca6156badddee/uv-0.10.9-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:842c39c19d9072f1ad53c71bb4ecd1c9caa311d5de9d19e09a636274a6c95e2e", size = 23660703, upload-time = "2026-03-06T21:21:06.667Z" }, + { url = "https://files.pythonhosted.org/packages/6c/a0/58388abb252c7a37bc67422fce3a6b87404ea3fac44ca20132a4ba502235/uv-0.10.9-py3-none-win32.whl", hash = "sha256:ed44047c602449916ba18a8596715ef7edbbd00859f3db9eac010dc62a0edd30", size = 21524142, upload-time = "2026-03-06T21:21:18.246Z" }, + { url = "https://files.pythonhosted.org/packages/c9/e9/adf7a12136573937d12ac189569e2e90e7fad18b458192083df6986f3013/uv-0.10.9-py3-none-win_amd64.whl", hash = "sha256:af79552276d8bd622048ab2d67ec22120a6af64d83963c46b1482218c27b571f", size = 24103389, upload-time = "2026-03-06T21:20:56.495Z" }, + { url = "https://files.pythonhosted.org/packages/5e/49/4971affd9c62d26b3ff4a84dc6432275be72d9615d95f7bb9e027beeeed8/uv-0.10.9-py3-none-win_arm64.whl", hash = "sha256:47e18a0521d76293d4f60d129f520b18bddf1976b4a47b50f0fcb04fb6a9d40f", size = 22454171, upload-time = "2026-03-06T21:21:24.596Z" }, ] [[package]] From f74bda5a838a710df192f7a6b7592c1b9e5500f0 Mon Sep 17 00:00:00 2001 From: Evan Mattson <35585003+moonbox3@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:56:57 +0900 Subject: [PATCH 15/44] Python: Fix conversation-id propagation when chat_options is a dict (#4340) * Fix #4305: Handle dict chat_options in _update_conversation_id _update_conversation_id assumed chat_options had attribute access, but ChatOptions is a TypedDict (dict). When a dict was passed, setting .conversation_id raised AttributeError. Now checks isinstance(dict) and uses key access for dicts, falling back to attribute access for objects. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR feedback: use Mapping ABC and add missing tests (#4305) - Use collections.abc.Mapping instead of dict for isinstance check in _update_conversation_id, making it more robust for non-dict mapping types. - Add test for object-style chat_options with optional options dict parameter. - Add test verifying existing conversation_id gets overwritten (idempotent). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove unnecessary Mapping check in _update_conversation_id (#4305) chat_options is always a dict, so the isinstance(chat_opts, Mapping) check and the else branch for attribute-style access are dead code. Simplify to direct dict key assignment and remove object-style tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../packages/core/agent_framework/_tools.py | 2 +- .../core/test_function_invocation_logic.py | 63 +++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/python/packages/core/agent_framework/_tools.py b/python/packages/core/agent_framework/_tools.py index 3f11189fdc..105738e717 100644 --- a/python/packages/core/agent_framework/_tools.py +++ b/python/packages/core/agent_framework/_tools.py @@ -1458,7 +1458,7 @@ def _update_conversation_id( if conversation_id is None: return if "chat_options" in kwargs: - kwargs["chat_options"].conversation_id = conversation_id + kwargs["chat_options"]["conversation_id"] = conversation_id else: kwargs["conversation_id"] = conversation_id diff --git a/python/packages/core/tests/core/test_function_invocation_logic.py b/python/packages/core/tests/core/test_function_invocation_logic.py index 319d35f152..7f0eda62fc 100644 --- a/python/packages/core/tests/core/test_function_invocation_logic.py +++ b/python/packages/core/tests/core/test_function_invocation_logic.py @@ -3449,3 +3449,66 @@ async def test_streaming_function_calling_response_includes_reasoning_and_tool_r reasoning_contents = [c for msg in response.messages for c in msg.contents if c.type == "text_reasoning"] assert len(reasoning_contents) >= 1 assert reasoning_contents[0].id == "rs_test123" + + +# region _update_conversation_id unit tests + + +class TestUpdateConversationId: + """Tests for _update_conversation_id handling dict chat_options.""" + + def test_chat_options_as_dict(self): + """When chat_options is a plain dict, conversation_id should be set via key access.""" + from agent_framework._tools import _update_conversation_id + + kwargs: dict[str, Any] = {"chat_options": {}} + _update_conversation_id(kwargs, "conv_1") + assert kwargs["chat_options"]["conversation_id"] == "conv_1" + + def test_chat_options_as_typed_dict(self): + """When chat_options is a ChatOptions TypedDict, conversation_id should be set via key access.""" + from agent_framework import ChatOptions + from agent_framework._tools import _update_conversation_id + + opts: ChatOptions = {"temperature": 0.5} + kwargs: dict[str, Any] = {"chat_options": opts} + _update_conversation_id(kwargs, "conv_2") + assert kwargs["chat_options"]["conversation_id"] == "conv_2" + + def test_no_chat_options_falls_back_to_kwargs(self): + """When chat_options is absent, conversation_id should be set directly on kwargs.""" + from agent_framework._tools import _update_conversation_id + + kwargs: dict[str, Any] = {} + _update_conversation_id(kwargs, "conv_4") + assert kwargs["conversation_id"] == "conv_4" + + def test_none_conversation_id_is_noop(self): + """When conversation_id is None, kwargs should not be modified.""" + from agent_framework._tools import _update_conversation_id + + kwargs: dict[str, Any] = {"chat_options": {}} + _update_conversation_id(kwargs, None) + assert "conversation_id" not in kwargs["chat_options"] + assert "conversation_id" not in kwargs + + def test_options_dict_also_updated(self): + """The optional options dict should also receive conversation_id.""" + from agent_framework._tools import _update_conversation_id + + kwargs: dict[str, Any] = {"chat_options": {}} + options: dict[str, Any] = {} + _update_conversation_id(kwargs, "conv_5", options) + assert kwargs["chat_options"]["conversation_id"] == "conv_5" + assert options["conversation_id"] == "conv_5" + + def test_dict_overwrites_existing_conversation_id(self): + """When a dict already has a conversation_id, it should be overwritten.""" + from agent_framework._tools import _update_conversation_id + + kwargs: dict[str, Any] = {"chat_options": {"conversation_id": "old_id"}} + _update_conversation_id(kwargs, "new_id") + assert kwargs["chat_options"]["conversation_id"] == "new_id" + + +# endregion From 2aaca502170e27e23c92a4d79f3cffc4fcbd4835 Mon Sep 17 00:00:00 2001 From: Evan Mattson <35585003+moonbox3@users.noreply.github.com> Date: Tue, 10 Mar 2026 02:03:50 +0900 Subject: [PATCH 16/44] Python: Exclude conversation_id from chat completions API options (#4517) * Python: Exclude conversation_id from chat completions options (#4315) When a session with service_session_id is passed to an agent using the Chat Completions client, conversation_id leaked through _prepare_options() into AsyncCompletions.create(), causing an 'unexpected keyword argument' error. The Responses client already excluded conversation_id but the Chat Completions client did not. Added conversation_id to the exclusion set in _prepare_options(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply pre-commit auto-fixes * Remove reproduction report artifact Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../agent_framework/openai/_chat_client.py | 4 +- .../tests/azure/test_azure_chat_client.py | 67 +++++++++++++++++++ .../tests/openai/test_openai_chat_client.py | 15 +++++ 3 files changed, 85 insertions(+), 1 deletion(-) diff --git a/python/packages/core/agent_framework/openai/_chat_client.py b/python/packages/core/agent_framework/openai/_chat_client.py index 0214c8df20..0562e68f3e 100644 --- a/python/packages/core/agent_framework/openai/_chat_client.py +++ b/python/packages/core/agent_framework/openai/_chat_client.py @@ -327,7 +327,9 @@ class RawOpenAIChatClient( # type: ignore[misc] messages = prepend_instructions_to_messages(list(messages), instructions, role="system") # Start with a copy of options - run_options = {k: v for k, v in options.items() if v is not None and k not in {"instructions", "tools"}} + run_options = { + k: v for k, v in options.items() if v is not None and k not in {"instructions", "tools", "conversation_id"} + } # messages if messages and "messages" not in run_options: diff --git a/python/packages/core/tests/azure/test_azure_chat_client.py b/python/packages/core/tests/azure/test_azure_chat_client.py index 3e88504493..b6809d097d 100644 --- a/python/packages/core/tests/azure/test_azure_chat_client.py +++ b/python/packages/core/tests/azure/test_azure_chat_client.py @@ -626,6 +626,73 @@ async def test_streaming_with_none_delta( assert any(msg.contents for msg in results) +@patch.object(AsyncChatCompletions, "create", new_callable=AsyncMock) +async def test_cmc_with_conversation_id( + mock_create: AsyncMock, + azure_openai_unit_test_env: dict[str, str], + chat_history: list[Message], + mock_chat_completion_response: ChatCompletion, +) -> None: + """Test that conversation_id is excluded from the completions create call.""" + mock_create.return_value = mock_chat_completion_response + chat_history.append(Message(text="hello world", role="user")) + + azure_chat_client = AzureOpenAIChatClient() + await azure_chat_client.get_response( + messages=chat_history, + options={"conversation_id": "12345"}, + ) + + call_kwargs = mock_create.call_args.kwargs + assert "conversation_id" not in call_kwargs + + +@patch.object(AsyncChatCompletions, "create", new_callable=AsyncMock) +async def test_cmc_streaming_with_conversation_id( + mock_create: AsyncMock, + azure_openai_unit_test_env: dict[str, str], + chat_history: list[Message], + mock_streaming_chat_completion_response: AsyncStream[ChatCompletionChunk], +) -> None: + """Test that conversation_id is excluded from the streaming completions create call.""" + mock_create.return_value = mock_streaming_chat_completion_response + chat_history.append(Message(text="hello world", role="user")) + + azure_chat_client = AzureOpenAIChatClient() + async for _ in azure_chat_client.get_response( + messages=chat_history, + options={"conversation_id": "12345"}, + stream=True, + ): + pass + + call_kwargs = mock_create.call_args.kwargs + assert "conversation_id" not in call_kwargs + + +@patch.object(AsyncChatCompletions, "create", new_callable=AsyncMock) +async def test_cmc_agent_with_service_session_id( + mock_create: AsyncMock, + azure_openai_unit_test_env: dict[str, str], + mock_chat_completion_response: ChatCompletion, +) -> None: + """Test that agent.run() with a session containing service_session_id works correctly.""" + mock_create.return_value = mock_chat_completion_response + + azure_chat_client = AzureOpenAIChatClient() + agent = azure_chat_client.as_agent( + name="TestAgent", + instructions="You are a helpful assistant.", + ) + + session = agent.get_session(service_session_id="12345") + response = await agent.run("hello", session=session) + + assert response is not None + call_kwargs = mock_create.call_args.kwargs + assert "conversation_id" not in call_kwargs + + @tool(approval_mode="never_require") def get_story_text() -> str: """Returns a story about Emily and David.""" diff --git a/python/packages/core/tests/openai/test_openai_chat_client.py b/python/packages/core/tests/openai/test_openai_chat_client.py index 58faac42a3..04321b0883 100644 --- a/python/packages/core/tests/openai/test_openai_chat_client.py +++ b/python/packages/core/tests/openai/test_openai_chat_client.py @@ -1161,6 +1161,21 @@ def test_prepare_options_removes_parallel_tool_calls_when_no_tools(openai_unit_t assert "parallel_tool_calls" not in prepared_options +def test_prepare_options_excludes_conversation_id(openai_unit_test_env: dict[str, str]) -> None: + """Test that conversation_id is excluded from prepared options for chat completions.""" + client = OpenAIChatClient() + + messages = [Message(role="user", text="test")] + options = {"conversation_id": "12345", "temperature": 0.7} + + prepared_options = client._prepare_options(messages, options) + + # conversation_id is not a valid parameter for AsyncCompletions.create() + assert "conversation_id" not in prepared_options + # Other options should still be present + assert prepared_options["temperature"] == 0.7 + + async def test_streaming_exception_handling(openai_unit_test_env: dict[str, str]) -> None: """Test that streaming errors are properly handled.""" client = OpenAIChatClient() From 6cb2289a1685b6ba0025e93365a254073aac7d4f Mon Sep 17 00:00:00 2001 From: Giles Odigwe <79032838+giles17@users.noreply.github.com> Date: Mon, 9 Mar 2026 15:29:09 -0700 Subject: [PATCH 17/44] Auto-finalize ResponseStream on iteration completion (#4478) * Add multi-turn streaming sample and rename multi-turn samples - Rename 03_multi_turn.py to 03a_multi_turn.py - Add 03b_multi_turn_streaming.py showing streaming with session history - The new sample demonstrates calling get_final_response() after iterating the stream to persist conversation history - Update READMEs to reflect the new file names Closes #4447 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Auto-finalize ResponseStream on iteration completion When a ResponseStream is fully consumed via async iteration, automatically trigger finalization (finalizer + result hooks). This ensures session history is persisted in streaming multi-turn conversations without requiring an explicit get_final_response() call. - Add auto-finalize call in __anext__ on StopAsyncIteration - Guard inner stream finalization to prevent double-execution - Re-check _finalized after iteration in get_final_response() - Add tests for auto-finalization and streaming session history - Revert sample file renames from previous commit Closes #4447 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * README fix * Fix SIM102 lint: combine nested if statements Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../packages/core/agent_framework/_types.py | 63 ++++++++++--------- .../packages/core/tests/core/test_agents.py | 34 ++++++++++ python/packages/core/tests/core/test_types.py | 52 +++++++++++++++ python/samples/01-get-started/README.md | 2 +- python/samples/README.md | 2 +- 5 files changed, 122 insertions(+), 31 deletions(-) diff --git a/python/packages/core/agent_framework/_types.py b/python/packages/core/agent_framework/_types.py index 7ae9dbaa3d..fd97672d65 100644 --- a/python/packages/core/agent_framework/_types.py +++ b/python/packages/core/agent_framework/_types.py @@ -2776,6 +2776,7 @@ class ResponseStream(AsyncIterable[UpdateT], Generic[UpdateT, FinalT]): except StopAsyncIteration: self._consumed = True await self._run_cleanup_hooks() + await self.get_final_response() raise except Exception: await self._run_cleanup_hooks() @@ -2825,34 +2826,38 @@ class ResponseStream(AsyncIterable[UpdateT], Generic[UpdateT, FinalT]): await self._get_stream() if self._inner_stream is None: raise RuntimeError("Inner stream not available") - if not self._finalized: + if not self._finalized and not self._consumed: # Consume outer stream (which delegates to inner) if not already consumed - if not self._consumed: - async for _ in self: - pass + async for _ in self: + pass - # First, finalize the inner stream and run its result hooks + # Re-check: __anext__ auto-finalization may have already finalized this stream + if not self._finalized: # This ensures inner post-processing (e.g., context provider notifications) runs - inner_stream = self._inner_stream - inner_result: Any - if inner_stream._finalizer is not None: - inner_finalizer = inner_stream._finalizer - inner_result = inner_finalizer(inner_stream._updates) - if isawaitable(inner_result): - inner_result = await inner_result - else: - inner_result = list(inner_stream._updates) + # Skip if inner stream was already finalized (e.g., via auto-finalization on iteration) + if not self._inner_stream._finalized: + inner_stream = self._inner_stream + inner_result: Any + if inner_stream._finalizer is not None: + inner_finalizer = inner_stream._finalizer + inner_result = inner_finalizer(inner_stream._updates) + if isawaitable(inner_result): + inner_result = await inner_result + else: + inner_result = list(inner_stream._updates) - # Run inner stream's result hooks - inner_hooks = cast(list[Callable[[Any], Any | Awaitable[Any] | None]], inner_stream._result_hooks) - for hook in inner_hooks: - hooked_result = hook(inner_result) - if isawaitable(hooked_result): - hooked_result = await hooked_result - if hooked_result is not None: - inner_result = hooked_result - inner_stream._final_result = inner_result - inner_stream._finalized = True + # Run inner stream's result hooks + inner_hooks = cast(list[Callable[[Any], Any | Awaitable[Any] | None]], inner_stream._result_hooks) + for hook in inner_hooks: + hooked_result = hook(inner_result) + if isawaitable(hooked_result): + hooked_result = await hooked_result + if hooked_result is not None: + inner_result = hooked_result + inner_stream._final_result = inner_result + inner_stream._finalized = True + else: + inner_result = self._inner_stream._final_result # Now finalize the outer stream with its own finalizer # If outer has no finalizer, use inner's result (preserves from_awaitable behavior) @@ -2877,12 +2882,12 @@ class ResponseStream(AsyncIterable[UpdateT], Generic[UpdateT, FinalT]): self._finalized = True return self._final_result # type: ignore[return-value] - if not self._finalized: - if not self._consumed: - async for _ in self: - pass + if not self._finalized and not self._consumed: + async for _ in self: + pass - # Use finalizer if configured, otherwise return collected updates + # Re-check: __anext__ auto-finalization may have already finalized this stream + if not self._finalized: result: Any if self._finalizer is not None: result = self._finalizer(self._updates) diff --git a/python/packages/core/tests/core/test_agents.py b/python/packages/core/tests/core/test_agents.py index d41b87b707..b2704aa6a6 100644 --- a/python/packages/core/tests/core/test_agents.py +++ b/python/packages/core/tests/core/test_agents.py @@ -357,6 +357,40 @@ async def test_chat_client_agent_streaming_session_id_set_without_get_final_resp assert session.service_session_id == "resp_123" +async def test_chat_client_agent_streaming_session_history_saved_without_get_final_response( + chat_client_base: SupportsChatGetResponse, +) -> None: + """Test that session history is saved after streaming iteration without get_final_response(). + + Auto-finalization on iteration completion should trigger after_run providers, + persisting conversation history to the session. + """ + from agent_framework._sessions import InMemoryHistoryProvider + + chat_client_base.streaming_responses = [ + [ + ChatResponseUpdate( + contents=[Content.from_text("Hello Alice!")], + role="assistant", + response_id="resp_1", + finish_reason="stop", + ), + ] + ] + + agent = Agent(client=chat_client_base) + session = agent.create_session() + + # Only iterate — do NOT call get_final_response() + async for _ in agent.run("My name is Alice", session=session, stream=True): + pass + + chat_messages: list[Message] = session.state.get(InMemoryHistoryProvider.DEFAULT_SOURCE_ID, {}).get("messages", []) + assert len(chat_messages) == 2 + assert chat_messages[0].text == "My name is Alice" + assert chat_messages[1].text == "Hello Alice!" + + async def test_chat_client_agent_update_session_messages(client: SupportsChatGetResponse) -> None: from agent_framework._sessions import InMemoryHistoryProvider diff --git a/python/packages/core/tests/core/test_types.py b/python/packages/core/tests/core/test_types.py index 0d314c1aa5..312ab83f2e 100644 --- a/python/packages/core/tests/core/test_types.py +++ b/python/packages/core/tests/core/test_types.py @@ -2666,6 +2666,58 @@ class TestResponseStreamBasicIteration: assert stream.updates[0].text == "update_0" assert stream.updates[1].text == "update_1" + async def test_auto_finalize_on_iteration_completion(self) -> None: + """Stream auto-finalizes when async iteration completes.""" + stream = ResponseStream(_generate_updates(2), finalizer=_combine_updates) + + async for _ in stream: + pass + + assert stream._finalized is True + assert stream._final_result is not None + assert stream._final_result.text == "update_0update_1" + + async def test_auto_finalize_runs_result_hooks(self) -> None: + """Result hooks run automatically when iteration completes.""" + hook_called = {"value": False} + + def tracking_hook(response: ChatResponse) -> ChatResponse: + hook_called["value"] = True + response.additional_properties["auto_finalized"] = True + return response + + stream = ResponseStream( + _generate_updates(2), + finalizer=_combine_updates, + result_hooks=[tracking_hook], + ) + + async for _ in stream: + pass + + assert hook_called["value"] is True + final = await stream.get_final_response() + assert final.additional_properties["auto_finalized"] is True + + async def test_get_final_response_idempotent_after_auto_finalize(self) -> None: + """get_final_response returns cached result after auto-finalization.""" + call_count = {"value": 0} + + def counting_finalizer(updates: list[ChatResponseUpdate]) -> ChatResponse: + call_count["value"] += 1 + return _combine_updates(updates) + + stream = ResponseStream(_generate_updates(2), finalizer=counting_finalizer) + + async for _ in stream: + pass + + final1 = await stream.get_final_response() + final2 = await stream.get_final_response() + + assert call_count["value"] == 1 + assert final1.text == final2.text + class TestResponseStreamTransformHooks: """Tests for transform hooks (per-update processing).""" diff --git a/python/samples/01-get-started/README.md b/python/samples/01-get-started/README.md index 5ba119e016..e1bae20b32 100644 --- a/python/samples/01-get-started/README.md +++ b/python/samples/01-get-started/README.md @@ -22,7 +22,7 @@ export AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME="gpt-4o" # optional, defaults to |---|------|-------------------| | 1 | [01_hello_agent.py](01_hello_agent.py) | Create your first agent and run it (streaming and non-streaming). | | 2 | [02_add_tools.py](02_add_tools.py) | Define a function tool with `@tool` and attach it to an agent. | -| 3 | [03_multi_turn.py](03_multi_turn.py) | Keep conversation history across turns with `AgentThread`. | +| 3 | [03_multi_turn.py](03_multi_turn.py) | Keep conversation history across turns with `AgentSession`. | | 4 | [04_memory.py](04_memory.py) | Add dynamic context with a custom `ContextProvider`. | | 5 | [05_first_workflow.py](05_first_workflow.py) | Chain executors into a workflow with edges. | | 6 | [06_host_your_agent.py](06_host_your_agent.py) | Host a single agent with Azure Functions. | diff --git a/python/samples/README.md b/python/samples/README.md index 1f353fbc52..fa091b78bc 100644 --- a/python/samples/README.md +++ b/python/samples/README.md @@ -18,7 +18,7 @@ Start with `01-get-started/` and work through the numbered files: 1. **[01_hello_agent.py](./01-get-started/01_hello_agent.py)** — Create and run your first agent 2. **[02_add_tools.py](./01-get-started/02_add_tools.py)** — Add function tools with `@tool` -3. **[03_multi_turn.py](./01-get-started/03_multi_turn.py)** — Multi-turn conversations with `AgentThread` +3. **[03_multi_turn.py](./01-get-started/03_multi_turn.py)** — Multi-turn conversations with `AgentSession` 4. **[04_memory.py](./01-get-started/04_memory.py)** — Agent memory with `ContextProvider` 5. **[05_first_workflow.py](./01-get-started/05_first_workflow.py)** — Build a workflow with executors and edges 6. **[06_host_your_agent.py](./01-get-started/06_host_your_agent.py)** — Host your agent via Azure Functions From e2f0bc814eceb300bcad1010c03c6a563ce9f0f4 Mon Sep 17 00:00:00 2001 From: Giles Odigwe <79032838+giles17@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:59:41 -0700 Subject: [PATCH 18/44] Fix chat_response_cancellation sample to use Message objects (#4532) The sample was passing raw strings in a list to get_response(), which expects Message objects. This caused an AttributeError since strings don't have a 'role' attribute. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../02-agents/chat_client/chat_response_cancellation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/samples/02-agents/chat_client/chat_response_cancellation.py b/python/samples/02-agents/chat_client/chat_response_cancellation.py index db292786ce..dd32379443 100644 --- a/python/samples/02-agents/chat_client/chat_response_cancellation.py +++ b/python/samples/02-agents/chat_client/chat_response_cancellation.py @@ -2,6 +2,7 @@ import asyncio +from agent_framework import Message from agent_framework.openai import OpenAIChatClient from dotenv import load_dotenv @@ -28,7 +29,7 @@ async def main() -> None: client = OpenAIChatClient() try: - task = asyncio.create_task(client.get_response(messages=["Tell me a fantasy story."])) + task = asyncio.create_task(client.get_response(messages=[Message(role="user", text="Tell me a fantasy story.")])) await asyncio.sleep(1) task.cancel() await task From ded32f3ff8e55be61f21b56da5db4f7935a0419a Mon Sep 17 00:00:00 2001 From: Giles Odigwe <79032838+giles17@users.noreply.github.com> Date: Mon, 9 Mar 2026 17:00:49 -0700 Subject: [PATCH 19/44] Python: Add A2A server sample (#4528) * Python: Add A2A server sample and fix client streaming bug Add a pure Python A2A server sample so testing the A2A client no longer requires running the .NET server. The server uses the a2a-sdk's A2AStarletteApplication with uvicorn and supports three agent types (invoice, policy, logistics) backed by AzureOpenAIResponsesClient. New files: - a2a_server.py: Main server entry point with CLI args - agent_executor.py: Bridges a2a-sdk AgentExecutor to Agent Framework - agent_definitions.py: Agent and AgentCard factory definitions - invoice_data.py: Mock invoice data and query tool functions - a2a_server.http: REST Client requests for testing Also fixes a streaming bug in agent_with_a2a.py where async with was used on ResponseStream which does not support the async context manager protocol. Changed to async for to match all other samples. Closes #4045 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review: handle CancelledError and fix end_date filtering - Re-raise asyncio.CancelledError before the broad exception handler so cooperative cancellation is not swallowed. - Make end_date filter inclusive of the full day by comparing with < end + timedelta(days=1) instead of <= midnight. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- python/samples/04-hosting/a2a/README.md | 55 ++++-- python/samples/04-hosting/a2a/a2a_server.http | 82 +++++++++ python/samples/04-hosting/a2a/a2a_server.py | 120 +++++++++++++ .../04-hosting/a2a/agent_definitions.py | 169 ++++++++++++++++++ .../samples/04-hosting/a2a/agent_executor.py | 123 +++++++++++++ .../samples/04-hosting/a2a/agent_with_a2a.py | 18 +- python/samples/04-hosting/a2a/invoice_data.py | 167 +++++++++++++++++ 7 files changed, 709 insertions(+), 25 deletions(-) create mode 100644 python/samples/04-hosting/a2a/a2a_server.http create mode 100644 python/samples/04-hosting/a2a/a2a_server.py create mode 100644 python/samples/04-hosting/a2a/agent_definitions.py create mode 100644 python/samples/04-hosting/a2a/agent_executor.py create mode 100644 python/samples/04-hosting/a2a/invoice_data.py diff --git a/python/samples/04-hosting/a2a/README.md b/python/samples/04-hosting/a2a/README.md index 2ede8b8a3d..0affc84e19 100644 --- a/python/samples/04-hosting/a2a/README.md +++ b/python/samples/04-hosting/a2a/README.md @@ -1,34 +1,57 @@ # A2A Agent Examples -This folder contains examples demonstrating how to create and use agents with the A2A (Agent2Agent) protocol from the `agent_framework` package to communicate with remote A2A agents. +This sample demonstrates how to host and consume agents using the [A2A (Agent2Agent) protocol](https://a2a-protocol.org/latest/) with the `agent_framework` package. There are two runnable entry points: -By default the A2AAgent waits for the remote agent to finish before returning (`background=False`), so long-running A2A tasks are handled transparently. For advanced scenarios where you need to poll or resubscribe to in-progress tasks using continuation tokens, see the [background responses sample](../../02-agents/background_responses.py). +| Run this file | To... | +|---------------|-------| +| **[`a2a_server.py`](a2a_server.py)** | Host an Agent Framework agent as an A2A-compliant server. | +| **[`agent_with_a2a.py`](agent_with_a2a.py)** | Connect to an A2A server and send requests (non-streaming and streaming). | -For more information about the A2A protocol specification, visit: https://a2a-protocol.org/latest/ - -## Examples +The remaining files are supporting modules used by the server: | File | Description | |------|-------------| -| [`agent_with_a2a.py`](agent_with_a2a.py) | Demonstrates agent discovery, non-streaming and streaming responses using the A2A protocol. | +| [`agent_definitions.py`](agent_definitions.py) | Agent and AgentCard factory definitions for invoice, policy, and logistics agents. | +| [`agent_executor.py`](agent_executor.py) | Bridges the a2a-sdk `AgentExecutor` interface to Agent Framework agents. | +| [`invoice_data.py`](invoice_data.py) | Mock invoice data and tool functions for the invoice agent. | +| [`a2a_server.http`](a2a_server.http) | REST Client requests for testing the server directly from VS Code. | ## Environment Variables -Make sure to set the following environment variables before running the example: +Make sure to set the following environment variables before running the examples: -### Required -- `A2A_AGENT_HOST`: URL of a single A2A agent (for simple sample, e.g., `http://localhost:5001/`) +### Required (Server) +- `AZURE_AI_PROJECT_ENDPOINT` — Your Azure AI Foundry project endpoint +- `AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME` — Model deployment name (e.g. `gpt-4o`) +### Required (Client) +- `A2A_AGENT_HOST` — URL of the A2A server (e.g. `http://localhost:5001/`) -## Quick Testing with .NET A2A Servers +## Quick Start -For quick testing and demonstration, you can use the pre-built .NET A2A servers from this repository: +All commands below should be run from this directory: -**Quick Testing Reference**: Use the .NET A2A Client Server sample at: -`..\agent-framework\dotnet\samples\05-end-to-end\A2AClientServer` - -### Run Python A2A Sample ```powershell -# Simple A2A sample (single agent) +cd python/samples/04-hosting/a2a +``` + +### 1. Start the A2A Server + +Pick an agent type and start the server (each in its own terminal): + +```powershell +uv run python a2a_server.py --agent-type invoice --port 5000 +uv run python a2a_server.py --agent-type policy --port 5001 +uv run python a2a_server.py --agent-type logistics --port 5002 +``` + +You can run one agent or all three — each listens on its own port. + +### 2. Run the A2A Client + +In a separate terminal (from the same directory), point the client at a running server: + +```powershell +$env:A2A_AGENT_HOST = "http://localhost:5001/" uv run python agent_with_a2a.py ``` diff --git a/python/samples/04-hosting/a2a/a2a_server.http b/python/samples/04-hosting/a2a/a2a_server.http new file mode 100644 index 0000000000..65ff918a1d --- /dev/null +++ b/python/samples/04-hosting/a2a/a2a_server.http @@ -0,0 +1,82 @@ +### Each A2A agent is available at a different host address +@hostInvoice = http://localhost:5000 +@hostPolicy = http://localhost:5001 +@hostLogistics = http://localhost:5002 + +### Query agent card for the invoice agent +GET {{hostInvoice}}/.well-known/agent.json + +### Send a message to the invoice agent +POST {{hostInvoice}} +Content-Type: application/json + +{ + "id": "1", + "jsonrpc": "2.0", + "method": "message/send", + "params": { + "message": { + "kind": "message", + "role": "user", + "messageId": "msg_1", + "parts": [ + { + "kind": "text", + "text": "Show me all invoices for Contoso" + } + ] + } + } +} + +### Query agent card for the policy agent +GET {{hostPolicy}}/.well-known/agent.json + +### Send a message to the policy agent +POST {{hostPolicy}} +Content-Type: application/json + +{ + "id": "2", + "jsonrpc": "2.0", + "method": "message/send", + "params": { + "message": { + "kind": "message", + "role": "user", + "messageId": "msg_2", + "parts": [ + { + "kind": "text", + "text": "What is the policy for short shipments?" + } + ] + } + } +} + +### Query agent card for the logistics agent +GET {{hostLogistics}}/.well-known/agent.json + +### Send a message to the logistics agent +POST {{hostLogistics}} +Content-Type: application/json + +{ + "id": "3", + "jsonrpc": "2.0", + "method": "message/send", + "params": { + "message": { + "kind": "message", + "role": "user", + "messageId": "msg_3", + "parts": [ + { + "kind": "text", + "text": "What is the status for SHPMT-SAP-001?" + } + ] + } + } +} diff --git a/python/samples/04-hosting/a2a/a2a_server.py b/python/samples/04-hosting/a2a/a2a_server.py new file mode 100644 index 0000000000..d797bef95d --- /dev/null +++ b/python/samples/04-hosting/a2a/a2a_server.py @@ -0,0 +1,120 @@ +# Copyright (c) Microsoft. All rights reserved. + +import argparse +import os +import sys + +import uvicorn +from a2a.server.apps.jsonrpc.starlette_app import A2AStarletteApplication +from a2a.server.request_handlers.default_request_handler import DefaultRequestHandler +from a2a.server.tasks.inmemory_task_store import InMemoryTaskStore +from agent_definitions import AGENT_CARD_FACTORIES, AGENT_FACTORIES +from agent_executor import AgentFrameworkExecutor +from agent_framework.azure import AzureOpenAIResponsesClient +from azure.identity import AzureCliCredential +from dotenv import load_dotenv + +# Load environment variables from .env file +load_dotenv() + +""" +A2A Server Sample — Host an Agent Framework agent as an A2A endpoint + +This sample creates a Python-based A2A-compliant server that wraps an Agent +Framework agent. The server uses the a2a-sdk's Starlette application to handle +JSON-RPC requests and serves the AgentCard at /.well-known/agent.json. + +Three agent types are available: + - invoice — Answers invoice queries using mock data and function tools. + - policy — Returns a fixed policy response. + - logistics — Returns a fixed logistics response. + +Usage: + uv run python a2a_server.py --agent-type policy --port 5001 + uv run python a2a_server.py --agent-type invoice --port 5000 + uv run python a2a_server.py --agent-type logistics --port 5002 + +Environment variables: + AZURE_AI_PROJECT_ENDPOINT — Your Azure AI Foundry project endpoint + AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME — Model deployment name (e.g. gpt-4o) +""" + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser(description="A2A Agent Server") + parser.add_argument( + "--agent-type", + choices=["invoice", "policy", "logistics"], + default="policy", + help="Type of agent to host (default: policy)", + ) + parser.add_argument( + "--host", + default="localhost", + help="Host to bind to (default: localhost)", + ) + parser.add_argument( + "--port", + type=int, + default=5001, + help="Port to listen on (default: 5001)", + ) + return parser.parse_args() + + +def main() -> None: + args = parse_args() + + # Validate environment + project_endpoint = os.getenv("AZURE_AI_PROJECT_ENDPOINT") + deployment_name = os.getenv("AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME") + + if not project_endpoint: + print("Error: AZURE_AI_PROJECT_ENDPOINT environment variable is not set.") + sys.exit(1) + if not deployment_name: + print("Error: AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME environment variable is not set.") + sys.exit(1) + + # Create the LLM client + credential = AzureCliCredential() + client = AzureOpenAIResponsesClient( + project_endpoint=project_endpoint, + deployment_name=deployment_name, + credential=credential, + ) + + # Create the Agent Framework agent for the chosen type + agent_factory = AGENT_FACTORIES[args.agent_type] + agent = agent_factory(client) + + # Build the A2A server components + url = f"http://{args.host}:{args.port}/" + agent_card = AGENT_CARD_FACTORIES[args.agent_type](url) + executor = AgentFrameworkExecutor(agent) + task_store = InMemoryTaskStore() + request_handler = DefaultRequestHandler( + agent_executor=executor, + task_store=task_store, + ) + + a2a_app = A2AStarletteApplication( + agent_card=agent_card, + http_handler=request_handler, + ) + + print(f"Starting A2A server: {agent_card.name}") + print(f" Agent type : {args.agent_type}") + print(f" Listening : {url}") + print(f" Agent card : {url}.well-known/agent.json") + print() + + uvicorn.run( + a2a_app.build(), + host=args.host, + port=args.port, + ) + + +if __name__ == "__main__": + main() diff --git a/python/samples/04-hosting/a2a/agent_definitions.py b/python/samples/04-hosting/a2a/agent_definitions.py new file mode 100644 index 0000000000..b0e87e485f --- /dev/null +++ b/python/samples/04-hosting/a2a/agent_definitions.py @@ -0,0 +1,169 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Agent definitions and AgentCard factories for the A2A server sample. + +Provides factory functions to create Agent Framework agents and A2A +AgentCards for the invoice, policy, and logistics agent types. +""" + +from __future__ import annotations + +from typing import TYPE_CHECKING + +from a2a.types import AgentCapabilities, AgentCard, AgentSkill +from invoice_data import query_by_invoice_id, query_by_transaction_id, query_invoices + +if TYPE_CHECKING: + from agent_framework import Agent + from agent_framework.azure import AzureOpenAIResponsesClient + + +# --------------------------------------------------------------------------- +# Agent instructions +# --------------------------------------------------------------------------- + +INVOICE_INSTRUCTIONS = "You specialize in handling queries related to invoices." + +POLICY_INSTRUCTIONS = """\ +You specialize in handling queries related to policies and customer communications. + +Always reply with exactly this text: + +Policy: Short Shipment Dispute Handling Policy V2.1 + +Summary: "For short shipments reported by customers, first verify internal shipment records +(SAP) and physical logistics scan data (BigQuery). If discrepancy is confirmed and logistics data +shows fewer items packed than invoiced, issue a credit for the missing items. Document the +resolution in SAP CRM and notify the customer via email within 2 business days, referencing the +original invoice and the credit memo number. Use the 'Formal Credit Notification' email +template." +""" + +LOGISTICS_INSTRUCTIONS = """\ +You specialize in handling queries related to logistics. + +Always reply with exactly: + +Shipment number: SHPMT-SAP-001 +Item: TSHIRT-RED-L +Quantity: 900 +""" + +# --------------------------------------------------------------------------- +# Agent factories +# --------------------------------------------------------------------------- + + +def create_invoice_agent(client: AzureOpenAIResponsesClient) -> Agent: + """Create an invoice agent backed by the given client with query tools.""" + return client.as_agent( + name="InvoiceAgent", + instructions=INVOICE_INSTRUCTIONS, + tools=[query_invoices, query_by_transaction_id, query_by_invoice_id], + ) + + +def create_policy_agent(client: AzureOpenAIResponsesClient) -> Agent: + """Create a policy agent backed by the given client.""" + return client.as_agent( + name="PolicyAgent", + instructions=POLICY_INSTRUCTIONS, + ) + + +def create_logistics_agent(client: AzureOpenAIResponsesClient) -> Agent: + """Create a logistics agent backed by the given client.""" + return client.as_agent( + name="LogisticsAgent", + instructions=LOGISTICS_INSTRUCTIONS, + ) + + +# --------------------------------------------------------------------------- +# AgentCard factories +# --------------------------------------------------------------------------- + +_CAPABILITIES = AgentCapabilities(streaming=True, push_notifications=False) + + +def get_invoice_agent_card(url: str) -> AgentCard: + """Return an A2A AgentCard for the invoice agent.""" + return AgentCard( + name="InvoiceAgent", + description="Handles requests relating to invoices.", + url=url, + version="1.0.0", + default_input_modes=["text"], + default_output_modes=["text"], + capabilities=_CAPABILITIES, + skills=[ + AgentSkill( + id="id_invoice_agent", + name="InvoiceQuery", + description="Handles requests relating to invoices.", + tags=["invoice", "agent-framework"], + examples=["List the latest invoices for Contoso."], + ), + ], + ) + + +def get_policy_agent_card(url: str) -> AgentCard: + """Return an A2A AgentCard for the policy agent.""" + return AgentCard( + name="PolicyAgent", + description="Handles requests relating to policies and customer communications.", + url=url, + version="1.0.0", + default_input_modes=["text"], + default_output_modes=["text"], + capabilities=_CAPABILITIES, + skills=[ + AgentSkill( + id="id_policy_agent", + name="PolicyAgent", + description="Handles requests relating to policies and customer communications.", + tags=["policy", "agent-framework"], + examples=["What is the policy for short shipments?"], + ), + ], + ) + + +def get_logistics_agent_card(url: str) -> AgentCard: + """Return an A2A AgentCard for the logistics agent.""" + return AgentCard( + name="LogisticsAgent", + description="Handles requests relating to logistics.", + url=url, + version="1.0.0", + default_input_modes=["text"], + default_output_modes=["text"], + capabilities=_CAPABILITIES, + skills=[ + AgentSkill( + id="id_logistics_agent", + name="LogisticsQuery", + description="Handles requests relating to logistics.", + tags=["logistics", "agent-framework"], + examples=["What is the status for SHPMT-SAP-001"], + ), + ], + ) + + +# --------------------------------------------------------------------------- +# Lookup helpers +# --------------------------------------------------------------------------- + +AGENT_FACTORIES = { + "invoice": create_invoice_agent, + "policy": create_policy_agent, + "logistics": create_logistics_agent, +} + +AGENT_CARD_FACTORIES = { + "invoice": get_invoice_agent_card, + "policy": get_policy_agent_card, + "logistics": get_logistics_agent_card, +} diff --git a/python/samples/04-hosting/a2a/agent_executor.py b/python/samples/04-hosting/a2a/agent_executor.py new file mode 100644 index 0000000000..b940be18f8 --- /dev/null +++ b/python/samples/04-hosting/a2a/agent_executor.py @@ -0,0 +1,123 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""AgentExecutor bridge between the a2a-sdk server and Agent Framework agents. + +Implements the a2a-sdk ``AgentExecutor`` interface so that incoming A2A +requests are forwarded to an Agent Framework agent and the response is +published back through the a2a-sdk event queue. +""" + +from __future__ import annotations + +import asyncio +import uuid +from typing import TYPE_CHECKING + +from a2a.server.agent_execution.agent_executor import AgentExecutor +from a2a.types import ( + Message, + Part, + Role, + TaskState, + TaskStatus, + TaskStatusUpdateEvent, + TextPart, +) + +if TYPE_CHECKING: + from a2a.server.agent_execution.context import RequestContext + from a2a.server.events.event_queue import EventQueue + from agent_framework import Agent + + +class AgentFrameworkExecutor(AgentExecutor): + """Bridges A2A protocol requests to an Agent Framework agent. + + For each incoming ``execute`` call the executor: + 1. Extracts the user's text from the A2A ``RequestContext``. + 2. Runs the Agent Framework agent (non-streaming). + 3. Publishes the result as an A2A ``Message`` to the ``EventQueue``. + """ + + def __init__(self, agent: Agent) -> None: + self.agent = agent + + async def execute(self, context: RequestContext, event_queue: EventQueue) -> None: + """Run the agent and publish the response.""" + user_text = context.get_user_input() + if not user_text: + user_text = "Hello" + + task_id = context.task_id or str(uuid.uuid4()) + context_id = context.context_id or str(uuid.uuid4()) + + # Signal that the agent is working + await event_queue.enqueue_event( + TaskStatusUpdateEvent( + task_id=task_id, + context_id=context_id, + status=TaskStatus(state=TaskState.working), + final=False, + ) + ) + + try: + response = await self.agent.run(user_text) + + # Build response text from agent messages + response_parts: list[Part] = [] + for msg in response.messages: + if msg.text: + response_parts.append(TextPart(text=msg.text)) + + if not response_parts: + response_parts.append(TextPart(text=str(response))) + + # Publish the agent's response as a completed message + await event_queue.enqueue_event( + TaskStatusUpdateEvent( + task_id=task_id, + context_id=context_id, + status=TaskStatus( + state=TaskState.completed, + message=Message( + message_id=str(uuid.uuid4()), + role=Role.agent, + parts=response_parts, + ), + ), + final=True, + ) + ) + except asyncio.CancelledError: + raise + except Exception as e: + await event_queue.enqueue_event( + TaskStatusUpdateEvent( + task_id=task_id, + context_id=context_id, + status=TaskStatus( + state=TaskState.failed, + message=Message( + message_id=str(uuid.uuid4()), + role=Role.agent, + parts=[TextPart(text=f"Agent error: {e}")], + ), + ), + final=True, + ) + ) + + async def cancel(self, context: RequestContext, event_queue: EventQueue) -> None: + """Handle cancellation by publishing a canceled status.""" + task_id = context.task_id or str(uuid.uuid4()) + context_id = context.context_id or str(uuid.uuid4()) + + await event_queue.enqueue_event( + TaskStatusUpdateEvent( + task_id=task_id, + context_id=context_id, + status=TaskStatus(state=TaskState.canceled), + final=True, + ) + ) diff --git a/python/samples/04-hosting/a2a/agent_with_a2a.py b/python/samples/04-hosting/a2a/agent_with_a2a.py index 89d43e4b0a..58415b038c 100644 --- a/python/samples/04-hosting/a2a/agent_with_a2a.py +++ b/python/samples/04-hosting/a2a/agent_with_a2a.py @@ -78,16 +78,16 @@ async def main(): # Updates arrive as Server-Sent Events, letting you observe # progress in real time as the remote agent works. print("\n--- Streaming response ---") - async with agent.run("Tell me about yourself", stream=True) as stream: - async for update in stream: - for content in update.contents: - if content.text: - print(f" {content.text}") + stream = agent.run("Tell me about yourself", stream=True) + async for update in stream: + for content in update.contents: + if content.text: + print(f" {content.text}") - response = await stream.get_final_response() - print(f"\nFinal response ({len(response.messages)} message(s)):") - for message in response.messages: - print(f" {message.text}") + response = await stream.get_final_response() + print(f"\nFinal response ({len(response.messages)} message(s)):") + for message in response.messages: + print(f" {message.text}") if __name__ == "__main__": diff --git a/python/samples/04-hosting/a2a/invoice_data.py b/python/samples/04-hosting/a2a/invoice_data.py new file mode 100644 index 0000000000..877a00b4d2 --- /dev/null +++ b/python/samples/04-hosting/a2a/invoice_data.py @@ -0,0 +1,167 @@ +# Copyright (c) Microsoft. All rights reserved. + +"""Mock invoice data and tool functions for the A2A server sample. + +Provides mock invoice data and query tools for the A2A server sample, +enabling invoice-related queries through the A2A protocol. +""" + +import json +import random +from dataclasses import dataclass, field +from datetime import datetime, timedelta, timezone +from typing import Annotated + +from agent_framework import tool +from pydantic import Field + + +@dataclass +class Product: + """A product line item on an invoice.""" + + name: str + quantity: int + price_per_unit: float + + @property + def total_price(self) -> float: + return self.quantity * self.price_per_unit + + def to_dict(self) -> dict: + return { + "name": self.name, + "quantity": self.quantity, + "price_per_unit": self.price_per_unit, + "total_price": self.total_price, + } + + +@dataclass +class Invoice: + """An invoice record with products.""" + + transaction_id: str + invoice_id: str + company_name: str + invoice_date: datetime + products: list[Product] = field(default_factory=list) + + @property + def total_invoice_price(self) -> float: + return sum(p.total_price for p in self.products) + + def to_dict(self) -> dict: + return { + "transaction_id": self.transaction_id, + "invoice_id": self.invoice_id, + "company_name": self.company_name, + "invoice_date": self.invoice_date.strftime("%Y-%m-%d"), + "products": [p.to_dict() for p in self.products], + "total_invoice_price": self.total_invoice_price, + } + + +def _random_date_within_last_two_months() -> datetime: + end_date = datetime.now(timezone.utc) + start_date = end_date - timedelta(days=60) + random_days = random.randint(0, 60) + return start_date + timedelta(days=random_days) + + +def _build_invoices() -> list[Invoice]: + """Build 10 mock invoices.""" + return [ + Invoice("TICKET-XYZ987", "INV789", "Contoso", _random_date_within_last_two_months(), [ + Product("T-Shirts", 150, 10.00), + Product("Hats", 200, 15.00), + Product("Glasses", 300, 5.00), + ]), + Invoice("TICKET-XYZ111", "INV111", "XStore", _random_date_within_last_two_months(), [ + Product("T-Shirts", 2500, 12.00), + Product("Hats", 1500, 8.00), + Product("Glasses", 200, 20.00), + ]), + Invoice("TICKET-XYZ222", "INV222", "Cymbal Direct", _random_date_within_last_two_months(), [ + Product("T-Shirts", 1200, 14.00), + Product("Hats", 800, 7.00), + Product("Glasses", 500, 25.00), + ]), + Invoice("TICKET-XYZ333", "INV333", "Contoso", _random_date_within_last_two_months(), [ + Product("T-Shirts", 400, 11.00), + Product("Hats", 600, 15.00), + Product("Glasses", 700, 5.00), + ]), + Invoice("TICKET-XYZ444", "INV444", "XStore", _random_date_within_last_two_months(), [ + Product("T-Shirts", 800, 10.00), + Product("Hats", 500, 18.00), + Product("Glasses", 300, 22.00), + ]), + Invoice("TICKET-XYZ555", "INV555", "Cymbal Direct", _random_date_within_last_two_months(), [ + Product("T-Shirts", 1100, 9.00), + Product("Hats", 900, 12.00), + Product("Glasses", 1200, 15.00), + ]), + Invoice("TICKET-XYZ666", "INV666", "Contoso", _random_date_within_last_two_months(), [ + Product("T-Shirts", 2500, 8.00), + Product("Hats", 1200, 10.00), + Product("Glasses", 1000, 6.00), + ]), + Invoice("TICKET-XYZ777", "INV777", "XStore", _random_date_within_last_two_months(), [ + Product("T-Shirts", 1900, 13.00), + Product("Hats", 1300, 16.00), + Product("Glasses", 800, 19.00), + ]), + Invoice("TICKET-XYZ888", "INV888", "Cymbal Direct", _random_date_within_last_two_months(), [ + Product("T-Shirts", 2200, 11.00), + Product("Hats", 1700, 8.50), + Product("Glasses", 600, 21.00), + ]), + Invoice("TICKET-XYZ999", "INV999", "Contoso", _random_date_within_last_two_months(), [ + Product("T-Shirts", 1400, 10.50), + Product("Hats", 1100, 9.00), + Product("Glasses", 950, 12.00), + ]), + ] + + +# Module-level singleton so dates are stable for the lifetime of the server +INVOICES = _build_invoices() + + +@tool(approval_mode="never_require") +def query_invoices( + company_name: Annotated[str, Field(description="The company name to filter invoices by.")], + start_date: Annotated[str | None, Field(description="Optional start date (YYYY-MM-DD) to filter invoices.")] = None, + end_date: Annotated[str | None, Field(description="Optional end date (YYYY-MM-DD) to filter invoices.")] = None, +) -> str: + """Retrieves invoices for the specified company and optionally within the specified time range.""" + results = [i for i in INVOICES if i.company_name.lower() == company_name.lower()] + + if start_date: + start = datetime.strptime(start_date, "%Y-%m-%d").replace(tzinfo=timezone.utc) + results = [i for i in results if i.invoice_date >= start] + + if end_date: + end = datetime.strptime(end_date, "%Y-%m-%d").replace(tzinfo=timezone.utc) + timedelta(days=1) + results = [i for i in results if i.invoice_date < end] + + return json.dumps([i.to_dict() for i in results], indent=2) + + +@tool(approval_mode="never_require") +def query_by_transaction_id( + transaction_id: Annotated[str, Field(description="The transaction ID to look up (e.g. TICKET-XYZ987).")], +) -> str: + """Retrieves invoice using the transaction id.""" + results = [i for i in INVOICES if i.transaction_id.lower() == transaction_id.lower()] + return json.dumps([i.to_dict() for i in results], indent=2) + + +@tool(approval_mode="never_require") +def query_by_invoice_id( + invoice_id: Annotated[str, Field(description="The invoice ID to look up (e.g. INV789).")], +) -> str: + """Retrieves invoice using the invoice id.""" + results = [i for i in INVOICES if i.invoice_id.lower() == invoice_id.lower()] + return json.dumps([i.to_dict() for i in results], indent=2) From fd1c66121ecc77b9b1a417ee7838d4b448891d06 Mon Sep 17 00:00:00 2001 From: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com> Date: Tue, 10 Mar 2026 12:52:40 +0000 Subject: [PATCH 20/44] .NET: Skip Azure Persistent (V1) flaky CodeInterpreter integration tests (#4583) * Skip flaky CodeInterpreter integration tests in CI The CreateAgent_CreatesAgentWithCodeInterpreter tests fail intermittently because the Azure AI Code Interpreter service sometimes fails to read/execute uploaded Python files. This causes all 4 integration test jobs to fail consistently across both platforms (ubuntu/windows) and TFMs (net10.0/net472). Mark both test variants with Skip to match the convention used by other flaky tests in the suite (e.g., AzureAIAgentsPersistentStructuredOutputRunTests). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip flaky CodeInterpreter integration tests in CI The CreateAgent_CreatesAgentWithCodeInterpreter tests fail intermittently because the Azure AI Code Interpreter service sometimes fails to read/execute uploaded Python files. This causes all 4 integration test jobs to fail consistently across both platforms (ubuntu/windows) and TFMs (net10.0/net472). Mark both test variants with Skip to match the convention used by other flaky tests in the suite (e.g., AzureAIAgentsPersistentStructuredOutputRunTests). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AzureAIAgentsPersistentCreateTests.cs | 6 ++++-- .../OpenAIAssistantClientExtensionsTests.cs | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentCreateTests.cs b/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentCreateTests.cs index 6b29bb4b08..20f6a4cda4 100644 --- a/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentCreateTests.cs +++ b/dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentCreateTests.cs @@ -14,6 +14,8 @@ namespace AzureAIAgentsPersistent.IntegrationTests; public class AzureAIAgentsPersistentCreateTests { + private const string SkipCodeInterpreterReason = "Azure AI Code Interpreter intermittently fails to execute uploaded files in CI"; + private readonly PersistentAgentsClient _persistentAgentsClient = new(TestConfiguration.GetRequiredValue(TestSettings.AzureAIProjectEndpoint), TestAzureCliCredentials.CreateAzureCliCredential()); [Theory] @@ -131,11 +133,11 @@ public class AzureAIAgentsPersistentCreateTests } } - [Fact] + [Fact(Skip = SkipCodeInterpreterReason)] public Task CreateAgent_CreatesAgentWithCodeInterpreter_ChatClientAgentOptionsAsync() => this.CreateAgent_CreatesAgentWithCodeInterpreterAsync("CreateWithChatClientAgentOptionsAsync"); - [RetryFact(Constants.RetryCount, Constants.RetryDelay)] + [Fact(Skip = SkipCodeInterpreterReason)] public Task CreateAgent_CreatesAgentWithCodeInterpreter_FoundryOptionsAsync() => this.CreateAgent_CreatesAgentWithCodeInterpreterAsync("CreateWithFoundryOptionsAsync"); diff --git a/dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantClientExtensionsTests.cs b/dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantClientExtensionsTests.cs index 2e92cc6d42..9441d9534b 100644 --- a/dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantClientExtensionsTests.cs +++ b/dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantClientExtensionsTests.cs @@ -19,6 +19,8 @@ namespace OpenAIAssistant.IntegrationTests; public class OpenAIAssistantClientExtensionsTests { + private const string SkipCodeInterpreterReason = "OpenAI Assistant Code Interpreter intermittently fails in CI"; + private readonly AssistantClient _assistantClient = new OpenAIClient(TestConfiguration.GetRequiredValue(TestSettings.OpenAIApiKey)).GetAssistantClient(); private readonly OpenAIFileClient _fileClient = new OpenAIClient(TestConfiguration.GetRequiredValue(TestSettings.OpenAIApiKey)).GetOpenAIFileClient(); @@ -81,7 +83,7 @@ public class OpenAIAssistantClientExtensionsTests } } - [Theory] + [Theory(Skip = SkipCodeInterpreterReason)] [InlineData("CreateWithChatClientAgentOptionsAsync")] [InlineData("CreateWithChatClientAgentOptionsSync")] [InlineData("CreateWithParamsAsync")] From 1b7668119d4776850d6d61308e719ae00240cf6c Mon Sep 17 00:00:00 2001 From: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com> Date: Tue, 10 Mar 2026 13:52:45 +0000 Subject: [PATCH 21/44] .NET: Enable Microsoft.Agents.AI.FoundryMemory for NuGet release (#4559) * Enable Microsoft.Agents.AI.FoundryMemory for NuGet release - Remove IsPackable=false override from .csproj to inherit IsPackable=true from nuget-package.props - Add project to agent-framework-release.slnf for inclusion in build/sign/publish pipeline Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update FoundryMemoryProvider and MemorySearch sample - StoreAIContextAsync fires UpdateMemoriesAsync immediately (non-accumulation) - WhenUpdatesCompletedAsync polls last updateId via GetUpdateResultAsync - Updated FoundryAgents_Step22_MemorySearch sample to create/destroy memory store (matching features/foundry-agent-client pattern) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update FoundryAgents_Step22_MemorySearch sample - Sample now creates/destroys memory store (self-contained lifecycle) - Uses WaitForMemoriesUpdateAsync for seeding memories - Cleanup in finally block deletes both agent and memory store - Matches features/foundry-agent-client pattern Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/agent-framework-release.slnf | 1 + .../Program.cs | 128 ++++++++++-------- .../Microsoft.Agents.AI.FoundryMemory.csproj | 4 - 3 files changed, 73 insertions(+), 60 deletions(-) diff --git a/dotnet/agent-framework-release.slnf b/dotnet/agent-framework-release.slnf index ebd33c0767..1c8f477b16 100644 --- a/dotnet/agent-framework-release.slnf +++ b/dotnet/agent-framework-release.slnf @@ -14,6 +14,7 @@ "src\\Microsoft.Agents.AI.Declarative\\Microsoft.Agents.AI.Declarative.csproj", "src\\Microsoft.Agents.AI.DevUI\\Microsoft.Agents.AI.DevUI.csproj", "src\\Microsoft.Agents.AI.DurableTask\\Microsoft.Agents.AI.DurableTask.csproj", + "src\\Microsoft.Agents.AI.FoundryMemory\\Microsoft.Agents.AI.FoundryMemory.csproj", "src\\Microsoft.Agents.AI.Hosting.A2A.AspNetCore\\Microsoft.Agents.AI.Hosting.A2A.AspNetCore.csproj", "src\\Microsoft.Agents.AI.Hosting.A2A\\Microsoft.Agents.AI.Hosting.A2A.csproj", "src\\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore\\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.csproj", diff --git a/dotnet/samples/02-agents/FoundryAgents/FoundryAgents_Step22_MemorySearch/Program.cs b/dotnet/samples/02-agents/FoundryAgents/FoundryAgents_Step22_MemorySearch/Program.cs index 836bf1b684..1f6b0f2ddc 100644 --- a/dotnet/samples/02-agents/FoundryAgents/FoundryAgents_Step22_MemorySearch/Program.cs +++ b/dotnet/samples/02-agents/FoundryAgents/FoundryAgents_Step22_MemorySearch/Program.cs @@ -12,11 +12,8 @@ using OpenAI.Responses; string endpoint = Environment.GetEnvironmentVariable("AZURE_AI_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_AI_PROJECT_ENDPOINT is not set."); string deploymentName = Environment.GetEnvironmentVariable("AZURE_AI_MODEL_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; - -// Memory store configuration -// NOTE: Memory stores must be created beforehand via Azure Portal or Python SDK. -// The .NET SDK currently only supports using existing memory stores with agents. -string memoryStoreName = Environment.GetEnvironmentVariable("AZURE_AI_MEMORY_STORE_ID") ?? throw new InvalidOperationException("AZURE_AI_MEMORY_STORE_ID is not set."); +string embeddingModelName = Environment.GetEnvironmentVariable("AZURE_AI_EMBEDDING_DEPLOYMENT_NAME") ?? "text-embedding-ada-002"; +string memoryStoreName = Environment.GetEnvironmentVariable("AZURE_AI_MEMORY_STORE_ID") ?? $"foundry-memory-sample-{Guid.NewGuid():N}"; const string AgentInstructions = """ You are a helpful assistant that remembers past conversations. @@ -32,71 +29,57 @@ const string AgentNameNative = "MemorySearchAgent-NATIVE"; string userScope = $"user_{Environment.MachineName}"; // Get a client to create/retrieve/delete server side agents with Azure Foundry Agents. -AIProjectClient aiProjectClient = new(new Uri(endpoint), new AzureCliCredential()); +DefaultAzureCredential credential = new(); +AIProjectClient aiProjectClient = new(new Uri(endpoint), credential); + +// Ensure the memory store exists and has memories to retrieve. +await EnsureMemoryStoreAsync(); // Create the Memory Search tool configuration -MemorySearchPreviewTool memorySearchTool = new(memoryStoreName, userScope) -{ - // Optional: Configure how quickly new memories are indexed (in seconds) - UpdateDelay = 1, - - // Optional: Configure search behavior - SearchOptions = new MemorySearchToolOptions - { - // Additional search options can be configured here if needed - } -}; +MemorySearchPreviewTool memorySearchTool = new(memoryStoreName, userScope) { UpdateDelay = 0 }; // Create agent using Option 1 (MEAI) or Option 2 (Native SDK) AIAgent agent = await CreateAgentWithMEAI(); // AIAgent agent = await CreateAgentWithNativeSDK(); -Console.WriteLine("Agent created with Memory Search tool. Starting conversation...\n"); - -// Conversation 1: Share some personal information -Console.WriteLine("User: My name is Alice and I love programming in C#."); -AgentResponse response1 = await agent.RunAsync("My name is Alice and I love programming in C#."); -Console.WriteLine($"Agent: {response1.Messages.LastOrDefault()?.Text}\n"); - -// Allow time for memory to be indexed -await Task.Delay(2000); - -// Conversation 2: Test if the agent remembers -Console.WriteLine("User: What's my name and what programming language do I prefer?"); -AgentResponse response2 = await agent.RunAsync("What's my name and what programming language do I prefer?"); -Console.WriteLine($"Agent: {response2.Messages.LastOrDefault()?.Text}\n"); - -// Inspect memory search results if available in raw response items -// Note: Memory search tool call results appear as AgentResponseItem types -foreach (var message in response2.Messages) +try { - if (message.RawRepresentation is AgentResponseItem agentResponseItem && - agentResponseItem is MemorySearchToolCallResponseItem memorySearchResult) - { - Console.WriteLine($"Memory Search Status: {memorySearchResult.Status}"); - Console.WriteLine($"Memory Search Results Count: {memorySearchResult.Results.Count}"); + Console.WriteLine("Agent created with Memory Search tool. Starting conversation...\n"); - foreach (var result in memorySearchResult.Results) + // The agent uses the memory search tool to recall stored information. + Console.WriteLine("User: What's my name and what programming language do I prefer?"); + AgentResponse response = await agent.RunAsync("What's my name and what programming language do I prefer?"); + Console.WriteLine($"Agent: {response.Messages.LastOrDefault()?.Text}\n"); + + // Inspect memory search results if available in raw response items. + foreach (var message in response.Messages) + { + if (message.RawRepresentation is MemorySearchToolCallResponseItem memorySearchResult) { - var memoryItem = result.MemoryItem; - Console.WriteLine($" - Memory ID: {memoryItem.MemoryId}"); - Console.WriteLine($" Scope: {memoryItem.Scope}"); - Console.WriteLine($" Content: {memoryItem.Content}"); - Console.WriteLine($" Updated: {memoryItem.UpdatedAt}"); + Console.WriteLine($"Memory Search Status: {memorySearchResult.Status}"); + Console.WriteLine($"Memory Search Results Count: {memorySearchResult.Results.Count}"); + + foreach (var result in memorySearchResult.Results) + { + var memoryItem = result.MemoryItem; + Console.WriteLine($" - Memory ID: {memoryItem.MemoryId}"); + Console.WriteLine($" Scope: {memoryItem.Scope}"); + Console.WriteLine($" Content: {memoryItem.Content}"); + Console.WriteLine($" Updated: {memoryItem.UpdatedAt}"); + } } } } +finally +{ + // Cleanup: Delete the agent and memory store. + Console.WriteLine("\nCleaning up..."); + await aiProjectClient.Agents.DeleteAgentAsync(agent.Name); + Console.WriteLine("Agent deleted."); + await aiProjectClient.MemoryStores.DeleteMemoryStoreAsync(memoryStoreName); + Console.WriteLine("Memory store deleted."); +} -// Cleanup: Delete the agent (memory store persists and should be cleaned up separately if needed) -Console.WriteLine("\nCleaning up agent..."); -await aiProjectClient.Agents.DeleteAgentAsync(agent.Name); -Console.WriteLine("Agent deleted successfully."); - -// NOTE: Memory stores are long-lived resources and are NOT deleted with the agent. -// To delete a memory store, use the Azure Portal or Python SDK: -// await project_client.memory_stores.delete(memory_store.name) - -// --- Agent Creation Options --- #pragma warning disable CS8321 // Local function is declared but never used // Option 1 - Using MemorySearchTool wrapped as MEAI AITool @@ -122,3 +105,36 @@ async Task CreateAgentWithNativeSDK() }) ); } + +// Helpers — kept at the bottom so the main agent flow above stays clean. +async Task EnsureMemoryStoreAsync() +{ + Console.WriteLine($"Creating memory store '{memoryStoreName}'..."); + try + { + await aiProjectClient.MemoryStores.GetMemoryStoreAsync(memoryStoreName); + Console.WriteLine("Memory store already exists."); + } + catch (System.ClientModel.ClientResultException ex) when (ex.Status == 404) + { + MemoryStoreDefaultDefinition definition = new(deploymentName, embeddingModelName); + await aiProjectClient.MemoryStores.CreateMemoryStoreAsync(memoryStoreName, definition, "Sample memory store for Memory Search demo"); + Console.WriteLine("Memory store created."); + } + + Console.WriteLine("Storing memories from a prior conversation..."); + MemoryUpdateOptions memoryOptions = new(userScope) { UpdateDelay = 0 }; + memoryOptions.Items.Add(ResponseItem.CreateUserMessageItem("My name is Alice and I love programming in C#.")); + + MemoryUpdateResult updateResult = await aiProjectClient.MemoryStores.WaitForMemoriesUpdateAsync( + memoryStoreName: memoryStoreName, + options: memoryOptions, + pollingInterval: 500); + + if (updateResult.Status == MemoryStoreUpdateStatus.Failed) + { + throw new InvalidOperationException($"Memory update failed: {updateResult.ErrorDetails}"); + } + + Console.WriteLine($"Memory update completed (status: {updateResult.Status}).\n"); +} diff --git a/dotnet/src/Microsoft.Agents.AI.FoundryMemory/Microsoft.Agents.AI.FoundryMemory.csproj b/dotnet/src/Microsoft.Agents.AI.FoundryMemory/Microsoft.Agents.AI.FoundryMemory.csproj index 75da2bccc5..a1b8f85ae8 100644 --- a/dotnet/src/Microsoft.Agents.AI.FoundryMemory/Microsoft.Agents.AI.FoundryMemory.csproj +++ b/dotnet/src/Microsoft.Agents.AI.FoundryMemory/Microsoft.Agents.AI.FoundryMemory.csproj @@ -13,10 +13,6 @@ - - - false - From fbcf1444ee72d813a8a0eef3a99153205fa4b85f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Mar 2026 16:17:23 +0100 Subject: [PATCH 22/44] Fix Strands Agents documentation links in ADR (#4584) * Initial plan * Fix broken Strands Agents documentation links in ADR 0001 Replace 5 broken strandsagents.com URLs (returning 404) with stable GitHub source code links in docs/decisions/0001-agent-run-response.md. The Strands Agents docs site restructured from /api-reference/python/ to /api/python/, breaking the old links. Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> * Update Strands Agents links to use official documentation site Replace GitHub source links with official strandsagents.com/docs/api/python/ documentation URLs in docs/decisions/0001-agent-run-response.md. Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> * Update Strands Agents links to use specific documentation URLs - Streaming: strandsagents.com/docs/user-guide/concepts/streaming/ - Structured output: strandsagents.com/docs/user-guide/concepts/agents/structured-output/ - AgentResult/stop_reason: strandsagents.com/docs/api/python/strands.agent.agent_result/#agentresult Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> * Deduplicate Strands AgentResult link in stop-reason row Replaced the duplicate hyperlink on `stop_reason` with inline code, keeping a single AgentResult link to the same URL. Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> --- docs/decisions/0001-agent-run-response.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/decisions/0001-agent-run-response.md b/docs/decisions/0001-agent-run-response.md index fb4a962802..12724aca3a 100644 --- a/docs/decisions/0001-agent-run-response.md +++ b/docs/decisions/0001-agent-run-response.md @@ -64,7 +64,7 @@ Approaches observed from the compared SDKs: | AutoGen | **Approach 1** Separates messages into Agent-Agent (maps to Primary) and Internal (maps to Secondary) and these are returned as separate properties on the agent response object. See [types of messages](https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/messages.html#types-of-messages) and [Response](https://microsoft.github.io/autogen/stable/reference/python/autogen_agentchat.base.html#autogen_agentchat.base.Response) | **Approach 2** Returns a stream of internal events and the last item is a Response object. See [ChatAgent.on_messages_stream](https://microsoft.github.io/autogen/stable/reference/python/autogen_agentchat.base.html#autogen_agentchat.base.ChatAgent.on_messages_stream) | | OpenAI Agent SDK | **Approach 1** Separates new_items (Primary+Secondary) from final output (Primary) as separate properties on the [RunResult](https://github.com/openai/openai-agents-python/blob/main/src/agents/result.py#L39) | **Approach 1** Similar to non-streaming, has a way of streaming updates via a method on the response object which includes all data, and then a separate final output property on the response object which is populated only when the run is complete. See [RunResultStreaming](https://github.com/openai/openai-agents-python/blob/main/src/agents/result.py#L136) | | Google ADK | **Approach 2** [Emits events](https://google.github.io/adk-docs/runtime/#step-by-step-breakdown) with [FinalResponse](https://github.com/google/adk-java/blob/main/core/src/main/java/com/google/adk/events/Event.java#L232) true (Primary) / false (Secondary) and callers have to filter out those with false to get just the final response message | **Approach 2** Similar to non-streaming except [events](https://google.github.io/adk-docs/runtime/#streaming-vs-non-streaming-output-partialtrue) are emitted with [Partial](https://github.com/google/adk-java/blob/main/core/src/main/java/com/google/adk/events/Event.java#L133) true to indicate that they are streaming messages. A final non partial event is also emitted. | -| AWS (Strands) | **Approach 3** Returns an [AgentResult](https://strandsagents.com/latest/documentation/docs/api-reference/python/agent/agent_result/) (Primary) with messages and a reason for the run's completion. | **Approach 2** [Streams events](https://strandsagents.com/latest/documentation/docs/api-reference/python/agent/agent/#strands.agent.agent.Agent.stream_async) (Primary+Secondary) including, response text, current_tool_use, even data from "callbacks" (strands plugins) | +| AWS (Strands) | **Approach 3** Returns an [AgentResult](https://strandsagents.com/docs/api/python/strands.agent.agent_result/#agentresult) (Primary) with messages and a reason for the run's completion. | **Approach 2** [Streams events](https://strandsagents.com/docs/user-guide/concepts/streaming/) (Primary+Secondary) including, response text, current_tool_use, even data from "callbacks" (strands plugins) | | LangGraph | **Approach 2** A mixed list of all [messages](https://langchain-ai.github.io/langgraph/agents/run_agents/#output-format) | **Approach 2** A mixed list of all [messages](https://langchain-ai.github.io/langgraph/agents/run_agents/#output-format) | | Agno | **Combination of various approaches** Returns a [RunResponse](https://docs.agno.com/reference/agents/run-response) object with text content, messages (essentially chat history including inputs and instructions), reasoning and thinking text properties. Secondary events could potentially be extracted from messages. | **Approach 2** Returns [RunResponseEvent](https://docs.agno.com/reference/agents/run-response#runresponseevent-types-and-attributes) objects including tool call, memory update, etc, information, where the [RunResponseCompletedEvent](https://docs.agno.com/reference/agents/run-response#runresponsecompletedevent) has similar properties to RunResponse| | A2A | **Approach 3** Returns a [Task or Message](https://a2aproject.github.io/A2A/latest/specification/#71-messagesend) where the message is the final result (Primary) and task is a reference to a long running process. | **Approach 2** Returns a [stream](https://a2aproject.github.io/A2A/latest/specification/#72-messagestream) that contains task updates (Secondary) and a final message (Primary) | @@ -496,7 +496,7 @@ We need to decide what AIContent types, each agent response type will be mapped |-|-| | AutoGen | **Approach 1** Supports [configuring an agent](https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/agents.html#structured-output) at agent creation. | | Google ADK | **Approach 1** Both [input and output schemas can be specified for LLM Agents](https://google.github.io/adk-docs/agents/llm-agents/#structuring-data-input_schema-output_schema-output_key) at construction time. This option is specific to this agent type and other agent types do not necessarily support | -| AWS (Strands) | **Approach 2** Supports a special invocation method called [structured_output](https://strandsagents.com/latest/documentation/docs/api-reference/python/agent/agent/#strands.agent.agent.Agent.structured_output) | +| AWS (Strands) | **Approach 2** Supports a special invocation method called [structured_output](https://strandsagents.com/docs/user-guide/concepts/agents/structured-output/) | | LangGraph | **Approach 1** Supports [configuring an agent](https://langchain-ai.github.io/langgraph/agents/agents/?h=structured#6-configure-structured-output) at agent construction time, and a [structured response](https://langchain-ai.github.io/langgraph/agents/run_agents/#output-format) can be retrieved as a special property on the agent response | | Agno | **Approach 1** Supports [configuring an agent](https://docs.agno.com/input-output/structured-output/agent) at agent construction time | | A2A | **Informal Approach 2** Doesn't formally support schema negotiation, but [hints can be provided via metadata](https://a2a-protocol.org/latest/specification/#97-structured-data-exchange-requesting-and-providing-json) at invocation time | @@ -508,7 +508,7 @@ We need to decide what AIContent types, each agent response type will be mapped |-|-| | AutoGen | Supports a [stop reason](https://microsoft.github.io/autogen/stable/reference/python/autogen_agentchat.base.html#autogen_agentchat.base.TaskResult.stop_reason) which is a freeform text string | | Google ADK | [No equivalent present](https://github.com/google/adk-python/blob/main/src/google/adk/events/event.py) | -| AWS (Strands) | Exposes a [stop_reason](https://strandsagents.com/latest/documentation/docs/api-reference/python/types/event_loop/#strands.types.event_loop.StopReason) property on the [AgentResult](https://strandsagents.com/latest/documentation/docs/api-reference/python/agent/agent_result/) class with options that are tied closely to LLM operations. | +| AWS (Strands) | Exposes a `stop_reason` property on the [AgentResult](https://strandsagents.com/docs/api/python/strands.agent.agent_result/#agentresult) class with options that are tied closely to LLM operations. | | LangGraph | No equivalent present, output contains only [messages](https://langchain-ai.github.io/langgraph/agents/run_agents/#output-format) | | Agno | [No equivalent present](https://docs.agno.com/reference/agents/run-response) | | A2A | No equivalent present, response only contains a [message](https://a2a-protocol.org/latest/specification/#64-message-object) or [task](https://a2a-protocol.org/latest/specification/#61-task-object). | From c15f0754122a9a987da681a15596aa09b7c3d096 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Tue, 10 Mar 2026 15:40:44 +0000 Subject: [PATCH 23/44] Cleanup unecessary usages of AsIChatClient (#4561) --- .../AGUI/Step01_GettingStarted/Server/Program.cs | 3 +-- .../Step01_GettingStarted/Server/Server.csproj | 1 - .../AGUI/Step02_BackendTools/Server/Program.cs | 2 +- .../Step02_BackendTools/Server/Server.csproj | 1 - .../AGUI/Step03_FrontendTools/Server/Program.cs | 3 +-- .../Step03_FrontendTools/Server/Server.csproj | 1 - .../AGUI/Step04_HumanInLoop/Server/Program.cs | 2 +- .../AGUI/Step04_HumanInLoop/Server/Server.csproj | 1 - .../Step05_StateManagement/Server/Program.cs | 3 +-- .../Step05_StateManagement/Server/Server.csproj | 1 - .../AGUIDojoServer/ChatClientAgentFactory.cs | 16 ++++++++-------- .../samples/05-end-to-end/AGUIWebChat/README.md | 4 ++-- .../05-end-to-end/AGUIWebChat/Server/Program.cs | 3 +-- .../AspNetAgentAuthorization/Service/Program.cs | 2 +- .../Service/Service.csproj | 1 - 15 files changed, 17 insertions(+), 27 deletions(-) diff --git a/dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Server/Program.cs b/dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Server/Program.cs index 936d9430fb..2c7333015d 100644 --- a/dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Server/Program.cs +++ b/dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Server/Program.cs @@ -4,7 +4,6 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Agents.AI.Hosting.AGUI.AspNetCore; -using Microsoft.Extensions.AI; using OpenAI.Chat; WebApplicationBuilder builder = WebApplication.CreateBuilder(args); @@ -27,7 +26,7 @@ ChatClient chatClient = new AzureOpenAIClient( new DefaultAzureCredential()) .GetChatClient(deploymentName); -AIAgent agent = chatClient.AsIChatClient().AsAIAgent( +AIAgent agent = chatClient.AsAIAgent( name: "AGUIAssistant", instructions: "You are a helpful assistant."); diff --git a/dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Server/Server.csproj b/dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Server/Server.csproj index b1e7fe33cf..01c8663a7b 100644 --- a/dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Server/Server.csproj +++ b/dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Server/Server.csproj @@ -10,7 +10,6 @@ - diff --git a/dotnet/samples/02-agents/AGUI/Step02_BackendTools/Server/Program.cs b/dotnet/samples/02-agents/AGUI/Step02_BackendTools/Server/Program.cs index 5b55829b45..33a32410e2 100644 --- a/dotnet/samples/02-agents/AGUI/Step02_BackendTools/Server/Program.cs +++ b/dotnet/samples/02-agents/AGUI/Step02_BackendTools/Server/Program.cs @@ -82,7 +82,7 @@ ChatClient chatClient = new AzureOpenAIClient( new DefaultAzureCredential()) .GetChatClient(deploymentName); -ChatClientAgent agent = chatClient.AsIChatClient().AsAIAgent( +ChatClientAgent agent = chatClient.AsAIAgent( name: "AGUIAssistant", instructions: "You are a helpful assistant with access to restaurant information.", tools: tools); diff --git a/dotnet/samples/02-agents/AGUI/Step02_BackendTools/Server/Server.csproj b/dotnet/samples/02-agents/AGUI/Step02_BackendTools/Server/Server.csproj index b1e7fe33cf..01c8663a7b 100644 --- a/dotnet/samples/02-agents/AGUI/Step02_BackendTools/Server/Server.csproj +++ b/dotnet/samples/02-agents/AGUI/Step02_BackendTools/Server/Server.csproj @@ -10,7 +10,6 @@ - diff --git a/dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Server/Program.cs b/dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Server/Program.cs index 936d9430fb..2c7333015d 100644 --- a/dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Server/Program.cs +++ b/dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Server/Program.cs @@ -4,7 +4,6 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Agents.AI.Hosting.AGUI.AspNetCore; -using Microsoft.Extensions.AI; using OpenAI.Chat; WebApplicationBuilder builder = WebApplication.CreateBuilder(args); @@ -27,7 +26,7 @@ ChatClient chatClient = new AzureOpenAIClient( new DefaultAzureCredential()) .GetChatClient(deploymentName); -AIAgent agent = chatClient.AsIChatClient().AsAIAgent( +AIAgent agent = chatClient.AsAIAgent( name: "AGUIAssistant", instructions: "You are a helpful assistant."); diff --git a/dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Server/Server.csproj b/dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Server/Server.csproj index b1e7fe33cf..01c8663a7b 100644 --- a/dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Server/Server.csproj +++ b/dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Server/Server.csproj @@ -10,7 +10,6 @@ - diff --git a/dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Server/Program.cs b/dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Server/Program.cs index b90f59a1d0..edfcd03219 100644 --- a/dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Server/Program.cs +++ b/dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Server/Program.cs @@ -60,7 +60,7 @@ ChatClient openAIChatClient = new AzureOpenAIClient( new DefaultAzureCredential()) .GetChatClient(deploymentName); -ChatClientAgent baseAgent = openAIChatClient.AsIChatClient().AsAIAgent( +ChatClientAgent baseAgent = openAIChatClient.AsAIAgent( name: "AGUIAssistant", instructions: "You are a helpful assistant in charge of approving expenses", tools: tools); diff --git a/dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Server/Server.csproj b/dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Server/Server.csproj index b1e7fe33cf..01c8663a7b 100644 --- a/dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Server/Server.csproj +++ b/dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Server/Server.csproj @@ -10,7 +10,6 @@ - diff --git a/dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/Program.cs b/dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/Program.cs index 46637e376b..1965cf55f7 100644 --- a/dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/Program.cs +++ b/dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/Program.cs @@ -4,7 +4,6 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Agents.AI.Hosting.AGUI.AspNetCore; -using Microsoft.Extensions.AI; using Microsoft.Extensions.Options; using OpenAI.Chat; using RecipeAssistant; @@ -37,7 +36,7 @@ ChatClient chatClient = new AzureOpenAIClient( new DefaultAzureCredential()) .GetChatClient(deploymentName); -AIAgent baseAgent = chatClient.AsIChatClient().AsAIAgent( +AIAgent baseAgent = chatClient.AsAIAgent( name: "RecipeAgent", instructions: """ You are a helpful recipe assistant. When users ask you to create or suggest a recipe, diff --git a/dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/Server.csproj b/dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/Server.csproj index b1e7fe33cf..01c8663a7b 100644 --- a/dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/Server.csproj +++ b/dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/Server.csproj @@ -10,7 +10,6 @@ - diff --git a/dotnet/samples/05-end-to-end/AGUIClientServer/AGUIDojoServer/ChatClientAgentFactory.cs b/dotnet/samples/05-end-to-end/AGUIClientServer/AGUIDojoServer/ChatClientAgentFactory.cs index cfb07d2850..1cdd00731b 100644 --- a/dotnet/samples/05-end-to-end/AGUIClientServer/AGUIDojoServer/ChatClientAgentFactory.cs +++ b/dotnet/samples/05-end-to-end/AGUIClientServer/AGUIDojoServer/ChatClientAgentFactory.cs @@ -10,7 +10,7 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Extensions.AI; -using ChatClient = OpenAI.Chat.ChatClient; +using OpenAI.Chat; namespace AGUIDojoServer; @@ -36,7 +36,7 @@ internal static class ChatClientAgentFactory { ChatClient chatClient = s_azureOpenAIClient!.GetChatClient(s_deploymentName!); - return chatClient.AsIChatClient().AsAIAgent( + return chatClient.AsAIAgent( name: "AgenticChat", description: "A simple chat agent using Azure OpenAI"); } @@ -45,7 +45,7 @@ internal static class ChatClientAgentFactory { ChatClient chatClient = s_azureOpenAIClient!.GetChatClient(s_deploymentName!); - return chatClient.AsIChatClient().AsAIAgent( + return chatClient.AsAIAgent( name: "BackendToolRenderer", description: "An agent that can render backend tools using Azure OpenAI", tools: [AIFunctionFactory.Create( @@ -59,7 +59,7 @@ internal static class ChatClientAgentFactory { ChatClient chatClient = s_azureOpenAIClient!.GetChatClient(s_deploymentName!); - return chatClient.AsIChatClient().AsAIAgent( + return chatClient.AsAIAgent( name: "HumanInTheLoopAgent", description: "An agent that involves human feedback in its decision-making process using Azure OpenAI"); } @@ -68,7 +68,7 @@ internal static class ChatClientAgentFactory { ChatClient chatClient = s_azureOpenAIClient!.GetChatClient(s_deploymentName!); - return chatClient.AsIChatClient().AsAIAgent( + return chatClient.AsAIAgent( name: "ToolBasedGenerativeUIAgent", description: "An agent that uses tools to generate user interfaces using Azure OpenAI"); } @@ -76,7 +76,7 @@ internal static class ChatClientAgentFactory public static AIAgent CreateAgenticUI(JsonSerializerOptions options) { ChatClient chatClient = s_azureOpenAIClient!.GetChatClient(s_deploymentName!); - var baseAgent = chatClient.AsIChatClient().AsAIAgent(new ChatClientAgentOptions + var baseAgent = chatClient.AsAIAgent(new ChatClientAgentOptions { Name = "AgenticUIAgent", Description = "An agent that generates agentic user interfaces using Azure OpenAI", @@ -119,7 +119,7 @@ internal static class ChatClientAgentFactory { ChatClient chatClient = s_azureOpenAIClient!.GetChatClient(s_deploymentName!); - var baseAgent = chatClient.AsIChatClient().AsAIAgent( + var baseAgent = chatClient.AsAIAgent( name: "SharedStateAgent", description: "An agent that demonstrates shared state patterns using Azure OpenAI"); @@ -130,7 +130,7 @@ internal static class ChatClientAgentFactory { ChatClient chatClient = s_azureOpenAIClient!.GetChatClient(s_deploymentName!); - var baseAgent = chatClient.AsIChatClient().AsAIAgent(new ChatClientAgentOptions + var baseAgent = chatClient.AsAIAgent(new ChatClientAgentOptions { Name = "PredictiveStateUpdatesAgent", Description = "An agent that demonstrates predictive state updates using Azure OpenAI", diff --git a/dotnet/samples/05-end-to-end/AGUIWebChat/README.md b/dotnet/samples/05-end-to-end/AGUIWebChat/README.md index 0e42757fa1..721d1bdf41 100644 --- a/dotnet/samples/05-end-to-end/AGUIWebChat/README.md +++ b/dotnet/samples/05-end-to-end/AGUIWebChat/README.md @@ -74,7 +74,7 @@ AzureOpenAIClient azureOpenAIClient = new AzureOpenAIClient( ChatClient chatClient = azureOpenAIClient.GetChatClient(deploymentName); // Create AI agent -ChatClientAgent agent = chatClient.AsIChatClient().AsAIAgent( +ChatClientAgent agent = chatClient.AsAIAgent( name: "ChatAssistant", instructions: "You are a helpful assistant."); @@ -162,7 +162,7 @@ dotnet run Edit the instructions in `Server/Program.cs`: ```csharp -ChatClientAgent agent = chatClient.AsIChatClient().AsAIAgent( +ChatClientAgent agent = chatClient.AsAIAgent( name: "ChatAssistant", instructions: "You are a helpful coding assistant specializing in C# and .NET."); ``` diff --git a/dotnet/samples/05-end-to-end/AGUIWebChat/Server/Program.cs b/dotnet/samples/05-end-to-end/AGUIWebChat/Server/Program.cs index 0b474bb7f4..185b7d6bbf 100644 --- a/dotnet/samples/05-end-to-end/AGUIWebChat/Server/Program.cs +++ b/dotnet/samples/05-end-to-end/AGUIWebChat/Server/Program.cs @@ -6,7 +6,6 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; using Microsoft.Agents.AI.Hosting.AGUI.AspNetCore; -using Microsoft.Extensions.AI; using OpenAI.Chat; WebApplicationBuilder builder = WebApplication.CreateBuilder(args); @@ -28,7 +27,7 @@ AzureOpenAIClient azureOpenAIClient = new( ChatClient chatClient = azureOpenAIClient.GetChatClient(deploymentName); -ChatClientAgent agent = chatClient.AsIChatClient().AsAIAgent( +ChatClientAgent agent = chatClient.AsAIAgent( name: "ChatAssistant", instructions: "You are a helpful assistant."); diff --git a/dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Program.cs b/dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Program.cs index 1d89296a2e..e443888cea 100644 --- a/dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Program.cs +++ b/dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Program.cs @@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.AI; using OpenAI; +using OpenAI.Chat; WebApplicationBuilder builder = WebApplication.CreateBuilder(args); @@ -89,7 +90,6 @@ builder.Services.AddSingleton(sp => return new OpenAIClient(apiKey) .GetChatClient(model) - .AsIChatClient() .AsAIAgent( name: "ExpenseApprovalAgent", instructions: "You are an expense approval assistant. You can list pending expenses " diff --git a/dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Service.csproj b/dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Service.csproj index 40b91fcd86..6e1d68118f 100644 --- a/dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Service.csproj +++ b/dotnet/samples/05-end-to-end/AspNetAgentAuthorization/Service/Service.csproj @@ -10,7 +10,6 @@ - From 55fc882ca8ed2f34d3dc669ef44d5208e0cd77e3 Mon Sep 17 00:00:00 2001 From: Tao Chen Date: Tue, 10 Mar 2026 11:44:59 -0700 Subject: [PATCH 24/44] Python: Fix store=False not overriding client default (#4569) * Fix store=False not overriding client default * Address comments * Fix unit tests * Fix integration tests * Fix tests --- .../packages/core/agent_framework/_agents.py | 36 +- .../packages/core/tests/core/test_agents.py | 218 +++++++++--- python/uv.lock | 324 +++++++++--------- 3 files changed, 375 insertions(+), 203 deletions(-) diff --git a/python/packages/core/agent_framework/_agents.py b/python/packages/core/agent_framework/_agents.py index 3aaf9f1419..5cf7ff78a2 100644 --- a/python/packages/core/agent_framework/_agents.py +++ b/python/packages/core/agent_framework/_agents.py @@ -33,7 +33,13 @@ from ._clients import BaseChatClient, SupportsChatGetResponse from ._mcp import LOG_LEVEL_MAPPING, MCPTool from ._middleware import AgentMiddlewareLayer, MiddlewareTypes from ._serialization import SerializationMixin -from ._sessions import AgentSession, BaseContextProvider, BaseHistoryProvider, InMemoryHistoryProvider, SessionContext +from ._sessions import ( + AgentSession, + BaseContextProvider, + BaseHistoryProvider, + InMemoryHistoryProvider, + SessionContext, +) from ._tools import ( FunctionInvocationLayer, FunctionTool, @@ -532,7 +538,14 @@ class BaseAgent(SerializationMixin): if stream_callback is None: # Use non-streaming mode - return (await self.run(input_text, stream=False, session=parent_session, **forwarded_kwargs)).text + return ( + await self.run( + input_text, + stream=False, + session=parent_session, + **forwarded_kwargs, + ) + ).text # Use streaming mode - accumulate updates and create final response response_updates: list[AgentResponseUpdate] = [] @@ -951,7 +964,9 @@ class RawAgent(BaseAgent, Generic[OptionsCoT]): # type: ignore[misc] **ctx["filtered_kwargs"], ) - def _propagate_conversation_id(update: AgentResponseUpdate) -> AgentResponseUpdate: + def _propagate_conversation_id( + update: AgentResponseUpdate, + ) -> AgentResponseUpdate: """Eagerly propagate conversation_id to session as updates arrive. This ensures session.service_session_id is set even when the user @@ -975,8 +990,8 @@ class RawAgent(BaseAgent, Generic[OptionsCoT]): # type: ignore[misc] return self._finalize_response_updates(updates, response_format=rf) return ( - ResponseStream # type: ignore[reportUnknownMemberType] - .from_awaitable(_get_stream()) + ResponseStream + .from_awaitable(_get_stream()) # type: ignore[reportUnknownMemberType] .map( transform=partial( map_chat_to_agent_update, @@ -1002,7 +1017,9 @@ class RawAgent(BaseAgent, Generic[OptionsCoT]): # type: ignore[misc] ) @staticmethod - def _extract_conversation_id_from_streaming_response(response: AgentResponse[Any]) -> str | None: + def _extract_conversation_id_from_streaming_response( + response: AgentResponse[Any], + ) -> str | None: """Extract conversation_id from streaming raw updates, if present.""" raw = response.raw_representation if raw is None: @@ -1039,6 +1056,10 @@ class RawAgent(BaseAgent, Generic[OptionsCoT]): # type: ignore[misc] input_messages = normalize_messages(messages) + # `store` in runtime or agent options takes precedence over client-level storage + # indicators. An explicit `store=False` forces local (in-memory) history injection, + # even if the client is configured to use service-side storage by default. + store_ = opts.get("store", self.default_options.get("store", getattr(self.client, "STORES_BY_DEFAULT", False))) # Auto-inject InMemoryHistoryProvider when session is provided, no context providers # registered, and no service-side storage indicators if ( @@ -1046,8 +1067,7 @@ class RawAgent(BaseAgent, Generic[OptionsCoT]): # type: ignore[misc] and not self.context_providers and not session.service_session_id and not opts.get("conversation_id") - and not opts.get("store") - and not (getattr(self.client, "STORES_BY_DEFAULT", False) and opts.get("store") is not False) + and not store_ ): self.context_providers.append(InMemoryHistoryProvider()) diff --git a/python/packages/core/tests/core/test_agents.py b/python/packages/core/tests/core/test_agents.py index b2704aa6a6..a60e924387 100644 --- a/python/packages/core/tests/core/test_agents.py +++ b/python/packages/core/tests/core/test_agents.py @@ -50,7 +50,9 @@ async def test_agent_run_with_content(agent: SupportsAgentRun) -> None: async def test_agent_run_streaming(agent: SupportsAgentRun) -> None: - async def collect_updates(updates: AsyncIterable[AgentResponseUpdate]) -> list[AgentResponseUpdate]: + async def collect_updates( + updates: AsyncIterable[AgentResponseUpdate], + ) -> list[AgentResponseUpdate]: return [u async for u in updates] updates = await collect_updates(agent.run("test", stream=True)) @@ -72,7 +74,9 @@ async def test_chat_client_agent_init(client: SupportsChatGetResponse) -> None: assert agent.description == "Test" -async def test_chat_client_agent_init_with_name(client: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_init_with_name( + client: SupportsChatGetResponse, +) -> None: agent_id = str(uuid4()) agent = Agent(client=client, id=agent_id, name="Test Agent", description="Test") @@ -108,7 +112,13 @@ async def test_chat_client_agent_streaming_response_format_from_default_options( json_text = '{"greeting": "Hello"}' client.streaming_responses.append( # type: ignore[attr-defined] - [ChatResponseUpdate(contents=[Content.from_text(json_text)], role="assistant", finish_reason="stop")] + [ + ChatResponseUpdate( + contents=[Content.from_text(json_text)], + role="assistant", + finish_reason="stop", + ) + ] ) agent = Agent(client=client, default_options={"response_format": Greeting}) @@ -134,7 +144,13 @@ async def test_chat_client_agent_streaming_response_format_from_run_options( json_text = '{"greeting": "Hi"}' client.streaming_responses.append( # type: ignore[attr-defined] - [ChatResponseUpdate(contents=[Content.from_text(json_text)], role="assistant", finish_reason="stop")] + [ + ChatResponseUpdate( + contents=[Content.from_text(json_text)], + role="assistant", + finish_reason="stop", + ) + ] ) agent = Agent(client=client) @@ -149,14 +165,18 @@ async def test_chat_client_agent_streaming_response_format_from_run_options( assert result.value.greeting == "Hi" -async def test_chat_client_agent_create_session(client: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_create_session( + client: SupportsChatGetResponse, +) -> None: agent = Agent(client=client) session = agent.create_session() assert isinstance(session, AgentSession) -async def test_chat_client_agent_prepare_session_and_messages(client: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_prepare_session_and_messages( + client: SupportsChatGetResponse, +) -> None: from agent_framework._sessions import InMemoryHistoryProvider agent = Agent(client=client, context_providers=[InMemoryHistoryProvider()]) @@ -175,7 +195,9 @@ async def test_chat_client_agent_prepare_session_and_messages(client: SupportsCh assert result_messages[1].text == "Test" -async def test_prepare_session_does_not_mutate_agent_chat_options(client: SupportsChatGetResponse) -> None: +async def test_prepare_session_does_not_mutate_agent_chat_options( + client: SupportsChatGetResponse, +) -> None: tool = {"type": "code_interpreter"} agent = Agent(client=client, tools=[tool]) @@ -195,7 +217,9 @@ async def test_prepare_session_does_not_mutate_agent_chat_options(client: Suppor assert len(agent.default_options["tools"]) == 1 -async def test_chat_client_agent_run_with_session(chat_client_base: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_run_with_session( + chat_client_base: SupportsChatGetResponse, +) -> None: mock_response = ChatResponse( messages=[Message(role="assistant", contents=[Content.from_text("test response")])], conversation_id="123", @@ -391,7 +415,9 @@ async def test_chat_client_agent_streaming_session_history_saved_without_get_fin assert chat_messages[1].text == "Hello Alice!" -async def test_chat_client_agent_update_session_messages(client: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_update_session_messages( + client: SupportsChatGetResponse, +) -> None: from agent_framework._sessions import InMemoryHistoryProvider agent = Agent(client=client) @@ -410,7 +436,9 @@ async def test_chat_client_agent_update_session_messages(client: SupportsChatGet assert chat_messages[1].text == "test response" -async def test_chat_client_agent_update_session_conversation_id_missing(client: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_update_session_conversation_id_missing( + client: SupportsChatGetResponse, +) -> None: agent = Agent(client=client) session = agent.get_session(service_session_id="123") @@ -418,7 +446,9 @@ async def test_chat_client_agent_update_session_conversation_id_missing(client: assert session.service_session_id == "123" -async def test_chat_client_agent_default_author_name(client: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_default_author_name( + client: SupportsChatGetResponse, +) -> None: # Name is not specified here, so default name should be used agent = Agent(client=client) @@ -427,7 +457,9 @@ async def test_chat_client_agent_default_author_name(client: SupportsChatGetResp assert result.messages[0].author_name == "UnnamedAgent" -async def test_chat_client_agent_author_name_as_agent_name(client: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_author_name_as_agent_name( + client: SupportsChatGetResponse, +) -> None: # Name is specified here, so it should be used as author name agent = Agent(client=client, name="TestAgent") @@ -436,11 +468,17 @@ async def test_chat_client_agent_author_name_as_agent_name(client: SupportsChatG assert result.messages[0].author_name == "TestAgent" -async def test_chat_client_agent_author_name_is_used_from_response(chat_client_base: SupportsChatGetResponse) -> None: +async def test_chat_client_agent_author_name_is_used_from_response( + chat_client_base: SupportsChatGetResponse, +) -> None: chat_client_base.run_responses = [ ChatResponse( messages=[ - Message(role="assistant", contents=[Content.from_text("test response")], author_name="TestAuthor") + Message( + role="assistant", + contents=[Content.from_text("test response")], + author_name="TestAuthor", + ) ] ) ] @@ -476,7 +514,9 @@ class MockContextProvider(BaseContextProvider): self.new_messages.extend(context.response.messages) -async def test_chat_agent_context_providers_model_before_run(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_context_providers_model_before_run( + client: SupportsChatGetResponse, +) -> None: """Test that context providers' before_run is called during agent run.""" mock_provider = MockContextProvider(messages=[Message(role="system", text="Test context instructions")]) agent = Agent(client=client, context_providers=[mock_provider]) @@ -486,7 +526,9 @@ async def test_chat_agent_context_providers_model_before_run(client: SupportsCha assert mock_provider.before_run_called -async def test_chat_agent_context_providers_after_run(chat_client_base: SupportsChatGetResponse) -> None: +async def test_chat_agent_context_providers_after_run( + chat_client_base: SupportsChatGetResponse, +) -> None: """Test that context providers' after_run is called during agent run.""" mock_provider = MockContextProvider() chat_client_base.run_responses = [ @@ -505,7 +547,9 @@ async def test_chat_agent_context_providers_after_run(chat_client_base: Supports assert mock_provider.last_service_session_id == "test-thread-id" -async def test_chat_agent_context_providers_messages_adding(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_context_providers_messages_adding( + client: SupportsChatGetResponse, +) -> None: """Test that context providers' after_run is called during agent run.""" mock_provider = MockContextProvider() agent = Agent(client=client, context_providers=[mock_provider]) @@ -517,10 +561,16 @@ async def test_chat_agent_context_providers_messages_adding(client: SupportsChat assert len(mock_provider.new_messages) >= 2 -async def test_chat_agent_context_instructions_in_messages(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_context_instructions_in_messages( + client: SupportsChatGetResponse, +) -> None: """Test that AI context instructions are included in messages.""" mock_provider = MockContextProvider(messages=[Message(role="system", text="Context-specific instructions")]) - agent = Agent(client=client, instructions="Agent instructions", context_providers=[mock_provider]) + agent = Agent( + client=client, + instructions="Agent instructions", + context_providers=[mock_provider], + ) # We need to test the _prepare_session_and_messages method directly session_context, _ = await agent._prepare_session_and_messages( # type: ignore[reportPrivateUsage] @@ -537,10 +587,16 @@ async def test_chat_agent_context_instructions_in_messages(client: SupportsChatG # instructions system message is added by a client -async def test_chat_agent_no_context_instructions(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_no_context_instructions( + client: SupportsChatGetResponse, +) -> None: """Test behavior when AI context has no instructions.""" mock_provider = MockContextProvider() - agent = Agent(client=client, instructions="Agent instructions", context_providers=[mock_provider]) + agent = Agent( + client=client, + instructions="Agent instructions", + context_providers=[mock_provider], + ) session_context, _ = await agent._prepare_session_and_messages( # type: ignore[reportPrivateUsage] session=None, input_messages=[Message(role="user", text="Hello")] @@ -553,7 +609,9 @@ async def test_chat_agent_no_context_instructions(client: SupportsChatGetRespons assert messages[0].text == "Hello" -async def test_chat_agent_run_stream_context_providers(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_run_stream_context_providers( + client: SupportsChatGetResponse, +) -> None: """Test that context providers work with run method.""" mock_provider = MockContextProvider(messages=[Message(role="system", text="Stream context instructions")]) agent = Agent(client=client, context_providers=[mock_provider]) @@ -571,7 +629,9 @@ async def test_chat_agent_run_stream_context_providers(client: SupportsChatGetRe assert mock_provider.after_run_called -async def test_chat_agent_context_providers_with_service_session_id(chat_client_base: SupportsChatGetResponse) -> None: +async def test_chat_agent_context_providers_with_service_session_id( + chat_client_base: SupportsChatGetResponse, +) -> None: """Test context providers with service-managed session.""" mock_provider = MockContextProvider() chat_client_base.run_responses = [ @@ -604,7 +664,9 @@ async def test_chat_agent_as_tool_basic(client: SupportsChatGetResponse) -> None assert hasattr(tool, "input_model") -async def test_chat_agent_as_tool_custom_parameters(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_custom_parameters( + client: SupportsChatGetResponse, +) -> None: """Test as_tool with custom parameters.""" agent = Agent(client=client, name="TestAgent", description="Original description") @@ -652,7 +714,9 @@ async def test_chat_agent_as_tool_no_name(client: SupportsChatGetResponse) -> No agent.as_tool() -async def test_chat_agent_as_tool_function_execution(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_function_execution( + client: SupportsChatGetResponse, +) -> None: """Test that the generated FunctionTool can be executed.""" agent = Agent(client=client, name="TestAgent", description="Test agent") @@ -666,7 +730,9 @@ async def test_chat_agent_as_tool_function_execution(client: SupportsChatGetResp assert result == "test response" # From mock chat client -async def test_chat_agent_as_tool_with_stream_callback(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_with_stream_callback( + client: SupportsChatGetResponse, +) -> None: """Test as_tool with stream callback functionality.""" agent = Agent(client=client, name="StreamingAgent") @@ -689,7 +755,9 @@ async def test_chat_agent_as_tool_with_stream_callback(client: SupportsChatGetRe assert result == expected_text -async def test_chat_agent_as_tool_with_custom_arg_name(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_with_custom_arg_name( + client: SupportsChatGetResponse, +) -> None: """Test as_tool with custom argument name.""" agent = Agent(client=client, name="CustomArgAgent") @@ -700,7 +768,9 @@ async def test_chat_agent_as_tool_with_custom_arg_name(client: SupportsChatGetRe assert result == "test response" -async def test_chat_agent_as_tool_with_async_stream_callback(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_with_async_stream_callback( + client: SupportsChatGetResponse, +) -> None: """Test as_tool with async stream callback functionality.""" agent = Agent(client=client, name="AsyncStreamingAgent") @@ -723,7 +793,9 @@ async def test_chat_agent_as_tool_with_async_stream_callback(client: SupportsCha assert result == expected_text -async def test_chat_agent_as_tool_name_sanitization(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_name_sanitization( + client: SupportsChatGetResponse, +) -> None: """Test as_tool name sanitization.""" test_cases = [ ("Invoice & Billing Agent", "Invoice_Billing_Agent"), @@ -741,7 +813,9 @@ async def test_chat_agent_as_tool_name_sanitization(client: SupportsChatGetRespo assert tool.name == expected_tool_name, f"Expected {expected_tool_name}, got {tool.name} for input {agent_name}" -async def test_chat_agent_as_tool_propagate_session_true(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_propagate_session_true( + client: SupportsChatGetResponse, +) -> None: """Test that propagate_session=True forwards the parent's session to the sub-agent.""" agent = Agent(client=client, name="SubAgent", description="Sub agent") tool = agent.as_tool(propagate_session=True) @@ -767,7 +841,9 @@ async def test_chat_agent_as_tool_propagate_session_true(client: SupportsChatGet assert captured_session.state["shared_key"] == "shared_value" -async def test_chat_agent_as_tool_propagate_session_false_by_default(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_propagate_session_false_by_default( + client: SupportsChatGetResponse, +) -> None: """Test that propagate_session defaults to False and does not forward the session.""" agent = Agent(client=client, name="SubAgent", description="Sub agent") tool = agent.as_tool() # default: propagate_session=False @@ -789,7 +865,9 @@ async def test_chat_agent_as_tool_propagate_session_false_by_default(client: Sup assert captured_session is None -async def test_chat_agent_as_tool_propagate_session_shares_state(client: SupportsChatGetResponse) -> None: +async def test_chat_agent_as_tool_propagate_session_shares_state( + client: SupportsChatGetResponse, +) -> None: """Test that shared session allows the sub-agent to read and write parent's state.""" agent = Agent(client=client, name="SubAgent", description="Sub agent") tool = agent.as_tool(propagate_session=True) @@ -858,13 +936,20 @@ async def test_chat_agent_with_local_mcp_tools(client: SupportsChatGetResponse) # Test agent with MCP tools in constructor with contextlib.suppress(Exception): - agent = Agent(client=client, name="TestAgent", description="Test agent", tools=[mock_mcp_tool]) + agent = Agent( + client=client, + name="TestAgent", + description="Test agent", + tools=[mock_mcp_tool], + ) # Test async context manager with MCP tools async with agent: pass -async def test_mcp_tools_not_duplicated_when_passed_as_runtime_tools(chat_client_base: Any) -> None: +async def test_mcp_tools_not_duplicated_when_passed_as_runtime_tools( + chat_client_base: Any, +) -> None: """Test that MCP tool functions from self.mcp_tools are not duplicated when already present in runtime tools.""" captured_options: list[dict[str, Any]] = [] @@ -925,7 +1010,11 @@ async def test_agent_tool_receives_session_in_kwargs(chat_client_base: Any) -> N messages=Message( role="assistant", contents=[ - Content.from_function_call(call_id="1", name="echo_session_info", arguments='{"text": "hello"}') + Content.from_function_call( + call_id="1", + name="echo_session_info", + arguments='{"text": "hello"}', + ) ], ) ), @@ -935,7 +1024,11 @@ async def test_agent_tool_receives_session_in_kwargs(chat_client_base: Any) -> N agent = Agent(client=chat_client_base, tools=[echo_session_info]) session = agent.create_session() - result = await agent.run("hello", session=session, options={"additional_function_arguments": {"session": session}}) + result = await agent.run( + "hello", + session=session, + options={"additional_function_arguments": {"session": session}}, + ) assert result.text == "done" assert captured.get("has_session") is True @@ -1377,7 +1470,9 @@ def test_chat_agent_calls_update_agent_name_on_client(): @pytest.mark.asyncio -async def test_chat_agent_context_provider_adds_tools_when_agent_has_none(chat_client_base: SupportsChatGetResponse): +async def test_chat_agent_context_provider_adds_tools_when_agent_has_none( + chat_client_base: SupportsChatGetResponse, +): """Test that context provider tools are used when agent has no default tools.""" @tool @@ -1439,7 +1534,9 @@ async def test_chat_agent_context_provider_adds_instructions_when_agent_has_none # region STORES_BY_DEFAULT tests -async def test_stores_by_default_skips_inmemory_injection(client: SupportsChatGetResponse) -> None: +async def test_stores_by_default_skips_inmemory_injection( + client: SupportsChatGetResponse, +) -> None: """Client with STORES_BY_DEFAULT=True should not auto-inject InMemoryHistoryProvider.""" from agent_framework._sessions import InMemoryHistoryProvider @@ -1455,7 +1552,9 @@ async def test_stores_by_default_skips_inmemory_injection(client: SupportsChatGe assert not any(isinstance(p, InMemoryHistoryProvider) for p in agent.context_providers) -async def test_stores_by_default_false_injects_inmemory(client: SupportsChatGetResponse) -> None: +async def test_stores_by_default_false_injects_inmemory( + client: SupportsChatGetResponse, +) -> None: """Client with STORES_BY_DEFAULT=False (default) should auto-inject InMemoryHistoryProvider.""" from agent_framework._sessions import InMemoryHistoryProvider @@ -1468,7 +1567,9 @@ async def test_stores_by_default_false_injects_inmemory(client: SupportsChatGetR assert any(isinstance(p, InMemoryHistoryProvider) for p in agent.context_providers) -async def test_stores_by_default_with_store_false_injects_inmemory(client: SupportsChatGetResponse) -> None: +async def test_stores_by_default_with_store_false_injects_inmemory( + client: SupportsChatGetResponse, +) -> None: """Client with STORES_BY_DEFAULT=True but store=False should still inject InMemoryHistoryProvider.""" from agent_framework._sessions import InMemoryHistoryProvider @@ -1483,7 +1584,42 @@ async def test_stores_by_default_with_store_false_injects_inmemory(client: Suppo assert any(isinstance(p, InMemoryHistoryProvider) for p in agent.context_providers) -# endregion +async def test_store_true_skips_inmemory_injection( + client: SupportsChatGetResponse, +) -> None: + """Explicitly setting store=True should not auto-inject InMemoryHistoryProvider.""" + from agent_framework._sessions import InMemoryHistoryProvider + + agent = Agent(client=client) + session = agent.create_session() + + await agent.run("Hello", session=session, options={"store": True}) + + # User explicitly enabled server storage, so InMemoryHistoryProvider should not be injected + assert not any(isinstance(p, InMemoryHistoryProvider) for p in agent.context_providers) + + +async def test_stores_by_default_with_store_false_in_default_options_injects_inmemory( + client: SupportsChatGetResponse, +) -> None: + """Client with STORES_BY_DEFAULT=True but store=False in default_options should inject InMemoryHistoryProvider. + + This covers the regression where store=False is set via Agent(..., default_options={"store": False}) + with no per-run override while the client has STORES_BY_DEFAULT=True. + """ + from agent_framework._sessions import InMemoryHistoryProvider + + client.STORES_BY_DEFAULT = True # type: ignore[attr-defined] + + # Set store=False at agent initialization via default_options, not at run-time + agent = Agent(client=client, default_options={"store": False}) + session = agent.create_session() + + # Run without any per-run options override + await agent.run("Hello", session=session) + + # User explicitly disabled server storage in default_options, so InMemoryHistoryProvider should be injected + assert any(isinstance(p, InMemoryHistoryProvider) for p in agent.context_providers) # endregion diff --git a/python/uv.lock b/python/uv.lock index e82f8e7a3c..4842003720 100644 --- a/python/uv.lock +++ b/python/uv.lock @@ -1813,11 +1813,11 @@ wheels = [ [[package]] name = "filelock" -version = "3.25.0" +version = "3.25.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/77/18/a1fd2231c679dcb9726204645721b12498aeac28e1ad0601038f94b42556/filelock-3.25.0.tar.gz", hash = "sha256:8f00faf3abf9dc730a1ffe9c354ae5c04e079ab7d3a683b7c32da5dd05f26af3", size = 40158, upload-time = "2026-03-01T15:08:45.916Z" } +sdist = { url = "https://files.pythonhosted.org/packages/b3/8b/4c32ecde6bea6486a2a5d05340e695174351ff6b06cf651a74c005f9df00/filelock-3.25.1.tar.gz", hash = "sha256:b9a2e977f794ef94d77cdf7d27129ac648a61f585bff3ca24630c1629f701aa9", size = 40319, upload-time = "2026-03-09T19:38:47.309Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f9/0b/de6f54d4a8bedfe8645c41497f3c18d749f0bd3218170c667bf4b81d0cdd/filelock-3.25.0-py3-none-any.whl", hash = "sha256:5ccf8069f7948f494968fc0713c10e5c182a9c9d9eef3a636307a20c2490f047", size = 26427, upload-time = "2026-03-01T15:08:44.593Z" }, + { url = "https://files.pythonhosted.org/packages/a9/b8/2f664b56a3b4b32d28d3d106c71783073f712ba43ff6d34b9ea0ce36dc7b/filelock-3.25.1-py3-none-any.whl", hash = "sha256:18972df45473c4aa2c7921b609ee9ca4925910cc3a0fb226c96b92fc224ef7bf", size = 26720, upload-time = "2026-03-09T19:38:45.718Z" }, ] [[package]] @@ -1864,51 +1864,51 @@ wheels = [ [[package]] name = "fonttools" -version = "4.61.1" +version = "4.62.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ec/ca/cf17b88a8df95691275a3d77dc0a5ad9907f328ae53acbe6795da1b2f5ed/fonttools-4.61.1.tar.gz", hash = "sha256:6675329885c44657f826ef01d9e4fb33b9158e9d93c537d84ad8399539bc6f69", size = 3565756, upload-time = "2025-12-12T17:31:24.246Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/96/686339e0fda8142b7ebed39af53f4a5694602a729662f42a6209e3be91d0/fonttools-4.62.0.tar.gz", hash = "sha256:0dc477c12b8076b4eb9af2e440421b0433ffa9e1dcb39e0640a6c94665ed1098", size = 3579521, upload-time = "2026-03-09T16:50:06.217Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/69/12/bf9f4eaa2fad039356cc627587e30ed008c03f1cebd3034376b5ee8d1d44/fonttools-4.61.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c6604b735bb12fef8e0efd5578c9fb5d3d8532d5001ea13a19cddf295673ee09", size = 2852213, upload-time = "2025-12-12T17:29:46.675Z" }, - { url = "https://files.pythonhosted.org/packages/ac/49/4138d1acb6261499bedde1c07f8c2605d1d8f9d77a151e5507fd3ef084b6/fonttools-4.61.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5ce02f38a754f207f2f06557523cd39a06438ba3aafc0639c477ac409fc64e37", size = 2401689, upload-time = "2025-12-12T17:29:48.769Z" }, - { url = "https://files.pythonhosted.org/packages/e5/fe/e6ce0fe20a40e03aef906af60aa87668696f9e4802fa283627d0b5ed777f/fonttools-4.61.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77efb033d8d7ff233385f30c62c7c79271c8885d5c9657d967ede124671bbdfb", size = 5058809, upload-time = "2025-12-12T17:29:51.701Z" }, - { url = "https://files.pythonhosted.org/packages/79/61/1ca198af22f7dd22c17ab86e9024ed3c06299cfdb08170640e9996d501a0/fonttools-4.61.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:75c1a6dfac6abd407634420c93864a1e274ebc1c7531346d9254c0d8f6ca00f9", size = 5036039, upload-time = "2025-12-12T17:29:53.659Z" }, - { url = "https://files.pythonhosted.org/packages/99/cc/fa1801e408586b5fce4da9f5455af8d770f4fc57391cd5da7256bb364d38/fonttools-4.61.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0de30bfe7745c0d1ffa2b0b7048fb7123ad0d71107e10ee090fa0b16b9452e87", size = 5034714, upload-time = "2025-12-12T17:29:55.592Z" }, - { url = "https://files.pythonhosted.org/packages/bf/aa/b7aeafe65adb1b0a925f8f25725e09f078c635bc22754f3fecb7456955b0/fonttools-4.61.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:58b0ee0ab5b1fc9921eccfe11d1435added19d6494dde14e323f25ad2bc30c56", size = 5158648, upload-time = "2025-12-12T17:29:57.861Z" }, - { url = "https://files.pythonhosted.org/packages/99/f9/08ea7a38663328881384c6e7777bbefc46fd7d282adfd87a7d2b84ec9d50/fonttools-4.61.1-cp311-cp311-win32.whl", hash = "sha256:f79b168428351d11e10c5aeb61a74e1851ec221081299f4cf56036a95431c43a", size = 2280681, upload-time = "2025-12-12T17:29:59.943Z" }, - { url = "https://files.pythonhosted.org/packages/07/ad/37dd1ae5fa6e01612a1fbb954f0927681f282925a86e86198ccd7b15d515/fonttools-4.61.1-cp311-cp311-win_amd64.whl", hash = "sha256:fe2efccb324948a11dd09d22136fe2ac8a97d6c1347cf0b58a911dcd529f66b7", size = 2331951, upload-time = "2025-12-12T17:30:02.254Z" }, - { url = "https://files.pythonhosted.org/packages/6f/16/7decaa24a1bd3a70c607b2e29f0adc6159f36a7e40eaba59846414765fd4/fonttools-4.61.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:f3cb4a569029b9f291f88aafc927dd53683757e640081ca8c412781ea144565e", size = 2851593, upload-time = "2025-12-12T17:30:04.225Z" }, - { url = "https://files.pythonhosted.org/packages/94/98/3c4cb97c64713a8cf499b3245c3bf9a2b8fd16a3e375feff2aed78f96259/fonttools-4.61.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41a7170d042e8c0024703ed13b71893519a1a6d6e18e933e3ec7507a2c26a4b2", size = 2400231, upload-time = "2025-12-12T17:30:06.47Z" }, - { url = "https://files.pythonhosted.org/packages/b7/37/82dbef0f6342eb01f54bca073ac1498433d6ce71e50c3c3282b655733b31/fonttools-4.61.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:10d88e55330e092940584774ee5e8a6971b01fc2f4d3466a1d6c158230880796", size = 4954103, upload-time = "2025-12-12T17:30:08.432Z" }, - { url = "https://files.pythonhosted.org/packages/6c/44/f3aeac0fa98e7ad527f479e161aca6c3a1e47bb6996b053d45226fe37bf2/fonttools-4.61.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:15acc09befd16a0fb8a8f62bc147e1a82817542d72184acca9ce6e0aeda9fa6d", size = 5004295, upload-time = "2025-12-12T17:30:10.56Z" }, - { url = "https://files.pythonhosted.org/packages/14/e8/7424ced75473983b964d09f6747fa09f054a6d656f60e9ac9324cf40c743/fonttools-4.61.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e6bcdf33aec38d16508ce61fd81838f24c83c90a1d1b8c68982857038673d6b8", size = 4944109, upload-time = "2025-12-12T17:30:12.874Z" }, - { url = "https://files.pythonhosted.org/packages/c8/8b/6391b257fa3d0b553d73e778f953a2f0154292a7a7a085e2374b111e5410/fonttools-4.61.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5fade934607a523614726119164ff621e8c30e8fa1ffffbbd358662056ba69f0", size = 5093598, upload-time = "2025-12-12T17:30:15.79Z" }, - { url = "https://files.pythonhosted.org/packages/d9/71/fd2ea96cdc512d92da5678a1c98c267ddd4d8c5130b76d0f7a80f9a9fde8/fonttools-4.61.1-cp312-cp312-win32.whl", hash = "sha256:75da8f28eff26defba42c52986de97b22106cb8f26515b7c22443ebc9c2d3261", size = 2269060, upload-time = "2025-12-12T17:30:18.058Z" }, - { url = "https://files.pythonhosted.org/packages/80/3b/a3e81b71aed5a688e89dfe0e2694b26b78c7d7f39a5ffd8a7d75f54a12a8/fonttools-4.61.1-cp312-cp312-win_amd64.whl", hash = "sha256:497c31ce314219888c0e2fce5ad9178ca83fe5230b01a5006726cdf3ac9f24d9", size = 2319078, upload-time = "2025-12-12T17:30:22.862Z" }, - { url = "https://files.pythonhosted.org/packages/4b/cf/00ba28b0990982530addb8dc3e9e6f2fa9cb5c20df2abdda7baa755e8fe1/fonttools-4.61.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8c56c488ab471628ff3bfa80964372fc13504ece601e0d97a78ee74126b2045c", size = 2846454, upload-time = "2025-12-12T17:30:24.938Z" }, - { url = "https://files.pythonhosted.org/packages/5a/ca/468c9a8446a2103ae645d14fee3f610567b7042aba85031c1c65e3ef7471/fonttools-4.61.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dc492779501fa723b04d0ab1f5be046797fee17d27700476edc7ee9ae535a61e", size = 2398191, upload-time = "2025-12-12T17:30:27.343Z" }, - { url = "https://files.pythonhosted.org/packages/a3/4b/d67eedaed19def5967fade3297fed8161b25ba94699efc124b14fb68cdbc/fonttools-4.61.1-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:64102ca87e84261419c3747a0d20f396eb024bdbeb04c2bfb37e2891f5fadcb5", size = 4928410, upload-time = "2025-12-12T17:30:29.771Z" }, - { url = "https://files.pythonhosted.org/packages/b0/8d/6fb3494dfe61a46258cd93d979cf4725ded4eb46c2a4ca35e4490d84daea/fonttools-4.61.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4c1b526c8d3f615a7b1867f38a9410849c8f4aef078535742198e942fba0e9bd", size = 4984460, upload-time = "2025-12-12T17:30:32.073Z" }, - { url = "https://files.pythonhosted.org/packages/f7/f1/a47f1d30b3dc00d75e7af762652d4cbc3dff5c2697a0dbd5203c81afd9c3/fonttools-4.61.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:41ed4b5ec103bd306bb68f81dc166e77409e5209443e5773cb4ed837bcc9b0d3", size = 4925800, upload-time = "2025-12-12T17:30:34.339Z" }, - { url = "https://files.pythonhosted.org/packages/a7/01/e6ae64a0981076e8a66906fab01539799546181e32a37a0257b77e4aa88b/fonttools-4.61.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b501c862d4901792adaec7c25b1ecc749e2662543f68bb194c42ba18d6eec98d", size = 5067859, upload-time = "2025-12-12T17:30:36.593Z" }, - { url = "https://files.pythonhosted.org/packages/73/aa/28e40b8d6809a9b5075350a86779163f074d2b617c15d22343fce81918db/fonttools-4.61.1-cp313-cp313-win32.whl", hash = "sha256:4d7092bb38c53bbc78e9255a59158b150bcdc115a1e3b3ce0b5f267dc35dd63c", size = 2267821, upload-time = "2025-12-12T17:30:38.478Z" }, - { url = "https://files.pythonhosted.org/packages/1a/59/453c06d1d83dc0951b69ef692d6b9f1846680342927df54e9a1ca91c6f90/fonttools-4.61.1-cp313-cp313-win_amd64.whl", hash = "sha256:21e7c8d76f62ab13c9472ccf74515ca5b9a761d1bde3265152a6dc58700d895b", size = 2318169, upload-time = "2025-12-12T17:30:40.951Z" }, - { url = "https://files.pythonhosted.org/packages/32/8f/4e7bf82c0cbb738d3c2206c920ca34ca74ef9dabde779030145d28665104/fonttools-4.61.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fff4f534200a04b4a36e7ae3cb74493afe807b517a09e99cb4faa89a34ed6ecd", size = 2846094, upload-time = "2025-12-12T17:30:43.511Z" }, - { url = "https://files.pythonhosted.org/packages/71/09/d44e45d0a4f3a651f23a1e9d42de43bc643cce2971b19e784cc67d823676/fonttools-4.61.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d9203500f7c63545b4ce3799319fe4d9feb1a1b89b28d3cb5abd11b9dd64147e", size = 2396589, upload-time = "2025-12-12T17:30:45.681Z" }, - { url = "https://files.pythonhosted.org/packages/89/18/58c64cafcf8eb677a99ef593121f719e6dcbdb7d1c594ae5a10d4997ca8a/fonttools-4.61.1-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fa646ecec9528bef693415c79a86e733c70a4965dd938e9a226b0fc64c9d2e6c", size = 4877892, upload-time = "2025-12-12T17:30:47.709Z" }, - { url = "https://files.pythonhosted.org/packages/8a/ec/9e6b38c7ba1e09eb51db849d5450f4c05b7e78481f662c3b79dbde6f3d04/fonttools-4.61.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:11f35ad7805edba3aac1a3710d104592df59f4b957e30108ae0ba6c10b11dd75", size = 4972884, upload-time = "2025-12-12T17:30:49.656Z" }, - { url = "https://files.pythonhosted.org/packages/5e/87/b5339da8e0256734ba0dbbf5b6cdebb1dd79b01dc8c270989b7bcd465541/fonttools-4.61.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b931ae8f62db78861b0ff1ac017851764602288575d65b8e8ff1963fed419063", size = 4924405, upload-time = "2025-12-12T17:30:51.735Z" }, - { url = "https://files.pythonhosted.org/packages/0b/47/e3409f1e1e69c073a3a6fd8cb886eb18c0bae0ee13db2c8d5e7f8495e8b7/fonttools-4.61.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b148b56f5de675ee16d45e769e69f87623a4944f7443850bf9a9376e628a89d2", size = 5035553, upload-time = "2025-12-12T17:30:54.823Z" }, - { url = "https://files.pythonhosted.org/packages/bf/b6/1f6600161b1073a984294c6c031e1a56ebf95b6164249eecf30012bb2e38/fonttools-4.61.1-cp314-cp314-win32.whl", hash = "sha256:9b666a475a65f4e839d3d10473fad6d47e0a9db14a2f4a224029c5bfde58ad2c", size = 2271915, upload-time = "2025-12-12T17:30:57.913Z" }, - { url = "https://files.pythonhosted.org/packages/52/7b/91e7b01e37cc8eb0e1f770d08305b3655e4f002fc160fb82b3390eabacf5/fonttools-4.61.1-cp314-cp314-win_amd64.whl", hash = "sha256:4f5686e1fe5fce75d82d93c47a438a25bf0d1319d2843a926f741140b2b16e0c", size = 2323487, upload-time = "2025-12-12T17:30:59.804Z" }, - { url = "https://files.pythonhosted.org/packages/39/5c/908ad78e46c61c3e3ed70c3b58ff82ab48437faf84ec84f109592cabbd9f/fonttools-4.61.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:e76ce097e3c57c4bcb67c5aa24a0ecdbd9f74ea9219997a707a4061fbe2707aa", size = 2929571, upload-time = "2025-12-12T17:31:02.574Z" }, - { url = "https://files.pythonhosted.org/packages/bd/41/975804132c6dea64cdbfbaa59f3518a21c137a10cccf962805b301ac6ab2/fonttools-4.61.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:9cfef3ab326780c04d6646f68d4b4742aae222e8b8ea1d627c74e38afcbc9d91", size = 2435317, upload-time = "2025-12-12T17:31:04.974Z" }, - { url = "https://files.pythonhosted.org/packages/b0/5a/aef2a0a8daf1ebaae4cfd83f84186d4a72ee08fd6a8451289fcd03ffa8a4/fonttools-4.61.1-cp314-cp314t-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a75c301f96db737e1c5ed5fd7d77d9c34466de16095a266509e13da09751bd19", size = 4882124, upload-time = "2025-12-12T17:31:07.456Z" }, - { url = "https://files.pythonhosted.org/packages/80/33/d6db3485b645b81cea538c9d1c9219d5805f0877fda18777add4671c5240/fonttools-4.61.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:91669ccac46bbc1d09e9273546181919064e8df73488ea087dcac3e2968df9ba", size = 5100391, upload-time = "2025-12-12T17:31:09.732Z" }, - { url = "https://files.pythonhosted.org/packages/6c/d6/675ba631454043c75fcf76f0ca5463eac8eb0666ea1d7badae5fea001155/fonttools-4.61.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c33ab3ca9d3ccd581d58e989d67554e42d8d4ded94ab3ade3508455fe70e65f7", size = 4978800, upload-time = "2025-12-12T17:31:11.681Z" }, - { url = "https://files.pythonhosted.org/packages/7f/33/d3ec753d547a8d2bdaedd390d4a814e8d5b45a093d558f025c6b990b554c/fonttools-4.61.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:664c5a68ec406f6b1547946683008576ef8b38275608e1cee6c061828171c118", size = 5006426, upload-time = "2025-12-12T17:31:13.764Z" }, - { url = "https://files.pythonhosted.org/packages/b4/40/cc11f378b561a67bea850ab50063366a0d1dd3f6d0a30ce0f874b0ad5664/fonttools-4.61.1-cp314-cp314t-win32.whl", hash = "sha256:aed04cabe26f30c1647ef0e8fbb207516fd40fe9472e9439695f5c6998e60ac5", size = 2335377, upload-time = "2025-12-12T17:31:16.49Z" }, - { url = "https://files.pythonhosted.org/packages/e4/ff/c9a2b66b39f8628531ea58b320d66d951267c98c6a38684daa8f50fb02f8/fonttools-4.61.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2180f14c141d2f0f3da43f3a81bc8aa4684860f6b0e6f9e165a4831f24e6a23b", size = 2400613, upload-time = "2025-12-12T17:31:18.769Z" }, - { url = "https://files.pythonhosted.org/packages/c7/4e/ce75a57ff3aebf6fc1f4e9d508b8e5810618a33d900ad6c19eb30b290b97/fonttools-4.61.1-py3-none-any.whl", hash = "sha256:17d2bf5d541add43822bcf0c43d7d847b160c9bb01d15d5007d84e2217aaa371", size = 1148996, upload-time = "2025-12-12T17:31:21.03Z" }, + { url = "https://files.pythonhosted.org/packages/e4/33/63d79ca41020dd460b51f1e0f58ad1ff0a36b7bcbdf8f3971d52836581e9/fonttools-4.62.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:196cafef9aeec5258425bd31a4e9a414b2ee0d1557bca184d7923d3d3bcd90f9", size = 2870816, upload-time = "2026-03-09T16:48:32.39Z" }, + { url = "https://files.pythonhosted.org/packages/c0/7a/9aeec114bc9fc00d757a41f092f7107863d372e684a5b5724c043654477c/fonttools-4.62.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:153afc3012ff8761b1733e8fbe5d98623409774c44ffd88fbcb780e240c11d13", size = 2416127, upload-time = "2026-03-09T16:48:34.627Z" }, + { url = "https://files.pythonhosted.org/packages/5a/71/12cfd8ae0478b7158ffa8850786781f67e73c00fd897ef9d053415c5f88b/fonttools-4.62.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:13b663fb197334de84db790353d59da2a7288fd14e9be329f5debc63ec0500a5", size = 5100678, upload-time = "2026-03-09T16:48:36.454Z" }, + { url = "https://files.pythonhosted.org/packages/8a/d7/8e4845993ee233c2023d11babe9b3dae7d30333da1d792eeccebcb77baab/fonttools-4.62.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:591220d5333264b1df0d3285adbdfe2af4f6a45bbf9ca2b485f97c9f577c49ff", size = 5070859, upload-time = "2026-03-09T16:48:38.786Z" }, + { url = "https://files.pythonhosted.org/packages/ae/a0/287ae04cd883a52e7bb1d92dfc4997dcffb54173761c751106845fa9e316/fonttools-4.62.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:579f35c121528a50c96bf6fcb6a393e81e7f896d4326bf40e379f1c971603db9", size = 5076689, upload-time = "2026-03-09T16:48:41.886Z" }, + { url = "https://files.pythonhosted.org/packages/6d/4e/a2377ad26c36fcd3e671a1c316ea5ed83107de1588e2d897a98349363bc7/fonttools-4.62.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:44956b003151d5a289eba6c71fe590d63509267c37e26de1766ba15d9c589582", size = 5202053, upload-time = "2026-03-09T16:48:43.867Z" }, + { url = "https://files.pythonhosted.org/packages/44/2e/ad0472e69b02f83dc88983a9910d122178461606404be5b4838af6d1744a/fonttools-4.62.0-cp311-cp311-win32.whl", hash = "sha256:42c7848fa8836ab92c23b1617c407a905642521ff2d7897fe2bf8381530172f1", size = 2292852, upload-time = "2026-03-09T16:48:46.962Z" }, + { url = "https://files.pythonhosted.org/packages/77/ce/f5a4c42c117f8113ce04048053c128d17426751a508f26398110c993a074/fonttools-4.62.0-cp311-cp311-win_amd64.whl", hash = "sha256:4da779e8f342a32856075ddb193b2a024ad900bc04ecb744014c32409ae871ed", size = 2344367, upload-time = "2026-03-09T16:48:48.818Z" }, + { url = "https://files.pythonhosted.org/packages/ab/9d/7ad1ffc080619f67d0b1e0fa6a0578f0be077404f13fd8e448d1616a94a3/fonttools-4.62.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:22bde4dc12a9e09b5ced77f3b5053d96cf10c4976c6ac0dee293418ef289d221", size = 2870004, upload-time = "2026-03-09T16:48:50.837Z" }, + { url = "https://files.pythonhosted.org/packages/4d/8b/ba59069a490f61b737e064c3129453dbd28ee38e81d56af0d04d7e6b4de4/fonttools-4.62.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7199c73b326bad892f1cb53ffdd002128bfd58a89b8f662204fbf1daf8d62e85", size = 2414662, upload-time = "2026-03-09T16:48:53.295Z" }, + { url = "https://files.pythonhosted.org/packages/8c/8c/c52a4310de58deeac7e9ea800892aec09b00bb3eb0c53265b31ec02be115/fonttools-4.62.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d732938633681d6e2324e601b79e93f7f72395ec8681f9cdae5a8c08bc167e72", size = 5032975, upload-time = "2026-03-09T16:48:55.718Z" }, + { url = "https://files.pythonhosted.org/packages/0b/a1/d16318232964d786907b9b3613b8409f74cf0be2da400854509d3a864e43/fonttools-4.62.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:31a804c16d76038cc4e3826e07678efb0a02dc4f15396ea8e07088adbfb2578e", size = 4988544, upload-time = "2026-03-09T16:48:57.715Z" }, + { url = "https://files.pythonhosted.org/packages/b2/8d/7e745ca3e65852adc5e52a83dc213fe1b07d61cb5b394970fcd4b1199d1e/fonttools-4.62.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:090e74ac86e68c20150e665ef8e7e0c20cb9f8b395302c9419fa2e4d332c3b51", size = 4971296, upload-time = "2026-03-09T16:48:59.678Z" }, + { url = "https://files.pythonhosted.org/packages/e6/d4/b717a4874175146029ca1517e85474b1af80c9d9a306fc3161e71485eea5/fonttools-4.62.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8f086120e8be9e99ca1288aa5ce519833f93fe0ec6ebad2380c1dee18781f0b5", size = 5122503, upload-time = "2026-03-09T16:49:02.464Z" }, + { url = "https://files.pythonhosted.org/packages/cb/4b/92cfcba4bf8373f51c49c5ae4b512ead6fbda7d61a0e8c35a369d0db40a0/fonttools-4.62.0-cp312-cp312-win32.whl", hash = "sha256:37a73e5e38fd05c637daede6ffed5f3496096be7df6e4a3198d32af038f87527", size = 2281060, upload-time = "2026-03-09T16:49:04.385Z" }, + { url = "https://files.pythonhosted.org/packages/cd/06/cc96468781a4dc8ae2f14f16f32b32f69bde18cb9384aad27ccc7adf76f7/fonttools-4.62.0-cp312-cp312-win_amd64.whl", hash = "sha256:658ab837c878c4d2a652fcbb319547ea41693890e6434cf619e66f79387af3b8", size = 2331193, upload-time = "2026-03-09T16:49:06.598Z" }, + { url = "https://files.pythonhosted.org/packages/82/c7/985c1670aa6d82ef270f04cde11394c168f2002700353bd2bde405e59b8f/fonttools-4.62.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:274c8b8a87e439faf565d3bcd3f9f9e31bca7740755776a4a90a4bfeaa722efa", size = 2864929, upload-time = "2026-03-09T16:49:09.331Z" }, + { url = "https://files.pythonhosted.org/packages/c1/dc/c409c8ceec0d3119e9ab0b7b1a2e3c76d1f4d66e4a9db5c59e6b7652e7df/fonttools-4.62.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:93e27131a5a0ae82aaadcffe309b1bae195f6711689722af026862bede05c07c", size = 2412586, upload-time = "2026-03-09T16:49:11.378Z" }, + { url = "https://files.pythonhosted.org/packages/5f/ac/8e300dbf7b4d135287c261ffd92ede02d9f48f0d2db14665fbc8b059588a/fonttools-4.62.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:83c6524c5b93bad9c2939d88e619fedc62e913c19e673f25d5ab74e7a5d074e5", size = 5013708, upload-time = "2026-03-09T16:49:14.063Z" }, + { url = "https://files.pythonhosted.org/packages/fb/bc/60d93477b653eeb1ddf5f9ec34be689b79234d82dbdded269ac0252715b8/fonttools-4.62.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:106aec9226f9498fc5345125ff7200842c01eda273ae038f5049b0916907acee", size = 4964355, upload-time = "2026-03-09T16:49:16.515Z" }, + { url = "https://files.pythonhosted.org/packages/cb/eb/6dc62bcc3c3598c28a3ecb77e69018869c3e109bd83031d4973c059d318b/fonttools-4.62.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:15d86b96c79013320f13bc1b15f94789edb376c0a2d22fb6088f33637e8dfcbc", size = 4953472, upload-time = "2026-03-09T16:49:18.494Z" }, + { url = "https://files.pythonhosted.org/packages/82/b3/3af7592d9b254b7b7fec018135f8776bfa0d1ad335476c2791b1334dc5e4/fonttools-4.62.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4f16c07e5250d5d71d0f990a59460bc5620c3cc456121f2cfb5b60475699905f", size = 5094701, upload-time = "2026-03-09T16:49:21.67Z" }, + { url = "https://files.pythonhosted.org/packages/31/3d/976645583ab567d3ee75ff87b33aa1330fa2baeeeae5fc46210b4274dd45/fonttools-4.62.0-cp313-cp313-win32.whl", hash = "sha256:d31558890f3fa00d4f937d12708f90c7c142c803c23eaeb395a71f987a77ebe3", size = 2279710, upload-time = "2026-03-09T16:49:23.812Z" }, + { url = "https://files.pythonhosted.org/packages/f5/7a/e25245a30457595740041dba9d0ea8ec1b2517f2f1a6a741f15eba1a4edc/fonttools-4.62.0-cp313-cp313-win_amd64.whl", hash = "sha256:6826a5aa53fb6def8a66bf423939745f415546c4e92478a7c531b8b6282b6c3b", size = 2330291, upload-time = "2026-03-09T16:49:26.237Z" }, + { url = "https://files.pythonhosted.org/packages/1a/64/61f69298aa6e7c363dcf00dd6371a654676900abe27d1effd1a74b43e5d0/fonttools-4.62.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:4fa5a9c716e2f75ef34b5a5c2ca0ee4848d795daa7e6792bf30fd4abf8993449", size = 2864222, upload-time = "2026-03-09T16:49:28.285Z" }, + { url = "https://files.pythonhosted.org/packages/c6/57/6b08756fe4455336b1fe160ab3c11fccc90768ccb6ee03fb0b45851aace4/fonttools-4.62.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:625f5cbeb0b8f4e42343eaeb4bc2786718ddd84760a2f5e55fdd3db049047c00", size = 2410674, upload-time = "2026-03-09T16:49:30.504Z" }, + { url = "https://files.pythonhosted.org/packages/6f/86/db65b63bb1b824b63e602e9be21b18741ddc99bcf5a7850f9181159ae107/fonttools-4.62.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6247e58b96b982709cd569a91a2ba935d406dccf17b6aa615afaed37ac3856aa", size = 4999387, upload-time = "2026-03-09T16:49:32.593Z" }, + { url = "https://files.pythonhosted.org/packages/86/c8/c6669e42d2f4efd60d38a3252cebbb28851f968890efb2b9b15f9d1092b0/fonttools-4.62.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:840632ea9c1eab7b7f01c369e408c0721c287dfd7500ab937398430689852fd1", size = 4912506, upload-time = "2026-03-09T16:49:34.927Z" }, + { url = "https://files.pythonhosted.org/packages/2e/49/0ae552aa098edd0ec548413fbf818f52ceb70535016215094a5ce9bf8f70/fonttools-4.62.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:28a9ea2a7467a816d1bec22658b0cce4443ac60abac3e293bdee78beb74588f3", size = 4951202, upload-time = "2026-03-09T16:49:37.1Z" }, + { url = "https://files.pythonhosted.org/packages/71/65/ae38fc8a4cea6f162d74cf11f58e9aeef1baa7d0e3d1376dabd336c129e5/fonttools-4.62.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5ae611294f768d413949fd12693a8cba0e6332fbc1e07aba60121be35eac68d0", size = 5060758, upload-time = "2026-03-09T16:49:39.464Z" }, + { url = "https://files.pythonhosted.org/packages/db/3d/bb797496f35c60544cd5af71ffa5aad62df14ef7286908d204cb5c5096fe/fonttools-4.62.0-cp314-cp314-win32.whl", hash = "sha256:273acb61f316d07570a80ed5ff0a14a23700eedbec0ad968b949abaa4d3f6bb5", size = 2283496, upload-time = "2026-03-09T16:49:42.448Z" }, + { url = "https://files.pythonhosted.org/packages/2e/9f/91081ffe5881253177c175749cce5841f5ec6e931f5d52f4a817207b7429/fonttools-4.62.0-cp314-cp314-win_amd64.whl", hash = "sha256:a5f974006d14f735c6c878fc4b117ad031dc93638ddcc450ca69f8fd64d5e104", size = 2335426, upload-time = "2026-03-09T16:49:44.228Z" }, + { url = "https://files.pythonhosted.org/packages/f8/65/f47f9b3db1ec156a1f222f1089ba076b2cc9ee1d024a8b0a60c54258517e/fonttools-4.62.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0361a7d41d86937f1f752717c19f719d0fde064d3011038f9f19bdf5fc2f5c95", size = 2947079, upload-time = "2026-03-09T16:49:46.471Z" }, + { url = "https://files.pythonhosted.org/packages/52/73/bc62e5058a0c22cf02b1e0169ef0c3ca6c3247216d719f95bead3c05a991/fonttools-4.62.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d4108c12773b3c97aa592311557c405d5b4fc03db2b969ed928fcf68e7b3c887", size = 2448802, upload-time = "2026-03-09T16:49:48.328Z" }, + { url = "https://files.pythonhosted.org/packages/2b/df/bfaa0e845884935355670e6e68f137185ab87295f8bc838db575e4a66064/fonttools-4.62.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b448075f32708e8fb377fe7687f769a5f51a027172c591ba9a58693631b077a8", size = 5137378, upload-time = "2026-03-09T16:49:50.223Z" }, + { url = "https://files.pythonhosted.org/packages/32/32/04f616979a18b48b52e634988b93d847b6346260faf85ecccaf7e2e9057f/fonttools-4.62.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e5f1fa8cc9f1a56a3e33ee6b954d6d9235e6b9d11eb7a6c9dfe2c2f829dc24db", size = 4920714, upload-time = "2026-03-09T16:49:53.172Z" }, + { url = "https://files.pythonhosted.org/packages/3b/2e/274e16689c1dfee5c68302cd7c444213cfddd23cf4620374419625037ec6/fonttools-4.62.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:f8c8ea812f82db1e884b9cdb663080453e28f0f9a1f5027a5adb59c4cc8d38d1", size = 5016012, upload-time = "2026-03-09T16:49:55.762Z" }, + { url = "https://files.pythonhosted.org/packages/7f/0c/b08117270626e7117ac2f89d732fdd4386ec37d2ab3a944462d29e6f89a1/fonttools-4.62.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:03c6068adfdc67c565d217e92386b1cdd951abd4240d65180cec62fa74ba31b2", size = 5042766, upload-time = "2026-03-09T16:49:57.726Z" }, + { url = "https://files.pythonhosted.org/packages/11/83/a48b73e54efa272ee65315a6331b30a9b3a98733310bc11402606809c50e/fonttools-4.62.0-cp314-cp314t-win32.whl", hash = "sha256:d28d5baacb0017d384df14722a63abe6e0230d8ce642b1615a27d78ffe3bc983", size = 2347785, upload-time = "2026-03-09T16:49:59.698Z" }, + { url = "https://files.pythonhosted.org/packages/f8/27/c67eab6dc3525bdc39586511b1b3d7161e972dacc0f17476dbaf932e708b/fonttools-4.62.0-cp314-cp314t-win_amd64.whl", hash = "sha256:3f9e20c4618f1e04190c802acae6dc337cb6db9fa61e492fd97cd5c5a9ff6d07", size = 2413914, upload-time = "2026-03-09T16:50:02.251Z" }, + { url = "https://files.pythonhosted.org/packages/9c/57/c2487c281dde03abb2dec244fd67059b8d118bd30a653cbf69e94084cb23/fonttools-4.62.0-py3-none-any.whl", hash = "sha256:75064f19a10c50c74b336aa5ebe7b1f89fd0fb5255807bfd4b0c6317098f4af3", size = 1152427, upload-time = "2026-03-09T16:50:04.074Z" }, ] [[package]] @@ -2650,92 +2650,108 @@ wheels = [ [[package]] name = "kiwisolver" -version = "1.4.9" +version = "1.5.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5c/3c/85844f1b0feb11ee581ac23fe5fce65cd049a200c1446708cc1b7f922875/kiwisolver-1.4.9.tar.gz", hash = "sha256:c3b22c26c6fd6811b0ae8363b95ca8ce4ea3c202d3d0975b2914310ceb1bcc4d", size = 97564, upload-time = "2025-08-10T21:27:49.279Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d0/67/9c61eccb13f0bdca9307614e782fec49ffdde0f7a2314935d489fa93cd9c/kiwisolver-1.5.0.tar.gz", hash = "sha256:d4193f3d9dc3f6f79aaed0e5637f45d98850ebf01f7ca20e69457f3e8946b66a", size = 103482, upload-time = "2026-03-09T13:15:53.382Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6f/ab/c80b0d5a9d8a1a65f4f815f2afff9798b12c3b9f31f1d304dd233dd920e2/kiwisolver-1.4.9-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:eb14a5da6dc7642b0f3a18f13654847cd8b7a2550e2645a5bda677862b03ba16", size = 124167, upload-time = "2025-08-10T21:25:53.403Z" }, - { url = "https://files.pythonhosted.org/packages/a0/c0/27fe1a68a39cf62472a300e2879ffc13c0538546c359b86f149cc19f6ac3/kiwisolver-1.4.9-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:39a219e1c81ae3b103643d2aedb90f1ef22650deb266ff12a19e7773f3e5f089", size = 66579, upload-time = "2025-08-10T21:25:54.79Z" }, - { url = "https://files.pythonhosted.org/packages/31/a2/a12a503ac1fd4943c50f9822678e8015a790a13b5490354c68afb8489814/kiwisolver-1.4.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2405a7d98604b87f3fc28b1716783534b1b4b8510d8142adca34ee0bc3c87543", size = 65309, upload-time = "2025-08-10T21:25:55.76Z" }, - { url = "https://files.pythonhosted.org/packages/66/e1/e533435c0be77c3f64040d68d7a657771194a63c279f55573188161e81ca/kiwisolver-1.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:dc1ae486f9abcef254b5618dfb4113dd49f94c68e3e027d03cf0143f3f772b61", size = 1435596, upload-time = "2025-08-10T21:25:56.861Z" }, - { url = "https://files.pythonhosted.org/packages/67/1e/51b73c7347f9aabdc7215aa79e8b15299097dc2f8e67dee2b095faca9cb0/kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a1f570ce4d62d718dce3f179ee78dac3b545ac16c0c04bb363b7607a949c0d1", size = 1246548, upload-time = "2025-08-10T21:25:58.246Z" }, - { url = "https://files.pythonhosted.org/packages/21/aa/72a1c5d1e430294f2d32adb9542719cfb441b5da368d09d268c7757af46c/kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb27e7b78d716c591e88e0a09a2139c6577865d7f2e152488c2cc6257f460872", size = 1263618, upload-time = "2025-08-10T21:25:59.857Z" }, - { url = "https://files.pythonhosted.org/packages/a3/af/db1509a9e79dbf4c260ce0cfa3903ea8945f6240e9e59d1e4deb731b1a40/kiwisolver-1.4.9-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:15163165efc2f627eb9687ea5f3a28137217d217ac4024893d753f46bce9de26", size = 1317437, upload-time = "2025-08-10T21:26:01.105Z" }, - { url = "https://files.pythonhosted.org/packages/e0/f2/3ea5ee5d52abacdd12013a94130436e19969fa183faa1e7c7fbc89e9a42f/kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bdee92c56a71d2b24c33a7d4c2856bd6419d017e08caa7802d2963870e315028", size = 2195742, upload-time = "2025-08-10T21:26:02.675Z" }, - { url = "https://files.pythonhosted.org/packages/6f/9b/1efdd3013c2d9a2566aa6a337e9923a00590c516add9a1e89a768a3eb2fc/kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:412f287c55a6f54b0650bd9b6dce5aceddb95864a1a90c87af16979d37c89771", size = 2290810, upload-time = "2025-08-10T21:26:04.009Z" }, - { url = "https://files.pythonhosted.org/packages/fb/e5/cfdc36109ae4e67361f9bc5b41323648cb24a01b9ade18784657e022e65f/kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:2c93f00dcba2eea70af2be5f11a830a742fe6b579a1d4e00f47760ef13be247a", size = 2461579, upload-time = "2025-08-10T21:26:05.317Z" }, - { url = "https://files.pythonhosted.org/packages/62/86/b589e5e86c7610842213994cdea5add00960076bef4ae290c5fa68589cac/kiwisolver-1.4.9-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f117e1a089d9411663a3207ba874f31be9ac8eaa5b533787024dc07aeb74f464", size = 2268071, upload-time = "2025-08-10T21:26:06.686Z" }, - { url = "https://files.pythonhosted.org/packages/3b/c6/f8df8509fd1eee6c622febe54384a96cfaf4d43bf2ccec7a0cc17e4715c9/kiwisolver-1.4.9-cp311-cp311-win_amd64.whl", hash = "sha256:be6a04e6c79819c9a8c2373317d19a96048e5a3f90bec587787e86a1153883c2", size = 73840, upload-time = "2025-08-10T21:26:07.94Z" }, - { url = "https://files.pythonhosted.org/packages/e2/2d/16e0581daafd147bc11ac53f032a2b45eabac897f42a338d0a13c1e5c436/kiwisolver-1.4.9-cp311-cp311-win_arm64.whl", hash = "sha256:0ae37737256ba2de764ddc12aed4956460277f00c4996d51a197e72f62f5eec7", size = 65159, upload-time = "2025-08-10T21:26:09.048Z" }, - { url = "https://files.pythonhosted.org/packages/86/c9/13573a747838aeb1c76e3267620daa054f4152444d1f3d1a2324b78255b5/kiwisolver-1.4.9-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ac5a486ac389dddcc5bef4f365b6ae3ffff2c433324fb38dd35e3fab7c957999", size = 123686, upload-time = "2025-08-10T21:26:10.034Z" }, - { url = "https://files.pythonhosted.org/packages/51/ea/2ecf727927f103ffd1739271ca19c424d0e65ea473fbaeea1c014aea93f6/kiwisolver-1.4.9-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f2ba92255faa7309d06fe44c3a4a97efe1c8d640c2a79a5ef728b685762a6fd2", size = 66460, upload-time = "2025-08-10T21:26:11.083Z" }, - { url = "https://files.pythonhosted.org/packages/5b/5a/51f5464373ce2aeb5194508298a508b6f21d3867f499556263c64c621914/kiwisolver-1.4.9-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a2899935e724dd1074cb568ce7ac0dce28b2cd6ab539c8e001a8578eb106d14", size = 64952, upload-time = "2025-08-10T21:26:12.058Z" }, - { url = "https://files.pythonhosted.org/packages/70/90/6d240beb0f24b74371762873e9b7f499f1e02166a2d9c5801f4dbf8fa12e/kiwisolver-1.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f6008a4919fdbc0b0097089f67a1eb55d950ed7e90ce2cc3e640abadd2757a04", size = 1474756, upload-time = "2025-08-10T21:26:13.096Z" }, - { url = "https://files.pythonhosted.org/packages/12/42/f36816eaf465220f683fb711efdd1bbf7a7005a2473d0e4ed421389bd26c/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:67bb8b474b4181770f926f7b7d2f8c0248cbcb78b660fdd41a47054b28d2a752", size = 1276404, upload-time = "2025-08-10T21:26:14.457Z" }, - { url = "https://files.pythonhosted.org/packages/2e/64/bc2de94800adc830c476dce44e9b40fd0809cddeef1fde9fcf0f73da301f/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2327a4a30d3ee07d2fbe2e7933e8a37c591663b96ce42a00bc67461a87d7df77", size = 1294410, upload-time = "2025-08-10T21:26:15.73Z" }, - { url = "https://files.pythonhosted.org/packages/5f/42/2dc82330a70aa8e55b6d395b11018045e58d0bb00834502bf11509f79091/kiwisolver-1.4.9-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7a08b491ec91b1d5053ac177afe5290adacf1f0f6307d771ccac5de30592d198", size = 1343631, upload-time = "2025-08-10T21:26:17.045Z" }, - { url = "https://files.pythonhosted.org/packages/22/fd/f4c67a6ed1aab149ec5a8a401c323cee7a1cbe364381bb6c9c0d564e0e20/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d8fc5c867c22b828001b6a38d2eaeb88160bf5783c6cb4a5e440efc981ce286d", size = 2224963, upload-time = "2025-08-10T21:26:18.737Z" }, - { url = "https://files.pythonhosted.org/packages/45/aa/76720bd4cb3713314677d9ec94dcc21ced3f1baf4830adde5bb9b2430a5f/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:3b3115b2581ea35bb6d1f24a4c90af37e5d9b49dcff267eeed14c3893c5b86ab", size = 2321295, upload-time = "2025-08-10T21:26:20.11Z" }, - { url = "https://files.pythonhosted.org/packages/80/19/d3ec0d9ab711242f56ae0dc2fc5d70e298bb4a1f9dfab44c027668c673a1/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:858e4c22fb075920b96a291928cb7dea5644e94c0ee4fcd5af7e865655e4ccf2", size = 2487987, upload-time = "2025-08-10T21:26:21.49Z" }, - { url = "https://files.pythonhosted.org/packages/39/e9/61e4813b2c97e86b6fdbd4dd824bf72d28bcd8d4849b8084a357bc0dd64d/kiwisolver-1.4.9-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ed0fecd28cc62c54b262e3736f8bb2512d8dcfdc2bcf08be5f47f96bf405b145", size = 2291817, upload-time = "2025-08-10T21:26:22.812Z" }, - { url = "https://files.pythonhosted.org/packages/a0/41/85d82b0291db7504da3c2defe35c9a8a5c9803a730f297bd823d11d5fb77/kiwisolver-1.4.9-cp312-cp312-win_amd64.whl", hash = "sha256:f68208a520c3d86ea51acf688a3e3002615a7f0238002cccc17affecc86a8a54", size = 73895, upload-time = "2025-08-10T21:26:24.37Z" }, - { url = "https://files.pythonhosted.org/packages/e2/92/5f3068cf15ee5cb624a0c7596e67e2a0bb2adee33f71c379054a491d07da/kiwisolver-1.4.9-cp312-cp312-win_arm64.whl", hash = "sha256:2c1a4f57df73965f3f14df20b80ee29e6a7930a57d2d9e8491a25f676e197c60", size = 64992, upload-time = "2025-08-10T21:26:25.732Z" }, - { url = "https://files.pythonhosted.org/packages/31/c1/c2686cda909742ab66c7388e9a1a8521a59eb89f8bcfbee28fc980d07e24/kiwisolver-1.4.9-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a5d0432ccf1c7ab14f9949eec60c5d1f924f17c037e9f8b33352fa05799359b8", size = 123681, upload-time = "2025-08-10T21:26:26.725Z" }, - { url = "https://files.pythonhosted.org/packages/ca/f0/f44f50c9f5b1a1860261092e3bc91ecdc9acda848a8b8c6abfda4a24dd5c/kiwisolver-1.4.9-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efb3a45b35622bb6c16dbfab491a8f5a391fe0e9d45ef32f4df85658232ca0e2", size = 66464, upload-time = "2025-08-10T21:26:27.733Z" }, - { url = "https://files.pythonhosted.org/packages/2d/7a/9d90a151f558e29c3936b8a47ac770235f436f2120aca41a6d5f3d62ae8d/kiwisolver-1.4.9-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1a12cf6398e8a0a001a059747a1cbf24705e18fe413bc22de7b3d15c67cffe3f", size = 64961, upload-time = "2025-08-10T21:26:28.729Z" }, - { url = "https://files.pythonhosted.org/packages/e9/e9/f218a2cb3a9ffbe324ca29a9e399fa2d2866d7f348ec3a88df87fc248fc5/kiwisolver-1.4.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b67e6efbf68e077dd71d1a6b37e43e1a99d0bff1a3d51867d45ee8908b931098", size = 1474607, upload-time = "2025-08-10T21:26:29.798Z" }, - { url = "https://files.pythonhosted.org/packages/d9/28/aac26d4c882f14de59041636292bc838db8961373825df23b8eeb807e198/kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5656aa670507437af0207645273ccdfee4f14bacd7f7c67a4306d0dcaeaf6eed", size = 1276546, upload-time = "2025-08-10T21:26:31.401Z" }, - { url = "https://files.pythonhosted.org/packages/8b/ad/8bfc1c93d4cc565e5069162f610ba2f48ff39b7de4b5b8d93f69f30c4bed/kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bfc08add558155345129c7803b3671cf195e6a56e7a12f3dde7c57d9b417f525", size = 1294482, upload-time = "2025-08-10T21:26:32.721Z" }, - { url = "https://files.pythonhosted.org/packages/da/f1/6aca55ff798901d8ce403206d00e033191f63d82dd708a186e0ed2067e9c/kiwisolver-1.4.9-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:40092754720b174e6ccf9e845d0d8c7d8e12c3d71e7fc35f55f3813e96376f78", size = 1343720, upload-time = "2025-08-10T21:26:34.032Z" }, - { url = "https://files.pythonhosted.org/packages/d1/91/eed031876c595c81d90d0f6fc681ece250e14bf6998c3d7c419466b523b7/kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:497d05f29a1300d14e02e6441cf0f5ee81c1ff5a304b0d9fb77423974684e08b", size = 2224907, upload-time = "2025-08-10T21:26:35.824Z" }, - { url = "https://files.pythonhosted.org/packages/e9/ec/4d1925f2e49617b9cca9c34bfa11adefad49d00db038e692a559454dfb2e/kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:bdd1a81a1860476eb41ac4bc1e07b3f07259e6d55bbf739b79c8aaedcf512799", size = 2321334, upload-time = "2025-08-10T21:26:37.534Z" }, - { url = "https://files.pythonhosted.org/packages/43/cb/450cd4499356f68802750c6ddc18647b8ea01ffa28f50d20598e0befe6e9/kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:e6b93f13371d341afee3be9f7c5964e3fe61d5fa30f6a30eb49856935dfe4fc3", size = 2488313, upload-time = "2025-08-10T21:26:39.191Z" }, - { url = "https://files.pythonhosted.org/packages/71/67/fc76242bd99f885651128a5d4fa6083e5524694b7c88b489b1b55fdc491d/kiwisolver-1.4.9-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d75aa530ccfaa593da12834b86a0724f58bff12706659baa9227c2ccaa06264c", size = 2291970, upload-time = "2025-08-10T21:26:40.828Z" }, - { url = "https://files.pythonhosted.org/packages/75/bd/f1a5d894000941739f2ae1b65a32892349423ad49c2e6d0771d0bad3fae4/kiwisolver-1.4.9-cp313-cp313-win_amd64.whl", hash = "sha256:dd0a578400839256df88c16abddf9ba14813ec5f21362e1fe65022e00c883d4d", size = 73894, upload-time = "2025-08-10T21:26:42.33Z" }, - { url = "https://files.pythonhosted.org/packages/95/38/dce480814d25b99a391abbddadc78f7c117c6da34be68ca8b02d5848b424/kiwisolver-1.4.9-cp313-cp313-win_arm64.whl", hash = "sha256:d4188e73af84ca82468f09cadc5ac4db578109e52acb4518d8154698d3a87ca2", size = 64995, upload-time = "2025-08-10T21:26:43.889Z" }, - { url = "https://files.pythonhosted.org/packages/e2/37/7d218ce5d92dadc5ebdd9070d903e0c7cf7edfe03f179433ac4d13ce659c/kiwisolver-1.4.9-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:5a0f2724dfd4e3b3ac5a82436a8e6fd16baa7d507117e4279b660fe8ca38a3a1", size = 126510, upload-time = "2025-08-10T21:26:44.915Z" }, - { url = "https://files.pythonhosted.org/packages/23/b0/e85a2b48233daef4b648fb657ebbb6f8367696a2d9548a00b4ee0eb67803/kiwisolver-1.4.9-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:1b11d6a633e4ed84fc0ddafd4ebfd8ea49b3f25082c04ad12b8315c11d504dc1", size = 67903, upload-time = "2025-08-10T21:26:45.934Z" }, - { url = "https://files.pythonhosted.org/packages/44/98/f2425bc0113ad7de24da6bb4dae1343476e95e1d738be7c04d31a5d037fd/kiwisolver-1.4.9-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61874cdb0a36016354853593cffc38e56fc9ca5aa97d2c05d3dcf6922cd55a11", size = 66402, upload-time = "2025-08-10T21:26:47.101Z" }, - { url = "https://files.pythonhosted.org/packages/98/d8/594657886df9f34c4177cc353cc28ca7e6e5eb562d37ccc233bff43bbe2a/kiwisolver-1.4.9-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:60c439763a969a6af93b4881db0eed8fadf93ee98e18cbc35bc8da868d0c4f0c", size = 1582135, upload-time = "2025-08-10T21:26:48.665Z" }, - { url = "https://files.pythonhosted.org/packages/5c/c6/38a115b7170f8b306fc929e166340c24958347308ea3012c2b44e7e295db/kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92a2f997387a1b79a75e7803aa7ded2cfbe2823852ccf1ba3bcf613b62ae3197", size = 1389409, upload-time = "2025-08-10T21:26:50.335Z" }, - { url = "https://files.pythonhosted.org/packages/bf/3b/e04883dace81f24a568bcee6eb3001da4ba05114afa622ec9b6fafdc1f5e/kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a31d512c812daea6d8b3be3b2bfcbeb091dbb09177706569bcfc6240dcf8b41c", size = 1401763, upload-time = "2025-08-10T21:26:51.867Z" }, - { url = "https://files.pythonhosted.org/packages/9f/80/20ace48e33408947af49d7d15c341eaee69e4e0304aab4b7660e234d6288/kiwisolver-1.4.9-cp313-cp313t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:52a15b0f35dad39862d376df10c5230155243a2c1a436e39eb55623ccbd68185", size = 1453643, upload-time = "2025-08-10T21:26:53.592Z" }, - { url = "https://files.pythonhosted.org/packages/64/31/6ce4380a4cd1f515bdda976a1e90e547ccd47b67a1546d63884463c92ca9/kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a30fd6fdef1430fd9e1ba7b3398b5ee4e2887783917a687d86ba69985fb08748", size = 2330818, upload-time = "2025-08-10T21:26:55.051Z" }, - { url = "https://files.pythonhosted.org/packages/fa/e9/3f3fcba3bcc7432c795b82646306e822f3fd74df0ee81f0fa067a1f95668/kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cc9617b46837c6468197b5945e196ee9ca43057bb7d9d1ae688101e4e1dddf64", size = 2419963, upload-time = "2025-08-10T21:26:56.421Z" }, - { url = "https://files.pythonhosted.org/packages/99/43/7320c50e4133575c66e9f7dadead35ab22d7c012a3b09bb35647792b2a6d/kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:0ab74e19f6a2b027ea4f845a78827969af45ce790e6cb3e1ebab71bdf9f215ff", size = 2594639, upload-time = "2025-08-10T21:26:57.882Z" }, - { url = "https://files.pythonhosted.org/packages/65/d6/17ae4a270d4a987ef8a385b906d2bdfc9fce502d6dc0d3aea865b47f548c/kiwisolver-1.4.9-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dba5ee5d3981160c28d5490f0d1b7ed730c22470ff7f6cc26cfcfaacb9896a07", size = 2391741, upload-time = "2025-08-10T21:26:59.237Z" }, - { url = "https://files.pythonhosted.org/packages/2a/8f/8f6f491d595a9e5912971f3f863d81baddccc8a4d0c3749d6a0dd9ffc9df/kiwisolver-1.4.9-cp313-cp313t-win_arm64.whl", hash = "sha256:0749fd8f4218ad2e851e11cc4dc05c7cbc0cbc4267bdfdb31782e65aace4ee9c", size = 68646, upload-time = "2025-08-10T21:27:00.52Z" }, - { url = "https://files.pythonhosted.org/packages/6b/32/6cc0fbc9c54d06c2969faa9c1d29f5751a2e51809dd55c69055e62d9b426/kiwisolver-1.4.9-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:9928fe1eb816d11ae170885a74d074f57af3a0d65777ca47e9aeb854a1fba386", size = 123806, upload-time = "2025-08-10T21:27:01.537Z" }, - { url = "https://files.pythonhosted.org/packages/b2/dd/2bfb1d4a4823d92e8cbb420fe024b8d2167f72079b3bb941207c42570bdf/kiwisolver-1.4.9-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:d0005b053977e7b43388ddec89fa567f43d4f6d5c2c0affe57de5ebf290dc552", size = 66605, upload-time = "2025-08-10T21:27:03.335Z" }, - { url = "https://files.pythonhosted.org/packages/f7/69/00aafdb4e4509c2ca6064646cba9cd4b37933898f426756adb2cb92ebbed/kiwisolver-1.4.9-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2635d352d67458b66fd0667c14cb1d4145e9560d503219034a18a87e971ce4f3", size = 64925, upload-time = "2025-08-10T21:27:04.339Z" }, - { url = "https://files.pythonhosted.org/packages/43/dc/51acc6791aa14e5cb6d8a2e28cefb0dc2886d8862795449d021334c0df20/kiwisolver-1.4.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:767c23ad1c58c9e827b649a9ab7809fd5fd9db266a9cf02b0e926ddc2c680d58", size = 1472414, upload-time = "2025-08-10T21:27:05.437Z" }, - { url = "https://files.pythonhosted.org/packages/3d/bb/93fa64a81db304ac8a246f834d5094fae4b13baf53c839d6bb6e81177129/kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:72d0eb9fba308b8311685c2268cf7d0a0639a6cd027d8128659f72bdd8a024b4", size = 1281272, upload-time = "2025-08-10T21:27:07.063Z" }, - { url = "https://files.pythonhosted.org/packages/70/e6/6df102916960fb8d05069d4bd92d6d9a8202d5a3e2444494e7cd50f65b7a/kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f68e4f3eeca8fb22cc3d731f9715a13b652795ef657a13df1ad0c7dc0e9731df", size = 1298578, upload-time = "2025-08-10T21:27:08.452Z" }, - { url = "https://files.pythonhosted.org/packages/7c/47/e142aaa612f5343736b087864dbaebc53ea8831453fb47e7521fa8658f30/kiwisolver-1.4.9-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d84cd4061ae292d8ac367b2c3fa3aad11cb8625a95d135fe93f286f914f3f5a6", size = 1345607, upload-time = "2025-08-10T21:27:10.125Z" }, - { url = "https://files.pythonhosted.org/packages/54/89/d641a746194a0f4d1a3670fb900d0dbaa786fb98341056814bc3f058fa52/kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a60ea74330b91bd22a29638940d115df9dc00af5035a9a2a6ad9399ffb4ceca5", size = 2230150, upload-time = "2025-08-10T21:27:11.484Z" }, - { url = "https://files.pythonhosted.org/packages/aa/6b/5ee1207198febdf16ac11f78c5ae40861b809cbe0e6d2a8d5b0b3044b199/kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:ce6a3a4e106cf35c2d9c4fa17c05ce0b180db622736845d4315519397a77beaf", size = 2325979, upload-time = "2025-08-10T21:27:12.917Z" }, - { url = "https://files.pythonhosted.org/packages/fc/ff/b269eefd90f4ae14dcc74973d5a0f6d28d3b9bb1afd8c0340513afe6b39a/kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:77937e5e2a38a7b48eef0585114fe7930346993a88060d0bf886086d2aa49ef5", size = 2491456, upload-time = "2025-08-10T21:27:14.353Z" }, - { url = "https://files.pythonhosted.org/packages/fc/d4/10303190bd4d30de547534601e259a4fbf014eed94aae3e5521129215086/kiwisolver-1.4.9-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:24c175051354f4a28c5d6a31c93906dc653e2bf234e8a4bbfb964892078898ce", size = 2294621, upload-time = "2025-08-10T21:27:15.808Z" }, - { url = "https://files.pythonhosted.org/packages/28/e0/a9a90416fce5c0be25742729c2ea52105d62eda6c4be4d803c2a7be1fa50/kiwisolver-1.4.9-cp314-cp314-win_amd64.whl", hash = "sha256:0763515d4df10edf6d06a3c19734e2566368980d21ebec439f33f9eb936c07b7", size = 75417, upload-time = "2025-08-10T21:27:17.436Z" }, - { url = "https://files.pythonhosted.org/packages/1f/10/6949958215b7a9a264299a7db195564e87900f709db9245e4ebdd3c70779/kiwisolver-1.4.9-cp314-cp314-win_arm64.whl", hash = "sha256:0e4e2bf29574a6a7b7f6cb5fa69293b9f96c928949ac4a53ba3f525dffb87f9c", size = 66582, upload-time = "2025-08-10T21:27:18.436Z" }, - { url = "https://files.pythonhosted.org/packages/ec/79/60e53067903d3bc5469b369fe0dfc6b3482e2133e85dae9daa9527535991/kiwisolver-1.4.9-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d976bbb382b202f71c67f77b0ac11244021cfa3f7dfd9e562eefcea2df711548", size = 126514, upload-time = "2025-08-10T21:27:19.465Z" }, - { url = "https://files.pythonhosted.org/packages/25/d1/4843d3e8d46b072c12a38c97c57fab4608d36e13fe47d47ee96b4d61ba6f/kiwisolver-1.4.9-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2489e4e5d7ef9a1c300a5e0196e43d9c739f066ef23270607d45aba368b91f2d", size = 67905, upload-time = "2025-08-10T21:27:20.51Z" }, - { url = "https://files.pythonhosted.org/packages/8c/ae/29ffcbd239aea8b93108de1278271ae764dfc0d803a5693914975f200596/kiwisolver-1.4.9-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e2ea9f7ab7fbf18fffb1b5434ce7c69a07582f7acc7717720f1d69f3e806f90c", size = 66399, upload-time = "2025-08-10T21:27:21.496Z" }, - { url = "https://files.pythonhosted.org/packages/a1/ae/d7ba902aa604152c2ceba5d352d7b62106bedbccc8e95c3934d94472bfa3/kiwisolver-1.4.9-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b34e51affded8faee0dfdb705416153819d8ea9250bbbf7ea1b249bdeb5f1122", size = 1582197, upload-time = "2025-08-10T21:27:22.604Z" }, - { url = "https://files.pythonhosted.org/packages/f2/41/27c70d427eddb8bc7e4f16420a20fefc6f480312122a59a959fdfe0445ad/kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d8aacd3d4b33b772542b2e01beb50187536967b514b00003bdda7589722d2a64", size = 1390125, upload-time = "2025-08-10T21:27:24.036Z" }, - { url = "https://files.pythonhosted.org/packages/41/42/b3799a12bafc76d962ad69083f8b43b12bf4fe78b097b12e105d75c9b8f1/kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7cf974dd4e35fa315563ac99d6287a1024e4dc2077b8a7d7cd3d2fb65d283134", size = 1402612, upload-time = "2025-08-10T21:27:25.773Z" }, - { url = "https://files.pythonhosted.org/packages/d2/b5/a210ea073ea1cfaca1bb5c55a62307d8252f531beb364e18aa1e0888b5a0/kiwisolver-1.4.9-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:85bd218b5ecfbee8c8a82e121802dcb519a86044c9c3b2e4aef02fa05c6da370", size = 1453990, upload-time = "2025-08-10T21:27:27.089Z" }, - { url = "https://files.pythonhosted.org/packages/5f/ce/a829eb8c033e977d7ea03ed32fb3c1781b4fa0433fbadfff29e39c676f32/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0856e241c2d3df4efef7c04a1e46b1936b6120c9bcf36dd216e3acd84bc4fb21", size = 2331601, upload-time = "2025-08-10T21:27:29.343Z" }, - { url = "https://files.pythonhosted.org/packages/e0/4b/b5e97eb142eb9cd0072dacfcdcd31b1c66dc7352b0f7c7255d339c0edf00/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:9af39d6551f97d31a4deebeac6f45b156f9755ddc59c07b402c148f5dbb6482a", size = 2422041, upload-time = "2025-08-10T21:27:30.754Z" }, - { url = "https://files.pythonhosted.org/packages/40/be/8eb4cd53e1b85ba4edc3a9321666f12b83113a178845593307a3e7891f44/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:bb4ae2b57fc1d8cbd1cf7b1d9913803681ffa903e7488012be5b76dedf49297f", size = 2594897, upload-time = "2025-08-10T21:27:32.803Z" }, - { url = "https://files.pythonhosted.org/packages/99/dd/841e9a66c4715477ea0abc78da039832fbb09dac5c35c58dc4c41a407b8a/kiwisolver-1.4.9-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:aedff62918805fb62d43a4aa2ecd4482c380dc76cd31bd7c8878588a61bd0369", size = 2391835, upload-time = "2025-08-10T21:27:34.23Z" }, - { url = "https://files.pythonhosted.org/packages/0c/28/4b2e5c47a0da96896fdfdb006340ade064afa1e63675d01ea5ac222b6d52/kiwisolver-1.4.9-cp314-cp314t-win_amd64.whl", hash = "sha256:1fa333e8b2ce4d9660f2cda9c0e1b6bafcfb2457a9d259faa82289e73ec24891", size = 79988, upload-time = "2025-08-10T21:27:35.587Z" }, - { url = "https://files.pythonhosted.org/packages/80/be/3578e8afd18c88cdf9cb4cffde75a96d2be38c5a903f1ed0ceec061bd09e/kiwisolver-1.4.9-cp314-cp314t-win_arm64.whl", hash = "sha256:4a48a2ce79d65d363597ef7b567ce3d14d68783d2b2263d98db3d9477805ba32", size = 70260, upload-time = "2025-08-10T21:27:36.606Z" }, - { url = "https://files.pythonhosted.org/packages/a3/0f/36d89194b5a32c054ce93e586d4049b6c2c22887b0eb229c61c68afd3078/kiwisolver-1.4.9-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:720e05574713db64c356e86732c0f3c5252818d05f9df320f0ad8380641acea5", size = 60104, upload-time = "2025-08-10T21:27:43.287Z" }, - { url = "https://files.pythonhosted.org/packages/52/ba/4ed75f59e4658fd21fe7dde1fee0ac397c678ec3befba3fe6482d987af87/kiwisolver-1.4.9-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:17680d737d5335b552994a2008fab4c851bcd7de33094a82067ef3a576ff02fa", size = 58592, upload-time = "2025-08-10T21:27:44.314Z" }, - { url = "https://files.pythonhosted.org/packages/33/01/a8ea7c5ea32a9b45ceeaee051a04c8ed4320f5add3c51bfa20879b765b70/kiwisolver-1.4.9-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:85b5352f94e490c028926ea567fc569c52ec79ce131dadb968d3853e809518c2", size = 80281, upload-time = "2025-08-10T21:27:45.369Z" }, - { url = "https://files.pythonhosted.org/packages/da/e3/dbd2ecdce306f1d07a1aaf324817ee993aab7aee9db47ceac757deabafbe/kiwisolver-1.4.9-pp311-pypy311_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:464415881e4801295659462c49461a24fb107c140de781d55518c4b80cb6790f", size = 78009, upload-time = "2025-08-10T21:27:46.376Z" }, - { url = "https://files.pythonhosted.org/packages/da/e9/0d4add7873a73e462aeb45c036a2dead2562b825aa46ba326727b3f31016/kiwisolver-1.4.9-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:fb940820c63a9590d31d88b815e7a3aa5915cad3ce735ab45f0c730b39547de1", size = 73929, upload-time = "2025-08-10T21:27:48.236Z" }, + { url = "https://files.pythonhosted.org/packages/12/dd/a495a9c104be1c476f0386e714252caf2b7eca883915422a64c50b88c6f5/kiwisolver-1.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9eed0f7edbb274413b6ee781cca50541c8c0facd3d6fd289779e494340a2b85c", size = 122798, upload-time = "2026-03-09T13:12:58.963Z" }, + { url = "https://files.pythonhosted.org/packages/11/60/37b4047a2af0cf5ef6d8b4b26e91829ae6fc6a2d1f74524bcb0e7cd28a32/kiwisolver-1.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c4923e404d6bcd91b6779c009542e5647fef32e4a5d75e115e3bbac6f2335eb", size = 66216, upload-time = "2026-03-09T13:13:00.155Z" }, + { url = "https://files.pythonhosted.org/packages/0a/aa/510dc933d87767584abfe03efa445889996c70c2990f6f87c3ebaa0a18c5/kiwisolver-1.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0df54df7e686afa55e6f21fb86195224a6d9beb71d637e8d7920c95cf0f89aac", size = 63911, upload-time = "2026-03-09T13:13:01.671Z" }, + { url = "https://files.pythonhosted.org/packages/80/46/bddc13df6c2a40741e0cc7865bb1c9ed4796b6760bd04ce5fae3928ef917/kiwisolver-1.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2517e24d7315eb51c10664cdb865195df38ab74456c677df67bb47f12d088a27", size = 1438209, upload-time = "2026-03-09T13:13:03.385Z" }, + { url = "https://files.pythonhosted.org/packages/fd/d6/76621246f5165e5372f02f5e6f3f48ea336a8f9e96e43997d45b240ed8cd/kiwisolver-1.5.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff710414307fefa903e0d9bdf300972f892c23477829f49504e59834f4195398", size = 1248888, upload-time = "2026-03-09T13:13:05.231Z" }, + { url = "https://files.pythonhosted.org/packages/b2/c1/31559ec6fb39a5b48035ce29bb63ade628f321785f38c384dee3e2c08bc1/kiwisolver-1.5.0-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6176c1811d9d5a04fa391c490cc44f451e240697a16977f11c6f722efb9041db", size = 1266304, upload-time = "2026-03-09T13:13:06.743Z" }, + { url = "https://files.pythonhosted.org/packages/5e/ef/1cb8276f2d29cc6a41e0a042f27946ca347d3a4a75acf85d0a16aa6dcc82/kiwisolver-1.5.0-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50847dca5d197fcbd389c805aa1a1cf32f25d2e7273dc47ab181a517666b68cc", size = 1319650, upload-time = "2026-03-09T13:13:08.607Z" }, + { url = "https://files.pythonhosted.org/packages/4c/e4/5ba3cecd7ce6236ae4a80f67e5d5531287337d0e1f076ca87a5abe4cd5d0/kiwisolver-1.5.0-cp311-cp311-manylinux_2_39_riscv64.whl", hash = "sha256:01808c6d15f4c3e8559595d6d1fe6411c68e4a3822b4b9972b44473b24f4e679", size = 970949, upload-time = "2026-03-09T13:13:10.299Z" }, + { url = "https://files.pythonhosted.org/packages/5a/69/dc61f7ae9a2f071f26004ced87f078235b5507ab6e5acd78f40365655034/kiwisolver-1.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:f1f9f4121ec58628c96baa3de1a55a4e3a333c5102c8e94b64e23bf7b2083309", size = 2199125, upload-time = "2026-03-09T13:13:11.841Z" }, + { url = "https://files.pythonhosted.org/packages/e5/7b/abbe0f1b5afa85f8d084b73e90e5f801c0939eba16ac2e49af7c61a6c28d/kiwisolver-1.5.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:b7d335370ae48a780c6e6a6bbfa97342f563744c39c35562f3f367665f5c1de2", size = 2293783, upload-time = "2026-03-09T13:13:14.399Z" }, + { url = "https://files.pythonhosted.org/packages/8a/80/5908ae149d96d81580d604c7f8aefd0e98f4fd728cf172f477e9f2a81744/kiwisolver-1.5.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:800ee55980c18545af444d93fdd60c56b580db5cc54867d8cbf8a1dc0829938c", size = 1960726, upload-time = "2026-03-09T13:13:16.047Z" }, + { url = "https://files.pythonhosted.org/packages/84/08/a78cb776f8c085b7143142ce479859cfec086bd09ee638a317040b6ef420/kiwisolver-1.5.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c438f6ca858697c9ab67eb28246c92508af972e114cac34e57a6d4ba17a3ac08", size = 2464738, upload-time = "2026-03-09T13:13:17.897Z" }, + { url = "https://files.pythonhosted.org/packages/b1/e1/65584da5356ed6cb12c63791a10b208860ac40a83de165cb6a6751a686e3/kiwisolver-1.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:8c63c91f95173f9c2a67c7c526b2cea976828a0e7fced9cdcead2802dc10f8a4", size = 2270718, upload-time = "2026-03-09T13:13:19.421Z" }, + { url = "https://files.pythonhosted.org/packages/be/6c/28f17390b62b8f2f520e2915095b3c94d88681ecf0041e75389d9667f202/kiwisolver-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:beb7f344487cdcb9e1efe4b7a29681b74d34c08f0043a327a74da852a6749e7b", size = 73480, upload-time = "2026-03-09T13:13:20.818Z" }, + { url = "https://files.pythonhosted.org/packages/d8/0e/2ee5debc4f77a625778fec5501ff3e8036fe361b7ee28ae402a485bb9694/kiwisolver-1.5.0-cp311-cp311-win_arm64.whl", hash = "sha256:ad4ae4ffd1ee9cd11357b4c66b612da9888f4f4daf2f36995eda64bd45370cac", size = 64930, upload-time = "2026-03-09T13:13:21.997Z" }, + { url = "https://files.pythonhosted.org/packages/4d/b2/818b74ebea34dabe6d0c51cb1c572e046730e64844da6ed646d5298c40ce/kiwisolver-1.5.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:4e9750bc21b886308024f8a54ccb9a2cc38ac9fa813bf4348434e3d54f337ff9", size = 123158, upload-time = "2026-03-09T13:13:23.127Z" }, + { url = "https://files.pythonhosted.org/packages/bf/d9/405320f8077e8e1c5c4bd6adc45e1e6edf6d727b6da7f2e2533cf58bff71/kiwisolver-1.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:72ec46b7eba5b395e0a7b63025490d3214c11013f4aacb4f5e8d6c3041829588", size = 66388, upload-time = "2026-03-09T13:13:24.765Z" }, + { url = "https://files.pythonhosted.org/packages/99/9f/795fedf35634f746151ca8839d05681ceb6287fbed6cc1c9bf235f7887c2/kiwisolver-1.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ed3a984b31da7481b103f68776f7128a89ef26ed40f4dc41a2223cda7fb24819", size = 64068, upload-time = "2026-03-09T13:13:25.878Z" }, + { url = "https://files.pythonhosted.org/packages/c4/13/680c54afe3e65767bed7ec1a15571e1a2f1257128733851ade24abcefbcc/kiwisolver-1.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bb5136fb5352d3f422df33f0c879a1b0c204004324150cc3b5e3c4f310c9049f", size = 1477934, upload-time = "2026-03-09T13:13:27.166Z" }, + { url = "https://files.pythonhosted.org/packages/c8/2f/cebfcdb60fd6a9b0f6b47a9337198bcbad6fbe15e68189b7011fd914911f/kiwisolver-1.5.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b2af221f268f5af85e776a73d62b0845fc8baf8ef0abfae79d29c77d0e776aaf", size = 1278537, upload-time = "2026-03-09T13:13:28.707Z" }, + { url = "https://files.pythonhosted.org/packages/f2/0d/9b782923aada3fafb1d6b84e13121954515c669b18af0c26e7d21f579855/kiwisolver-1.5.0-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b0f172dc8ffaccb8522d7c5d899de00133f2f1ca7b0a49b7da98e901de87bf2d", size = 1296685, upload-time = "2026-03-09T13:13:30.528Z" }, + { url = "https://files.pythonhosted.org/packages/27/70/83241b6634b04fe44e892688d5208332bde130f38e610c0418f9ede47ded/kiwisolver-1.5.0-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6ab8ba9152203feec73758dad83af9a0bbe05001eb4639e547207c40cfb52083", size = 1346024, upload-time = "2026-03-09T13:13:32.818Z" }, + { url = "https://files.pythonhosted.org/packages/e4/db/30ed226fb271ae1a6431fc0fe0edffb2efe23cadb01e798caeb9f2ceae8f/kiwisolver-1.5.0-cp312-cp312-manylinux_2_39_riscv64.whl", hash = "sha256:cdee07c4d7f6d72008d3f73b9bf027f4e11550224c7c50d8df1ae4a37c1402a6", size = 987241, upload-time = "2026-03-09T13:13:34.435Z" }, + { url = "https://files.pythonhosted.org/packages/ec/bd/c314595208e4c9587652d50959ead9e461995389664e490f4dce7ff0f782/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7c60d3c9b06fb23bd9c6139281ccbdc384297579ae037f08ae90c69f6845c0b1", size = 2227742, upload-time = "2026-03-09T13:13:36.4Z" }, + { url = "https://files.pythonhosted.org/packages/c1/43/0499cec932d935229b5543d073c2b87c9c22846aab48881e9d8d6e742a2d/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e315e5ec90d88e140f57696ff85b484ff68bb311e36f2c414aa4286293e6dee0", size = 2323966, upload-time = "2026-03-09T13:13:38.204Z" }, + { url = "https://files.pythonhosted.org/packages/3d/6f/79b0d760907965acfd9d61826a3d41f8f093c538f55cd2633d3f0db269f6/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:1465387ac63576c3e125e5337a6892b9e99e0627d52317f3ca79e6930d889d15", size = 1977417, upload-time = "2026-03-09T13:13:39.966Z" }, + { url = "https://files.pythonhosted.org/packages/ab/31/01d0537c41cb75a551a438c3c7a80d0c60d60b81f694dac83dd436aec0d0/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:530a3fd64c87cffa844d4b6b9768774763d9caa299e9b75d8eca6a4423b31314", size = 2491238, upload-time = "2026-03-09T13:13:41.698Z" }, + { url = "https://files.pythonhosted.org/packages/e4/34/8aefdd0be9cfd00a44509251ba864f5caf2991e36772e61c408007e7f417/kiwisolver-1.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1d9daea4ea6b9be74fe2f01f7fbade8d6ffab263e781274cffca0dba9be9eec9", size = 2294947, upload-time = "2026-03-09T13:13:43.343Z" }, + { url = "https://files.pythonhosted.org/packages/ad/cf/0348374369ca588f8fe9c338fae49fa4e16eeb10ffb3d012f23a54578a9e/kiwisolver-1.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:f18c2d9782259a6dc132fdc7a63c168cbc74b35284b6d75c673958982a378384", size = 73569, upload-time = "2026-03-09T13:13:45.792Z" }, + { url = "https://files.pythonhosted.org/packages/28/26/192b26196e2316e2bd29deef67e37cdf9870d9af8e085e521afff0fed526/kiwisolver-1.5.0-cp312-cp312-win_arm64.whl", hash = "sha256:f7c7553b13f69c1b29a5bde08ddc6d9d0c8bfb84f9ed01c30db25944aeb852a7", size = 64997, upload-time = "2026-03-09T13:13:46.878Z" }, + { url = "https://files.pythonhosted.org/packages/9d/69/024d6711d5ba575aa65d5538042e99964104e97fa153a9f10bc369182bc2/kiwisolver-1.5.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:fd40bb9cd0891c4c3cb1ddf83f8bbfa15731a248fdc8162669405451e2724b09", size = 123166, upload-time = "2026-03-09T13:13:48.032Z" }, + { url = "https://files.pythonhosted.org/packages/ce/48/adbb40df306f587054a348831220812b9b1d787aff714cfbc8556e38fccd/kiwisolver-1.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c0e1403fd7c26d77c1f03e096dc58a5c726503fa0db0456678b8668f76f521e3", size = 66395, upload-time = "2026-03-09T13:13:49.365Z" }, + { url = "https://files.pythonhosted.org/packages/a8/3a/d0a972b34e1c63e2409413104216cd1caa02c5a37cb668d1687d466c1c45/kiwisolver-1.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dda366d548e89a90d88a86c692377d18d8bd64b39c1fb2b92cb31370e2896bbd", size = 64065, upload-time = "2026-03-09T13:13:50.562Z" }, + { url = "https://files.pythonhosted.org/packages/2b/0a/7b98e1e119878a27ba8618ca1e18b14f992ff1eda40f47bccccf4de44121/kiwisolver-1.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:332b4f0145c30b5f5ad9374881133e5aa64320428a57c2c2b61e9d891a51c2f3", size = 1477903, upload-time = "2026-03-09T13:13:52.084Z" }, + { url = "https://files.pythonhosted.org/packages/18/d8/55638d89ffd27799d5cc3d8aa28e12f4ce7a64d67b285114dbedc8ea4136/kiwisolver-1.5.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0c50b89ffd3e1a911c69a1dd3de7173c0cd10b130f56222e57898683841e4f96", size = 1278751, upload-time = "2026-03-09T13:13:54.673Z" }, + { url = "https://files.pythonhosted.org/packages/b8/97/b4c8d0d18421ecceba20ad8701358453b88e32414e6f6950b5a4bad54e65/kiwisolver-1.5.0-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4db576bb8c3ef9365f8b40fe0f671644de6736ae2c27a2c62d7d8a1b4329f099", size = 1296793, upload-time = "2026-03-09T13:13:56.287Z" }, + { url = "https://files.pythonhosted.org/packages/c4/10/f862f94b6389d8957448ec9df59450b81bec4abb318805375c401a1e6892/kiwisolver-1.5.0-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0b85aad90cea8ac6797a53b5d5f2e967334fa4d1149f031c4537569972596cb8", size = 1346041, upload-time = "2026-03-09T13:13:58.269Z" }, + { url = "https://files.pythonhosted.org/packages/a3/6a/f1650af35821eaf09de398ec0bc2aefc8f211f0cda50204c9f1673741ba9/kiwisolver-1.5.0-cp313-cp313-manylinux_2_39_riscv64.whl", hash = "sha256:d36ca54cb4c6c4686f7cbb7b817f66f5911c12ddb519450bbe86707155028f87", size = 987292, upload-time = "2026-03-09T13:13:59.871Z" }, + { url = "https://files.pythonhosted.org/packages/de/19/d7fb82984b9238115fe629c915007be608ebd23dc8629703d917dbfaffd4/kiwisolver-1.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:38f4a703656f493b0ad185211ccfca7f0386120f022066b018eb5296d8613e23", size = 2227865, upload-time = "2026-03-09T13:14:01.401Z" }, + { url = "https://files.pythonhosted.org/packages/7f/b9/46b7f386589fd222dac9e9de9c956ce5bcefe2ee73b4e79891381dda8654/kiwisolver-1.5.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3ac2360e93cb41be81121755c6462cff3beaa9967188c866e5fce5cf13170859", size = 2324369, upload-time = "2026-03-09T13:14:02.972Z" }, + { url = "https://files.pythonhosted.org/packages/92/8b/95e237cf3d9c642960153c769ddcbe278f182c8affb20cecc1cc983e7cc5/kiwisolver-1.5.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c95cab08d1965db3d84a121f1c7ce7479bdd4072c9b3dafd8fecce48a2e6b902", size = 1977989, upload-time = "2026-03-09T13:14:04.503Z" }, + { url = "https://files.pythonhosted.org/packages/1b/95/980c9df53501892784997820136c01f62bc1865e31b82b9560f980c0e649/kiwisolver-1.5.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:fc20894c3d21194d8041a28b65622d5b86db786da6e3cfe73f0c762951a61167", size = 2491645, upload-time = "2026-03-09T13:14:06.106Z" }, + { url = "https://files.pythonhosted.org/packages/cb/32/900647fd0840abebe1561792c6b31e6a7c0e278fc3973d30572a965ca14c/kiwisolver-1.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:7a32f72973f0f950c1920475d5c5ea3d971b81b6f0ec53b8d0a956cc965f22e0", size = 2295237, upload-time = "2026-03-09T13:14:08.891Z" }, + { url = "https://files.pythonhosted.org/packages/be/8a/be60e3bbcf513cc5a50f4a3e88e1dcecebb79c1ad607a7222877becaa101/kiwisolver-1.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:0bf3acf1419fa93064a4c2189ac0b58e3be7872bf6ee6177b0d4c63dc4cea276", size = 73573, upload-time = "2026-03-09T13:14:12.327Z" }, + { url = "https://files.pythonhosted.org/packages/4d/d2/64be2e429eb4fca7f7e1c52a91b12663aeaf25de3895e5cca0f47ef2a8d0/kiwisolver-1.5.0-cp313-cp313-win_arm64.whl", hash = "sha256:fa8eb9ecdb7efb0b226acec134e0d709e87a909fa4971a54c0c4f6e88635484c", size = 64998, upload-time = "2026-03-09T13:14:13.469Z" }, + { url = "https://files.pythonhosted.org/packages/b0/69/ce68dd0c85755ae2de490bf015b62f2cea5f6b14ff00a463f9d0774449ff/kiwisolver-1.5.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:db485b3847d182b908b483b2ed133c66d88d49cacf98fd278fadafe11b4478d1", size = 125700, upload-time = "2026-03-09T13:14:14.636Z" }, + { url = "https://files.pythonhosted.org/packages/74/aa/937aac021cf9d4349990d47eb319309a51355ed1dbdc9c077cdc9224cb11/kiwisolver-1.5.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:be12f931839a3bdfe28b584db0e640a65a8bcbc24560ae3fdb025a449b3d754e", size = 67537, upload-time = "2026-03-09T13:14:15.808Z" }, + { url = "https://files.pythonhosted.org/packages/ee/20/3a87fbece2c40ad0f6f0aefa93542559159c5f99831d596050e8afae7a9f/kiwisolver-1.5.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:16b85d37c2cbb3253226d26e64663f755d88a03439a9c47df6246b35defbdfb7", size = 65514, upload-time = "2026-03-09T13:14:18.035Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7f/f943879cda9007c45e1f7dba216d705c3a18d6b35830e488b6c6a4e7cdf0/kiwisolver-1.5.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4432b835675f0ea7414aab3d37d119f7226d24869b7a829caeab49ebda407b0c", size = 1584848, upload-time = "2026-03-09T13:14:19.745Z" }, + { url = "https://files.pythonhosted.org/packages/37/f8/4d4f85cc1870c127c88d950913370dd76138482161cd07eabbc450deff01/kiwisolver-1.5.0-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b0feb50971481a2cc44d94e88bdb02cdd497618252ae226b8eb1201b957e368", size = 1391542, upload-time = "2026-03-09T13:14:21.54Z" }, + { url = "https://files.pythonhosted.org/packages/04/0b/65dd2916c84d252b244bd405303220f729e7c17c9d7d33dca6feeff9ffc4/kiwisolver-1.5.0-cp313-cp313t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:56fa888f10d0f367155e76ce849fa1166fc9730d13bd2d65a2aa13b6f5424489", size = 1404447, upload-time = "2026-03-09T13:14:23.205Z" }, + { url = "https://files.pythonhosted.org/packages/39/5c/2606a373247babce9b1d056c03a04b65f3cf5290a8eac5d7bdead0a17e21/kiwisolver-1.5.0-cp313-cp313t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:940dda65d5e764406b9fb92761cbf462e4e63f712ab60ed98f70552e496f3bf1", size = 1455918, upload-time = "2026-03-09T13:14:24.74Z" }, + { url = "https://files.pythonhosted.org/packages/d5/d1/c6078b5756670658e9192a2ef11e939c92918833d2745f85cd14a6004bdf/kiwisolver-1.5.0-cp313-cp313t-manylinux_2_39_riscv64.whl", hash = "sha256:89fc958c702ee9a745e4700378f5d23fddbc46ff89e8fdbf5395c24d5c1452a3", size = 1072856, upload-time = "2026-03-09T13:14:26.597Z" }, + { url = "https://files.pythonhosted.org/packages/cb/c8/7def6ddf16eb2b3741d8b172bdaa9af882b03c78e9b0772975408801fa63/kiwisolver-1.5.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9027d773c4ff81487181a925945743413f6069634d0b122d0b37684ccf4f1e18", size = 2333580, upload-time = "2026-03-09T13:14:28.237Z" }, + { url = "https://files.pythonhosted.org/packages/9e/87/2ac1fce0eb1e616fcd3c35caa23e665e9b1948bb984f4764790924594128/kiwisolver-1.5.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:5b233ea3e165e43e35dba1d2b8ecc21cf070b45b65ae17dd2747d2713d942021", size = 2423018, upload-time = "2026-03-09T13:14:30.018Z" }, + { url = "https://files.pythonhosted.org/packages/67/13/c6700ccc6cc218716bfcda4935e4b2997039869b4ad8a94f364c5a3b8e63/kiwisolver-1.5.0-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:ce9bf03dad3b46408c08649c6fbd6ca28a9fce0eb32fdfffa6775a13103b5310", size = 2062804, upload-time = "2026-03-09T13:14:32.888Z" }, + { url = "https://files.pythonhosted.org/packages/1b/bd/877056304626943ff0f1f44c08f584300c199b887cb3176cd7e34f1515f1/kiwisolver-1.5.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:fc4d3f1fb9ca0ae9f97b095963bc6326f1dbfd3779d6679a1e016b9baaa153d3", size = 2597482, upload-time = "2026-03-09T13:14:34.971Z" }, + { url = "https://files.pythonhosted.org/packages/75/19/c60626c47bf0f8ac5dcf72c6c98e266d714f2fbbfd50cf6dab5ede3aaa50/kiwisolver-1.5.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:f443b4825c50a51ee68585522ab4a1d1257fac65896f282b4c6763337ac9f5d2", size = 2394328, upload-time = "2026-03-09T13:14:36.816Z" }, + { url = "https://files.pythonhosted.org/packages/47/84/6a6d5e5bb8273756c27b7d810d47f7ef2f1f9b9fd23c9ee9a3f8c75c9cef/kiwisolver-1.5.0-cp313-cp313t-win_arm64.whl", hash = "sha256:893ff3a711d1b515ba9da14ee090519bad4610ed1962fbe298a434e8c5f8db53", size = 68410, upload-time = "2026-03-09T13:14:38.695Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d7/060f45052f2a01ad5762c8fdecd6d7a752b43400dc29ff75cd47225a40fd/kiwisolver-1.5.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8df31fe574b8b3993cc61764f40941111b25c2d9fea13d3ce24a49907cd2d615", size = 123231, upload-time = "2026-03-09T13:14:41.323Z" }, + { url = "https://files.pythonhosted.org/packages/c2/a7/78da680eadd06ff35edef6ef68a1ad273bad3e2a0936c9a885103230aece/kiwisolver-1.5.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:1d49a49ac4cbfb7c1375301cd1ec90169dfeae55ff84710d782260ce77a75a02", size = 66489, upload-time = "2026-03-09T13:14:42.534Z" }, + { url = "https://files.pythonhosted.org/packages/49/b2/97980f3ad4fae37dd7fe31626e2bf75fbf8bdf5d303950ec1fab39a12da8/kiwisolver-1.5.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0cbe94b69b819209a62cb27bdfa5dc2a8977d8de2f89dfd97ba4f53ed3af754e", size = 64063, upload-time = "2026-03-09T13:14:44.759Z" }, + { url = "https://files.pythonhosted.org/packages/e7/f9/b06c934a6aa8bc91f566bd2a214fd04c30506c2d9e2b6b171953216a65b6/kiwisolver-1.5.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:80aa065ffd378ff784822a6d7c3212f2d5f5e9c3589614b5c228b311fd3063ac", size = 1475913, upload-time = "2026-03-09T13:14:46.247Z" }, + { url = "https://files.pythonhosted.org/packages/6b/f0/f768ae564a710135630672981231320bc403cf9152b5596ec5289de0f106/kiwisolver-1.5.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e7f886f47ab881692f278ae901039a234e4025a68e6dfab514263a0b1c4ae05", size = 1282782, upload-time = "2026-03-09T13:14:48.458Z" }, + { url = "https://files.pythonhosted.org/packages/e2/9f/1de7aad00697325f05238a5f2eafbd487fb637cc27a558b5367a5f37fb7f/kiwisolver-1.5.0-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5060731cc3ed12ca3a8b57acd4aeca5bbc2f49216dd0bec1650a1acd89486bcd", size = 1300815, upload-time = "2026-03-09T13:14:50.721Z" }, + { url = "https://files.pythonhosted.org/packages/5a/c2/297f25141d2e468e0ce7f7a7b92e0cf8918143a0cbd3422c1ad627e85a06/kiwisolver-1.5.0-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7a4aa69609f40fce3cbc3f87b2061f042eee32f94b8f11db707b66a26461591a", size = 1347925, upload-time = "2026-03-09T13:14:52.304Z" }, + { url = "https://files.pythonhosted.org/packages/b9/d3/f4c73a02eb41520c47610207b21afa8cdd18fdbf64ffd94674ae21c4812d/kiwisolver-1.5.0-cp314-cp314-manylinux_2_39_riscv64.whl", hash = "sha256:d168fda2dbff7b9b5f38e693182d792a938c31db4dac3a80a4888de603c99554", size = 991322, upload-time = "2026-03-09T13:14:54.637Z" }, + { url = "https://files.pythonhosted.org/packages/7b/46/d3f2efef7732fcda98d22bf4ad5d3d71d545167a852ca710a494f4c15343/kiwisolver-1.5.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:413b820229730d358efd838ecbab79902fe97094565fdc80ddb6b0a18c18a581", size = 2232857, upload-time = "2026-03-09T13:14:56.471Z" }, + { url = "https://files.pythonhosted.org/packages/3f/ec/2d9756bf2b6d26ae4349b8d3662fb3993f16d80c1f971c179ce862b9dbae/kiwisolver-1.5.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:5124d1ea754509b09e53738ec185584cc609aae4a3b510aaf4ed6aa047ef9303", size = 2329376, upload-time = "2026-03-09T13:14:58.072Z" }, + { url = "https://files.pythonhosted.org/packages/8f/9f/876a0a0f2260f1bde92e002b3019a5fabc35e0939c7d945e0fa66185eb20/kiwisolver-1.5.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e4415a8db000bf49a6dd1c478bf70062eaacff0f462b92b0ba68791a905861f9", size = 1982549, upload-time = "2026-03-09T13:14:59.668Z" }, + { url = "https://files.pythonhosted.org/packages/6c/4f/ba3624dfac23a64d54ac4179832860cb537c1b0af06024936e82ca4154a0/kiwisolver-1.5.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:d618fd27420381a4f6044faa71f46d8bfd911bd077c555f7138ed88729bfbe79", size = 2494680, upload-time = "2026-03-09T13:15:01.364Z" }, + { url = "https://files.pythonhosted.org/packages/39/b7/97716b190ab98911b20d10bf92eca469121ec483b8ce0edd314f51bc85af/kiwisolver-1.5.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5092eb5b1172947f57d6ea7d89b2f29650414e4293c47707eb499ec07a0ac796", size = 2297905, upload-time = "2026-03-09T13:15:03.925Z" }, + { url = "https://files.pythonhosted.org/packages/a3/36/4e551e8aa55c9188bca9abb5096805edbf7431072b76e2298e34fd3a3008/kiwisolver-1.5.0-cp314-cp314-win_amd64.whl", hash = "sha256:d76e2d8c75051d58177e762164d2e9ab92886534e3a12e795f103524f221dd8e", size = 75086, upload-time = "2026-03-09T13:15:07.775Z" }, + { url = "https://files.pythonhosted.org/packages/70/15/9b90f7df0e31a003c71649cf66ef61c3c1b862f48c81007fa2383c8bd8d7/kiwisolver-1.5.0-cp314-cp314-win_arm64.whl", hash = "sha256:fa6248cd194edff41d7ea9425ced8ca3a6f838bfb295f6f1d6e6bb694a8518df", size = 66577, upload-time = "2026-03-09T13:15:09.139Z" }, + { url = "https://files.pythonhosted.org/packages/17/01/7dc8c5443ff42b38e72731643ed7cf1ed9bf01691ae5cdca98501999ed83/kiwisolver-1.5.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:d1ffeb80b5676463d7a7d56acbe8e37a20ce725570e09549fe738e02ca6b7e1e", size = 125794, upload-time = "2026-03-09T13:15:10.525Z" }, + { url = "https://files.pythonhosted.org/packages/46/8a/b4ebe46ebaac6a303417fab10c2e165c557ddaff558f9699d302b256bc53/kiwisolver-1.5.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:bc4d8e252f532ab46a1de9349e2d27b91fce46736a9eedaa37beaca66f574ed4", size = 67646, upload-time = "2026-03-09T13:15:12.016Z" }, + { url = "https://files.pythonhosted.org/packages/60/35/10a844afc5f19d6f567359bf4789e26661755a2f36200d5d1ed8ad0126e5/kiwisolver-1.5.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6783e069732715ad0c3ce96dbf21dbc2235ab0593f2baf6338101f70371f4028", size = 65511, upload-time = "2026-03-09T13:15:13.311Z" }, + { url = "https://files.pythonhosted.org/packages/f8/8a/685b297052dd041dcebce8e8787b58923b6e78acc6115a0dc9189011c44b/kiwisolver-1.5.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e7c4c09a490dc4d4a7f8cbee56c606a320f9dc28cf92a7157a39d1ce7676a657", size = 1584858, upload-time = "2026-03-09T13:15:15.103Z" }, + { url = "https://files.pythonhosted.org/packages/9e/80/04865e3d4638ac5bddec28908916df4a3075b8c6cc101786a96803188b96/kiwisolver-1.5.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2a075bd7bd19c70cf67c8badfa36cf7c5d8de3c9ddb8420c51e10d9c50e94920", size = 1392539, upload-time = "2026-03-09T13:15:16.661Z" }, + { url = "https://files.pythonhosted.org/packages/ba/01/77a19cacc0893fa13fafa46d1bba06fb4dc2360b3292baf4b56d8e067b24/kiwisolver-1.5.0-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bdd3e53429ff02aa319ba59dfe4ceeec345bf46cf180ec2cf6fd5b942e7975e9", size = 1405310, upload-time = "2026-03-09T13:15:18.229Z" }, + { url = "https://files.pythonhosted.org/packages/53/39/bcaf5d0cca50e604cfa9b4e3ae1d64b50ca1ae5b754122396084599ef903/kiwisolver-1.5.0-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3cdcb35dc9d807259c981a85531048ede628eabcffb3239adf3d17463518992d", size = 1456244, upload-time = "2026-03-09T13:15:20.444Z" }, + { url = "https://files.pythonhosted.org/packages/d0/7a/72c187abc6975f6978c3e39b7cf67aeb8b3c0a8f9790aa7fd412855e9e1f/kiwisolver-1.5.0-cp314-cp314t-manylinux_2_39_riscv64.whl", hash = "sha256:70d593af6a6ca332d1df73d519fddb5148edb15cd90d5f0155e3746a6d4fcc65", size = 1073154, upload-time = "2026-03-09T13:15:22.039Z" }, + { url = "https://files.pythonhosted.org/packages/c7/ca/cf5b25783ebbd59143b4371ed0c8428a278abe68d6d0104b01865b1bbd0f/kiwisolver-1.5.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:377815a8616074cabbf3f53354e1d040c35815a134e01d7614b7692e4bf8acfa", size = 2334377, upload-time = "2026-03-09T13:15:23.741Z" }, + { url = "https://files.pythonhosted.org/packages/4a/e5/b1f492adc516796e88751282276745340e2a72dcd0d36cf7173e0daf3210/kiwisolver-1.5.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:0255a027391d52944eae1dbb5d4cc5903f57092f3674e8e544cdd2622826b3f0", size = 2425288, upload-time = "2026-03-09T13:15:25.789Z" }, + { url = "https://files.pythonhosted.org/packages/e6/e5/9b21fbe91a61b8f409d74a26498706e97a48008bfcd1864373d32a6ba31c/kiwisolver-1.5.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:012b1eb16e28718fa782b5e61dc6f2da1f0792ca73bd05d54de6cb9561665fc9", size = 2063158, upload-time = "2026-03-09T13:15:27.63Z" }, + { url = "https://files.pythonhosted.org/packages/b1/02/83f47986138310f95ea95531f851b2a62227c11cbc3e690ae1374fe49f0f/kiwisolver-1.5.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:0e3aafb33aed7479377e5e9a82e9d4bf87063741fc99fc7ae48b0f16e32bdd6f", size = 2597260, upload-time = "2026-03-09T13:15:29.421Z" }, + { url = "https://files.pythonhosted.org/packages/07/18/43a5f24608d8c313dd189cf838c8e68d75b115567c6279de7796197cfb6a/kiwisolver-1.5.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:e7a116ae737f0000343218c4edf5bd45893bfeaff0993c0b215d7124c9f77646", size = 2394403, upload-time = "2026-03-09T13:15:31.517Z" }, + { url = "https://files.pythonhosted.org/packages/3b/b5/98222136d839b8afabcaa943b09bd05888c2d36355b7e448550211d1fca4/kiwisolver-1.5.0-cp314-cp314t-win_amd64.whl", hash = "sha256:1dd9b0b119a350976a6d781e7278ec7aca0b201e1a9e2d23d9804afecb6ca681", size = 79687, upload-time = "2026-03-09T13:15:33.204Z" }, + { url = "https://files.pythonhosted.org/packages/99/a2/ca7dc962848040befed12732dff6acae7fb3c4f6fc4272b3f6c9a30b8713/kiwisolver-1.5.0-cp314-cp314t-win_arm64.whl", hash = "sha256:58f812017cd2985c21fbffb4864d59174d4903dd66fa23815e74bbc7a0e2dd57", size = 70032, upload-time = "2026-03-09T13:15:34.411Z" }, + { url = "https://files.pythonhosted.org/packages/1c/fa/2910df836372d8761bb6eff7d8bdcb1613b5c2e03f260efe7abe34d388a7/kiwisolver-1.5.0-graalpy312-graalpy250_312_native-macosx_10_13_x86_64.whl", hash = "sha256:5ae8e62c147495b01a0f4765c878e9bfdf843412446a247e28df59936e99e797", size = 130262, upload-time = "2026-03-09T13:15:35.629Z" }, + { url = "https://files.pythonhosted.org/packages/0f/41/c5f71f9f00aabcc71fee8b7475e3f64747282580c2fe748961ba29b18385/kiwisolver-1.5.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:f6764a4ccab3078db14a632420930f6186058750df066b8ea2a7106df91d3203", size = 138036, upload-time = "2026-03-09T13:15:36.894Z" }, + { url = "https://files.pythonhosted.org/packages/fa/06/7399a607f434119c6e1fdc8ec89a8d51ccccadf3341dee4ead6bd14caaf5/kiwisolver-1.5.0-graalpy312-graalpy250_312_native-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c31c13da98624f957b0fb1b5bae5383b2333c2c3f6793d9825dd5ce79b525cb7", size = 194295, upload-time = "2026-03-09T13:15:38.22Z" }, + { url = "https://files.pythonhosted.org/packages/b5/91/53255615acd2a1eaca307ede3c90eb550bae9c94581f8c00081b6b1c8f44/kiwisolver-1.5.0-graalpy312-graalpy250_312_native-win_amd64.whl", hash = "sha256:1f1489f769582498610e015a8ef2d36f28f505ab3096d0e16b4858a9ec214f57", size = 75987, upload-time = "2026-03-09T13:15:39.65Z" }, + { url = "https://files.pythonhosted.org/packages/e9/eb/5fcbbbf9a0e2c3a35effb88831a483345326bbc3a030a3b5b69aee647f84/kiwisolver-1.5.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ec4c85dc4b687c7f7f15f553ff26a98bfe8c58f5f7f0ac8905f0ba4c7be60232", size = 59532, upload-time = "2026-03-09T13:15:47.047Z" }, + { url = "https://files.pythonhosted.org/packages/c3/9b/e17104555bb4db148fd52327feea1e96be4b88e8e008b029002c281a21ab/kiwisolver-1.5.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:12e91c215a96e39f57989c8912ae761286ac5a9584d04030ceb3368a357f017a", size = 57420, upload-time = "2026-03-09T13:15:48.199Z" }, + { url = "https://files.pythonhosted.org/packages/48/44/2b5b95b7aa39fb2d8d9d956e0f3d5d45aef2ae1d942d4c3ffac2f9cfed1a/kiwisolver-1.5.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:be4a51a55833dc29ab5d7503e7bcb3b3af3402d266018137127450005cdfe737", size = 79892, upload-time = "2026-03-09T13:15:49.694Z" }, + { url = "https://files.pythonhosted.org/packages/52/7d/7157f9bba6b455cfb4632ed411e199fc8b8977642c2b12082e1bd9e6d173/kiwisolver-1.5.0-pp311-pypy311_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:daae526907e262de627d8f70058a0f64acc9e2641c164c99c8f594b34a799a16", size = 77603, upload-time = "2026-03-09T13:15:50.945Z" }, + { url = "https://files.pythonhosted.org/packages/0a/dd/8050c947d435c8d4bc94e3252f4d8bb8a76cfb424f043a8680be637a57f1/kiwisolver-1.5.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:59cd8683f575d96df5bb48f6add94afc055012c29e28124fcae2b63661b9efb1", size = 73558, upload-time = "2026-03-09T13:15:52.112Z" }, ] [[package]] @@ -4075,7 +4091,7 @@ wheels = [ [[package]] name = "posthog" -version = "7.9.7" +version = "7.9.8" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "backoff", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, @@ -4085,9 +4101,9 @@ dependencies = [ { name = "six", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, { name = "typing-extensions", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/16/08/e5064ae25749367f38f6d204ce876a045ecf4fd01ed0e66477364925416c/posthog-7.9.7.tar.gz", hash = "sha256:35dcaf4acc37b386b5ebcd6037cc80821e88d359627c0f61537c667c52359483", size = 175634, upload-time = "2026-03-05T22:09:51.979Z" } +sdist = { url = "https://files.pythonhosted.org/packages/63/f5/490fbe0cd357bf5efaa026200d2a29aaa5e39cd8272cfe0e2d449f46f2db/posthog-7.9.8.tar.gz", hash = "sha256:52b1fa5f3d3faf2ee2fb7f5eb375332905887f7c1e386ef45103448413bd3e57", size = 176688, upload-time = "2026-03-09T14:34:07.822Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ed/8a/3e4dd145d7d5aaad856d522c61475c51ee80b512b6446bfb3966b2dedf66/posthog-7.9.7-py3-none-any.whl", hash = "sha256:204e47c27dcc230d0bc9b323709c36f98f86e79fa8190caea3b1fbc3c999b1a0", size = 201316, upload-time = "2026-03-05T22:09:50.18Z" }, + { url = "https://files.pythonhosted.org/packages/0f/aa/8b3de1650e0c39223c7f9b7c0f4961f7d39bfa690fa800a9521565381ecb/posthog-7.9.8-py3-none-any.whl", hash = "sha256:2735bcc3232e22c88034454e820c1739f4b29e606d55f31e56b52202650e4330", size = 202361, upload-time = "2026-03-09T14:34:06.031Z" }, ] [[package]] @@ -4105,26 +4121,26 @@ wheels = [ [[package]] name = "prek" -version = "0.3.4" +version = "0.3.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c6/51/2324eaad93a4b144853ca1c56da76f357d3a70c7b4fd6659e972d7bb8660/prek-0.3.4.tar.gz", hash = "sha256:56a74d02d8b7dfe3c774ecfcd8c1b4e5f1e1b84369043a8003e8e3a779fce72d", size = 356633, upload-time = "2026-02-28T03:47:13.452Z" } +sdist = { url = "https://files.pythonhosted.org/packages/46/d6/277e002e56eeab3a9d48f1ca4cc067d249d6326fc1783b770d70ad5ae2be/prek-0.3.5.tar.gz", hash = "sha256:ca40b6685a4192256bc807f32237af94bf9b8799c0d708b98735738250685642", size = 374806, upload-time = "2026-03-09T10:35:18.842Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/09/20/1a964cb72582307c2f1dc7f583caab90f42810ad41551e5220592406a4c3/prek-0.3.4-py3-none-linux_armv6l.whl", hash = "sha256:c35192d6e23fe7406bd2f333d1c7dab1a4b34ab9289789f453170f33550aa74d", size = 4641915, upload-time = "2026-02-28T03:47:03.772Z" }, - { url = "https://files.pythonhosted.org/packages/c5/cb/4a21f37102bac37e415b61818344aa85de8d29a581253afa7db8c08d5a33/prek-0.3.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6f784d78de72a8bbe58a5fe7bde787c364ae88f0aff5222c5c5c7287876c510a", size = 4649166, upload-time = "2026-02-28T03:47:06.164Z" }, - { url = "https://files.pythonhosted.org/packages/85/9c/a7c0d117a098d57931428bdb60fcb796e0ebc0478c59288017a2e22eca96/prek-0.3.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:50a43f522625e8c968e8c9992accf9e29017abad6c782d6d176b73145ad680b7", size = 4274422, upload-time = "2026-02-28T03:46:59.356Z" }, - { url = "https://files.pythonhosted.org/packages/59/84/81d06df1724d09266df97599a02543d82fde7dfaefd192f09d9b2ccb092f/prek-0.3.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:4bbb1d3912a88935f35c6ba4466b4242732e3e3a8c608623c708e83cea85de00", size = 4629873, upload-time = "2026-02-28T03:46:56.419Z" }, - { url = "https://files.pythonhosted.org/packages/09/cd/bb0aefa25cfacd8dbced75b9a9d9945707707867fa5635fb69ae1bbc2d88/prek-0.3.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ca4d4134db8f6e8de3c418317becdf428957e3cab271807f475318105fd46d04", size = 4552507, upload-time = "2026-02-28T03:47:05.004Z" }, - { url = "https://files.pythonhosted.org/packages/9b/c0/578a7af4861afb64ec81c03bfdcc1bb3341bb61f2fff8a094ecf13987a56/prek-0.3.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fb6395f6eb76133bb1e11fc718db8144522466cdc2e541d05e7813d1bbcae7d", size = 4865929, upload-time = "2026-02-28T03:47:09.231Z" }, - { url = "https://files.pythonhosted.org/packages/fc/48/f169406590028f7698ef2e1ff5bffd92ca05e017636c1163a2f5ef0f8275/prek-0.3.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aae17813239ddcb4ae7b38418de4d49afff740f48f8e0556029c96f58e350412", size = 5390286, upload-time = "2026-02-28T03:47:10.796Z" }, - { url = "https://files.pythonhosted.org/packages/05/c5/98a73fec052059c3ae06ce105bef67caca42334c56d84e9ef75df72ba152/prek-0.3.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10a621a690d9c127afc3d21c275030d364d1fbef3296c095068d3ae80a59546e", size = 4891028, upload-time = "2026-02-28T03:47:07.916Z" }, - { url = "https://files.pythonhosted.org/packages/a3/b4/029966e35e59b59c142be7e1d2208ad261709ac1a66aa4a3ce33c5b9f91f/prek-0.3.4-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:d978c31bc3b1f0b3d58895b7c6ac26f077e0ea846da54f46aeee4c7088b1b105", size = 4633986, upload-time = "2026-02-28T03:47:14.351Z" }, - { url = "https://files.pythonhosted.org/packages/1d/27/d122802555745b6940c99fcb41496001c192ddcdf56ec947ec10a0298e05/prek-0.3.4-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a8e089a030f0a023c22a4bb2ec4ff3fcc153585d701cff67acbfca2f37e173ae", size = 4680722, upload-time = "2026-02-28T03:47:12.224Z" }, - { url = "https://files.pythonhosted.org/packages/34/40/92318c96b3a67b4e62ed82741016ede34d97ea9579d3cc1332b167632222/prek-0.3.4-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:8060c72b764f0b88112616763da9dd3a7c293e010f8520b74079893096160a2f", size = 4535623, upload-time = "2026-02-28T03:46:52.221Z" }, - { url = "https://files.pythonhosted.org/packages/df/f5/6b383d94e722637da4926b4f609d36fe432827bb6f035ad46ee02bde66b6/prek-0.3.4-py3-none-musllinux_1_1_i686.whl", hash = "sha256:65b23268456b5a763278d4e1ec532f2df33918f13ded85869a1ddff761eb9697", size = 4729879, upload-time = "2026-02-28T03:46:57.886Z" }, - { url = "https://files.pythonhosted.org/packages/79/f8/fdc705b807d813fd713ffa4f67f96741542ed1dafbb221206078c06f3df4/prek-0.3.4-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:3975c61139c7b3200e38dc3955e050b0f2615701d3deb9715696a902e850509e", size = 5001569, upload-time = "2026-02-28T03:47:00.892Z" }, - { url = "https://files.pythonhosted.org/packages/84/92/b007a41f58e8192a1e611a21b396ad870d51d7873b7af12068ebae7fc15f/prek-0.3.4-py3-none-win32.whl", hash = "sha256:37449ae82f4dc08b72e542401e3d7318f05d1163e87c31ab260a40f425d6516e", size = 4297057, upload-time = "2026-02-28T03:47:02.219Z" }, - { url = "https://files.pythonhosted.org/packages/bb/dc/bcb02de9b11461e8e0c7d3c8fdf8cfa15ac6efe73472a4375549ba5defd2/prek-0.3.4-py3-none-win_amd64.whl", hash = "sha256:60e9aa86ca65de963510ae28c5d94b9d7a97bcbaa6e4cdb5bf5083ed4c45dc71", size = 4655174, upload-time = "2026-02-28T03:46:53.749Z" }, - { url = "https://files.pythonhosted.org/packages/0b/86/98f5598569f4cd3de7161e266fab6a8981e65555f79d4704810c1502ad0a/prek-0.3.4-py3-none-win_arm64.whl", hash = "sha256:486bdae8f4512d3b4f6eb61b83e5b7595da2adca385af4b2b7823c0ab38d1827", size = 4367817, upload-time = "2026-02-28T03:46:55.264Z" }, + { url = "https://files.pythonhosted.org/packages/8f/a9/16dd8d3a50362ebccffe58518af1f1f571c96f0695d7fcd8bbd386585f58/prek-0.3.5-py3-none-linux_armv6l.whl", hash = "sha256:44b3e12791805804f286d103682b42a84e0f98a2687faa37045e9d3375d3d73d", size = 5105604, upload-time = "2026-03-09T10:35:00.332Z" }, + { url = "https://files.pythonhosted.org/packages/e4/74/bc6036f5bf03860cda66ab040b32737e54802b71a81ec381839deb25df9e/prek-0.3.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e3cb451cc51ac068974557491beb4c7d2d41dfde29ed559c1694c8ce23bf53e8", size = 5506155, upload-time = "2026-03-09T10:35:17.64Z" }, + { url = "https://files.pythonhosted.org/packages/02/d9/a3745c2a10509c63b6a118ada766614dd705efefd08f275804d5c807aa4a/prek-0.3.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:ad8f5f0d8da53dc94d00b76979af312b3dacccc9dcbc6417756c5dca3633c052", size = 5100383, upload-time = "2026-03-09T10:35:13.302Z" }, + { url = "https://files.pythonhosted.org/packages/43/8e/de965fc515d39309a332789cd3778161f7bc80cde15070bedf17f9f8cb93/prek-0.3.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:4511e15d34072851ac88e4b2006868fbe13655059ad941d7a0ff9ee17138fd9f", size = 5334913, upload-time = "2026-03-09T10:35:14.813Z" }, + { url = "https://files.pythonhosted.org/packages/3f/8c/44f07e8940256059cfd82520e3cbe0764ab06ddb4aa43148465db00b39ad/prek-0.3.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fcc0b63b8337e2046f51267facaac63ba755bc14aad53991840a5eccba3e5c28", size = 5033825, upload-time = "2026-03-09T10:35:06.976Z" }, + { url = "https://files.pythonhosted.org/packages/94/85/3ff0f96881ff2360c212d310ff23c3cf5a15b223d34fcfa8cdcef203be69/prek-0.3.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5fc0d78c3896a674aeb8247a83bbda7efec85274dbdfbc978ceff8d37e4ed20", size = 5438586, upload-time = "2026-03-09T10:34:58.779Z" }, + { url = "https://files.pythonhosted.org/packages/79/a5/c6d08d31293400fcb5d427f8e7e6bacfc959988e868ad3a9d97b4d87c4b7/prek-0.3.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64cad21cb9072d985179495b77b312f6b81e7b45357d0c68dc1de66e0408eabc", size = 6359714, upload-time = "2026-03-09T10:34:57.454Z" }, + { url = "https://files.pythonhosted.org/packages/ba/18/321dcff9ece8065d42c8c1c7a53a23b45d2b4330aa70993be75dc5f2822f/prek-0.3.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45ee84199bb48e013bdfde0c84352c17a44cc42d5792681b86d94e9474aab6f8", size = 5717632, upload-time = "2026-03-09T10:35:08.634Z" }, + { url = "https://files.pythonhosted.org/packages/a3/7f/1288226aa381d0cea403157f4e6b64b356e1a745f2441c31dd9d8a1d63da/prek-0.3.5-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:f43275e5d564e18e52133129ebeb5cb071af7ce4a547766c7f025aa0955dfbb6", size = 5339040, upload-time = "2026-03-09T10:35:03.665Z" }, + { url = "https://files.pythonhosted.org/packages/22/94/cfec83df9c2b8e7ed1608087bcf9538a6a77b4c2e7365123e9e0a3162cd1/prek-0.3.5-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:abcee520d31522bcbad9311f21326b447694cd5edba33618c25fd023fc9865ec", size = 5162586, upload-time = "2026-03-09T10:35:11.564Z" }, + { url = "https://files.pythonhosted.org/packages/13/b7/741d62132f37a5f7cc0fad1168bd31f20dea9628f482f077f569547e0436/prek-0.3.5-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:499c56a94a155790c75a973d351a33f8065579d9094c93f6d451ada5d1e469be", size = 5002933, upload-time = "2026-03-09T10:35:16.347Z" }, + { url = "https://files.pythonhosted.org/packages/6f/83/630a5671df6550fcfa67c54955e8a8174eb9b4d97ac38fb05a362029245b/prek-0.3.5-py3-none-musllinux_1_1_i686.whl", hash = "sha256:de1065b59f194624adc9dea269d4ff6b50e98a1b5bb662374a9adaa496b3c1eb", size = 5304934, upload-time = "2026-03-09T10:35:09.975Z" }, + { url = "https://files.pythonhosted.org/packages/de/79/67a7afd0c0b6c436630b7dba6e586a42d21d5d6e5778fbd9eba7bbd3dd26/prek-0.3.5-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:a1c4869e45ee341735d07179da3a79fa2afb5959cef8b3c8a71906eb52dc6933", size = 5829914, upload-time = "2026-03-09T10:35:05.39Z" }, + { url = "https://files.pythonhosted.org/packages/37/47/e2fe13b33e7b5fdd9dd1a312f5440208bfe1be6183e54c5c99c10f27d848/prek-0.3.5-py3-none-win32.whl", hash = "sha256:70b2152ecedc58f3f4f69adc884617b0cf44259f7414c44d6268ea6f107672eb", size = 4836910, upload-time = "2026-03-09T10:35:01.884Z" }, + { url = "https://files.pythonhosted.org/packages/6b/ab/dc2a139fd4896d11f39631479ed385e86307af7f54059ebe9414bb0d00c6/prek-0.3.5-py3-none-win_amd64.whl", hash = "sha256:01d031b684f7e1546225393af1268d9b4451a44ef6cb9be4101c85c7862e08db", size = 5234234, upload-time = "2026-03-09T10:35:20.193Z" }, + { url = "https://files.pythonhosted.org/packages/ed/38/f7256b4b7581444f658e909c3b566f51bfabe56c03e80d107a6932d62040/prek-0.3.5-py3-none-win_arm64.whl", hash = "sha256:aa774168e3d868039ff79422bdef2df8d5a016ed804a9914607dcdd3d41da053", size = 5083330, upload-time = "2026-03-09T10:34:55.469Z" }, ] [[package]] @@ -5378,11 +5394,11 @@ wheels = [ [[package]] name = "setuptools" -version = "82.0.0" +version = "82.0.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/82/f3/748f4d6f65d1756b9ae577f329c951cda23fb900e4de9f70900ced962085/setuptools-82.0.0.tar.gz", hash = "sha256:22e0a2d69474c6ae4feb01951cb69d515ed23728cf96d05513d36e42b62b37cb", size = 1144893, upload-time = "2026-02-08T15:08:40.206Z" } +sdist = { url = "https://files.pythonhosted.org/packages/4f/db/cfac1baf10650ab4d1c111714410d2fbb77ac5a616db26775db562c8fab2/setuptools-82.0.1.tar.gz", hash = "sha256:7d872682c5d01cfde07da7bccc7b65469d3dca203318515ada1de5eda35efbf9", size = 1152316, upload-time = "2026-03-09T12:47:17.221Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e1/c6/76dc613121b793286a3f91621d7b75a2b493e0390ddca50f11993eadf192/setuptools-82.0.0-py3-none-any.whl", hash = "sha256:70b18734b607bd1da571d097d236cfcfacaf01de45717d59e6e04b96877532e0", size = 1003468, upload-time = "2026-02-08T15:08:38.723Z" }, + { url = "https://files.pythonhosted.org/packages/9d/76/f789f7a86709c6b087c5a2f52f911838cad707cc613162401badc665acfe/setuptools-82.0.1-py3-none-any.whl", hash = "sha256:a59e362652f08dcd477c78bb6e7bd9d80a7995bc73ce773050228a348ce2e5bb", size = 1006223, upload-time = "2026-03-09T12:47:15.026Z" }, ] [[package]] From 09b3e2e4f00eed114dafd3f144f564e8aef20599 Mon Sep 17 00:00:00 2001 From: Ahmed Muhsin <36454324+ahmedmuhsin@users.noreply.github.com> Date: Tue, 10 Mar 2026 14:29:33 -0500 Subject: [PATCH 25/44] Python: Prevent pickle deserialization of untrusted HITL HTTP input (#4566) * fix: prevent pickle deserialization of untrusted HITL input Add strip_pickle_markers() to sanitize HTTP input before it reaches pickle.loads() via the checkpoint decoding path. Applied as a 3-layer defence-in-depth: 1. _app.py: sanitize req.get_json() at the HTTP boundary 2. _workflow.py: sanitize in _deserialize_hitl_response() before decode 3. _serialization.py: sanitize in reconstruct_to_type() as final guard Any dict containing __pickled__ or __type__ markers from untrusted sources is replaced with None, blocking arbitrary code execution via crafted payloads to POST /workflow/respond/{instanceId}/{requestId}. Includes 12 new unit tests covering the sanitizer and end-to-end attack prevention. * refactor: address review concerns for pickle fix 1. Remove deserialize_value() fallback in _deserialize_hitl_response untrusted HITL data now returns as-is when no type hint is available, never flowing into pickle.loads(). 2. Move strip_pickle_markers() out of reconstruct_to_type() the function is general-purpose again; untrusted-data callers are responsible for sanitizing first (documented with NOTE comment). 3. Define _PICKLE_MARKER/_TYPE_MARKER as local constants with import-time assertions against core's values decouples from private names while failing loudly if core ever changes them. 4. Update tests to reflect new responsibility boundaries. * fix: simplify warning message and fix ruff RUF001 lint * fix: suppress pyright reportPrivateUsage on core marker imports * Lower marker-strip log from warning to debug to avoid log flooding * Replace assert with RuntimeError for marker sync checks (ruff S101) * Fix pyright and ruff CI errors in security fix - Use cast() for dict/list comprehensions in strip_pickle_markers (pyright) - type: ignore for narrowed dict return in _workflow.py (pyright) - Simplify marker imports: use core constants directly, remove local copies - Remove duplicate pyright ignore comment * Remove duplicate end-to-end test in TestStripPickleMarkers * Suppress mypy redundant-cast on list cast needed by pyright --- .../agent_framework_azurefunctions/_app.py | 6 +- .../_serialization.py | 49 +++++++++++- .../_workflow.py | 19 +++-- .../azurefunctions/tests/test_func_utils.py | 77 ++++++++++++++++++- 4 files changed, 141 insertions(+), 10 deletions(-) diff --git a/python/packages/azurefunctions/agent_framework_azurefunctions/_app.py b/python/packages/azurefunctions/agent_framework_azurefunctions/_app.py index 01dcc102f4..c108f7739d 100644 --- a/python/packages/azurefunctions/agent_framework_azurefunctions/_app.py +++ b/python/packages/azurefunctions/agent_framework_azurefunctions/_app.py @@ -44,7 +44,7 @@ from ._context import CapturingRunnerContext from ._entities import create_agent_entity from ._errors import IncomingRequestError from ._orchestration import AgentOrchestrationContextType, AgentTask, AzureFunctionsAgentExecutor -from ._serialization import deserialize_value, serialize_value +from ._serialization import deserialize_value, serialize_value, strip_pickle_markers from ._workflow import ( SOURCE_HITL_RESPONSE, SOURCE_ORCHESTRATOR, @@ -515,6 +515,10 @@ class AgentFunctionApp(DFAppBase): except ValueError: return self._build_error_response("Request body must be valid JSON.") + # Sanitize untrusted HTTP input before it reaches pickle.loads(). + # See strip_pickle_markers() docstring for details on the attack vector. + response_data = strip_pickle_markers(response_data) + # Send the response as an external event # The request_id is used as the event name for correlation await client.raise_event( diff --git a/python/packages/azurefunctions/agent_framework_azurefunctions/_serialization.py b/python/packages/azurefunctions/agent_framework_azurefunctions/_serialization.py index f48e55f5d5..4ed080eceb 100644 --- a/python/packages/azurefunctions/agent_framework_azurefunctions/_serialization.py +++ b/python/packages/azurefunctions/agent_framework_azurefunctions/_serialization.py @@ -22,9 +22,14 @@ import importlib import logging from contextlib import suppress from dataclasses import is_dataclass -from typing import Any +from typing import Any, cast -from agent_framework._workflows._checkpoint_encoding import decode_checkpoint_value, encode_checkpoint_value +from agent_framework._workflows._checkpoint_encoding import ( + _PICKLE_MARKER, # pyright: ignore[reportPrivateUsage] + _TYPE_MARKER, # pyright: ignore[reportPrivateUsage] + decode_checkpoint_value, + encode_checkpoint_value, +) from pydantic import BaseModel logger = logging.getLogger(__name__) @@ -48,6 +53,41 @@ def resolve_type(type_key: str) -> type | None: return None +# ============================================================================ +# Pickle marker sanitization (security) +# ============================================================================ + + +def strip_pickle_markers(data: Any) -> Any: + """Recursively strip pickle/type markers from untrusted data. + + The core checkpoint encoding uses ``__pickled__`` and ``__type__`` markers to + roundtrip arbitrary Python objects via *pickle*. If an attacker crafts an + HTTP payload that contains these markers, the data would flow into + ``pickle.loads()`` and enable **arbitrary code execution**. + + This function walks the incoming data structure and replaces any ``dict`` + that contains either marker key with ``None``, neutralising the attack + vector while leaving all other data untouched. + + It **must** be called on every value that originates from an untrusted + source (e.g. ``req.get_json()``) *before* the value is passed to + ``deserialize_value`` / ``decode_checkpoint_value``. + """ + if isinstance(data, dict): + if _PICKLE_MARKER in data or _TYPE_MARKER in data: + logger.debug("Stripped pickle/type markers from untrusted input.") + return None + typed_dict = cast(dict[str, Any], data) + return {k: strip_pickle_markers(v) for k, v in typed_dict.items()} + + if isinstance(data, list): + typed_list = cast(list[Any], data) # type: ignore[redundant-cast] + return [strip_pickle_markers(item) for item in typed_list] + + return data + + # ============================================================================ # Serialize / Deserialize # ============================================================================ @@ -117,7 +157,10 @@ def reconstruct_to_type(value: Any, target_type: type) -> Any: if not isinstance(value, dict): return value - # Try decoding if data has pickle markers (from checkpoint encoding) + # Try decoding if data has pickle markers (from checkpoint encoding). + # NOTE: This function is general-purpose. Callers that handle untrusted + # data (e.g. HITL responses) MUST call strip_pickle_markers() before + # passing data here. See _deserialize_hitl_response in _workflow.py. decoded = deserialize_value(value) if not isinstance(decoded, dict): return decoded diff --git a/python/packages/azurefunctions/agent_framework_azurefunctions/_workflow.py b/python/packages/azurefunctions/agent_framework_azurefunctions/_workflow.py index 60c04ad66c..a8774353ec 100644 --- a/python/packages/azurefunctions/agent_framework_azurefunctions/_workflow.py +++ b/python/packages/azurefunctions/agent_framework_azurefunctions/_workflow.py @@ -50,7 +50,7 @@ from azure.durable_functions import DurableOrchestrationContext from ._context import CapturingRunnerContext from ._orchestration import AzureFunctionsAgentExecutor -from ._serialization import deserialize_value, reconstruct_to_type, resolve_type, serialize_value +from ._serialization import deserialize_value, reconstruct_to_type, resolve_type, serialize_value, strip_pickle_markers logger = logging.getLogger(__name__) @@ -961,6 +961,13 @@ def _deserialize_hitl_response(response_data: Any, response_type_str: str | None type(response_data).__name__, ) + if response_data is None: + return None + + # Sanitize untrusted external input before deserialization. + # HITL response data originates from an HTTP POST and must not contain + # pickle/type markers that would reach pickle.loads(). + response_data = strip_pickle_markers(response_data) if response_data is None: return None @@ -969,7 +976,7 @@ def _deserialize_hitl_response(response_data: Any, response_type_str: str | None logger.debug("Response data is not a dict, returning as-is: %s", type(response_data).__name__) return response_data - # Try to deserialize using the type hint + # Try to reconstruct using the type hint (Pydantic / dataclass) if response_type_str: response_type = resolve_type(response_type_str) if response_type: @@ -979,6 +986,8 @@ def _deserialize_hitl_response(response_data: Any, response_type_str: str | None return result logger.warning("Could not resolve response type: %s", response_type_str) - # Fall back to generic deserialization - logger.debug("Falling back to generic deserialization") - return deserialize_value(response_data) + # No type hint available - return the sanitized dict as-is. + # We intentionally do NOT call deserialize_value() here because HITL + # response data is untrusted and must never flow into pickle.loads(). + logger.debug("No type hint; returning sanitized data as-is") + return response_data # type: ignore[reportUnknownVariableType] diff --git a/python/packages/azurefunctions/tests/test_func_utils.py b/python/packages/azurefunctions/tests/test_func_utils.py index 240e2f0a2c..63f0af0182 100644 --- a/python/packages/azurefunctions/tests/test_func_utils.py +++ b/python/packages/azurefunctions/tests/test_func_utils.py @@ -21,6 +21,7 @@ from agent_framework_azurefunctions._serialization import ( deserialize_value, reconstruct_to_type, serialize_value, + strip_pickle_markers, ) @@ -353,7 +354,11 @@ class TestReconstructToType: assert result.comment == "Great" def test_reconstruct_from_checkpoint_markers(self) -> None: - """Test that data with checkpoint markers is decoded via deserialize_value.""" + """Test that data with checkpoint markers is decoded via deserialize_value. + + reconstruct_to_type is general-purpose and handles trusted checkpoint + data. Untrusted HITL callers must call strip_pickle_markers() first. + """ original = SampleData(value=99, name="marker-test") encoded = serialize_value(original) @@ -372,3 +377,73 @@ class TestReconstructToType: result = reconstruct_to_type(data, Unrelated) assert result == data + + def test_reconstruct_strips_injected_pickle_markers(self) -> None: + """End-to-end: strip_pickle_markers + reconstruct_to_type blocks attack. + + This mirrors the real HITL flow where callers sanitize before reconstruction. + """ + malicious = {"__pickled__": "gASVDgAAAAAAAACMBHRlc3SULg==", "__type__": "builtins:str"} + sanitized = strip_pickle_markers(malicious) + result = reconstruct_to_type(sanitized, str) + assert result is None + + +class TestStripPickleMarkers: + """Security tests for strip_pickle_markers — the defence-in-depth layer + that prevents untrusted HTTP input from reaching pickle.loads().""" + + def test_strips_top_level_pickle_marker(self) -> None: + """A dict containing __pickled__ must be replaced with None.""" + data = {"__pickled__": "PAYLOAD", "__type__": "os:system"} + assert strip_pickle_markers(data) is None + + def test_strips_top_level_type_marker_only(self) -> None: + """Even __type__ alone (without __pickled__) must be neutralised.""" + data = {"__type__": "os:system", "other": "value"} + assert strip_pickle_markers(data) is None + + def test_strips_nested_pickle_marker(self) -> None: + """Pickle markers nested inside a dict must be neutralised.""" + data = {"safe": "value", "nested": {"__pickled__": "PAYLOAD", "__type__": "os:system"}} + result = strip_pickle_markers(data) + assert result == {"safe": "value", "nested": None} + + def test_strips_pickle_marker_in_list(self) -> None: + """Pickle markers inside a list element must be neutralised.""" + data = [{"__pickled__": "PAYLOAD"}, "safe"] + result = strip_pickle_markers(data) + assert result == [None, "safe"] + + def test_strips_deeply_nested_marker(self) -> None: + """Deeply nested pickle markers must be neutralised.""" + data = {"a": {"b": {"c": {"__pickled__": "deep"}}}} + result = strip_pickle_markers(data) + assert result == {"a": {"b": {"c": None}}} + + def test_preserves_safe_dict(self) -> None: + """Dicts without pickle markers must be left untouched.""" + data = {"approved": True, "reason": "Looks good"} + assert strip_pickle_markers(data) == data + + def test_preserves_primitives(self) -> None: + """Primitive values must pass through unchanged.""" + assert strip_pickle_markers("hello") == "hello" + assert strip_pickle_markers(42) == 42 + assert strip_pickle_markers(None) is None + assert strip_pickle_markers(True) is True + + def test_preserves_safe_list(self) -> None: + """Lists without pickle markers must be left untouched.""" + data = [1, "two", {"key": "value"}] + assert strip_pickle_markers(data) == data + + def test_mixed_safe_and_malicious(self) -> None: + """Only the malicious entries should be stripped; safe entries remain.""" + data = { + "user_input": "hello", + "evil": {"__pickled__": "PAYLOAD", "__type__": "os:system"}, + "count": 42, + } + result = strip_pickle_markers(data) + assert result == {"user_input": "hello", "evil": None, "count": 42} From a3bfad4791c5364646ed6f31d892ef1ce257e3f3 Mon Sep 17 00:00:00 2001 From: Peter Ibekwe <109177538+peibekwe@users.noreply.github.com> Date: Tue, 10 Mar 2026 12:45:01 -0700 Subject: [PATCH 26/44] .NET: Added support for polymorphic type as workflow output (#4485) * Added support for polymorphic type as workflow output * Update Linq expression to avoid unnecessary allocations. * Added caching as per PR comment --- .../Microsoft.Agents.AI.Workflows/Executor.cs | 21 +- .../PolymorphicOutputTests.cs | 276 ++++++++++++++++++ 2 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/PolymorphicOutputTests.cs diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/Executor.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/Executor.cs index 6987c6aca3..d865b990c4 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/Executor.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/Executor.cs @@ -3,6 +3,7 @@ #pragma warning disable CS0618 // Type or member is obsolete - Internal use of obsolete types for backward compatibility using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -133,7 +134,25 @@ internal sealed class ExecutorProtocol(MessageRouter router, ISet sendType public bool CanHandle(Type type) => router.CanHandle(type); - public bool CanOutput(Type type) => this._yieldTypes.Contains(new(type)); + private readonly ConcurrentDictionary _canOutputCache = new(); + + public bool CanOutput(Type type) + { + return this._canOutputCache.GetOrAdd(type, this.CanOutputCore); + } + + private bool CanOutputCore(Type type) + { + foreach (TypeId yieldType in this._yieldTypes) + { + if (yieldType.IsMatchPolymorphic(type)) + { + return true; + } + } + + return false; + } public ProtocolDescriptor Describe() => new(this.Router.IncomingTypes, yieldTypes, sendTypes, this.Router.HasCatchAll); } diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/PolymorphicOutputTests.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/PolymorphicOutputTests.cs new file mode 100644 index 0000000000..040975e6a0 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/PolymorphicOutputTests.cs @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using FluentAssertions; + +namespace Microsoft.Agents.AI.Workflows.UnitTests; + +/// +/// Regression tests for polymorphic output type handling in workflows. +/// Verifies that executors can return derived types when the declared output type is a base class. +/// +/// +/// This addresses GitHub issue #4134: InvalidOperationException when returning derived type as workflow output. +/// +public partial class PolymorphicOutputTests +{ + #region Test Type Hierarchy + + /// + /// Base class used as declared output type. + /// + public class BaseOutput + { + public virtual string Name => "BaseOutput"; + } + + /// + /// Derived class returned at runtime. + /// + public class DerivedOutput : BaseOutput + { + public override string Name => "DerivedOutput"; + } + + /// + /// Second-level derived class for testing multiple inheritance levels. + /// + public class GrandchildOutput : DerivedOutput + { + public override string Name => "GrandchildOutput"; + } + + /// + /// Unrelated class that should NOT be accepted as output. + /// + public class UnrelatedOutput + { + public string Name => "UnrelatedOutput"; + } + + #endregion + + #region Test Executors + + /// + /// Executor that declares BaseOutput as yield type but returns DerivedOutput. + /// + internal sealed class DerivedOutputExecutor() : Executor(nameof(DerivedOutputExecutor)) + { + protected override ProtocolBuilder ConfigureProtocol(ProtocolBuilder protocolBuilder) + { + return protocolBuilder.ConfigureRoutes(routeBuilder => + routeBuilder.AddHandler(this.HandleAsync)); + } + + private async ValueTask HandleAsync(string input, IWorkflowContext context, CancellationToken cancellationToken) + { + await Task.Delay(10, cancellationToken); + + // Arrange: Return a derived type where the method signature declares the base type + return new DerivedOutput(); + } + } + + /// + /// Executor that declares BaseOutput as yield type but returns GrandchildOutput (two levels deep). + /// + internal sealed class GrandchildOutputExecutor() : Executor(nameof(GrandchildOutputExecutor)) + { + protected override ProtocolBuilder ConfigureProtocol(ProtocolBuilder protocolBuilder) + { + return protocolBuilder.ConfigureRoutes(routeBuilder => + routeBuilder.AddHandler(this.HandleAsync)); + } + + private async ValueTask HandleAsync(string input, IWorkflowContext context, CancellationToken cancellationToken) + { + await Task.Delay(10, cancellationToken); + + // Arrange: Return a grandchild type (two inheritance levels) + return new GrandchildOutput(); + } + } + + /// + /// Executor that attempts to return an unrelated type - should fail validation. + /// This executor intentionally bypasses type safety to test runtime validation. + /// + internal sealed class UnrelatedOutputExecutor() : Executor(nameof(UnrelatedOutputExecutor)) + { + protected override ProtocolBuilder ConfigureProtocol(ProtocolBuilder protocolBuilder) + { + return protocolBuilder.ConfigureRoutes(routeBuilder => + routeBuilder.AddHandler(this.HandleAsync)); + } + + private async ValueTask HandleAsync(string input, IWorkflowContext context, CancellationToken cancellationToken) + { + // Arrange: Attempt to yield an unrelated type - should throw + UnrelatedOutput unrelated = new(); + await context.YieldOutputAsync(unrelated, cancellationToken).ConfigureAwait(false); + + // This line should not be reached + return new BaseOutput(); + } + } + + /// + /// Executor that returns the exact declared type (baseline test). + /// + internal sealed class ExactTypeExecutor() : Executor(nameof(ExactTypeExecutor)) + { + protected override ProtocolBuilder ConfigureProtocol(ProtocolBuilder protocolBuilder) + { + return protocolBuilder.ConfigureRoutes(routeBuilder => + routeBuilder.AddHandler(this.HandleAsync)); + } + + private ValueTask HandleAsync(string input, IWorkflowContext context, CancellationToken cancellationToken) + { + BaseOutput result = new(); + return new ValueTask(result); + } + } + + #endregion + + #region Tests + + /// + /// Verifies that returning a derived type when the declared output type is a base class succeeds. + /// This is the main regression test for GitHub issue #4134. + /// + [Fact] + public async Task ReturningDerivedType_WhenBaseTypeIsDeclared_ShouldSucceedAsync() + { + // Arrange + DerivedOutputExecutor executor = new(); + WorkflowBuilder builder = new WorkflowBuilder(executor).WithOutputFrom(executor); + Workflow workflow = builder.Build(); + + // Act + List events = []; + await using StreamingRun run = await InProcessExecution.RunStreamingAsync(workflow, "test input"); + await foreach (WorkflowEvent evt in run.WatchStreamAsync()) + { + events.Add(evt); + } + + // Assert + events.Should().NotBeEmpty("workflow should produce events"); + + List outputEvents = events.OfType().ToList(); + outputEvents.Should().ContainSingle("workflow should produce exactly one output event"); + + WorkflowOutputEvent outputEvent = outputEvents.Single(); + outputEvent.Data.Should().BeOfType("output should be the derived type"); + ((DerivedOutput)outputEvent.Data!).Name.Should().Be("DerivedOutput"); + + // Verify no error events + List errorEvents = events.OfType().ToList(); + errorEvents.Should().BeEmpty("workflow should not produce error events"); + } + + /// + /// Verifies that returning a grandchild type (multiple inheritance levels) succeeds. + /// + [Fact] + public async Task ReturningGrandchildType_WhenBaseTypeIsDeclared_ShouldSucceedAsync() + { + // Arrange + GrandchildOutputExecutor executor = new(); + WorkflowBuilder builder = new WorkflowBuilder(executor).WithOutputFrom(executor); + Workflow workflow = builder.Build(); + + // Act + List events = []; + await using StreamingRun run = await InProcessExecution.RunStreamingAsync(workflow, "test input"); + await foreach (WorkflowEvent evt in run.WatchStreamAsync()) + { + events.Add(evt); + } + + // Assert + events.Should().NotBeEmpty("workflow should produce events"); + + List outputEvents = events.OfType().ToList(); + outputEvents.Should().ContainSingle("workflow should produce exactly one output event"); + + WorkflowOutputEvent outputEvent = outputEvents.Single(); + outputEvent.Data.Should().BeOfType("output should be the grandchild type"); + ((GrandchildOutput)outputEvent.Data!).Name.Should().Be("GrandchildOutput"); + + // Verify no error events + List errorEvents = events.OfType().ToList(); + errorEvents.Should().BeEmpty("workflow should not produce error events"); + } + + /// + /// Verifies that returning an unrelated type still throws InvalidOperationException. + /// This ensures the fix doesn't break the existing validation for truly incompatible types. + /// + [Fact] + public async Task ReturningUnrelatedType_WhenBaseTypeIsDeclared_ShouldFailAsync() + { + // Arrange + UnrelatedOutputExecutor executor = new(); + WorkflowBuilder builder = new WorkflowBuilder(executor).WithOutputFrom(executor); + Workflow workflow = builder.Build(); + + // Act + List events = []; + await using StreamingRun run = await InProcessExecution.RunStreamingAsync(workflow, "test input"); + await foreach (WorkflowEvent evt in run.WatchStreamAsync()) + { + events.Add(evt); + } + + // Assert: Should have an error event with InvalidOperationException message + List errorEvents = events.OfType().ToList(); + errorEvents.Should().ContainSingle("workflow should produce exactly one error event"); + + WorkflowErrorEvent errorEvent = errorEvents.Single(); + string errorMessage = errorEvent.Data?.ToString() ?? string.Empty; + errorMessage.Should().Contain("Cannot output object of type UnrelatedOutput"); + errorMessage.Should().Contain("BaseOutput"); + } + + /// + /// Verifies that returning the exact declared type still works (baseline test). + /// + [Fact] + public async Task ReturningExactType_WhenSameTypeIsDeclared_ShouldSucceedAsync() + { + // Arrange: Create an executor that returns the exact declared type + ExactTypeExecutor executor = new(); + WorkflowBuilder builder = new WorkflowBuilder(executor).WithOutputFrom(executor); + Workflow workflow = builder.Build(); + + // Act + List events = []; + await using StreamingRun run = await InProcessExecution.RunStreamingAsync(workflow, "test input"); + await foreach (WorkflowEvent evt in run.WatchStreamAsync()) + { + events.Add(evt); + } + + // Assert + events.Should().NotBeEmpty("workflow should produce events"); + + List outputEvents = events.OfType().ToList(); + outputEvents.Should().ContainSingle("workflow should produce exactly one output event"); + + WorkflowOutputEvent outputEvent = outputEvents.Single(); + outputEvent.Data.Should().BeOfType("output should be the exact base type"); + + // Verify no error events + List errorEvents = events.OfType().ToList(); + errorEvents.Should().BeEmpty("workflow should not produce error events"); + } + + #endregion +} From e35f530f2edc3ca039de8a7d60e4f70462eebd62 Mon Sep 17 00:00:00 2001 From: Evan Mattson <35585003+moonbox3@users.noreply.github.com> Date: Wed, 11 Mar 2026 07:20:05 +0900 Subject: [PATCH 27/44] Python: Fix `executor_completed` event with non-copyable raw_representation in mixed workflows (#4493) * Python: Fix `executor_completed` event with non-copyable raw_representation in mixed workflows Fixes #4455 * fix(#4455): use class-level sets for deepcopy field exclusion - SerializationMixin.__deepcopy__: check type(self).DEFAULT_EXCLUDE instead of hardcoding 'raw_representation' - Content.__deepcopy__: add _SHALLOW_COPY_FIELDS class variable and check against it instead of hardcoding - Fix tautological assertion in test (was always True) - Add second excluded field to test to verify DEFAULT_EXCLUDE is respected generically Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Decouple __deepcopy__ from DEFAULT_EXCLUDE in SerializationMixin (#4455) Introduce _SHALLOW_COPY_FIELDS class variable in SerializationMixin to separate deep-copy semantics from serialization semantics. Previously, __deepcopy__ used DEFAULT_EXCLUDE to decide which fields to shallow-copy, conflating 'not serialized' with 'not safe to deep-copy'. A field added to DEFAULT_EXCLUDE purely for serialization (e.g. additional_properties) would be silently shared between original and copy. - Add _SHALLOW_COPY_FIELDS (default {'raw_representation'}) to SerializationMixin, matching the pattern already used by Content - Update __deepcopy__ to read from _SHALLOW_COPY_FIELDS instead of DEFAULT_EXCLUDE - Add test verifying DEFAULT_EXCLUDE fields are deep-copied unless also in _SHALLOW_COPY_FIELDS - Add test for Content._SHALLOW_COPY_FIELDS identity preservation - Add test for ChatResponse deep-copying additional_properties Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add test for _SHALLOW_COPY_FIELDS and DEFAULT_EXCLUDE independence Add test_deepcopy_shallow_copy_fields_override_default_exclude to verify that a field in both DEFAULT_EXCLUDE and _SHALLOW_COPY_FIELDS is shallow-copied (controlled by _SHALLOW_COPY_FIELDS), while a field in DEFAULT_EXCLUDE only is still deep-copied. This addresses review comment #11 ensuring the two class variables control independent concerns. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove unnecessary local variable in __deepcopy__ Inline cls._SHALLOW_COPY_FIELDS directly in the loop check instead of assigning to a local variable first, per review feedback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply pre-commit auto-fixes --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../core/agent_framework/_serialization.py | 20 +++ .../packages/core/agent_framework/_types.py | 19 ++ .../tests/core/test_serializable_mixin.py | 100 +++++++++++ python/packages/core/tests/core/test_types.py | 164 ++++++++++++++++++ .../tests/workflow/test_agent_executor.py | 57 ++++++ 5 files changed, 360 insertions(+) diff --git a/python/packages/core/agent_framework/_serialization.py b/python/packages/core/agent_framework/_serialization.py index 8dffdc0ce6..20e873039d 100644 --- a/python/packages/core/agent_framework/_serialization.py +++ b/python/packages/core/agent_framework/_serialization.py @@ -2,6 +2,7 @@ from __future__ import annotations +import copy import json import logging import re @@ -263,6 +264,25 @@ class SerializationMixin: DEFAULT_EXCLUDE: ClassVar[set[str]] = set() INJECTABLE: ClassVar[set[str]] = set() + _SHALLOW_COPY_FIELDS: ClassVar[set[str]] = {"raw_representation"} + + def __deepcopy__(self, memo: dict[int, Any]) -> SerializationMixin: + """Create a deep copy, preserving ``_SHALLOW_COPY_FIELDS`` by reference. + + Fields listed in ``_SHALLOW_COPY_FIELDS`` may contain LLM SDK objects + (e.g., proto/gRPC responses) that are not safe to deep-copy. They are + kept as shallow references in the copy; all other attributes are + deep-copied normally. + """ + cls = type(self) + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k in cls._SHALLOW_COPY_FIELDS: + object.__setattr__(result, k, v) + else: + object.__setattr__(result, k, copy.deepcopy(v, memo)) + return result def to_dict(self, *, exclude: set[str] | None = None, exclude_none: bool = True) -> dict[str, Any]: """Convert the instance and any nested objects to a dictionary. diff --git a/python/packages/core/agent_framework/_types.py b/python/packages/core/agent_framework/_types.py index fd97672d65..b8d5f5c29a 100644 --- a/python/packages/core/agent_framework/_types.py +++ b/python/packages/core/agent_framework/_types.py @@ -445,6 +445,8 @@ class Content: `Content.from_uri()`, etc. to create instances. """ + _SHALLOW_COPY_FIELDS: ClassVar[set[str]] = {"raw_representation"} + def __init__( self, type: ContentType, @@ -546,6 +548,23 @@ class Content: self.approved = approved self.consent_link = consent_link + def __deepcopy__(self, memo: dict[int, Any]) -> Content: + """Create a deep copy, preserving ``_SHALLOW_COPY_FIELDS`` by reference. + + Fields listed in ``_SHALLOW_COPY_FIELDS`` may contain LLM SDK objects + (e.g., proto/gRPC responses) that are not safe to deep-copy. + """ + cls = type(self) + result = cls.__new__(cls) + memo[id(self)] = result + shallow = cls._SHALLOW_COPY_FIELDS + for k, v in self.__dict__.items(): + if k in shallow: + object.__setattr__(result, k, v) + else: + object.__setattr__(result, k, deepcopy(v, memo)) + return result + @classmethod def from_text( cls: type[ContentT], diff --git a/python/packages/core/tests/core/test_serializable_mixin.py b/python/packages/core/tests/core/test_serializable_mixin.py index 05ece1072b..8134e14680 100644 --- a/python/packages/core/tests/core/test_serializable_mixin.py +++ b/python/packages/core/tests/core/test_serializable_mixin.py @@ -427,3 +427,103 @@ class TestSerializationMixin: assert obj.options["existing"] == "value" assert obj.options["injected"] == "option" + + def test_deepcopy_preserves_shallow_copy_fields_by_reference(self): + """Test that deepcopy keeps _SHALLOW_COPY_FIELDS fields as shallow references.""" + import copy + + class NonCopyable: + def __deepcopy__(self, memo): + raise TypeError("cannot deepcopy") + + class TestClass(SerializationMixin): + _SHALLOW_COPY_FIELDS = {"raw_representation", "other_opaque"} + + def __init__(self, items: list, raw_representation: Any = None, other_opaque: Any = None): + self.items = items + self.raw_representation = raw_representation + self.other_opaque = other_opaque + + raw = NonCopyable() + opaque = NonCopyable() + original_items = ["a", "b"] + obj = TestClass(items=original_items, raw_representation=raw, other_opaque=opaque) + cloned = copy.deepcopy(obj) + + # _SHALLOW_COPY_FIELDS fields should be the same object (shallow copy) + assert cloned.raw_representation is raw + assert cloned.other_opaque is opaque + # Normal attributes should be independent copies + assert cloned.items is not original_items + assert cloned.items == ["a", "b"] + + def test_deepcopy_deep_copies_non_shallow_copy_fields(self): + """Test that deepcopy fully copies fields not in _SHALLOW_COPY_FIELDS.""" + import copy + + class TestClass(SerializationMixin): + _SHALLOW_COPY_FIELDS = {"raw_representation"} + + def __init__(self, items: list, raw_representation: Any = None): + self.items = items + self.raw_representation = raw_representation + + original_list = ["a", "b"] + obj = TestClass(items=original_list, raw_representation="raw") + cloned = copy.deepcopy(obj) + + # list should be a new object + assert cloned.items is not original_list + assert cloned.items == ["a", "b"] + # raw_representation should be the same object + assert cloned.raw_representation is obj.raw_representation + + def test_deepcopy_deep_copies_default_exclude_fields(self): + """Test that DEFAULT_EXCLUDE fields are deep-copied unless also in _SHALLOW_COPY_FIELDS.""" + import copy + + class TestClass(SerializationMixin): + DEFAULT_EXCLUDE = {"additional_properties"} + + def __init__(self, items: list, additional_properties: dict | None = None): + self.items = items + self.additional_properties = additional_properties or {} + + original_props = {"key": "value"} + obj = TestClass(items=["a"], additional_properties=original_props) + cloned = copy.deepcopy(obj) + + # DEFAULT_EXCLUDE field should be deep-copied (independent copy) + assert cloned.additional_properties is not original_props + assert cloned.additional_properties == {"key": "value"} + + def test_deepcopy_shallow_copy_fields_override_default_exclude(self): + """Test that _SHALLOW_COPY_FIELDS controls deepcopy independently of DEFAULT_EXCLUDE.""" + import copy + + class NonCopyable: + def __deepcopy__(self, memo): + raise TypeError("cannot deepcopy") + + class TestClass(SerializationMixin): + DEFAULT_EXCLUDE = {"opaque", "additional_properties"} + _SHALLOW_COPY_FIELDS = {"opaque"} + + def __init__(self, items: list, opaque: Any = None, additional_properties: dict | None = None): + self.items = items + self.opaque = opaque + self.additional_properties = additional_properties or {} + + opaque = NonCopyable() + original_props = {"key": "value"} + obj = TestClass(items=["a"], opaque=opaque, additional_properties=original_props) + cloned = copy.deepcopy(obj) + + # Field in both DEFAULT_EXCLUDE and _SHALLOW_COPY_FIELDS: shallow-copied + assert cloned.opaque is opaque + # Field in DEFAULT_EXCLUDE only: deep-copied + assert cloned.additional_properties is not original_props + assert cloned.additional_properties == {"key": "value"} + # Normal field: deep-copied + assert cloned.items is not obj.items + assert cloned.items == ["a"] diff --git a/python/packages/core/tests/core/test_types.py b/python/packages/core/tests/core/test_types.py index 312ab83f2e..b932516196 100644 --- a/python/packages/core/tests/core/test_types.py +++ b/python/packages/core/tests/core/test_types.py @@ -1860,6 +1860,170 @@ def test_agent_run_response_update_all_content_types(): assert update_str.role == "user" +# region DeepCopy + + +class _NonCopyableRaw: + """Simulates an LLM SDK response object that cannot be deep-copied (e.g., proto/gRPC).""" + + def __deepcopy__(self, memo: dict) -> Any: + raise TypeError("Cannot deepcopy this object") + + +def test_content_deepcopy_preserves_raw_representation(): + """Test that deepcopy of Content keeps raw_representation by reference.""" + import copy + + raw = _NonCopyableRaw() + content = Content.from_text("hello", raw_representation=raw) + + cloned = copy.deepcopy(content) + + assert cloned.text == "hello" + assert cloned.raw_representation is raw + assert cloned.additional_properties is not content.additional_properties + + +def test_message_deepcopy_preserves_raw_representation(): + """Test that deepcopy of Message keeps raw_representation by reference.""" + import copy + + raw = _NonCopyableRaw() + msg = Message("assistant", ["hello"], raw_representation=raw) + + cloned = copy.deepcopy(msg) + + assert cloned.text == "hello" + assert cloned.raw_representation is raw + assert cloned.contents is not msg.contents + + +def test_agent_response_deepcopy_preserves_raw_representation(): + """Test that deepcopy of AgentResponse keeps raw_representation by reference.""" + import copy + + raw = _NonCopyableRaw() + response = AgentResponse( + messages=[Message("assistant", ["test"])], + raw_representation=raw, + ) + + cloned = copy.deepcopy(response) + + assert cloned.text == "test" + assert cloned.raw_representation is raw + assert cloned.messages is not response.messages + + +def test_chat_response_deepcopy_preserves_raw_representation(): + """Test that deepcopy of ChatResponse keeps raw_representation by reference.""" + import copy + + raw = _NonCopyableRaw() + response = ChatResponse( + messages=[Message("assistant", ["test"])], + raw_representation=raw, + ) + + cloned = copy.deepcopy(response) + + assert cloned.text == "test" + assert cloned.raw_representation is raw + assert cloned.messages is not response.messages + + +def test_chat_response_update_deepcopy_preserves_raw_representation(): + """Test that deepcopy of ChatResponseUpdate keeps raw_representation by reference.""" + import copy + + raw = _NonCopyableRaw() + update = ChatResponseUpdate( + contents=[Content.from_text("hello")], + role="assistant", + raw_representation=raw, + ) + + cloned = copy.deepcopy(update) + + assert cloned.text == "hello" + assert cloned.raw_representation is raw + assert cloned.contents is not update.contents + + +def test_agent_response_update_deepcopy_preserves_raw_representation(): + """Test that deepcopy of AgentResponseUpdate keeps raw_representation by reference.""" + import copy + + raw = _NonCopyableRaw() + update = AgentResponseUpdate( + contents=[Content.from_text("hello")], + role="assistant", + raw_representation=raw, + ) + + cloned = copy.deepcopy(update) + + assert cloned.text == "hello" + assert cloned.raw_representation is raw + assert cloned.contents is not update.contents + + +def test_nested_deepcopy_preserves_raw_representation(): + """Test that deepcopy of an AgentResponse with nested Message raw_representations works.""" + import copy + + raw_msg = _NonCopyableRaw() + raw_response = _NonCopyableRaw() + response = AgentResponse( + messages=[Message("assistant", ["hello"], raw_representation=raw_msg)], + raw_representation=raw_response, + ) + + cloned = copy.deepcopy(response) + + assert cloned.raw_representation is raw_response + assert cloned.messages[0].raw_representation is raw_msg + assert cloned.messages is not response.messages + assert cloned.text == "hello" + + +def test_content_deepcopy_shallow_copy_fields_identity(): + """Test that Content._SHALLOW_COPY_FIELDS fields are identity-preserved while others are deep-copied.""" + import copy + + raw = _NonCopyableRaw() + content = Content.from_text("hello", raw_representation=raw) + content.additional_properties["key"] = "value" + + cloned = copy.deepcopy(content) + + # _SHALLOW_COPY_FIELDS (raw_representation) should be same object + assert cloned.raw_representation is raw + # Non-shallow fields should be independent deep copies + assert cloned.additional_properties is not content.additional_properties + assert cloned.additional_properties == {"key": "value"} + + +def test_chat_response_deepcopy_deep_copies_additional_properties(): + """Test that ChatResponse deepcopy deep-copies additional_properties despite it being in DEFAULT_EXCLUDE.""" + import copy + + response = ChatResponse( + messages=[Message("assistant", ["test"])], + additional_properties={"key": [1, 2, 3]}, + ) + + cloned = copy.deepcopy(response) + + # additional_properties is in DEFAULT_EXCLUDE for serialization but not in _SHALLOW_COPY_FIELDS, + # so it should be deep-copied (independent copy) + assert cloned.additional_properties is not response.additional_properties + assert cloned.additional_properties == {"key": [1, 2, 3]} + + +# endregion + + # region Serialization diff --git a/python/packages/core/tests/workflow/test_agent_executor.py b/python/packages/core/tests/workflow/test_agent_executor.py index 599e62d635..059e683745 100644 --- a/python/packages/core/tests/workflow/test_agent_executor.py +++ b/python/packages/core/tests/workflow/test_agent_executor.py @@ -383,3 +383,60 @@ async def test_agent_executor_run_with_messages_kwarg_does_not_raise() -> None: result = await workflow.run("hello", messages=["stale"]) assert result is not None assert agent.call_count == 1 + + +class _NonCopyableRaw: + """Simulates an LLM SDK response object that cannot be deep-copied (e.g., proto/gRPC).""" + + def __deepcopy__(self, memo: dict) -> Any: + raise TypeError("Cannot deepcopy this object") + + +class _AgentWithRawRepr(BaseAgent): + """Agent that returns responses with a non-copyable raw_representation.""" + + def __init__(self, raw: Any, **kwargs: Any): + super().__init__(**kwargs) + self._raw = raw + + def run( + self, + messages: str | Message | list[str] | list[Message] | None = None, + *, + stream: bool = False, + session: AgentSession | None = None, + **kwargs: Any, + ) -> Awaitable[AgentResponse] | ResponseStream[AgentResponseUpdate, AgentResponse]: + async def _run() -> AgentResponse: + return AgentResponse( + messages=[Message("assistant", [f"reply from {self.name}"])], + raw_representation=self._raw, + ) + + return _run() + + +async def test_agent_executor_workflow_with_non_copyable_raw_representation() -> None: + """Workflow should complete when AgentResponse contains a raw_representation that cannot be deep-copied.""" + raw = _NonCopyableRaw() + + agent_a = _AgentWithRawRepr(raw=raw, id="a", name="AgentA") + agent_b = _CountingAgent(id="b", name="AgentB") + + exec_a = AgentExecutor(agent_a, id="exec_a") + exec_b = AgentExecutor(agent_b, id="exec_b") + + workflow = SequentialBuilder(participants=[exec_a, exec_b]).build() + events = await workflow.run("hello") + + completed = [e for e in events if isinstance(e, WorkflowEvent) and e.type == "executor_completed"] + completed_a = [e for e in completed if e.executor_id == "exec_a"] + + assert len(completed_a) == 1 + assert completed_a[0].data is not None + + # The yielded AgentResponse should preserve its raw_representation reference + agent_responses = [d for d in completed_a[0].data if isinstance(d, AgentResponse)] + assert len(agent_responses) > 0 + assert agent_responses[0].text == "reply from AgentA" + assert agent_responses[0].raw_representation is raw From 97b6c9951a2e867c76274b2d40777ec38801d9d5 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 09:12:53 +0900 Subject: [PATCH 28/44] Python: Fix broken link in purview README (504 on Microsoft 365 Dev Program URL) (#4610) * Initial plan * Fix broken link in purview README: replace 504-returning dev-program URL with stable learn.microsoft.com URL Co-authored-by: crickman <66376200+crickman@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: crickman <66376200+crickman@users.noreply.github.com> --- python/packages/purview/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/packages/purview/README.md b/python/packages/purview/README.md index f23da59457..2b1f9b7984 100644 --- a/python/packages/purview/README.md +++ b/python/packages/purview/README.md @@ -29,7 +29,7 @@ Add Purview when you need to: - Microsoft Azure subscription with Microsoft Purview configured. - Microsoft 365 subscription with an E5 license and pay-as-you-go billing setup. - - For testing, you can use a Microsoft 365 Developer Program tenant. For more information, see [Join the Microsoft 365 Developer Program](https://developer.microsoft.com/en-us/microsoft-365/dev-program). + - For testing, you can use a Microsoft 365 Developer Program tenant. For more information, see [Join the Microsoft 365 Developer Program](https://learn.microsoft.com/en-us/office/developer-program/microsoft-365-developer-program). ### Authentication From d3f0c331805e9fabe838d8b80fa09f8dc568586f Mon Sep 17 00:00:00 2001 From: Chris <66376200+crickman@users.noreply.github.com> Date: Tue, 10 Mar 2026 17:41:39 -0700 Subject: [PATCH 29/44] .NET Compaction - Introducing compaction strategies and pipeline (#4533) * Checkpoint * Checkpoint * Stable * Strategies * Updated * Encoding * Formatting * Cleanup * Formatting * Tests * Tuning * Update tests * Test update * Remove working solution * Add sample to solution * Sample readyme * Experimental * Format * Formatting * Encoding * Support IChatReducer * Sample output formatting * Initial plan * Replace CompactingChatClient with MessageCompactionContextProvider Co-authored-by: crickman <66376200+crickman@users.noreply.github.com> * Boundary condition * Fix encoding * Fix cast * Test coverage * Namespace * Improvements * Efficiency * Cleanup * Detect service managed conversation * Fix namespace * Fix merge * Fix test expectation * Update dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> * Address PR comments (x1) * Update comment * Update comments * Clean-up * Format output * Sync sample comment * Fix condition * Adjust data-flow * Address comments (x2) * Direct compaction * Fix summarization content * Argument check / fix count calculation * Minor follow-up * Diagnostics * Minor updates * Fix state test * Fix sliding window perf * Stable state keys * Increase size computation * Formatting * Add README.md for Agent_Step18_CompactionPipeline sample (#4574) * Sample comments * Updated * Update dotnet/src/Microsoft.Agents.AI/Compaction/MessageIndex.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionProviderTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/src/Microsoft.Agents.AI/Compaction/MessageIndex.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address copilot comments * Fix namespace * Comments / convensions * Prefix `MessageGroup` and `MessageIndex` * Fix sliding window * Update dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Python alignment * Fix merge * Fix equality, readme, and sample * Readme update and ToolResult fix * Update dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Simplify readme * Update dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove example * Remove unused --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: westey <164392973+westey-m@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- dotnet/Directory.Packages.props | 1 + dotnet/agent-framework-dotnet.slnx | 1 + .../Agent_Step18_CompactionPipeline.csproj | 21 + .../Program.cs | 120 ++ .../Agent_Step18_CompactionPipeline/README.md | 132 ++ dotnet/samples/02-agents/Agents/README.md | 1 + .../InMemoryChatHistoryProvider.cs | 19 +- .../ChatClient/ChatClientExtensions.cs | 2 +- .../Compaction/ChatMessageContentEquality.cs | 159 ++ .../ChatReducerCompactionStrategy.cs | 82 + .../Compaction/CompactionGroupKind.cs | 55 + .../Compaction/CompactionLogMessages.cs | 112 ++ .../Compaction/CompactionMessageGroup.cs | 116 ++ .../Compaction/CompactionMessageIndex.cs | 529 ++++++ .../Compaction/CompactionProvider.cs | 186 +++ .../Compaction/CompactionStrategy.cs | 164 ++ .../Compaction/CompactionTelemetry.cs | 45 + .../Compaction/CompactionTrigger.cs | 15 + .../Compaction/CompactionTriggers.cs | 134 ++ .../Compaction/PipelineCompactionStrategy.cs | 62 + .../SlidingWindowCompactionStrategy.cs | 140 ++ .../SummarizationCompactionStrategy.cs | 204 +++ .../ToolResultCompactionStrategy.cs | 234 +++ .../TruncationCompactionStrategy.cs | 110 ++ .../Microsoft.Agents.AI.csproj | 6 +- .../ChatMessageContentEqualityTests.cs | 518 ++++++ .../ChatReducerCompactionStrategyTests.cs | 255 +++ .../Compaction/CompactionMessageIndexTests.cs | 1477 +++++++++++++++++ .../Compaction/CompactionProviderTests.cs | 366 ++++ .../Compaction/CompactionStrategyTests.cs | 236 +++ .../Compaction/CompactionTriggersTests.cs | 180 ++ .../PipelineCompactionStrategyTests.cs | 208 +++ .../SlidingWindowCompactionStrategyTests.cs | 311 ++++ .../SummarizationCompactionStrategyTests.cs | 613 +++++++ .../ToolResultCompactionStrategyTests.cs | 351 ++++ .../TruncationCompactionStrategyTests.cs | 328 ++++ .../Microsoft.Agents.AI.UnitTests.csproj | 1 + 37 files changed, 7486 insertions(+), 8 deletions(-) create mode 100644 dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/Agent_Step18_CompactionPipeline.csproj create mode 100644 dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/Program.cs create mode 100644 dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/ChatMessageContentEquality.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/ChatReducerCompactionStrategy.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionGroupKind.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionLogMessages.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionMessageGroup.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionMessageIndex.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionProvider.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionStrategy.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTelemetry.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTrigger.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTriggers.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/PipelineCompactionStrategy.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/SlidingWindowCompactionStrategy.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/ToolResultCompactionStrategy.cs create mode 100644 dotnet/src/Microsoft.Agents.AI/Compaction/TruncationCompactionStrategy.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ChatMessageContentEqualityTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ChatReducerCompactionStrategyTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionMessageIndexTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionProviderTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionStrategyTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionTriggersTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/PipelineCompactionStrategyTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/SlidingWindowCompactionStrategyTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/SummarizationCompactionStrategyTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ToolResultCompactionStrategyTests.cs create mode 100644 dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/TruncationCompactionStrategyTests.cs diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index 81ab56efd3..5e83e0d577 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -108,6 +108,7 @@ + diff --git a/dotnet/agent-framework-dotnet.slnx b/dotnet/agent-framework-dotnet.slnx index 0e1f678003..04fbb6cd87 100644 --- a/dotnet/agent-framework-dotnet.slnx +++ b/dotnet/agent-framework-dotnet.slnx @@ -56,6 +56,7 @@ + diff --git a/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/Agent_Step18_CompactionPipeline.csproj b/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/Agent_Step18_CompactionPipeline.csproj new file mode 100644 index 0000000000..0f9de7c359 --- /dev/null +++ b/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/Agent_Step18_CompactionPipeline.csproj @@ -0,0 +1,21 @@ + + + + Exe + net10.0 + + enable + enable + + + + + + + + + + + + + diff --git a/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/Program.cs b/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/Program.cs new file mode 100644 index 0000000000..ce0a4a294d --- /dev/null +++ b/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/Program.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft. All rights reserved. + +// This sample demonstrates how to use a CompactionProvider with a compaction pipeline +// as an AIContextProvider for an agent's in-run context management. The pipeline chains multiple +// compaction strategies from gentle to aggressive: +// 1. ToolResultCompactionStrategy - Collapses old tool-call groups into concise summaries +// 2. SummarizationCompactionStrategy - LLM-compresses older conversation spans +// 3. SlidingWindowCompactionStrategy - Keeps only the most recent N user turns +// 4. TruncationCompactionStrategy - Emergency token-budget backstop + +using System.ComponentModel; +using Azure.AI.OpenAI; +using Azure.Identity; +using Microsoft.Agents.AI; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; + +var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); +var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; + +// WARNING: DefaultAzureCredential is convenient for development but requires careful consideration in production. +// In production, consider using a specific credential (e.g., ManagedIdentityCredential) to avoid +// latency issues, unintended credential probing, and potential security risks from fallback mechanisms. +AzureOpenAIClient openAIClient = new(new Uri(endpoint), new DefaultAzureCredential()); + +// Create a chat client for the agent and a separate one for the summarization strategy. +// Using the same model for simplicity; in production, use a smaller/cheaper model for summarization. +IChatClient agentChatClient = openAIClient.GetChatClient(deploymentName).AsIChatClient(); +IChatClient summarizerChatClient = openAIClient.GetChatClient(deploymentName).AsIChatClient(); + +// Define a tool the agent can use, so we can see tool-result compaction in action. +[Description("Look up the current price of a product by name.")] +static string LookupPrice([Description("The product name to look up.")] string productName) => + productName.ToUpperInvariant() switch + { + "LAPTOP" => "The laptop costs $999.99.", + "KEYBOARD" => "The keyboard costs $79.99.", + "MOUSE" => "The mouse costs $29.99.", + _ => $"Sorry, I don't have pricing for '{productName}'." + }; + +// Configure the compaction pipeline with one of each strategy, ordered least to most aggressive. +PipelineCompactionStrategy compactionPipeline = + new(// 1. Gentle: collapse old tool-call groups into short summaries + new ToolResultCompactionStrategy(CompactionTriggers.MessagesExceed(7)), + + // 2. Moderate: use an LLM to summarize older conversation spans into a concise message + new SummarizationCompactionStrategy(summarizerChatClient, CompactionTriggers.TokensExceed(0x500)), + + // 3. Aggressive: keep only the last N user turns and their responses + new SlidingWindowCompactionStrategy(CompactionTriggers.TurnsExceed(4)), + + // 4. Emergency: drop oldest groups until under the token budget + new TruncationCompactionStrategy(CompactionTriggers.TokensExceed(0x8000))); + +// Create the agent with a CompactionProvider that uses the compaction pipeline. +AIAgent agent = + agentChatClient + .AsBuilder() + // Note: Adding the CompactionProvider at the builder level means it will be applied to all agents + // built from this builder and will manage context for both agent messages and tool calls. + .UseAIContextProviders(new CompactionProvider(compactionPipeline)) + .BuildAIAgent( + new ChatClientAgentOptions + { + Name = "ShoppingAssistant", + ChatOptions = new() + { + Instructions = + """ + You are a helpful, but long winded, shopping assistant. + Help the user look up prices and compare products. + When responding, Be sure to be extra descriptive and use as + many words as possible without sounding ridiculous. + """, + Tools = [AIFunctionFactory.Create(LookupPrice)] + }, + // Note: AIContextProviders may be specified here instead of ChatClientBuilder.UseAIContextProviders. + // Specifying compaction at the agent level skips compaction in the function calling loop. + //AIContextProviders = [new CompactionProvider(compactionPipeline)] + }); + +AgentSession session = await agent.CreateSessionAsync(); + +// Helper to print chat history size +void PrintChatHistory() +{ + if (session.TryGetInMemoryChatHistory(out var history)) + { + Console.ForegroundColor = ConsoleColor.Cyan; + Console.WriteLine($"\n[Messages: #{history.Count}]\n"); + Console.ResetColor(); + } +} + +// Run a multi-turn conversation with tool calls to exercise the pipeline. +string[] prompts = +[ + "What's the price of a laptop?", + "How about a keyboard?", + "And a mouse?", + "Which product is the cheapest?", + "Can you compare the laptop and the keyboard for me?", + "What was the first product I asked about?", + "Thank you!", +]; + +foreach (string prompt in prompts) +{ + Console.ForegroundColor = ConsoleColor.Cyan; + Console.Write("\n[User] "); + Console.ResetColor(); + Console.WriteLine(prompt); + Console.ForegroundColor = ConsoleColor.Cyan; + Console.Write("\n[Agent] "); + Console.ResetColor(); + Console.WriteLine(await agent.RunAsync(prompt, session)); + + PrintChatHistory(); +} diff --git a/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md b/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md new file mode 100644 index 0000000000..0640a42f21 --- /dev/null +++ b/dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md @@ -0,0 +1,132 @@ +# Compaction Pipeline + +This sample demonstrates how to use a `CompactionProvider` with a `PipelineCompactionStrategy` to manage long conversation histories in a token-efficient way. The pipeline chains four compaction strategies, ordered from gentle to aggressive, so that the least disruptive strategy runs first and more aggressive strategies only activate when necessary. + +## What This Sample Shows + +- **`CompactionProvider`** — an `AIContextProvider` that applies a compaction strategy before each agent invocation, keeping only the most relevant messages within the model's context window +- **`PipelineCompactionStrategy`** — chains multiple compaction strategies into an ordered pipeline; each strategy evaluates its own trigger independently and operates on the output of the previous one +- **`ToolResultCompactionStrategy`** — collapses older tool-call groups into concise inline summaries, activated by a message-count trigger +- **`SummarizationCompactionStrategy`** — uses an LLM to compress older conversation spans into a single summary message, activated by a token-count trigger +- **`SlidingWindowCompactionStrategy`** — retains only the most recent N user turns and their responses, activated by a turn-count trigger +- **`TruncationCompactionStrategy`** — emergency backstop that drops the oldest groups until the conversation fits within a hard token budget +- **`CompactionTriggers`** — factory methods (`MessagesExceed`, `TokensExceed`, `TurnsExceed`, `GroupsExceed`, `HasToolCalls`, `All`, `Any`) that control when each strategy activates + +## Concepts + +### Message groups + +The compaction engine organizes messages into atomic *groups* that are treated as indivisible units during compaction. A group is either: + +| Group kind | Contents | +|---|---| +| `System` | System prompt message(s) | +| `User` | A single user message | +| `ToolCall` | One assistant message with tool calls + the matching tool result messages | +| `AssistantText` | A single assistant text-only message | +| `Summary` | One or more messages summarizing earlier conversation spans, produced by compaction strategies | + +`Summary` groups (`CompactionGroupKind.Summary`) are created by compaction strategies (for example, `SummarizationCompactionStrategy`) and do not originate directly from user or assistant messages. +Strategies exclude entire groups rather than individual messages, preserving the tool-call/result pairing required by most model APIs. + +### Compaction triggers + +A `CompactionTrigger` is a predicate evaluated against the current `MessageIndex`. When the trigger fires, the strategy performs compaction; when it does not fire, the strategy is skipped. Available triggers are: + +| Trigger | Activates when… | +|---|---| +| `CompactionTriggers.Always` | Always (unconditional) | +| `CompactionTriggers.Never` | Never (disabled) | +| `CompactionTriggers.MessagesExceed(n)` | Included message count > n | +| `CompactionTriggers.TokensExceed(n)` | Included token count > n | +| `CompactionTriggers.TurnsExceed(n)` | Included user-turn count > n | +| `CompactionTriggers.GroupsExceed(n)` | Included group count > n | +| `CompactionTriggers.HasToolCalls()` | At least one included tool-call group exists | +| `CompactionTriggers.All(...)` | All supplied triggers fire (logical AND) | +| `CompactionTriggers.Any(...)` | Any supplied trigger fires (logical OR) | + +### Pipeline ordering + +Order strategies from **least aggressive** to **most aggressive**. The pipeline runs every strategy whose trigger is met. Earlier strategies reduce the conversation gently so that later, more destructive strategies may not need to activate at all. + +``` +1. ToolResultCompactionStrategy – gentle: replaces verbose tool results with a short label +2. SummarizationCompactionStrategy – moderate: LLM-summarizes older turns +3. SlidingWindowCompactionStrategy – aggressive: drops turns beyond the window +4. TruncationCompactionStrategy – emergency: hard token-budget enforcement +``` + +## Prerequisites + +- .NET 10 SDK or later +- Azure OpenAI service endpoint and model deployment +- Azure CLI installed and authenticated + +**Note**: This sample uses `DefaultAzureCredential`. Sign in with `az login` before running. For production, prefer a specific credential such as `ManagedIdentityCredential`. For more information, see the [Azure CLI authentication documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively). + +## Environment Variables + +```powershell +$env:AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/" # Required +$env:AZURE_OPENAI_DEPLOYMENT_NAME="gpt-4o-mini" # Optional, defaults to gpt-4o-mini +``` + +## Running the Sample + +```powershell +cd dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline +dotnet run +``` + +## Expected Behavior + +The sample runs a seven-turn shopping-assistant conversation with tool calls. After each turn it prints the full message count so you can observe the pipeline compaction doesn't alter the source conversation. + +Each of the four compaction strategies has a deliberately low threshold so that it activates during the short demonstration conversation. In a production scenario you would raise the thresholds to match your model's context window and cost requirements. + +## Customizing the Pipeline + +### Using a single strategy + +If you only need one compaction strategy, pass it directly to `CompactionProvider` without wrapping it in a pipeline: + +```csharp +CompactionProvider provider = + new(new SlidingWindowCompactionStrategy(CompactionTriggers.TurnsExceed(20))); +``` + +### Ad-hoc compaction outside the provider pipeline + +`CompactionProvider.CompactAsync` applies a strategy to an arbitrary list of messages without an active agent session: + +```csharp +IEnumerable compacted = await CompactionProvider.CompactAsync( + new TruncationCompactionStrategy(CompactionTriggers.TokensExceed(8000)), + existingMessages); +``` + +### Using a different model for summarization + +The `SummarizationCompactionStrategy` accepts any `IChatClient`. Use a smaller, cheaper model to reduce summarization cost: + +```csharp +IChatClient summarizerChatClient = openAIClient.GetChatClient("gpt-4o-mini").AsIChatClient(); +new SummarizationCompactionStrategy(summarizerChatClient, CompactionTriggers.TokensExceed(4000)) +``` + +### Registering through `ChatClientAgentOptions` + +`CompactionProvider` can also be specified directly on `ChatClientAgentOptions` instead of calling `UseAIContextProviders` on the `ChatClientBuilder`: + +```csharp +AIAgent agent = agentChatClient + .AsBuilder() + .BuildAIAgent(new ChatClientAgentOptions + { + AIContextProviders = [new CompactionProvider(compactionPipeline)] + }); +``` + +This places the compaction provider at the agent level instead of the chat client level, which allows you to use different compaction strategies for different agents that share the same chat client. + +> Note: In this mode the `CompactionProvider` is not engaged during the tool calling loop. Agent-level `AIContextProviders` run before chat history is stored, so any synthetic summary messages produced by `CompactionProvider` can become part of the persisted history when using `ChatHistoryProvider`. If you want to compact only the request context while preserving the original stored history, register `CompactionProvider` on the `ChatClientBuilder` via `UseAIContextProviders(...)` instead of on `ChatClientAgentOptions`. diff --git a/dotnet/samples/02-agents/Agents/README.md b/dotnet/samples/02-agents/Agents/README.md index 116cbfc06b..4ac53ba246 100644 --- a/dotnet/samples/02-agents/Agents/README.md +++ b/dotnet/samples/02-agents/Agents/README.md @@ -44,6 +44,7 @@ Before you begin, ensure you have the following prerequisites: |[Deep research with an agent](./Agent_Step15_DeepResearch/)|This sample demonstrates how to use the Deep Research Tool to perform comprehensive research on complex topics| |[Declarative agent](./Agent_Step16_Declarative/)|This sample demonstrates how to declaratively define an agent.| |[Providing additional AI Context to an agent using multiple AIContextProviders](./Agent_Step17_AdditionalAIContext/)|This sample demonstrates how to inject additional AI context into a ChatClientAgent using multiple custom AIContextProvider components that are attached to the agent.| +|[Using compaction pipeline with an agent](./Agent_Step18_CompactionPipeline/)|This sample demonstrates how to use a compaction pipeline to efficiently limit the size of the conversation history for an agent.| ## Running the samples from the console diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs index 7c7b28b7bd..8db6666c37 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs @@ -79,20 +79,21 @@ public sealed class InMemoryChatHistoryProvider : ChatHistoryProvider /// is . public void SetMessages(AgentSession? session, List messages) { - _ = Throw.IfNull(messages); + Throw.IfNull(messages); - var state = this._sessionState.GetOrInitializeState(session); + State state = this._sessionState.GetOrInitializeState(session); state.Messages = messages; } /// protected override async ValueTask> ProvideChatHistoryAsync(InvokingContext context, CancellationToken cancellationToken = default) { - var state = this._sessionState.GetOrInitializeState(context.Session); + State state = this._sessionState.GetOrInitializeState(context.Session); if (this.ReducerTriggerEvent is InMemoryChatHistoryProviderOptions.ChatReducerTriggerEvent.BeforeMessagesRetrieval && this.ChatReducer is not null) { - state.Messages = (await this.ChatReducer.ReduceAsync(state.Messages, cancellationToken).ConfigureAwait(false)).ToList(); + // Apply pre-retrieval reduction if configured + await ReduceMessagesAsync(this.ChatReducer, state, cancellationToken).ConfigureAwait(false); } return state.Messages; @@ -101,7 +102,7 @@ public sealed class InMemoryChatHistoryProvider : ChatHistoryProvider /// protected override async ValueTask StoreChatHistoryAsync(InvokedContext context, CancellationToken cancellationToken = default) { - var state = this._sessionState.GetOrInitializeState(context.Session); + State state = this._sessionState.GetOrInitializeState(context.Session); // Add request and response messages to the provider var allNewMessages = context.RequestMessages.Concat(context.ResponseMessages ?? []); @@ -109,10 +110,16 @@ public sealed class InMemoryChatHistoryProvider : ChatHistoryProvider if (this.ReducerTriggerEvent is InMemoryChatHistoryProviderOptions.ChatReducerTriggerEvent.AfterMessageAdded && this.ChatReducer is not null) { - state.Messages = (await this.ChatReducer.ReduceAsync(state.Messages, cancellationToken).ConfigureAwait(false)).ToList(); + // Apply pre-write reduction strategy if configured + await ReduceMessagesAsync(this.ChatReducer, state, cancellationToken).ConfigureAwait(false); } } + private static async Task ReduceMessagesAsync(IChatReducer reducer, State state, CancellationToken cancellationToken = default) + { + state.Messages = [.. await reducer.ReduceAsync(state.Messages, cancellationToken).ConfigureAwait(false)]; + } + /// /// Represents the state of a stored in the . /// diff --git a/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientExtensions.cs b/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientExtensions.cs index 653f198402..8290c39974 100644 --- a/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientExtensions.cs @@ -55,7 +55,7 @@ public static class ChatClientExtensions if (chatClient.GetService() is null) { - _ = chatBuilder.Use((innerClient, services) => + chatBuilder.Use((innerClient, services) => { var loggerFactory = services.GetService(); diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/ChatMessageContentEquality.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/ChatMessageContentEquality.cs new file mode 100644 index 0000000000..6e325cd8b8 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/ChatMessageContentEquality.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using Microsoft.Extensions.AI; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// Content-based equality comparison for instances. +/// +internal static class ChatMessageContentEquality +{ + /// + /// Determines whether two instances represent the same message by content. + /// + /// + /// When both messages define a , identity is determined solely + /// by that identifier. Otherwise, the comparison falls through to , + /// , and each item in . + /// + internal static bool ContentEquals(this ChatMessage? message, ChatMessage? other) + { + if (ReferenceEquals(message, other)) + { + return true; + } + + if (message is null || other is null) + { + return false; + } + + // A matching MessageId is sufficient. + if (message.MessageId is not null && other.MessageId is not null) + { + return string.Equals(message.MessageId, other.MessageId, StringComparison.Ordinal); + } + + if (message.Role != other.Role) + { + return false; + } + + if (!string.Equals(message.AuthorName, other.AuthorName, StringComparison.Ordinal)) + { + return false; + } + + return ContentsEqual(message.Contents, other.Contents); + } + + private static bool ContentsEqual(IList left, IList right) + { + if (left.Count != right.Count) + { + return false; + } + + for (int i = 0; i < left.Count; i++) + { + if (!ContentItemEquals(left[i], right[i])) + { + return false; + } + } + + return true; + } + + private static bool ContentItemEquals(AIContent left, AIContent right) + { + if (ReferenceEquals(left, right)) + { + return true; + } + + if (left.GetType() != right.GetType()) + { + return false; + } + + return (left, right) switch + { + (TextContent a, TextContent b) => TextContentEquals(a, b), + (TextReasoningContent a, TextReasoningContent b) => TextReasoningContentEquals(a, b), + (DataContent a, DataContent b) => DataContentEquals(a, b), + (UriContent a, UriContent b) => UriContentEquals(a, b), + (ErrorContent a, ErrorContent b) => ErrorContentEquals(a, b), + (FunctionCallContent a, FunctionCallContent b) => FunctionCallContentEquals(a, b), + (FunctionResultContent a, FunctionResultContent b) => FunctionResultContentEquals(a, b), + (HostedFileContent a, HostedFileContent b) => HostedFileContentEquals(a, b), + (AIContent a, AIContent b) => a.GetType() == b.GetType(), + }; + } + + private static bool TextContentEquals(TextContent a, TextContent b) => + string.Equals(a.Text, b.Text, StringComparison.Ordinal); + + private static bool TextReasoningContentEquals(TextReasoningContent a, TextReasoningContent b) => + string.Equals(a.Text, b.Text, StringComparison.Ordinal) && + string.Equals(a.ProtectedData, b.ProtectedData, StringComparison.Ordinal); + + private static bool DataContentEquals(DataContent a, DataContent b) => + string.Equals(a.MediaType, b.MediaType, StringComparison.Ordinal) && + string.Equals(a.Name, b.Name, StringComparison.Ordinal) && + a.Data.Span.SequenceEqual(b.Data.Span); + + private static bool UriContentEquals(UriContent a, UriContent b) => + Equals(a.Uri, b.Uri) && + string.Equals(a.MediaType, b.MediaType, StringComparison.Ordinal); + + private static bool ErrorContentEquals(ErrorContent a, ErrorContent b) => + string.Equals(a.Message, b.Message, StringComparison.Ordinal) && + string.Equals(a.ErrorCode, b.ErrorCode, StringComparison.Ordinal) && + Equals(a.Details, b.Details); + + private static bool FunctionCallContentEquals(FunctionCallContent a, FunctionCallContent b) => + string.Equals(a.CallId, b.CallId, StringComparison.Ordinal) && + string.Equals(a.Name, b.Name, StringComparison.Ordinal) && + ArgumentsEqual(a.Arguments, b.Arguments); + + private static bool FunctionResultContentEquals(FunctionResultContent a, FunctionResultContent b) => + string.Equals(a.CallId, b.CallId, StringComparison.Ordinal) && + Equals(a.Result, b.Result); + + private static bool ArgumentsEqual(IDictionary? left, IDictionary? right) + { + if (ReferenceEquals(left, right)) + { + return true; + } + + if (left is null || right is null) + { + return false; + } + + if (left.Count != right.Count) + { + return false; + } + + foreach (KeyValuePair entry in left) + { + if (!right.TryGetValue(entry.Key, out object? value) || !Equals(entry.Value, value)) + { + return false; + } + } + + return true; + } + + private static bool HostedFileContentEquals(HostedFileContent a, HostedFileContent b) => + string.Equals(a.FileId, b.FileId, StringComparison.Ordinal) && + string.Equals(a.MediaType, b.MediaType, StringComparison.Ordinal) && + string.Equals(a.Name, b.Name, StringComparison.Ordinal); +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/ChatReducerCompactionStrategy.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/ChatReducerCompactionStrategy.cs new file mode 100644 index 0000000000..3df6736527 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/ChatReducerCompactionStrategy.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Logging; +using Microsoft.Shared.DiagnosticIds; +using Microsoft.Shared.Diagnostics; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// A compaction strategy that delegates to an to reduce the conversation's +/// included messages. +/// +/// +/// +/// This strategy bridges the abstraction from Microsoft.Extensions.AI +/// into the compaction pipeline. It collects the currently included messages from the +/// , passes them to the reducer, and rebuilds the index from the +/// reduced message list when the reducer produces fewer messages. +/// +/// +/// The controls when reduction is attempted. +/// Use for common trigger conditions such as token or message thresholds. +/// +/// +/// Use this strategy when you have an existing implementation +/// (such as MessageCountingChatReducer) and want to apply it as part of a +/// pipeline or as an in-run compaction strategy. +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class ChatReducerCompactionStrategy : CompactionStrategy +{ + /// + /// Initializes a new instance of the class. + /// + /// + /// The that performs the message reduction. + /// + /// + /// The that controls when compaction proceeds. + /// + public ChatReducerCompactionStrategy(IChatReducer chatReducer, CompactionTrigger trigger) + : base(trigger) + { + this.ChatReducer = Throw.IfNull(chatReducer); + } + + /// + /// Gets the chat reducer used to reduce messages. + /// + public IChatReducer ChatReducer { get; } + + /// + protected override async ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken) + { + // No need to short-circuit on empty conversations, this is handled by . + List includedMessages = [.. index.GetIncludedMessages()]; + + IEnumerable reduced = await this.ChatReducer.ReduceAsync(includedMessages, cancellationToken).ConfigureAwait(false); + IList reducedMessages = reduced as IList ?? [.. reduced]; + + if (reducedMessages.Count >= includedMessages.Count) + { + return false; + } + + // Rebuild the index from the reduced messages + CompactionMessageIndex rebuilt = CompactionMessageIndex.Create(reducedMessages, index.Tokenizer); + index.Groups.Clear(); + foreach (CompactionMessageGroup group in rebuilt.Groups) + { + index.Groups.Add(group); + } + + return true; + } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionGroupKind.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionGroupKind.cs new file mode 100644 index 0000000000..474fab1e9d --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionGroupKind.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Diagnostics.CodeAnalysis; +using Microsoft.Shared.DiagnosticIds; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// Identifies the kind of a . +/// +/// +/// Message groups are used to classify logically related messages that must be kept together +/// during compaction operations. For example, an assistant message containing tool calls +/// and its corresponding tool result messages form an atomic group. +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public enum CompactionGroupKind +{ + /// + /// A system message group containing one or more system messages. + /// + System, + + /// + /// A user message group containing a single user message. + /// + User, + + /// + /// An assistant message group containing a single assistant text response (no tool calls). + /// + AssistantText, + + /// + /// An atomic tool call group containing an assistant message with tool calls + /// followed by the corresponding tool result messages. + /// + /// + /// This group must be treated as an atomic unit during compaction. Removing the assistant + /// message without its tool results (or vice versa) will cause LLM API errors. + /// + ToolCall, + +#pragma warning disable IDE0001 // Simplify Names + /// + /// A summary message group produced by a compaction strategy (e.g., SummarizationCompactionStrategy). + /// + /// + /// Summary groups replace previously compacted messages with a condensed representation. + /// They are identified by the metadata entry + /// on the underlying . + /// +#pragma warning restore IDE0001 // Simplify Names + Summary, +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionLogMessages.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionLogMessages.cs new file mode 100644 index 0000000000..6211b988c7 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionLogMessages.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Diagnostics.CodeAnalysis; +using Microsoft.Extensions.Logging; + +namespace Microsoft.Agents.AI.Compaction; + +#pragma warning disable SYSLIB1006 // Multiple logging methods cannot use the same event id within a class + +/// +/// Extensions for logging compaction diagnostics. +/// +/// +/// This extension uses the to +/// generate logging code at compile time to achieve optimized code. +/// +[ExcludeFromCodeCoverage] +internal static partial class CompactionLogMessages +{ + /// + /// Logs when compaction is skipped because the trigger condition was not met. + /// + [LoggerMessage( + Level = LogLevel.Trace, + Message = "Compaction skipped for {StrategyName}: trigger condition not met or insufficient groups.")] + public static partial void LogCompactionSkipped( + this ILogger logger, + string strategyName); + + /// + /// Logs compaction completion with before/after metrics. + /// + [LoggerMessage( + Level = LogLevel.Debug, + Message = "Compaction completed: {StrategyName} in {DurationMs}ms — Messages {BeforeMessages}→{AfterMessages}, Groups {BeforeGroups}→{AfterGroups}, Tokens {BeforeTokens}→{AfterTokens}")] + public static partial void LogCompactionCompleted( + this ILogger logger, + string strategyName, + long durationMs, + int beforeMessages, + int afterMessages, + int beforeGroups, + int afterGroups, + int beforeTokens, + int afterTokens); + + /// + /// Logs when the compaction provider skips compaction. + /// + [LoggerMessage( + Level = LogLevel.Trace, + Message = "CompactionProvider skipped: {Reason}.")] + public static partial void LogCompactionProviderSkipped( + this ILogger logger, + string reason); + + /// + /// Logs when the compaction provider begins applying a compaction strategy. + /// + [LoggerMessage( + Level = LogLevel.Debug, + Message = "CompactionProvider applying compaction to {MessageCount} messages using {StrategyName}.")] + public static partial void LogCompactionProviderApplying( + this ILogger logger, + int messageCount, + string strategyName); + + /// + /// Logs when the compaction provider has applied compaction with result metrics. + /// + [LoggerMessage( + Level = LogLevel.Debug, + Message = "CompactionProvider compaction applied: messages {BeforeMessages}→{AfterMessages}.")] + public static partial void LogCompactionProviderApplied( + this ILogger logger, + int beforeMessages, + int afterMessages); + + /// + /// Logs when a summarization LLM call is starting. + /// + [LoggerMessage( + Level = LogLevel.Debug, + Message = "Summarization starting for {GroupCount} groups ({MessageCount} messages) using {ChatClientType}.")] + public static partial void LogSummarizationStarting( + this ILogger logger, + int groupCount, + int messageCount, + string chatClientType); + + /// + /// Logs when a summarization LLM call has completed. + /// + [LoggerMessage( + Level = LogLevel.Debug, + Message = "Summarization completed: summary length {SummaryLength} characters, inserted at index {InsertIndex}.")] + public static partial void LogSummarizationCompleted( + this ILogger logger, + int summaryLength, + int insertIndex); + + /// + /// Logs when a summarization LLM call fails and groups are restored. + /// + [LoggerMessage( + Level = LogLevel.Warning, + Message = "Summarization failed for {GroupCount} groups; restoring excluded groups and continuing without compaction. Error: {ErrorMessage}")] + public static partial void LogSummarizationFailed( + this ILogger logger, + int groupCount, + string errorMessage); +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionMessageGroup.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionMessageGroup.cs new file mode 100644 index 0000000000..049fa3013f --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionMessageGroup.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization; +using Microsoft.Extensions.AI; +using Microsoft.Shared.DiagnosticIds; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// Represents a logical group of instances that must be kept or removed together during compaction. +/// +/// +/// +/// Message groups ensure atomic preservation of related messages. For example, an assistant message +/// containing tool calls and its corresponding tool result messages form a +/// group — removing one without the other would cause LLM API errors. +/// +/// +/// Groups also support exclusion semantics: a group can be marked as excluded (with an optional reason) +/// to indicate it should not be included in the messages sent to the model, while still being preserved +/// for diagnostics, storage, or later re-inclusion. +/// +/// +/// Each group tracks its , , and +/// so that can efficiently aggregate totals across all or only included groups. +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class CompactionMessageGroup +{ + /// + /// The key used to identify a message as a compaction summary. + /// + /// + /// When this key is present with a value of , the message is classified as + /// by . + /// + public static readonly string SummaryPropertyKey = "_is_summary"; + + /// + /// Initializes a new instance of the class. + /// + /// The kind of message group. + /// The messages in this group. The list is captured as a read-only snapshot. + /// The total UTF-8 byte count of the text content in the messages. + /// The token count for the messages, computed by a tokenizer or estimated. + /// + /// The user turn this group belongs to, or for . + /// + [JsonConstructor] + internal CompactionMessageGroup(CompactionGroupKind kind, IReadOnlyList messages, int byteCount, int tokenCount, int? turnIndex = null) + { + this.Kind = kind; + this.Messages = messages; + this.MessageCount = messages.Count; + this.ByteCount = byteCount; + this.TokenCount = tokenCount; + this.TurnIndex = turnIndex; + } + + /// + /// Gets the kind of this message group. + /// + public CompactionGroupKind Kind { get; } + + /// + /// Gets the messages in this group. + /// + public IReadOnlyList Messages { get; } + + /// + /// Gets the number of messages in this group. + /// + public int MessageCount { get; } + + /// + /// Gets the total UTF-8 byte count of the text content in this group's messages. + /// + public int ByteCount { get; } + + /// + /// Gets the estimated or actual token count for this group's messages. + /// + public int TokenCount { get; } + + /// + /// Gets user turn index this group belongs to, or for groups + /// that precede the first user message (e.g., system messages). A turn index of 0 + /// corresponds with any non-system message that precedes the first user message, + /// turn index 1 corresponds with the first user message and its subsequent non-user + /// messages, and so on... + /// + /// + /// A turn starts with a group and includes all subsequent + /// non-user, non-system groups until the next user group or end of conversation. System messages + /// () are always assigned a turn index + /// since they never belong to a user turn. + /// + public int? TurnIndex { get; } + + /// + /// Gets or sets a value indicating whether this group is excluded from the projected message list. + /// + /// + /// Excluded groups are preserved in the collection for diagnostics or storage purposes + /// but are not included when calling . + /// + public bool IsExcluded { get; set; } + + /// + /// Gets or sets an optional reason explaining why this group was excluded. + /// + public string? ExcludeReason { get; set; } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionMessageIndex.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionMessageIndex.cs new file mode 100644 index 0000000000..003a70f2b3 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionMessageIndex.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Text; +using Microsoft.Extensions.AI; +using Microsoft.ML.Tokenizers; +using Microsoft.Shared.DiagnosticIds; +using Microsoft.Shared.Diagnostics; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// A collection of instances and derived metrics based on a flat list of objects. +/// +/// +/// provides structural grouping of messages into logical units. Individual +/// groups can be marked as excluded without being removed, allowing compaction strategies to toggle visibility while preserving +/// the full history for diagnostics or storage. Metrics are provided both including and excluding excluded groups, +/// allowing strategies to make informed decisions based on the impact of potential exclusions. +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class CompactionMessageIndex +{ + private int _currentTurn; + private ChatMessage? _lastProcessedMessage; + + /// + /// Gets the list of message groups in this collection. + /// + public IList Groups { get; } + + /// + /// Gets the tokenizer used for computing token counts, or if token counts are estimated. + /// + public Tokenizer? Tokenizer { get; } + + /// + /// Initializes a new instance of the class with the specified groups. + /// + /// The message groups. + /// An optional tokenizer retained for computing token counts when adding new groups. + public CompactionMessageIndex(IList groups, Tokenizer? tokenizer = null) + { + this.Groups = Throw.IfNull(groups, nameof(groups)); + this.Tokenizer = tokenizer; + + // Restore turn counter and last processed message from the groups + for (int index = groups.Count - 1; index >= 0; --index) + { + if (this._lastProcessedMessage is null && this.Groups[index].Kind != CompactionGroupKind.Summary) + { + IReadOnlyList groupMessages = this.Groups[index].Messages; + this._lastProcessedMessage = groupMessages[^1]; + } + + if (this.Groups[index].TurnIndex.HasValue) + { + this._currentTurn = this.Groups[index].TurnIndex!.Value; + + // Both values restored — no need to keep scanning + if (this._lastProcessedMessage is not null) + { + break; + } + } + } + } + + /// + /// Creates a from a flat list of instances. + /// + /// The messages to group. + /// + /// An optional for computing token counts on each group. + /// When , token counts are estimated as ByteCount / 4. + /// + /// A new with messages organized into logical groups. + /// + /// The grouping algorithm: + /// + /// System messages become groups. + /// User messages become groups. + /// Assistant messages with tool calls, followed by their corresponding tool result messages, become groups. + /// Assistant messages marked with become groups. + /// Assistant messages without tool calls become groups. + /// + /// + internal static CompactionMessageIndex Create(IList messages, Tokenizer? tokenizer = null) + { + CompactionMessageIndex instance = new([], tokenizer); + instance.AppendFromMessages(messages, 0); + return instance; + } + + /// + /// Incrementally updates the groups with new messages from the conversation. + /// + /// + /// The full list of messages for the conversation. This must be the same list (or a replacement with the same + /// prefix) that was used to create or last update this instance. + /// + /// + /// + /// Uses equality on the last processed message to detect changes. Only the messages after that position are + /// processed and appended as new groups. Existing groups and their compaction state (exclusions) are preserved. + /// + /// + /// If the last processed message is not found (e.g., the message list was replaced entirely + /// or a sliding window shifted past it), all groups are cleared and rebuilt from scratch. + /// + /// + /// If the last message in matches the last + /// processed message, no work is performed. + /// + /// + internal void Update(IList allMessages) + { + if (allMessages.Count == 0) + { + this.Groups.Clear(); + this._currentTurn = 0; + this._lastProcessedMessage = null; + return; + } + + // If the last message is unchanged and the list hasn't shrunk, there is nothing new to process. + if (this._lastProcessedMessage is not null && + allMessages.Count >= this.RawMessageCount && + allMessages[allMessages.Count - 1].ContentEquals(this._lastProcessedMessage)) + { + return; + } + + // Walk backwards to locate where we left off. + int foundIndex = -1; + if (this._lastProcessedMessage is not null) + { + for (int i = allMessages.Count - 1; i >= 0; --i) + { + if (allMessages[i].ContentEquals(this._lastProcessedMessage)) + { + foundIndex = i; + break; + } + } + } + + if (foundIndex < 0) + { + // Last processed message not found — total rebuild. + this.Groups.Clear(); + this._currentTurn = 0; + this.AppendFromMessages(allMessages, 0); + return; + } + + // Guard against a sliding window that removed messages from the front: + // the number of messages up to (and including) the found position must + // match the number of messages already represented by existing groups. + if (foundIndex + 1 < this.RawMessageCount) + { + // Front of the message list was trimmed — rebuild. + this.Groups.Clear(); + this._currentTurn = 0; + this.AppendFromMessages(allMessages, 0); + return; + } + + // Process only the delta messages. + this.AppendFromMessages(allMessages, foundIndex + 1); + } + + private void AppendFromMessages(IList messages, int startIndex) + { + int index = startIndex; + + while (index < messages.Count) + { + ChatMessage message = messages[index]; + + if (message.Role == ChatRole.System) + { + // System messages are not part of any turn + this.Groups.Add(CreateGroup(CompactionGroupKind.System, [message], this.Tokenizer, turnIndex: null)); + index++; + } + else if (message.Role == ChatRole.User) + { + this._currentTurn++; + this.Groups.Add(CreateGroup(CompactionGroupKind.User, [message], this.Tokenizer, this._currentTurn)); + index++; + } + else if (message.Role == ChatRole.Assistant && HasToolCalls(message)) + { + List groupMessages = [message]; + index++; + + // Collect all subsequent tool result messages and reasoning-only assistant messages + while (index < messages.Count && + (messages[index].Role == ChatRole.Tool || + (messages[index].Role == ChatRole.Assistant && HasOnlyReasoning(messages[index])))) + { + groupMessages.Add(messages[index]); + index++; + } + + this.Groups.Add(CreateGroup(CompactionGroupKind.ToolCall, groupMessages, this.Tokenizer, this._currentTurn)); + } + else if (message.Role == ChatRole.Assistant && IsSummaryMessage(message)) + { + this.Groups.Add(CreateGroup(CompactionGroupKind.Summary, [message], this.Tokenizer, this._currentTurn)); + index++; + } + else if (message.Role == ChatRole.Assistant && HasOnlyReasoning(message)) + { + // Reasoning-only assistant messages that precede a tool-call assistant message + // are part of the same atomic tool-call group. Look ahead past consecutive + // reasoning messages to find a possible tool-call message. + int lookahead = index + 1; + while (lookahead < messages.Count && + messages[lookahead].Role == ChatRole.Assistant && + HasOnlyReasoning(messages[lookahead])) + { + lookahead++; + } + + if (lookahead < messages.Count && messages[lookahead].Role == ChatRole.Assistant && HasToolCalls(messages[lookahead])) + { + // Group all reasoning messages + the tool-call message together + List groupMessages = []; + for (int j = index; j <= lookahead; j++) + { + groupMessages.Add(messages[j]); + } + + index = lookahead + 1; + + // Collect all subsequent tool result messages and reasoning-only assistant messages + while (index < messages.Count && + (messages[index].Role == ChatRole.Tool || + (messages[index].Role == ChatRole.Assistant && HasOnlyReasoning(messages[index])))) + { + groupMessages.Add(messages[index]); + index++; + } + + this.Groups.Add(CreateGroup(CompactionGroupKind.ToolCall, groupMessages, this.Tokenizer, this._currentTurn)); + } + else + { + this.Groups.Add(CreateGroup(CompactionGroupKind.AssistantText, [message], this.Tokenizer, this._currentTurn)); + index++; + } + } + else + { + this.Groups.Add(CreateGroup(CompactionGroupKind.AssistantText, [message], this.Tokenizer, this._currentTurn)); + index++; + } + } + + if (messages.Count > 0) + { + this._lastProcessedMessage = messages[^1]; + } + } + + /// + /// Creates a new with byte and token counts computed using this collection's + /// , and adds it to the list at the specified index. + /// + /// The zero-based index at which the group should be inserted. + /// The kind of message group. + /// The messages in the group. + /// The optional turn index to assign to the new group. + /// The newly created . + public CompactionMessageGroup InsertGroup(int index, CompactionGroupKind kind, IReadOnlyList messages, int? turnIndex = null) + { + CompactionMessageGroup group = CreateGroup(kind, messages, this.Tokenizer, turnIndex); + this.Groups.Insert(index, group); + return group; + } + + /// + /// Creates a new with byte and token counts computed using this collection's + /// , and appends it to the end of the list. + /// + /// The kind of message group. + /// The messages in the group. + /// The optional turn index to assign to the new group. + /// The newly created . + public CompactionMessageGroup AddGroup(CompactionGroupKind kind, IReadOnlyList messages, int? turnIndex = null) + { + CompactionMessageGroup group = CreateGroup(kind, messages, this.Tokenizer, turnIndex); + this.Groups.Add(group); + return group; + } + + /// + /// Returns only the messages from groups that are not excluded. + /// + /// A list of instances from included groups, in order. + public IEnumerable GetIncludedMessages() => + this.Groups.Where(group => !group.IsExcluded).SelectMany(group => group.Messages); + + /// + /// Returns all messages from all groups, including excluded ones. + /// + /// A list of all instances, in order. + public IEnumerable GetAllMessages() => this.Groups.SelectMany(group => group.Messages); + + /// + /// Gets the total number of groups, including excluded ones. + /// + public int TotalGroupCount => this.Groups.Count; + + /// + /// Gets the total number of messages across all groups, including excluded ones. + /// + public int TotalMessageCount => this.Groups.Sum(group => group.MessageCount); + + /// + /// Gets the total UTF-8 byte count across all groups, including excluded ones. + /// + public int TotalByteCount => this.Groups.Sum(group => group.ByteCount); + + /// + /// Gets the total token count across all groups, including excluded ones. + /// + public int TotalTokenCount => this.Groups.Sum(group => group.TokenCount); + + /// + /// Gets the total number of groups that are not excluded. + /// + public int IncludedGroupCount => this.Groups.Count(group => !group.IsExcluded); + + /// + /// Gets the total number of messages across all included (non-excluded) groups. + /// + public int IncludedMessageCount => this.Groups.Where(group => !group.IsExcluded).Sum(group => group.MessageCount); + + /// + /// Gets the total UTF-8 byte count across all included (non-excluded) groups. + /// + public int IncludedByteCount => this.Groups.Where(group => !group.IsExcluded).Sum(group => group.ByteCount); + + /// + /// Gets the total token count across all included (non-excluded) groups. + /// + public int IncludedTokenCount => this.Groups.Where(group => !group.IsExcluded).Sum(group => group.TokenCount); + + /// + /// Gets the total number of user turns across all groups (including those with excluded groups). + /// + public int TotalTurnCount => this.Groups.Select(group => group.TurnIndex).Distinct().Count(turnIndex => turnIndex is not null && turnIndex > 0); + + /// + /// Gets the number of user turns that have at least one non-excluded group. + /// + public int IncludedTurnCount => this.Groups.Where(group => !group.IsExcluded && group.TurnIndex is not null && group.TurnIndex > 0).Select(group => group.TurnIndex).Distinct().Count(); + + /// + /// Gets the total number of groups across all included (non-excluded) groups that are not . + /// + public int IncludedNonSystemGroupCount => this.Groups.Count(group => !group.IsExcluded && group.Kind != CompactionGroupKind.System); + + /// + /// Gets the total number of original messages (that are not summaries). + /// + public int RawMessageCount => this.Groups.Where(group => group.Kind != CompactionGroupKind.Summary).Sum(group => group.MessageCount); + + /// + /// Returns all groups that belong to the specified user turn. + /// + /// The desired turn index. + /// The groups belonging to the turn, in order. + public IEnumerable GetTurnGroups(int turnIndex) => this.Groups.Where(group => group.TurnIndex == turnIndex); + + /// + /// Computes the UTF-8 byte count for a set of messages across all content types. + /// + /// The messages to compute byte count for. + /// The total UTF-8 byte count of all message content. + internal static int ComputeByteCount(IReadOnlyList messages) + { + int total = 0; + for (int i = 0; i < messages.Count; i++) + { + IList contents = messages[i].Contents; + for (int j = 0; j < contents.Count; j++) + { + total += ComputeContentByteCount(contents[j]); + } + } + + return total; + } + + /// + /// Computes the token count for a set of messages using the specified tokenizer. + /// + /// The messages to compute token count for. + /// The tokenizer to use for counting tokens. + /// The total token count across all message content. + /// + /// Text-bearing content ( and ) + /// is tokenized directly. All other content types estimate tokens as byteCount / 4. + /// + internal static int ComputeTokenCount(IReadOnlyList messages, Tokenizer tokenizer) + { + int total = 0; + for (int i = 0; i < messages.Count; i++) + { + IList contents = messages[i].Contents; + for (int j = 0; j < contents.Count; j++) + { + AIContent content = contents[j]; + switch (content) + { + case TextContent text: + if (text.Text is { Length: > 0 } t) + { + total += tokenizer.CountTokens(t); + } + + break; + + case TextReasoningContent reasoning: + if (reasoning.Text is { Length: > 0 } rt) + { + total += tokenizer.CountTokens(rt); + } + + if (reasoning.ProtectedData is { Length: > 0 } pd) + { + total += tokenizer.CountTokens(pd); + } + + break; + + default: + total += ComputeContentByteCount(content) / 4; + break; + } + } + } + + return total; + } + + private static int ComputeContentByteCount(AIContent content) + { + switch (content) + { + case TextContent text: + return GetStringByteCount(text.Text); + + case TextReasoningContent reasoning: + return GetStringByteCount(reasoning.Text) + GetStringByteCount(reasoning.ProtectedData); + + case DataContent data: + return data.Data.Length + GetStringByteCount(data.MediaType) + GetStringByteCount(data.Name); + + case UriContent uri: + return (uri.Uri is Uri uriValue ? GetStringByteCount(uriValue.OriginalString) : 0) + GetStringByteCount(uri.MediaType); + + case FunctionCallContent call: + int callBytes = GetStringByteCount(call.CallId) + GetStringByteCount(call.Name); + if (call.Arguments is not null) + { + foreach (KeyValuePair arg in call.Arguments) + { + callBytes += GetStringByteCount(arg.Key); + callBytes += GetStringByteCount(arg.Value?.ToString()); + } + } + + return callBytes; + + case FunctionResultContent result: + return GetStringByteCount(result.CallId) + GetStringByteCount(result.Result?.ToString()); + + case ErrorContent error: + return GetStringByteCount(error.Message) + GetStringByteCount(error.ErrorCode) + GetStringByteCount(error.Details); + + case HostedFileContent file: + return GetStringByteCount(file.FileId) + GetStringByteCount(file.MediaType) + GetStringByteCount(file.Name); + + default: + return 0; + } + } + + private static int GetStringByteCount(string? value) => + value is { Length: > 0 } ? Encoding.UTF8.GetByteCount(value) : 0; + + private static CompactionMessageGroup CreateGroup(CompactionGroupKind kind, IReadOnlyList messages, Tokenizer? tokenizer, int? turnIndex) + { + int byteCount = ComputeByteCount(messages); + int tokenCount = tokenizer is not null + ? ComputeTokenCount(messages, tokenizer) + : byteCount / 4; + + return new CompactionMessageGroup(kind, messages, byteCount, tokenCount, turnIndex); + } + + private static bool HasToolCalls(ChatMessage message) + { + foreach (AIContent content in message.Contents) + { + if (content is FunctionCallContent) + { + return true; + } + } + + return false; + } + + private static bool HasOnlyReasoning(ChatMessage message) => + message.Contents.All(content => content is TextReasoningContent); + + private static bool IsSummaryMessage(ChatMessage message) => + message.AdditionalProperties?.TryGetValue(CompactionMessageGroup.SummaryPropertyKey, out object? value) is true + && value is true; +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionProvider.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionProvider.cs new file mode 100644 index 0000000000..02891b4f48 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionProvider.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Shared.DiagnosticIds; +using Microsoft.Shared.Diagnostics; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// A that applies a to compact +/// the message list before each agent invocation. +/// +/// +/// +/// This provider performs in-run compaction by organizing messages into atomic groups (preserving +/// tool-call/result pairings) before applying compaction logic. Only included messages are forwarded +/// to the agent's underlying chat client. +/// +/// +/// The can be added to an agent's context provider pipeline +/// via or via UseAIContextProviders +/// on a or . +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class CompactionProvider : AIContextProvider +{ + private readonly CompactionStrategy _compactionStrategy; + private readonly ProviderSessionState _sessionState; + private readonly ILoggerFactory? _loggerFactory; + + /// + /// Initializes a new instance of the class. + /// + /// The compaction strategy to apply before each invocation. + /// + /// An optional key used to store the provider state in the . Provide + /// an explicit value if configuring multiple agents with different compaction strategies that will interact + /// in the same session. + /// + /// + /// An optional used to create a logger for provider diagnostics. + /// When , logging is disabled. + /// + /// is . + public CompactionProvider(CompactionStrategy compactionStrategy, string? stateKey = null, ILoggerFactory? loggerFactory = null) + { + this._compactionStrategy = Throw.IfNull(compactionStrategy); + stateKey ??= this._compactionStrategy.GetType().Name; + this.StateKeys = [stateKey]; + this._sessionState = new ProviderSessionState( + _ => new State(), + stateKey, + AgentJsonUtilities.DefaultOptions); + this._loggerFactory = loggerFactory; + } + + /// + public override IReadOnlyList StateKeys { get; } + + /// + /// Applies compaction strategy to the provided message list and returns the compacted messages. + /// This can be used for ad-hoc compaction outside of the provider pipeline. + /// + /// The compaction strategy to apply before each invocation. + /// The messages to compact + /// An optional for emitting compaction diagnostics. + /// The to monitor for cancellation requests. + /// An enumeration of the compacted instances. + public static async Task> CompactAsync(CompactionStrategy compactionStrategy, IEnumerable messages, ILogger? logger = null, CancellationToken cancellationToken = default) + { + Throw.IfNull(compactionStrategy); + Throw.IfNull(messages); + + List messageList = messages as List ?? [.. messages]; + CompactionMessageIndex messageIndex = CompactionMessageIndex.Create(messageList); + + await compactionStrategy.CompactAsync(messageIndex, logger, cancellationToken).ConfigureAwait(false); + + return messageIndex.GetIncludedMessages(); + } + + /// + /// Applies the compaction strategy to the accumulated message list before forwarding it to the agent. + /// + /// Contains the request context including all accumulated messages. + /// The to monitor for cancellation requests. + /// + /// A task that represents the asynchronous operation. The task result contains an + /// with the compacted message list. + /// + protected override async ValueTask InvokingCoreAsync(InvokingContext context, CancellationToken cancellationToken = default) + { + using Activity? activity = CompactionTelemetry.ActivitySource.StartActivity(CompactionTelemetry.ActivityNames.CompactionProviderInvoke); + + ILoggerFactory loggerFactory = this.GetLoggerFactory(context.Agent); + ILogger logger = loggerFactory.CreateLogger(); + + AgentSession? session = context.Session; + IEnumerable? allMessages = context.AIContext.Messages; + + if (session is null || allMessages is null) + { + logger.LogCompactionProviderSkipped("no session or no messages"); + return context.AIContext; + } + + ChatClientAgentSession? chatClientSession = session.GetService(); + if (chatClientSession is not null && + !string.IsNullOrWhiteSpace(chatClientSession.ConversationId)) + { + logger.LogCompactionProviderSkipped("session managed by remote service"); + return context.AIContext; + } + + List messageList = allMessages as List ?? [.. allMessages]; + + State state = this._sessionState.GetOrInitializeState(session); + + CompactionMessageIndex messageIndex; + if (state.MessageGroups.Count > 0) + { + // Update existing index with any new messages appended since the last call. + messageIndex = new([.. state.MessageGroups]); + messageIndex.Update(messageList); + } + else + { + // First pass — initialize the message index from scratch. + messageIndex = CompactionMessageIndex.Create(messageList); + } + + string strategyName = this._compactionStrategy.GetType().Name; + int beforeMessages = messageIndex.IncludedMessageCount; + logger.LogCompactionProviderApplying(beforeMessages, strategyName); + + // Apply compaction + await this._compactionStrategy.CompactAsync( + messageIndex, + loggerFactory.CreateLogger(this._compactionStrategy.GetType()), + cancellationToken).ConfigureAwait(false); + + int afterMessages = messageIndex.IncludedMessageCount; + if (afterMessages < beforeMessages) + { + logger.LogCompactionProviderApplied(beforeMessages, afterMessages); + } + + // Persist the index + state.MessageGroups.Clear(); + state.MessageGroups.AddRange(messageIndex.Groups); + + return new AIContext + { + Instructions = context.AIContext.Instructions, + Messages = messageIndex.GetIncludedMessages(), + Tools = context.AIContext.Tools + }; + } + + private ILoggerFactory GetLoggerFactory(AIAgent agent) => + this._loggerFactory ?? + agent.GetService()?.GetService() ?? + NullLoggerFactory.Instance; + + /// + /// Represents the persisted state of a stored in the . + /// + internal sealed class State + { + /// + /// Gets or sets the message index groups used for incremental compaction updates. + /// + [JsonPropertyName("messagegroups")] + public List MessageGroups { get; set; } = []; + } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionStrategy.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionStrategy.cs new file mode 100644 index 0000000000..e6f7485438 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionStrategy.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.Shared.DiagnosticIds; +using Microsoft.Shared.Diagnostics; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// Base class for strategies that compact a to reduce context size. +/// +/// +/// +/// Compaction strategies operate on instances, which organize messages +/// into atomic groups that respect the tool-call/result pairing constraint. Strategies mutate the collection +/// in place by marking groups as excluded, removing groups, or replacing message content (e.g., with summaries). +/// +/// +/// Every strategy requires a that determines whether compaction should +/// proceed based on current metrics (token count, message count, turn count, etc.). +/// The base class evaluates this trigger at the start of and skips compaction when +/// the trigger returns . +/// +/// +/// An optional target condition controls when compaction stops. Strategies incrementally exclude +/// groups and re-evaluate the target after each exclusion, stopping as soon as the target returns +/// . When no target is specified, it defaults to the inverse of the trigger — +/// meaning compaction stops when the trigger condition would no longer fire. +/// +/// +/// Strategies can be applied at three lifecycle points: +/// +/// In-run: During the tool loop, before each LLM call, to keep context within token limits. +/// Pre-write: Before persisting messages to storage via . +/// On existing storage: As a maintenance operation to compact stored history. +/// +/// +/// +/// Multiple strategies can be composed by applying them sequentially to the same +/// via . +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public abstract class CompactionStrategy +{ + /// + /// Initializes a new instance of the class. + /// + /// + /// The that determines whether compaction should proceed. + /// + /// + /// An optional target condition that controls when compaction stops. Strategies re-evaluate + /// this predicate after each incremental exclusion and stop when it returns . + /// When , defaults to the inverse of the — compaction + /// stops as soon as the trigger condition would no longer fire. + /// + protected CompactionStrategy(CompactionTrigger trigger, CompactionTrigger? target = null) + { + this.Trigger = Throw.IfNull(trigger); + this.Target = target ?? (index => !trigger(index)); + } + + /// + /// Gets the trigger predicate that controls when compaction proceeds. + /// + protected CompactionTrigger Trigger { get; } + + /// + /// Gets the target predicate that controls when compaction stops. + /// Strategies re-evaluate this after each incremental exclusion and stop when it returns . + /// + protected CompactionTrigger Target { get; } + + /// + /// Applies the strategy-specific compaction logic to the specified message index. + /// + /// + /// This method is called by only when the + /// returns . Implementations do not need to evaluate the trigger or + /// report metrics — the base class handles both. Implementations should use + /// to determine when to stop compacting incrementally. + /// + /// The message index to compact. The strategy mutates this collection in place. + /// The for emitting compaction diagnostics. + /// The to monitor for cancellation requests. + /// A task whose result is if any compaction was performed, otherwise. + protected abstract ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken); + + /// + /// Evaluates the and, when it fires, delegates to + /// and reports compaction metrics. + /// + /// The message index to compact. The strategy mutates this collection in place. + /// An optional for emitting compaction diagnostics. When , logging is disabled. + /// The to monitor for cancellation requests. + /// A task representing the asynchronous operation. The task result is if compaction occurred, otherwise. + public async ValueTask CompactAsync(CompactionMessageIndex index, ILogger? logger = null, CancellationToken cancellationToken = default) + { + string strategyName = this.GetType().Name; + logger ??= NullLogger.Instance; + + using Activity? activity = CompactionTelemetry.ActivitySource.StartActivity(CompactionTelemetry.ActivityNames.Compact); + activity?.SetTag(CompactionTelemetry.Tags.Strategy, strategyName); + + if (index.IncludedNonSystemGroupCount <= 1 || !this.Trigger(index)) + { + activity?.SetTag(CompactionTelemetry.Tags.Triggered, false); + logger.LogCompactionSkipped(strategyName); + return false; + } + + activity?.SetTag(CompactionTelemetry.Tags.Triggered, true); + + int beforeTokens = index.IncludedTokenCount; + int beforeGroups = index.IncludedGroupCount; + int beforeMessages = index.IncludedMessageCount; + + Stopwatch stopwatch = Stopwatch.StartNew(); + + bool compacted = await this.CompactCoreAsync(index, logger, cancellationToken).ConfigureAwait(false); + + stopwatch.Stop(); + + activity?.SetTag(CompactionTelemetry.Tags.Compacted, compacted); + + if (compacted) + { + activity? + .SetTag(CompactionTelemetry.Tags.BeforeTokens, beforeTokens) + .SetTag(CompactionTelemetry.Tags.AfterTokens, index.IncludedTokenCount) + .SetTag(CompactionTelemetry.Tags.BeforeMessages, beforeMessages) + .SetTag(CompactionTelemetry.Tags.AfterMessages, index.IncludedMessageCount) + .SetTag(CompactionTelemetry.Tags.BeforeGroups, beforeGroups) + .SetTag(CompactionTelemetry.Tags.AfterGroups, index.IncludedGroupCount) + .SetTag(CompactionTelemetry.Tags.DurationMs, stopwatch.ElapsedMilliseconds); + + logger.LogCompactionCompleted( + strategyName, + stopwatch.ElapsedMilliseconds, + beforeMessages, + index.IncludedMessageCount, + beforeGroups, + index.IncludedGroupCount, + beforeTokens, + index.IncludedTokenCount); + } + + return compacted; + } + + /// + /// Ensures the provided value is not a negative number. + /// + /// The target value. + /// 0 if negative; otherwise the value + protected static int EnsureNonNegative(int value) => Math.Max(0, value); +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTelemetry.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTelemetry.cs new file mode 100644 index 0000000000..11b37dfa82 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTelemetry.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Diagnostics; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// Provides shared telemetry infrastructure for compaction operations. +/// +internal static class CompactionTelemetry +{ + /// + /// The used to create activities for compaction operations. + /// + public static readonly ActivitySource ActivitySource = new(OpenTelemetryConsts.DefaultSourceName); + + /// + /// Activity names used by compaction tracing. + /// + public static class ActivityNames + { + public const string Compact = "compaction.compact"; + public const string CompactionProviderInvoke = "compaction.provider.invoke"; + public const string Summarize = "compaction.summarize"; + } + + /// + /// Tag names used on compaction activities. + /// + public static class Tags + { + public const string Strategy = "compaction.strategy"; + public const string Triggered = "compaction.triggered"; + public const string Compacted = "compaction.compacted"; + public const string BeforeTokens = "compaction.before.tokens"; + public const string AfterTokens = "compaction.after.tokens"; + public const string BeforeMessages = "compaction.before.messages"; + public const string AfterMessages = "compaction.after.messages"; + public const string BeforeGroups = "compaction.before.groups"; + public const string AfterGroups = "compaction.after.groups"; + public const string DurationMs = "compaction.duration_ms"; + public const string GroupsSummarized = "compaction.groups_summarized"; + public const string SummaryLength = "compaction.summary_length"; + } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTrigger.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTrigger.cs new file mode 100644 index 0000000000..104d2ccad1 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTrigger.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Diagnostics.CodeAnalysis; +using Microsoft.Shared.DiagnosticIds; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// Defines a condition based on metrics used by a +/// to determine when to trigger compaction and when the target compaction threshold has been met. +/// +/// An index over conversation messages that provides group, token, message, and turn metrics. +/// to indicate the condition has been met; otherwise . +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public delegate bool CompactionTrigger(CompactionMessageIndex index); diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTriggers.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTriggers.cs new file mode 100644 index 0000000000..a2bc398ac3 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/CompactionTriggers.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Microsoft.Shared.DiagnosticIds; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// Factory to create predicates. +/// +/// +/// +/// A defines a condition based on metrics used +/// by a to determine when to trigger compaction and when the target +/// compaction threshold has been met. +/// +/// +/// Combine triggers with or for compound conditions. +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public static class CompactionTriggers +{ + /// + /// Always trigger, regardless of the message index state. + /// + public static readonly CompactionTrigger Always = + _ => true; + + /// + /// Never trigger, regardless of the message index state. + /// + public static readonly CompactionTrigger Never = + _ => false; + + /// + /// Creates a trigger that fires when the included token count is below the specified maximum. + /// + /// The token threshold. + /// A that evaluates included token count. + public static CompactionTrigger TokensBelow(int maxTokens) => + index => index.IncludedTokenCount < maxTokens; + + /// + /// Creates a trigger that fires when the included token count exceeds the specified maximum. + /// + /// The token threshold. + /// A that evaluates included token count. + public static CompactionTrigger TokensExceed(int maxTokens) => + index => index.IncludedTokenCount > maxTokens; + + /// + /// Creates a trigger that fires when the included message count exceeds the specified maximum. + /// + /// The message threshold. + /// A that evaluates included message count. + public static CompactionTrigger MessagesExceed(int maxMessages) => + index => index.IncludedMessageCount > maxMessages; + + /// + /// Creates a trigger that fires when the included user turn count exceeds the specified maximum. + /// + /// The turn threshold. + /// A that evaluates included turn count. + /// + /// + /// A user turn starts with a group and includes all subsequent + /// non-user, non-system groups until the next user group or end of conversation. Each group is assigned + /// a indicating which user turn it belongs to. + /// System messages () are always assigned a + /// since they never belong to a user turn. + /// + /// + /// The turn count is the number of distinct values defined by . + /// + /// + public static CompactionTrigger TurnsExceed(int maxTurns) => + index => index.IncludedTurnCount > maxTurns; + + /// + /// Creates a trigger that fires when the included group count exceeds the specified maximum. + /// + /// The group threshold. + /// A that evaluates included group count. + public static CompactionTrigger GroupsExceed(int maxGroups) => + index => index.IncludedGroupCount > maxGroups; + + /// + /// Creates a trigger that fires when the included message index contains at least one + /// non-excluded group. + /// + /// A that evaluates included tool call presence. + public static CompactionTrigger HasToolCalls() => + index => index.Groups.Any(g => !g.IsExcluded && g.Kind == CompactionGroupKind.ToolCall); + + /// + /// Creates a compound trigger that fires only when all of the specified triggers fire. + /// + /// The triggers to combine with logical AND. + /// A that requires all conditions to be met. + public static CompactionTrigger All(params CompactionTrigger[] triggers) => + index => + { + for (int i = 0; i < triggers.Length; i++) + { + if (!triggers[i](index)) + { + return false; + } + } + + return true; + }; + + /// + /// Creates a compound trigger that fires when any of the specified triggers fire. + /// + /// The triggers to combine with logical OR. + /// A that requires at least one condition to be met. + public static CompactionTrigger Any(params CompactionTrigger[] triggers) => + index => + { + for (int i = 0; i < triggers.Length; i++) + { + if (triggers[i](index)) + { + return true; + } + } + + return false; + }; +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/PipelineCompactionStrategy.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/PipelineCompactionStrategy.cs new file mode 100644 index 0000000000..0a4c3411b0 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/PipelineCompactionStrategy.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Shared.DiagnosticIds; +using Microsoft.Shared.Diagnostics; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// A compaction strategy that executes a sequential pipeline of instances +/// against the same . +/// +/// +/// +/// Each strategy in the pipeline operates on the result of the previous one, enabling composed behaviors +/// such as summarizing older messages first and then truncating to fit a token budget. +/// +/// +/// The pipeline itself always executes while each child strategy evaluates its own +/// independently to decide whether it should compact. +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class PipelineCompactionStrategy : CompactionStrategy +{ + /// + /// Initializes a new instance of the class. + /// + /// The ordered sequence of strategies to execute. + public PipelineCompactionStrategy(params IEnumerable strategies) + : base(CompactionTriggers.Always) + { + this.Strategies = [.. Throw.IfNull(strategies)]; + } + + /// + /// Gets the ordered list of strategies in this pipeline. + /// + public IReadOnlyList Strategies { get; } + + /// + protected override async ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken) + { + bool anyCompacted = false; + + foreach (CompactionStrategy strategy in this.Strategies) + { + bool compacted = await strategy.CompactAsync(index, logger, cancellationToken).ConfigureAwait(false); + + if (compacted) + { + anyCompacted = true; + } + } + + return anyCompacted; + } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/SlidingWindowCompactionStrategy.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/SlidingWindowCompactionStrategy.cs new file mode 100644 index 0000000000..be74e679bb --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/SlidingWindowCompactionStrategy.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Shared.DiagnosticIds; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// A compaction strategy that removes the oldest user turns and their associated response groups +/// to bound conversation length. +/// +/// +/// +/// This strategy always preserves system messages. It identifies user turns in the +/// conversation (via ) and excludes the oldest turns +/// one at a time until the condition is met. +/// +/// +/// is a hard floor: even if the +/// has not been reached, compaction will not touch the last turns +/// (by ). Groups with a +/// of 0 or are always preserved regardless of this setting. +/// +/// +/// This strategy is more predictable than token-based truncation for bounding conversation +/// length, since it operates on logical turn boundaries rather than estimated token counts. +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class SlidingWindowCompactionStrategy : CompactionStrategy +{ + /// + /// The default minimum number of most-recent turns to preserve. + /// + public const int DefaultMinimumPreserved = 1; + + /// + /// Initializes a new instance of the class. + /// + /// + /// The that controls when compaction proceeds. + /// Use for turn-based thresholds. + /// + /// + /// The minimum number of most-recent turns (by ) to preserve. + /// This is a hard floor — compaction will not exclude turns within this range, regardless of the target condition. + /// Groups with of 0 or are always preserved. + /// + /// + /// An optional target condition that controls when compaction stops. When , + /// defaults to the inverse of the — compaction stops as soon as the trigger would no longer fire. + /// + public SlidingWindowCompactionStrategy(CompactionTrigger trigger, int minimumPreservedTurns = DefaultMinimumPreserved, CompactionTrigger? target = null) + : base(trigger, target) + { + this.MinimumPreservedTurns = EnsureNonNegative(minimumPreservedTurns); + } + + /// + /// Gets the minimum number of most-recent turns (by ) that are always preserved. + /// This is a hard floor that compaction cannot exceed, regardless of the target condition. + /// Groups with of 0 or are always preserved + /// independently of this value. + /// + public int MinimumPreservedTurns { get; } + + /// + protected override ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken) + { + // Forward pass: pre-index non-system included groups by TurnIndex. + Dictionary> turnGroups = []; + List turnOrder = []; + + for (int i = 0; i < index.Groups.Count; i++) + { + CompactionMessageGroup group = index.Groups[i]; + if (!group.IsExcluded && group.Kind != CompactionGroupKind.System && group.TurnIndex is int turnIndex) + { + if (!turnGroups.TryGetValue(turnIndex, out List? indices)) + { + indices = []; + turnGroups[turnIndex] = indices; + turnOrder.Add(turnIndex); + } + + indices.Add(i); + } + } + + // Backward pass: identify protected turns by TurnIndex. + // TurnIndex = 0 is always protected (non-system messages before first user message). + // TurnIndex = null is always protected (system messages, already excluded from turn tracking). + HashSet protectedTurnIndices = []; + if (turnGroups.ContainsKey(0)) + { + protectedTurnIndices.Add(0); + } + + // Protect the last MinimumPreservedTurns distinct turns. + int turnsToProtect = Math.Min(this.MinimumPreservedTurns, turnOrder.Count); + for (int i = turnOrder.Count - turnsToProtect; i < turnOrder.Count; i++) + { + protectedTurnIndices.Add(turnOrder[i]); + } + + // Exclude turns oldest-first, skipping protected turns, checking target after each turn. + bool compacted = false; + + for (int t = 0; t < turnOrder.Count; t++) + { + int currentTurnIndex = turnOrder[t]; + if (protectedTurnIndices.Contains(currentTurnIndex)) + { + continue; + } + + List groupIndices = turnGroups[currentTurnIndex]; + for (int g = 0; g < groupIndices.Count; g++) + { + int idx = groupIndices[g]; + index.Groups[idx].IsExcluded = true; + index.Groups[idx].ExcludeReason = $"Excluded by {nameof(SlidingWindowCompactionStrategy)}"; + } + + compacted = true; + + if (this.Target(index)) + { + break; + } + } + + return new ValueTask(compacted); + } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs new file mode 100644 index 0000000000..9ff7ecf405 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Logging; +using Microsoft.Shared.DiagnosticIds; +using Microsoft.Shared.Diagnostics; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// A compaction strategy that uses an LLM to summarize older portions of the conversation, +/// replacing them with a single summary message that preserves key facts and context. +/// +/// +/// +/// This strategy protects system messages and the most recent +/// non-system groups. All older groups are collected and sent to the +/// for summarization. The resulting summary replaces those messages as a single assistant message +/// with . +/// +/// +/// is a hard floor: even if the +/// has not been reached, compaction will not touch the last non-system groups. +/// +/// +/// The predicate controls when compaction proceeds. Use +/// for common trigger conditions such as token thresholds. +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class SummarizationCompactionStrategy : CompactionStrategy +{ + /// + /// The default summarization prompt used when none is provided. + /// + public const string DefaultSummarizationPrompt = + """ + You are a conversation summarizer. Produce a concise summary of the conversation that preserves: + + - Key facts, decisions, and user preferences + - Important context needed for future turns + - Tool call outcomes and their significance + + Omit pleasantries and redundant exchanges. Be factual and brief. + """; + + /// + /// The default minimum number of most-recent non-system groups to preserve. + /// + public const int DefaultMinimumPreserved = 8; + + /// + /// Initializes a new instance of the class. + /// + /// The to use for generating summaries. A smaller, faster model is recommended. + /// + /// The that controls when compaction proceeds. + /// + /// + /// The minimum number of most-recent non-system message groups to preserve. + /// This is a hard floor — compaction will not summarize groups beyond this limit, + /// regardless of the target condition. Defaults to 8, preserving the current and recent exchanges. + /// + /// + /// An optional custom system prompt for the summarization LLM call. When , + /// is used. + /// + /// + /// An optional target condition that controls when compaction stops. When , + /// defaults to the inverse of the — compaction stops as soon as the trigger would no longer fire. + /// + public SummarizationCompactionStrategy( + IChatClient chatClient, + CompactionTrigger trigger, + int minimumPreservedGroups = DefaultMinimumPreserved, + string? summarizationPrompt = null, + CompactionTrigger? target = null) + : base(trigger, target) + { + this.ChatClient = Throw.IfNull(chatClient); + this.MinimumPreservedGroups = EnsureNonNegative(minimumPreservedGroups); + this.SummarizationPrompt = summarizationPrompt ?? DefaultSummarizationPrompt; + } + + /// + /// Gets the chat client used for generating summaries. + /// + public IChatClient ChatClient { get; } + + /// + /// Gets the minimum number of most-recent non-system groups that are always preserved. + /// This is a hard floor that compaction cannot exceed, regardless of the target condition. + /// + public int MinimumPreservedGroups { get; } + + /// + /// Gets the prompt used when requesting summaries from the chat client. + /// + public string SummarizationPrompt { get; } + + /// + protected override async ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken) + { + // Count non-system, non-excluded groups to determine which are protected + int nonSystemIncludedCount = 0; + for (int i = 0; i < index.Groups.Count; i++) + { + CompactionMessageGroup group = index.Groups[i]; + if (!group.IsExcluded && group.Kind != CompactionGroupKind.System) + { + nonSystemIncludedCount++; + } + } + + int protectedFromEnd = Math.Min(this.MinimumPreservedGroups, nonSystemIncludedCount); + int maxSummarizable = nonSystemIncludedCount - protectedFromEnd; + + if (maxSummarizable <= 0) + { + return false; + } + + // Mark oldest non-system groups for summarization one at a time until the target is met. + // Track which groups were excluded so we can restore them if the LLM call fails. + List summarizationMessages = [new ChatMessage(ChatRole.System, this.SummarizationPrompt)]; + List excludedGroups = []; + int insertIndex = -1; + + for (int i = 0; i < index.Groups.Count && excludedGroups.Count < maxSummarizable; i++) + { + CompactionMessageGroup group = index.Groups[i]; + if (group.IsExcluded || group.Kind == CompactionGroupKind.System) + { + continue; + } + + if (insertIndex < 0) + { + insertIndex = i; + } + + // Collect messages from this group for summarization + summarizationMessages.AddRange(group.Messages); + + group.IsExcluded = true; + group.ExcludeReason = $"Summarized by {nameof(SummarizationCompactionStrategy)}"; + excludedGroups.Add(group); + + // Stop marking when target condition is met + if (this.Target(index)) + { + break; + } + } + + // Generate summary using the chat client (single LLM call for all marked groups) + int summarized = excludedGroups.Count; + logger.LogSummarizationStarting(summarized, summarizationMessages.Count - 1, this.ChatClient.GetType().Name); + + using Activity? summarizeActivity = CompactionTelemetry.ActivitySource.StartActivity(CompactionTelemetry.ActivityNames.Summarize); + summarizeActivity?.SetTag(CompactionTelemetry.Tags.GroupsSummarized, summarized); + + ChatResponse response; + try + { + response = await this.ChatClient.GetResponseAsync( + summarizationMessages, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + // Restore excluded groups so the conversation is not left in an inconsistent state + for (int i = 0; i < excludedGroups.Count; i++) + { + excludedGroups[i].IsExcluded = false; + excludedGroups[i].ExcludeReason = null; + } + + logger.LogSummarizationFailed(summarized, ex.Message); + + return false; + } + + string summaryText = string.IsNullOrWhiteSpace(response.Text) ? "[Summary unavailable]" : response.Text; + + summarizeActivity?.SetTag(CompactionTelemetry.Tags.SummaryLength, summaryText.Length); + + // Insert a summary group at the position of the first summarized group + ChatMessage summaryMessage = new(ChatRole.Assistant, $"[Summary]\n{summaryText}"); + (summaryMessage.AdditionalProperties ??= [])[CompactionMessageGroup.SummaryPropertyKey] = true; + + index.InsertGroup(insertIndex, CompactionGroupKind.Summary, [summaryMessage]); + + logger.LogSummarizationCompleted(summaryText.Length, insertIndex); + + return true; + } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/ToolResultCompactionStrategy.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/ToolResultCompactionStrategy.cs new file mode 100644 index 0000000000..9b4dbb6b16 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/ToolResultCompactionStrategy.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Logging; +using Microsoft.Shared.DiagnosticIds; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// A compaction strategy that collapses old tool call groups into single concise assistant +/// messages, removing the detailed tool results while preserving a record of which tools were called +/// and what they returned. +/// +/// +/// +/// This is the gentlest compaction strategy — it does not remove any user messages or +/// plain assistant responses. It only targets +/// groups outside the protected recent window, replacing each multi-message group +/// (assistant call + tool results) with a single assistant message in a YAML-like format: +/// +/// [Tool Calls] +/// get_weather: +/// - Sunny and 72°F +/// search_docs: +/// - Found 3 docs +/// +/// +/// +/// is a hard floor: even if the +/// has not been reached, compaction will not touch the last non-system groups. +/// +/// +/// The predicate controls when compaction proceeds. Use +/// for common trigger conditions such as token thresholds. +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class ToolResultCompactionStrategy : CompactionStrategy +{ + /// + /// The default minimum number of most-recent non-system groups to preserve. + /// + public const int DefaultMinimumPreserved = 16; + + /// + /// Initializes a new instance of the class. + /// + /// + /// The that controls when compaction proceeds. + /// + /// + /// The minimum number of most-recent non-system message groups to preserve. + /// This is a hard floor — compaction will not collapse groups beyond this limit, + /// regardless of the target condition. + /// Defaults to , ensuring the current turn's tool interactions remain visible. + /// + /// + /// An optional target condition that controls when compaction stops. When , + /// defaults to the inverse of the — compaction stops as soon as the trigger would no longer fire. + /// + public ToolResultCompactionStrategy(CompactionTrigger trigger, int minimumPreservedGroups = DefaultMinimumPreserved, CompactionTrigger? target = null) + : base(trigger, target) + { + this.MinimumPreservedGroups = EnsureNonNegative(minimumPreservedGroups); + } + + /// + /// Gets the minimum number of most-recent non-system groups that are always preserved. + /// This is a hard floor that compaction cannot exceed, regardless of the target condition. + /// + public int MinimumPreservedGroups { get; } + + /// + protected override ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken) + { + // Identify protected groups: the N most-recent non-system, non-excluded groups + List nonSystemIncludedIndices = []; + for (int i = 0; i < index.Groups.Count; i++) + { + CompactionMessageGroup group = index.Groups[i]; + if (!group.IsExcluded && group.Kind != CompactionGroupKind.System) + { + nonSystemIncludedIndices.Add(i); + } + } + + int protectedStart = EnsureNonNegative(nonSystemIncludedIndices.Count - this.MinimumPreservedGroups); + HashSet protectedGroupIndices = []; + for (int i = protectedStart; i < nonSystemIncludedIndices.Count; i++) + { + protectedGroupIndices.Add(nonSystemIncludedIndices[i]); + } + + // Collect eligible tool groups in order (oldest first) + List eligibleIndices = []; + for (int i = 0; i < index.Groups.Count; i++) + { + CompactionMessageGroup group = index.Groups[i]; + if (!group.IsExcluded && group.Kind == CompactionGroupKind.ToolCall && !protectedGroupIndices.Contains(i)) + { + eligibleIndices.Add(i); + } + } + + if (eligibleIndices.Count == 0) + { + return new ValueTask(false); + } + + // Collapse one tool group at a time from oldest, re-checking target after each + bool compacted = false; + int offset = 0; + + for (int e = 0; e < eligibleIndices.Count; e++) + { + int idx = eligibleIndices[e] + offset; + CompactionMessageGroup group = index.Groups[idx]; + + string summary = BuildToolCallSummary(group); + + // Exclude the original group and insert a collapsed replacement + group.IsExcluded = true; + group.ExcludeReason = $"Collapsed by {nameof(ToolResultCompactionStrategy)}"; + + ChatMessage summaryMessage = new(ChatRole.Assistant, summary); + (summaryMessage.AdditionalProperties ??= [])[CompactionMessageGroup.SummaryPropertyKey] = true; + + index.InsertGroup(idx + 1, CompactionGroupKind.Summary, [summaryMessage], group.TurnIndex); + offset++; // Each insertion shifts subsequent indices by 1 + + compacted = true; + + // Stop when target condition is met + if (this.Target(index)) + { + break; + } + } + + return new ValueTask(compacted); + } + + /// + /// Builds a concise summary string for a tool call group, including tool names, + /// results, and deduplication counts for repeated tool names. + /// + private static string BuildToolCallSummary(CompactionMessageGroup group) + { + // Collect function calls (callId, name) and results (callId → result text) + List<(string CallId, string Name)> functionCalls = []; + Dictionary resultsByCallId = new(); + List plainTextResults = []; + + foreach (ChatMessage message in group.Messages) + { + if (message.Contents is null) + { + continue; + } + + bool hasFunctionResult = false; + foreach (AIContent content in message.Contents) + { + if (content is FunctionCallContent fcc) + { + functionCalls.Add((fcc.CallId, fcc.Name)); + } + else if (content is FunctionResultContent frc && frc.CallId is not null) + { + resultsByCallId[frc.CallId] = frc.Result?.ToString() ?? string.Empty; + hasFunctionResult = true; + } + } + + // Collect plain text from Tool-role messages that lack FunctionResultContent + if (!hasFunctionResult && message.Role == ChatRole.Tool && message.Text is string text) + { + plainTextResults.Add(text); + } + } + + // Match function calls to their results using CallId or positional fallback, + // grouping by tool name while preserving first-seen order. + int plainTextIdx = 0; + List orderedNames = []; + Dictionary> groupedResults = new(); + + foreach ((string callId, string name) in functionCalls) + { + if (!groupedResults.TryGetValue(name, out _)) + { + orderedNames.Add(name); + groupedResults[name] = []; + } + + string? result = null; + if (resultsByCallId.TryGetValue(callId, out string? matchedResult)) + { + result = matchedResult; + } + else if (plainTextIdx < plainTextResults.Count) + { + result = plainTextResults[plainTextIdx++]; + } + + if (!string.IsNullOrEmpty(result)) + { + groupedResults[name].Add(result); + } + } + + // Format as YAML-like block with [Tool Calls] header + List lines = ["[Tool Calls]"]; + foreach (string name in orderedNames) + { + List results = groupedResults[name]; + + lines.Add($"{name}:"); + if (results.Count > 0) + { + foreach (string result in results) + { + lines.Add($" - {result}"); + } + } + } + + return string.Join("\n", lines); + } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Compaction/TruncationCompactionStrategy.cs b/dotnet/src/Microsoft.Agents.AI/Compaction/TruncationCompactionStrategy.cs new file mode 100644 index 0000000000..9f816fece1 --- /dev/null +++ b/dotnet/src/Microsoft.Agents.AI/Compaction/TruncationCompactionStrategy.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Shared.DiagnosticIds; + +namespace Microsoft.Agents.AI.Compaction; + +/// +/// A compaction strategy that removes the oldest non-system message groups, +/// keeping at least most-recent groups intact. +/// +/// +/// +/// This strategy preserves system messages and removes the oldest non-system message groups first. +/// It respects atomic group boundaries — an assistant message with tool calls and its +/// corresponding tool result messages are always removed together. +/// +/// +/// is a hard floor: even if the +/// has not been reached, compaction will not touch the last non-system groups. +/// +/// +/// The controls when compaction proceeds. +/// Use for common trigger conditions such as token or group thresholds. +/// +/// +[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] +public sealed class TruncationCompactionStrategy : CompactionStrategy +{ + /// + /// The default minimum number of most-recent non-system groups to preserve. + /// + public const int DefaultMinimumPreserved = 32; + + /// + /// Initializes a new instance of the class. + /// + /// + /// The that controls when compaction proceeds. + /// + /// + /// The minimum number of most-recent non-system message groups to preserve. + /// This is a hard floor — compaction will not remove groups beyond this limit, + /// regardless of the target condition. + /// + /// + /// An optional target condition that controls when compaction stops. When , + /// defaults to the inverse of the — compaction stops as soon as the trigger would no longer fire. + /// + public TruncationCompactionStrategy(CompactionTrigger trigger, int minimumPreservedGroups = DefaultMinimumPreserved, CompactionTrigger? target = null) + : base(trigger, target) + { + this.MinimumPreservedGroups = EnsureNonNegative(minimumPreservedGroups); + } + + /// + /// Gets the minimum number of most-recent non-system message groups that are always preserved. + /// This is a hard floor that compaction cannot exceed, regardless of the target condition. + /// + public int MinimumPreservedGroups { get; } + + /// + protected override ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken) + { + // Count removable (non-system, non-excluded) groups + int removableCount = 0; + for (int i = 0; i < index.Groups.Count; i++) + { + CompactionMessageGroup group = index.Groups[i]; + if (!group.IsExcluded && group.Kind != CompactionGroupKind.System) + { + removableCount++; + } + } + + int maxRemovable = removableCount - this.MinimumPreservedGroups; + if (maxRemovable <= 0) + { + return new ValueTask(false); + } + + // Exclude oldest non-system groups one at a time, re-checking target after each + bool compacted = false; + int removed = 0; + for (int i = 0; i < index.Groups.Count && removed < maxRemovable; i++) + { + CompactionMessageGroup group = index.Groups[i]; + if (group.IsExcluded || group.Kind == CompactionGroupKind.System) + { + continue; + } + + group.IsExcluded = true; + group.ExcludeReason = $"Truncated by {nameof(TruncationCompactionStrategy)}"; + removed++; + compacted = true; + + // Stop when target condition is met + if (this.Target(index)) + { + break; + } + } + + return new ValueTask(compacted); + } +} diff --git a/dotnet/src/Microsoft.Agents.AI/Microsoft.Agents.AI.csproj b/dotnet/src/Microsoft.Agents.AI/Microsoft.Agents.AI.csproj index f036812900..93b228d29e 100644 --- a/dotnet/src/Microsoft.Agents.AI/Microsoft.Agents.AI.csproj +++ b/dotnet/src/Microsoft.Agents.AI/Microsoft.Agents.AI.csproj @@ -18,10 +18,14 @@ + + + + @@ -36,7 +40,7 @@ - + diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ChatMessageContentEqualityTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ChatMessageContentEqualityTests.cs new file mode 100644 index 0000000000..0ec84f3cb3 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ChatMessageContentEqualityTests.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the extension methods. +/// +public class ChatMessageContentEqualityTests +{ + #region Null and reference handling + + [Fact] + public void BothNullReturnsTrue() + { + ChatMessage? a = null; + ChatMessage? b = null; + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void LeftNullReturnsFalse() + { + ChatMessage? a = null; + ChatMessage b = new(ChatRole.User, "Hello"); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void RightNullReturnsFalse() + { + ChatMessage a = new(ChatRole.User, "Hello"); + ChatMessage? b = null; + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void SameReferenceReturnsTrue() + { + ChatMessage a = new(ChatRole.User, "Hello"); + + Assert.True(a.ContentEquals(a)); + } + + #endregion + + #region MessageId shortcut + + [Fact] + public void MatchingMessageIdReturnsTrue() + { + ChatMessage a = new(ChatRole.User, "Hello") { MessageId = "msg-1" }; + ChatMessage b = new(ChatRole.User, "Hello") { MessageId = "msg-1" }; + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void MatchingMessageIdSufficientDespiteDifferentContent() + { + ChatMessage a = new(ChatRole.User, "Hello") { MessageId = "msg-1" }; + ChatMessage b = new(ChatRole.Assistant, "Goodbye") { MessageId = "msg-1" }; + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentMessageIdReturnsFalse() + { + ChatMessage a = new(ChatRole.User, "Hello") { MessageId = "msg-1" }; + ChatMessage b = new(ChatRole.User, "Hello") { MessageId = "msg-2" }; + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void OnlyLeftHasMessageIdFallsThroughToContentComparison() + { + ChatMessage a = new(ChatRole.User, "Hello") { MessageId = "msg-1" }; + ChatMessage b = new(ChatRole.User, "Hello"); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void OnlyRightHasMessageIdFallsThroughToContentComparison() + { + ChatMessage a = new(ChatRole.User, "Hello"); + ChatMessage b = new(ChatRole.User, "Hello") { MessageId = "msg-1" }; + + Assert.True(a.ContentEquals(b)); + } + + #endregion + + #region Role and AuthorName + + [Fact] + public void DifferentRoleReturnsFalse() + { + ChatMessage a = new(ChatRole.User, "Hello"); + ChatMessage b = new(ChatRole.Assistant, "Hello"); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentAuthorNameReturnsFalse() + { + ChatMessage a = new(ChatRole.User, "Hello") { AuthorName = "Alice" }; + ChatMessage b = new(ChatRole.User, "Hello") { AuthorName = "Bob" }; + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void BothNullAuthorNamesAreEqual() + { + ChatMessage a = new(ChatRole.User, "Hello"); + ChatMessage b = new(ChatRole.User, "Hello"); + + Assert.True(a.ContentEquals(b)); + } + + #endregion + + #region TextContent + + [Fact] + public void EqualTextContentReturnsTrue() + { + ChatMessage a = new(ChatRole.User, "Hello world"); + ChatMessage b = new(ChatRole.User, "Hello world"); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentTextContentReturnsFalse() + { + ChatMessage a = new(ChatRole.User, "Hello"); + ChatMessage b = new(ChatRole.User, "Goodbye"); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void TextContentIsCaseSensitive() + { + ChatMessage a = new(ChatRole.User, "Hello"); + ChatMessage b = new(ChatRole.User, "hello"); + + Assert.False(a.ContentEquals(b)); + } + + #endregion + + #region TextReasoningContent + + [Fact] + public void EqualTextReasoningContentReturnsTrue() + { + ChatMessage a = new(ChatRole.Assistant, [new TextReasoningContent("thinking...") { ProtectedData = "opaque" }]); + ChatMessage b = new(ChatRole.Assistant, [new TextReasoningContent("thinking...") { ProtectedData = "opaque" }]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentReasoningTextReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new TextReasoningContent("alpha")]); + ChatMessage b = new(ChatRole.Assistant, [new TextReasoningContent("beta")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentProtectedDataReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new TextReasoningContent("same") { ProtectedData = "x" }]); + ChatMessage b = new(ChatRole.Assistant, [new TextReasoningContent("same") { ProtectedData = "y" }]); + + Assert.False(a.ContentEquals(b)); + } + + #endregion + + #region DataContent + + [Fact] + public void EqualDataContentReturnsTrue() + { + byte[] data = Encoding.UTF8.GetBytes("payload"); + ChatMessage a = new(ChatRole.User, [new DataContent(data, "application/octet-stream") { Name = "file.bin" }]); + ChatMessage b = new(ChatRole.User, [new DataContent(data, "application/octet-stream") { Name = "file.bin" }]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentDataBytesReturnsFalse() + { + ChatMessage a = new(ChatRole.User, [new DataContent(Encoding.UTF8.GetBytes("aaa"), "text/plain")]); + ChatMessage b = new(ChatRole.User, [new DataContent(Encoding.UTF8.GetBytes("bbb"), "text/plain")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentMediaTypeReturnsFalse() + { + byte[] data = [1, 2, 3]; + ChatMessage a = new(ChatRole.User, [new DataContent(data, "image/png")]); + ChatMessage b = new(ChatRole.User, [new DataContent(data, "image/jpeg")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentDataContentNameReturnsFalse() + { + byte[] data = [1, 2, 3]; + ChatMessage a = new(ChatRole.User, [new DataContent(data, "image/png") { Name = "a.png" }]); + ChatMessage b = new(ChatRole.User, [new DataContent(data, "image/png") { Name = "b.png" }]); + + Assert.False(a.ContentEquals(b)); + } + + #endregion + + #region UriContent + + [Fact] + public void EqualUriContentReturnsTrue() + { + ChatMessage a = new(ChatRole.User, [new UriContent(new Uri("https://example.com/image.png"), "image/png")]); + ChatMessage b = new(ChatRole.User, [new UriContent(new Uri("https://example.com/image.png"), "image/png")]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentUriReturnsFalse() + { + ChatMessage a = new(ChatRole.User, [new UriContent(new Uri("https://a.com/x"), "image/png")]); + ChatMessage b = new(ChatRole.User, [new UriContent(new Uri("https://b.com/x"), "image/png")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentUriMediaTypeReturnsFalse() + { + Uri uri = new("https://example.com/file"); + ChatMessage a = new(ChatRole.User, [new UriContent(uri, "image/png")]); + ChatMessage b = new(ChatRole.User, [new UriContent(uri, "image/jpeg")]); + + Assert.False(a.ContentEquals(b)); + } + + #endregion + + #region ErrorContent + + [Fact] + public void EqualErrorContentReturnsTrue() + { + ChatMessage a = new(ChatRole.Assistant, [new ErrorContent("fail") { ErrorCode = "E001" }]); + ChatMessage b = new(ChatRole.Assistant, [new ErrorContent("fail") { ErrorCode = "E001" }]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentErrorMessageReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new ErrorContent("fail")]); + ChatMessage b = new(ChatRole.Assistant, [new ErrorContent("crash")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentErrorCodeReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new ErrorContent("fail") { ErrorCode = "E001" }]); + ChatMessage b = new(ChatRole.Assistant, [new ErrorContent("fail") { ErrorCode = "E002" }]); + + Assert.False(a.ContentEquals(b)); + } + + #endregion + + #region FunctionCallContent + + [Fact] + public void EqualFunctionCallContentReturnsTrue() + { + ChatMessage a = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "get_weather") { Arguments = new Dictionary { ["city"] = "Seattle" } }]); + ChatMessage b = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "get_weather") { Arguments = new Dictionary { ["city"] = "Seattle" } }]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentCallIdReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "get_weather")]); + ChatMessage b = new(ChatRole.Assistant, [new FunctionCallContent("call-2", "get_weather")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentFunctionNameReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "get_weather")]); + ChatMessage b = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "get_time")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentArgumentsReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "fn") { Arguments = new Dictionary { ["x"] = "1" } }]); + ChatMessage b = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "fn") { Arguments = new Dictionary { ["x"] = "2" } }]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void NullArgumentsBothSidesReturnsTrue() + { + ChatMessage a = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "fn")]); + ChatMessage b = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "fn")]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void OneNullArgumentsReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "fn")]); + ChatMessage b = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "fn") { Arguments = new Dictionary { ["x"] = "1" } }]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentArgumentCountReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "fn") { Arguments = new Dictionary { ["x"] = "1" } }]); + ChatMessage b = new(ChatRole.Assistant, [new FunctionCallContent("call-1", "fn") { Arguments = new Dictionary { ["x"] = "1", ["y"] = "2" } }]); + + Assert.False(a.ContentEquals(b)); + } + + #endregion + + #region FunctionResultContent + + [Fact] + public void EqualFunctionResultContentReturnsTrue() + { + ChatMessage a = new(ChatRole.Tool, [new FunctionResultContent("call-1", "sunny")]); + ChatMessage b = new(ChatRole.Tool, [new FunctionResultContent("call-1", "sunny")]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentResultCallIdReturnsFalse() + { + ChatMessage a = new(ChatRole.Tool, [new FunctionResultContent("call-1", "sunny")]); + ChatMessage b = new(ChatRole.Tool, [new FunctionResultContent("call-2", "sunny")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentResultValueReturnsFalse() + { + ChatMessage a = new(ChatRole.Tool, [new FunctionResultContent("call-1", "sunny")]); + ChatMessage b = new(ChatRole.Tool, [new FunctionResultContent("call-1", "rainy")]); + + Assert.False(a.ContentEquals(b)); + } + + #endregion + + #region HostedFileContent + + [Fact] + public void EqualHostedFileContentReturnsTrue() + { + ChatMessage a = new(ChatRole.User, [new HostedFileContent("file-abc") { MediaType = "text/csv", Name = "data.csv" }]); + ChatMessage b = new(ChatRole.User, [new HostedFileContent("file-abc") { MediaType = "text/csv", Name = "data.csv" }]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentFileIdReturnsFalse() + { + ChatMessage a = new(ChatRole.User, [new HostedFileContent("file-abc")]); + ChatMessage b = new(ChatRole.User, [new HostedFileContent("file-xyz")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentHostedFileMediaTypeReturnsFalse() + { + ChatMessage a = new(ChatRole.User, [new HostedFileContent("file-abc") { MediaType = "text/csv" }]); + ChatMessage b = new(ChatRole.User, [new HostedFileContent("file-abc") { MediaType = "text/plain" }]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void DifferentHostedFileNameReturnsFalse() + { + ChatMessage a = new(ChatRole.User, [new HostedFileContent("file-abc") { Name = "a.csv" }]); + ChatMessage b = new(ChatRole.User, [new HostedFileContent("file-abc") { Name = "b.csv" }]); + + Assert.False(a.ContentEquals(b)); + } + + #endregion + + #region Content list structure + + [Fact] + public void DifferentContentCountReturnsFalse() + { + ChatMessage a = new(ChatRole.User, [new TextContent("one"), new TextContent("two")]); + ChatMessage b = new(ChatRole.User, [new TextContent("one")]); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void MixedContentTypesInSameOrderReturnsTrue() + { + ChatMessage a = new(ChatRole.Assistant, new AIContent[] { new TextContent("reply"), new FunctionCallContent("c1", "fn") }); + ChatMessage b = new(ChatRole.Assistant, new AIContent[] { new TextContent("reply"), new FunctionCallContent("c1", "fn") }); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void MismatchedContentTypeOrderReturnsFalse() + { + ChatMessage a = new(ChatRole.Assistant, new AIContent[] { new TextContent("reply"), new FunctionCallContent("c1", "fn") }); + ChatMessage b = new(ChatRole.Assistant, new AIContent[] { new FunctionCallContent("c1", "fn"), new TextContent("reply") }); + + Assert.False(a.ContentEquals(b)); + } + + [Fact] + public void EmptyContentsListsAreEqual() + { + ChatMessage a = new() { Role = ChatRole.User, Contents = [] }; + ChatMessage b = new() { Role = ChatRole.User, Contents = [] }; + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void SameContentItemReferenceReturnsTrue() + { + // Exercises the ReferenceEquals fast-path on individual AIContent items. + TextContent shared = new("Hello"); + ChatMessage a = new(ChatRole.User, [shared]); + ChatMessage b = new(ChatRole.User, [shared]); + + Assert.True(a.ContentEquals(b)); + } + + #endregion + + #region Unknown AIContent subtype + + [Fact] + public void UnknownContentSubtypeSameTypeReturnsTrue() + { + // Unknown subtypes with the same concrete type are considered equal. + ChatMessage a = new(ChatRole.User, [new StubContent()]); + ChatMessage b = new(ChatRole.User, [new StubContent()]); + + Assert.True(a.ContentEquals(b)); + } + + [Fact] + public void DifferentUnknownContentSubtypesReturnFalse() + { + ChatMessage a = new(ChatRole.User, [new StubContent()]); + ChatMessage b = new(ChatRole.User, [new OtherStubContent()]); + + Assert.False(a.ContentEquals(b)); + } + + private sealed class StubContent : AIContent; + + private sealed class OtherStubContent : AIContent; + + #endregion +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ChatReducerCompactionStrategyTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ChatReducerCompactionStrategyTests.cs new file mode 100644 index 0000000000..fb07eeb773 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ChatReducerCompactionStrategyTests.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the class. +/// +public class ChatReducerCompactionStrategyTests +{ + [Fact] + public void ConstructorNullReducerThrows() + { + // Act & Assert + Assert.Throws(() => new ChatReducerCompactionStrategy(null!, CompactionTriggers.Always)); + } + + [Fact] + public async Task CompactAsyncTriggerNotMetReturnsFalseAsync() + { + // Arrange — trigger never fires + TestChatReducer reducer = new(messages => messages.Take(1)); + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Never); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.False(result); + Assert.Equal(0, reducer.CallCount); + Assert.Equal(2, index.IncludedGroupCount); + } + + [Fact] + public async Task CompactAsyncReducerReturnsFewerMessagesRebuildsIndexAsync() + { + // Arrange — reducer keeps only the last message + TestChatReducer reducer = new(messages => messages.Skip(messages.Count() - 1)); + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Always); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "First"), + new ChatMessage(ChatRole.Assistant, "Response 1"), + new ChatMessage(ChatRole.User, "Second"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.True(result); + Assert.Equal(1, reducer.CallCount); + Assert.Equal(1, index.IncludedGroupCount); + Assert.Equal("Second", index.Groups[0].Messages[0].Text); + } + + [Fact] + public async Task CompactAsyncReducerReturnsSameCountReturnsFalseAsync() + { + // Arrange — reducer returns all messages (no reduction) + TestChatReducer reducer = new(messages => messages); + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Always); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.False(result); + Assert.Equal(1, reducer.CallCount); + Assert.Equal(2, index.IncludedGroupCount); + } + + [Fact] + public async Task CompactAsyncEmptyIndexReturnsFalseAsync() + { + // Arrange — no included messages + TestChatReducer reducer = new(messages => messages); + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Always); + CompactionMessageIndex index = CompactionMessageIndex.Create([]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.False(result); + Assert.Equal(0, reducer.CallCount); + } + + [Fact] + public async Task CompactAsyncPreservesSystemMessagesWhenReducerKeepsThemAsync() + { + // Arrange — reducer keeps system + last user message + TestChatReducer reducer = new(messages => + { + var nonSystem = messages.Where(m => m.Role != ChatRole.System).ToList(); + return messages.Where(m => m.Role == ChatRole.System) + .Concat(nonSystem.Skip(nonSystem.Count - 1)); + }); + + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Always); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "First"), + new ChatMessage(ChatRole.Assistant, "Response 1"), + new ChatMessage(ChatRole.User, "Second"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.True(result); + Assert.Equal(2, index.IncludedGroupCount); + Assert.Equal(CompactionGroupKind.System, index.Groups[0].Kind); + Assert.Equal("You are helpful.", index.Groups[0].Messages[0].Text); + Assert.Equal(CompactionGroupKind.User, index.Groups[1].Kind); + Assert.Equal("Second", index.Groups[1].Messages[0].Text); + } + + [Fact] + public async Task CompactAsyncRebuildsToolCallGroupsCorrectlyAsync() + { + // Arrange — reducer keeps last 3 messages (assistant tool call + tool result + user) + TestChatReducer reducer = new(messages => messages.Skip(messages.Count() - 3)); + + ChatMessage assistantToolCall = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather")]); + ChatMessage toolResult = new(ChatRole.Tool, "Sunny"); + + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Always); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Old question"), + new ChatMessage(ChatRole.Assistant, "Old answer"), + assistantToolCall, + toolResult, + new ChatMessage(ChatRole.User, "New question"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.True(result); + // Should have 2 groups: ToolCall group (assistant + tool result) + User group + Assert.Equal(2, index.IncludedGroupCount); + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[0].Kind); + Assert.Equal(2, index.Groups[0].Messages.Count); + Assert.Equal(CompactionGroupKind.User, index.Groups[1].Kind); + } + + [Fact] + public async Task CompactAsyncSkipsAlreadyExcludedGroupsAsync() + { + // Arrange — one group is pre-excluded, reducer keeps last message + TestChatReducer reducer = new(messages => messages.Skip(messages.Count() - 1)); + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Always); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Excluded"), + new ChatMessage(ChatRole.User, "Included 1"), + new ChatMessage(ChatRole.User, "Included 2"), + ]); + index.Groups[0].IsExcluded = true; + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — reducer only saw 2 included messages, kept 1 + Assert.True(result); + Assert.Equal(1, index.IncludedGroupCount); + Assert.Equal("Included 2", index.Groups[0].Messages[0].Text); + } + + [Fact] + public async Task CompactAsyncExposesReducerPropertyAsync() + { + // Arrange + TestChatReducer reducer = new(messages => messages); + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Always); + + // Assert + Assert.Same(reducer, strategy.ChatReducer); + await Task.CompletedTask; + } + + [Fact] + public async Task CompactAsyncPassesCancellationTokenToReducerAsync() + { + // Arrange + using CancellationTokenSource cancellationSource = new(); + CancellationToken capturedToken = default; + TestChatReducer reducer = new((messages, cancellationToken) => + { + capturedToken = cancellationToken; + return Task.FromResult>(messages.Skip(messages.Count() - 1).ToList()); + }); + + ChatReducerCompactionStrategy strategy = new(reducer, CompactionTriggers.Always); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "First"), + new ChatMessage(ChatRole.User, "Second"), + ]); + + // Act + await strategy.CompactAsync(index, logger: null, cancellationSource.Token); + + // Assert + Assert.Equal(cancellationSource.Token, capturedToken); + } + + /// + /// A test implementation of that applies a configurable reduction function. + /// + private sealed class TestChatReducer : IChatReducer + { + private readonly Func, CancellationToken, Task>> _reduceFunc; + + public TestChatReducer(Func, IEnumerable> reduceFunc) + { + this._reduceFunc = (messages, _) => Task.FromResult(reduceFunc(messages)); + } + + public TestChatReducer(Func, CancellationToken, Task>> reduceFunc) + { + this._reduceFunc = reduceFunc; + } + + public int CallCount { get; private set; } + + public async Task> ReduceAsync(IEnumerable messages, CancellationToken cancellationToken = default) + { + this.CallCount++; + return await this._reduceFunc(messages, cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionMessageIndexTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionMessageIndexTests.cs new file mode 100644 index 0000000000..ea0ecd0d44 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionMessageIndexTests.cs @@ -0,0 +1,1477 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Buffers; +using System.Collections.Generic; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; +using Microsoft.ML.Tokenizers; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the class. +/// +public class CompactionMessageIndexTests +{ + [Fact] + public void CreateEmptyListReturnsEmptyGroups() + { + // Arrange + List messages = []; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Empty(groups.Groups); + } + + [Fact] + public void CreateSystemMessageCreatesSystemGroup() + { + // Arrange + List messages = + [ + new ChatMessage(ChatRole.System, "You are helpful."), + ]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Single(groups.Groups); + Assert.Equal(CompactionGroupKind.System, groups.Groups[0].Kind); + Assert.Single(groups.Groups[0].Messages); + } + + [Fact] + public void CreateUserMessageCreatesUserGroup() + { + // Arrange + List messages = + [ + new ChatMessage(ChatRole.User, "Hello"), + ]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Single(groups.Groups); + Assert.Equal(CompactionGroupKind.User, groups.Groups[0].Kind); + } + + [Fact] + public void CreateAssistantTextMessageCreatesAssistantTextGroup() + { + // Arrange + List messages = + [ + new ChatMessage(ChatRole.Assistant, "Hi there!"), + ]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Single(groups.Groups); + Assert.Equal(CompactionGroupKind.AssistantText, groups.Groups[0].Kind); + } + + [Fact] + public void CreateToolCallWithResultsCreatesAtomicGroup() + { + // Arrange + ChatMessage assistantMessage = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather", new Dictionary { ["city"] = "Seattle" })]); + ChatMessage toolResult = new(ChatRole.Tool, [new FunctionResultContent("call1", "Sunny, 72°F")]); + + List messages = [assistantMessage, toolResult]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Single(groups.Groups); + Assert.Equal(CompactionGroupKind.ToolCall, groups.Groups[0].Kind); + Assert.Equal(2, groups.Groups[0].Messages.Count); + Assert.Same(assistantMessage, groups.Groups[0].Messages[0]); + Assert.Same(toolResult, groups.Groups[0].Messages[1]); + } + + [Fact] + public void CreateToolCallWithTextCreatesAtomicGroup() + { + // Arrange + ChatMessage assistantMessage = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather", new Dictionary { ["city"] = "Seattle" })]); + ChatMessage toolResult = new(ChatRole.Tool, [new TextContent("Sunny, 72°F"), new FunctionResultContent("call1", "Sunny, 72°F")]); + + List messages = [assistantMessage, toolResult]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Single(groups.Groups); + Assert.Equal(CompactionGroupKind.ToolCall, groups.Groups[0].Kind); + Assert.Equal(2, groups.Groups[0].Messages.Count); + Assert.Same(assistantMessage, groups.Groups[0].Messages[0]); + Assert.Same(toolResult, groups.Groups[0].Messages[1]); + } + + [Fact] + public void CreateMixedConversationGroupsCorrectly() + { + // Arrange + ChatMessage systemMsg = new(ChatRole.System, "You are helpful."); + ChatMessage userMsg = new(ChatRole.User, "What's the weather?"); + ChatMessage assistantToolCall = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather")]); + ChatMessage toolResult = new(ChatRole.Tool, "Sunny"); + ChatMessage assistantText = new(ChatRole.Assistant, "The weather is sunny!"); + + List messages = [systemMsg, userMsg, assistantToolCall, toolResult, assistantText]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Equal(4, groups.Groups.Count); + Assert.Equal(CompactionGroupKind.System, groups.Groups[0].Kind); + Assert.Equal(CompactionGroupKind.User, groups.Groups[1].Kind); + Assert.Equal(CompactionGroupKind.ToolCall, groups.Groups[2].Kind); + Assert.Equal(2, groups.Groups[2].Messages.Count); + Assert.Equal(CompactionGroupKind.AssistantText, groups.Groups[3].Kind); + } + + [Fact] + public void CreateMultipleToolResultsGroupsAllWithAssistant() + { + // Arrange + ChatMessage assistantToolCall = new(ChatRole.Assistant, [ + new FunctionCallContent("call1", "get_weather"), + new FunctionCallContent("call2", "get_time"), + ]); + ChatMessage toolResult1 = new(ChatRole.Tool, "Sunny"); + ChatMessage toolResult2 = new(ChatRole.Tool, "3:00 PM"); + + List messages = [assistantToolCall, toolResult1, toolResult2]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Single(groups.Groups); + Assert.Equal(CompactionGroupKind.ToolCall, groups.Groups[0].Kind); + Assert.Equal(3, groups.Groups[0].Messages.Count); + } + + [Fact] + public void GetIncludedMessagesExcludesMarkedGroups() + { + // Arrange + ChatMessage msg1 = new(ChatRole.User, "First"); + ChatMessage msg2 = new(ChatRole.Assistant, "Response"); + ChatMessage msg3 = new(ChatRole.User, "Second"); + + CompactionMessageIndex groups = CompactionMessageIndex.Create([msg1, msg2, msg3]); + groups.Groups[1].IsExcluded = true; + + // Act + List included = [.. groups.GetIncludedMessages()]; + + // Assert + Assert.Equal(2, included.Count); + Assert.Same(msg1, included[0]); + Assert.Same(msg3, included[1]); + } + + [Fact] + public void GetAllMessagesIncludesExcludedGroups() + { + // Arrange + ChatMessage msg1 = new(ChatRole.User, "First"); + ChatMessage msg2 = new(ChatRole.Assistant, "Response"); + + CompactionMessageIndex groups = CompactionMessageIndex.Create([msg1, msg2]); + groups.Groups[0].IsExcluded = true; + + // Act + List all = [.. groups.GetAllMessages()]; + + // Assert + Assert.Equal(2, all.Count); + } + + [Fact] + public void IncludedGroupCountReflectsExclusions() + { + // Arrange + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "A"), + new ChatMessage(ChatRole.Assistant, "B"), + new ChatMessage(ChatRole.User, "C"), + ]); + + groups.Groups[1].IsExcluded = true; + + // Act & Assert + Assert.Equal(2, groups.IncludedGroupCount); + Assert.Equal(2, groups.IncludedMessageCount); + } + + [Fact] + public void CreateSummaryMessageCreatesSummaryGroup() + { + // Arrange + ChatMessage summaryMessage = new(ChatRole.Assistant, "[Summary of earlier conversation]: key facts..."); + (summaryMessage.AdditionalProperties ??= [])[CompactionMessageGroup.SummaryPropertyKey] = true; + + List messages = [summaryMessage]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Single(groups.Groups); + Assert.Equal(CompactionGroupKind.Summary, groups.Groups[0].Kind); + Assert.Same(summaryMessage, groups.Groups[0].Messages[0]); + } + + [Fact] + public void CreateSummaryAmongOtherMessagesGroupsCorrectly() + { + // Arrange + ChatMessage systemMsg = new(ChatRole.System, "You are helpful."); + ChatMessage summaryMsg = new(ChatRole.Assistant, "[Summary]: previous context"); + (summaryMsg.AdditionalProperties ??= [])[CompactionMessageGroup.SummaryPropertyKey] = true; + ChatMessage userMsg = new(ChatRole.User, "Continue..."); + + List messages = [systemMsg, summaryMsg, userMsg]; + + // Act + CompactionMessageIndex groups = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Equal(3, groups.Groups.Count); + Assert.Equal(CompactionGroupKind.System, groups.Groups[0].Kind); + Assert.Equal(CompactionGroupKind.Summary, groups.Groups[1].Kind); + Assert.Equal(CompactionGroupKind.User, groups.Groups[2].Kind); + } + + [Fact] + public void MessageGroupStoresPassedCounts() + { + // Arrange & Act + CompactionMessageGroup group = new(CompactionGroupKind.User, [new ChatMessage(ChatRole.User, "Hello")], byteCount: 5, tokenCount: 2); + + // Assert + Assert.Equal(1, group.MessageCount); + Assert.Equal(5, group.ByteCount); + Assert.Equal(2, group.TokenCount); + } + + [Fact] + public void MessageGroupMessagesAreImmutable() + { + // Arrange + IReadOnlyList messages = [new ChatMessage(ChatRole.User, "Hello")]; + CompactionMessageGroup group = new(CompactionGroupKind.User, messages, byteCount: 5, tokenCount: 1); + + // Assert — Messages is IReadOnlyList, not IList + Assert.IsType>(group.Messages, exactMatch: false); + Assert.Same(messages, group.Messages); + } + + [Fact] + public void CreateComputesByteCountUtf8() + { + // Arrange — "Hello" is 5 UTF-8 bytes + CompactionMessageIndex groups = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "Hello")]); + + // Assert + Assert.Equal(5, groups.Groups[0].ByteCount); + } + + [Fact] + public void CreateComputesByteCountMultiByteChars() + { + // Arrange — "café" has a multi-byte 'é' (2 bytes in UTF-8) → 5 bytes total + CompactionMessageIndex groups = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "café")]); + + // Assert + Assert.Equal(5, groups.Groups[0].ByteCount); + } + + [Fact] + public void CreateComputesByteCountMultipleMessagesInGroup() + { + // Arrange — ToolCall group: assistant (tool call) + tool result "OK" (2 bytes) + ChatMessage assistantMsg = new(ChatRole.Assistant, [new FunctionCallContent("call1", "fn")]); + ChatMessage toolResult = new(ChatRole.Tool, "OK"); + CompactionMessageIndex groups = CompactionMessageIndex.Create([assistantMsg, toolResult]); + + // Assert — single ToolCall group with 2 messages + Assert.Single(groups.Groups); + Assert.Equal(2, groups.Groups[0].MessageCount); + Assert.Equal(9, groups.Groups[0].ByteCount); // FunctionCallContent: "call1" (5) + "fn" (2) = 7, "OK" = 2 → 9 total + } + + [Fact] + public void CreateDefaultTokenCountIsHeuristic() + { + // Arrange — "Hello world test data!" = 22 UTF-8 bytes → 22 / 4 = 5 estimated tokens + CompactionMessageIndex groups = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "Hello world test data!")]); + + // Assert + Assert.Equal(22, groups.Groups[0].ByteCount); + Assert.Equal(22 / 4, groups.Groups[0].TokenCount); + } + + [Fact] + public void CreateNonTextContentHasAccurateCounts() + { + // Arrange — message with pure function call (no text) + ChatMessage msg = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather")]); + ChatMessage tool = new(ChatRole.Tool, string.Empty); + CompactionMessageIndex groups = CompactionMessageIndex.Create([msg, tool]); + + // Assert — FunctionCallContent: "call1" (5) + "get_weather" (11) = 16 bytes + Assert.Equal(2, groups.Groups[0].MessageCount); + Assert.Equal(16, groups.Groups[0].ByteCount); + Assert.Equal(4, groups.Groups[0].TokenCount); // 16 / 4 = 4 estimated tokens + } + + [Fact] + public void TotalAggregatesSumAllGroups() + { + // Arrange + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "AAAA"), // 4 bytes + new ChatMessage(ChatRole.Assistant, "BBBB"), // 4 bytes + ]); + + groups.Groups[0].IsExcluded = true; + + // Act & Assert — totals include excluded groups + Assert.Equal(2, groups.TotalGroupCount); + Assert.Equal(2, groups.TotalMessageCount); + Assert.Equal(8, groups.TotalByteCount); + Assert.Equal(2, groups.TotalTokenCount); // Each group: 4 bytes / 4 = 1 token, 2 groups = 2 + } + + [Fact] + public void IncludedAggregatesExcludeMarkedGroups() + { + // Arrange + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "AAAA"), // 4 bytes + new ChatMessage(ChatRole.Assistant, "BBBB"), // 4 bytes + new ChatMessage(ChatRole.User, "CCCC"), // 4 bytes + ]); + + groups.Groups[0].IsExcluded = true; + + // Act & Assert + Assert.Equal(3, groups.TotalGroupCount); + Assert.Equal(2, groups.IncludedGroupCount); + Assert.Equal(3, groups.TotalMessageCount); + Assert.Equal(2, groups.IncludedMessageCount); + Assert.Equal(12, groups.TotalByteCount); + Assert.Equal(8, groups.IncludedByteCount); + Assert.Equal(3, groups.TotalTokenCount); // 12 / 4 = 3 (across 3 groups of 4 bytes each = 1+1+1) + Assert.Equal(2, groups.IncludedTokenCount); // 8 / 4 = 2 (2 included groups of 4 bytes = 1+1) + } + + [Fact] + public void ToolCallGroupAggregatesAcrossMessages() + { + // Arrange — tool call group with FunctionCallContent + tool result "OK" (2 bytes) + ChatMessage assistantMsg = new(ChatRole.Assistant, [new FunctionCallContent("call1", "fn")]); + ChatMessage toolResult = new(ChatRole.Tool, "OK"); + + CompactionMessageIndex groups = CompactionMessageIndex.Create([assistantMsg, toolResult]); + + // Assert — single group with 2 messages + Assert.Single(groups.Groups); + Assert.Equal(2, groups.Groups[0].MessageCount); + Assert.Equal(9, groups.Groups[0].ByteCount); // FunctionCallContent: "call1" (5) + "fn" (2) = 7, "OK" = 2 → 9 total + Assert.Equal(1, groups.TotalGroupCount); + Assert.Equal(2, groups.TotalMessageCount); + } + + [Fact] + public void CreateAssignsTurnIndicesSingleTurn() + { + // Arrange — System (no turn), User + Assistant = turn 1 + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Assert + Assert.Null(groups.Groups[0].TurnIndex); // System + Assert.Equal(1, groups.Groups[1].TurnIndex); // User + Assert.Equal(1, groups.Groups[2].TurnIndex); // Assistant + Assert.Equal(1, groups.TotalTurnCount); + Assert.Equal(1, groups.IncludedTurnCount); + } + + [Fact] + public void CreateAssignsTurnIndicesMultiTurn() + { + // Arrange — 3 user turns + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "System prompt."), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // Assert — 6 groups: System(null), User(1), Assistant(1), User(2), Assistant(2), User(3) + Assert.Null(groups.Groups[0].TurnIndex); + Assert.Equal(1, groups.Groups[1].TurnIndex); + Assert.Equal(1, groups.Groups[2].TurnIndex); + Assert.Equal(2, groups.Groups[3].TurnIndex); + Assert.Equal(2, groups.Groups[4].TurnIndex); + Assert.Equal(3, groups.Groups[5].TurnIndex); + Assert.Equal(3, groups.TotalTurnCount); + } + + [Fact] + public void CreateTurnSpansToolCallGroups() + { + // Arrange — turn 1 includes User, ToolCall, AssistantText + ChatMessage assistantToolCall = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather")]); + ChatMessage toolResult = new(ChatRole.Tool, "Sunny"); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "What's the weather?"), + assistantToolCall, + toolResult, + new ChatMessage(ChatRole.Assistant, "The weather is sunny!"), + ]); + + // Assert — all 3 groups belong to turn 1 + Assert.Equal(3, groups.Groups.Count); + Assert.Equal(1, groups.Groups[0].TurnIndex); // User + Assert.Equal(1, groups.Groups[1].TurnIndex); // ToolCall + Assert.Equal(1, groups.Groups[2].TurnIndex); // AssistantText + Assert.Equal(1, groups.TotalTurnCount); + } + + [Fact] + public void GetTurnGroupsReturnsGroupsForSpecificTurn() + { + // Arrange + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "System."), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + // Act + List turn1 = [.. groups.GetTurnGroups(1)]; + List turn2 = [.. groups.GetTurnGroups(2)]; + + // Assert + Assert.Equal(2, turn1.Count); + Assert.Equal(CompactionGroupKind.User, turn1[0].Kind); + Assert.Equal(CompactionGroupKind.AssistantText, turn1[1].Kind); + Assert.Equal(2, turn2.Count); + Assert.Equal(CompactionGroupKind.User, turn2[0].Kind); + Assert.Equal(CompactionGroupKind.AssistantText, turn2[1].Kind); + } + + [Fact] + public void IncludedTurnCountReflectsExclusions() + { + // Arrange — 2 turns, exclude all groups in turn 1 + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + groups.Groups[0].IsExcluded = true; // User Q1 (turn 1) + groups.Groups[1].IsExcluded = true; // Assistant A1 (turn 1) + + // Assert + Assert.Equal(2, groups.TotalTurnCount); + Assert.Equal(1, groups.IncludedTurnCount); // Only turn 2 has included groups + } + + [Fact] + public void TotalTurnCountZeroWhenNoUserMessages() + { + // Arrange — only system messages + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "System."), + ]); + + // Assert + Assert.Equal(0, groups.TotalTurnCount); + Assert.Equal(0, groups.IncludedTurnCount); + } + + [Fact] + public void IncludedTurnCountPartialExclusionStillCountsTurn() + { + // Arrange — turn 1 has 2 groups, only one excluded + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + ]); + + groups.Groups[1].IsExcluded = true; // Exclude assistant but user is still included + + // Assert — turn 1 still has one included group + Assert.Equal(1, groups.TotalTurnCount); + Assert.Equal(1, groups.IncludedTurnCount); + } + + [Fact] + public void UpdateAppendsNewMessagesIncrementally() + { + // Arrange — create with 2 messages + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + ]; + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + Assert.Equal(2, index.Groups.Count); + Assert.Equal(2, index.RawMessageCount); + + // Act — add 2 more messages and update + messages.Add(new ChatMessage(ChatRole.User, "Q2")); + messages.Add(new ChatMessage(ChatRole.Assistant, "A2")); + index.Update(messages); + + // Assert — should have 4 groups total, processed count updated + Assert.Equal(4, index.Groups.Count); + Assert.Equal(4, index.RawMessageCount); + Assert.Equal(CompactionGroupKind.User, index.Groups[2].Kind); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[3].Kind); + } + + [Fact] + public void UpdateNoOpWhenNoNewMessages() + { + // Arrange + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + ]; + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + int originalCount = index.Groups.Count; + + // Act — update with same count + index.Update(messages); + + // Assert — nothing changed + Assert.Equal(originalCount, index.Groups.Count); + } + + [Fact] + public void UpdateRebuildsWhenMessagesShrink() + { + // Arrange — create with 3 messages + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]; + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + Assert.Equal(3, index.Groups.Count); + + // Exclude a group to verify rebuild clears state + index.Groups[0].IsExcluded = true; + + // Act — update with fewer messages (simulates storage compaction) + List shortened = + [ + new ChatMessage(ChatRole.User, "Q2"), + ]; + index.Update(shortened); + + // Assert — rebuilt from scratch + Assert.Single(index.Groups); + Assert.False(index.Groups[0].IsExcluded); + Assert.Equal(1, index.RawMessageCount); + } + + [Fact] + public void UpdateWithEmptyListClearsGroups() + { + // Arrange — create with messages + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + ]; + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + Assert.Equal(2, index.Groups.Count); + + // Act — update with empty list + index.Update([]); + + // Assert — fully cleared + Assert.Empty(index.Groups); + Assert.Equal(0, index.TotalTurnCount); + Assert.Equal(0, index.RawMessageCount); + } + + [Fact] + public void UpdateRebuildsWhenLastProcessedMessageNotFound() + { + // Arrange — create with messages + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + ]; + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + Assert.Equal(2, index.Groups.Count); + index.Groups[0].IsExcluded = true; + + // Act — update with completely different messages (last processed "A1" is absent) + List replaced = + [ + new ChatMessage(ChatRole.User, "X1"), + new ChatMessage(ChatRole.Assistant, "X2"), + new ChatMessage(ChatRole.User, "X3"), + ]; + index.Update(replaced); + + // Assert — rebuilt from scratch, exclusion state gone + Assert.Equal(3, index.Groups.Count); + Assert.All(index.Groups, g => Assert.False(g.IsExcluded)); + Assert.Equal(3, index.RawMessageCount); + } + + [Fact] + public void UpdatePreservesExistingGroupExclusionState() + { + // Arrange + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + ]; + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + index.Groups[0].IsExcluded = true; + index.Groups[0].ExcludeReason = "Test exclusion"; + + // Act — append new messages + messages.Add(new ChatMessage(ChatRole.User, "Q2")); + index.Update(messages); + + // Assert — original exclusion state preserved + Assert.True(index.Groups[0].IsExcluded); + Assert.Equal("Test exclusion", index.Groups[0].ExcludeReason); + Assert.Equal(3, index.Groups.Count); + } + + [Fact] + public void InsertGroupInsertsAtSpecifiedIndex() + { + // Arrange + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act — insert between Q1 and Q2 + ChatMessage summaryMsg = new(ChatRole.Assistant, "[Summary]"); + CompactionMessageGroup inserted = index.InsertGroup(1, CompactionGroupKind.Summary, [summaryMsg], turnIndex: 1); + + // Assert + Assert.Equal(3, index.Groups.Count); + Assert.Same(inserted, index.Groups[1]); + Assert.Equal(CompactionGroupKind.Summary, index.Groups[1].Kind); + Assert.Equal("[Summary]", index.Groups[1].Messages[0].Text); + Assert.Equal(1, inserted.TurnIndex); + } + + [Fact] + public void AddGroupAppendsToEnd() + { + // Arrange + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + ]); + + // Act + ChatMessage msg = new(ChatRole.Assistant, "Appended"); + CompactionMessageGroup added = index.AddGroup(CompactionGroupKind.AssistantText, [msg], turnIndex: 1); + + // Assert + Assert.Equal(2, index.Groups.Count); + Assert.Same(added, index.Groups[1]); + Assert.Equal("Appended", index.Groups[1].Messages[0].Text); + } + + [Fact] + public void InsertGroupComputesByteAndTokenCounts() + { + // Arrange + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + ]); + + // Act — insert a group with known text + ChatMessage msg = new(ChatRole.Assistant, "Hello"); // 5 bytes, ~1 token (5/4) + CompactionMessageGroup inserted = index.InsertGroup(0, CompactionGroupKind.AssistantText, [msg]); + + // Assert + Assert.Equal(5, inserted.ByteCount); + Assert.Equal(1, inserted.TokenCount); // 5 / 4 = 1 (integer division) + } + + [Fact] + public void ConstructorWithGroupsRestoresTurnIndex() + { + // Arrange — pre-existing groups with turn indices + CompactionMessageGroup group1 = new(CompactionGroupKind.User, [new ChatMessage(ChatRole.User, "Q1")], 2, 1, turnIndex: 1); + CompactionMessageGroup group2 = new(CompactionGroupKind.AssistantText, [new ChatMessage(ChatRole.Assistant, "A1")], 2, 1, turnIndex: 1); + CompactionMessageGroup group3 = new(CompactionGroupKind.User, [new ChatMessage(ChatRole.User, "Q2")], 2, 1, turnIndex: 2); + List groups = [group1, group2, group3]; + + // Act — constructor should restore _currentTurn from the last group's TurnIndex + CompactionMessageIndex index = new(groups); + + // Assert — adding a new user message should get turn 3 (restored 2 + 1) + index.Update( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // The new user group should have TurnIndex 3 + CompactionMessageGroup lastGroup = index.Groups[index.Groups.Count - 1]; + Assert.Equal(CompactionGroupKind.User, lastGroup.Kind); + Assert.NotNull(lastGroup.TurnIndex); + } + + [Fact] + public void ConstructorWithEmptyGroupsHandlesGracefully() + { + // Arrange & Act — constructor with empty list + CompactionMessageIndex index = new([]); + + // Assert + Assert.Empty(index.Groups); + } + + [Fact] + public void ConstructorWithGroupsWithoutTurnIndexSkipsRestore() + { + // Arrange — groups without turn indices (system messages) + CompactionMessageGroup systemGroup = new(CompactionGroupKind.System, [new ChatMessage(ChatRole.System, "Be helpful")], 10, 3, turnIndex: null); + List groups = [systemGroup]; + + // Act — constructor won't find a TurnIndex to restore + CompactionMessageIndex index = new(groups); + + // Assert + Assert.Single(index.Groups); + } + + [Fact] + public void ComputeTokenCountReturnsTokenCount() + { + // Arrange — call the public static method directly + List messages = + [ + new ChatMessage(ChatRole.User, "Hello world"), + new ChatMessage(ChatRole.Assistant, "Greetings"), + ]; + + // Act — use a simple tokenizer that counts words (each word = 1 token) + SimpleWordTokenizer tokenizer = new(); + int tokenCount = CompactionMessageIndex.ComputeTokenCount(messages, tokenizer); + + // Assert — "Hello world" = 2, "Greetings" = 1 → 3 total + Assert.Equal(3, tokenCount); + } + + [Fact] + public void ComputeTokenCountEmptyContentsReturnsZero() + { + // Arrange — message with empty contents + List messages = + [ + new ChatMessage(ChatRole.User, []), + ]; + + SimpleWordTokenizer tokenizer = new(); + int tokenCount = CompactionMessageIndex.ComputeTokenCount(messages, tokenizer); + + // Assert — no content → 0 tokens + Assert.Equal(0, tokenCount); + } + + [Fact] + public void CreateWithTokenizerUsesTokenizerForCounts() + { + // Arrange + SimpleWordTokenizer tokenizer = new(); + + List messages = + [ + new ChatMessage(ChatRole.User, "Hello world test"), + ]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages, tokenizer); + + // Assert — tokenizer counts words: "Hello world test" = 3 tokens + Assert.Single(index.Groups); + Assert.Equal(3, index.Groups[0].TokenCount); + Assert.NotNull(index.Tokenizer); + } + + [Fact] + public void InsertGroupWithTokenizerUsesTokenizer() + { + // Arrange + SimpleWordTokenizer tokenizer = new(); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + ], tokenizer); + + // Act + ChatMessage msg = new(ChatRole.Assistant, "Hello world test message"); + CompactionMessageGroup inserted = index.InsertGroup(0, CompactionGroupKind.AssistantText, [msg]); + + // Assert — tokenizer counts words: "Hello world test message" = 4 tokens + Assert.Equal(4, inserted.TokenCount); + } + + [Fact] + public void CreateWithStandaloneToolMessageGroupsAsAssistantText() + { + // A Tool message not preceded by an assistant tool-call falls through to the else branch + List messages = + [ + new ChatMessage(ChatRole.Tool, "Orphaned tool result"), + ]; + + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // The Tool message should be grouped as AssistantText (the default fallback) + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + } + + [Fact] + public void CreateWithAssistantNonSummaryWithPropertiesFallsToAssistantText() + { + // Assistant message with AdditionalProperties but NOT a summary + ChatMessage assistant = new(ChatRole.Assistant, "Regular response"); + (assistant.AdditionalProperties ??= [])["someOtherKey"] = "value"; + + CompactionMessageIndex index = CompactionMessageIndex.Create([assistant]); + + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + } + + [Fact] + public void CreateWithSummaryPropertyFalseIsNotSummary() + { + // Summary property key present but value is false — not a summary + ChatMessage assistant = new(ChatRole.Assistant, "Not a summary"); + (assistant.AdditionalProperties ??= [])[CompactionMessageGroup.SummaryPropertyKey] = false; + + CompactionMessageIndex index = CompactionMessageIndex.Create([assistant]); + + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + } + + [Fact] + public void CreateWithSummaryPropertyNonBoolIsNotSummary() + { + // Summary property key present but value is a string, not a bool + ChatMessage assistant = new(ChatRole.Assistant, "Not a summary"); + (assistant.AdditionalProperties ??= [])[CompactionMessageGroup.SummaryPropertyKey] = "true"; + + CompactionMessageIndex index = CompactionMessageIndex.Create([assistant]); + + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + } + + [Fact] + public void CreateWithSummaryPropertyNullValueIsNotSummary() + { + // Summary property key present but value is null + ChatMessage assistant = new(ChatRole.Assistant, "Not a summary"); + (assistant.AdditionalProperties ??= [])[CompactionMessageGroup.SummaryPropertyKey] = null!; + + CompactionMessageIndex index = CompactionMessageIndex.Create([assistant]); + + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + } + + [Fact] + public void CreateWithNoAdditionalPropertiesIsNotSummary() + { + // Assistant message with no AdditionalProperties at all + ChatMessage assistant = new(ChatRole.Assistant, "Plain response"); + + CompactionMessageIndex index = CompactionMessageIndex.Create([assistant]); + + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + } + + [Fact] + public void ComputeByteCountHandlesTextAndNonTextContent() + { + // Mix of messages: one with text (non-null), one with FunctionCallContent + List messages = + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]), + ]; + + int byteCount = CompactionMessageIndex.ComputeByteCount(messages); + + // "Hello" = 5 bytes, FunctionCallContent("c1", "fn") = "c1" (2) + "fn" (2) = 4 bytes + Assert.Equal(9, byteCount); + } + + [Fact] + public void ComputeTokenCountHandlesTextAndNonTextContent() + { + // Mix: one with text, one with FunctionCallContent + SimpleWordTokenizer tokenizer = new(); + List messages = + [ + new ChatMessage(ChatRole.User, "Hello world"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]), + ]; + + int tokenCount = CompactionMessageIndex.ComputeTokenCount(messages, tokenizer); + + // "Hello world" = 2 tokens (tokenized), FunctionCallContent("c1","fn") = 4 bytes → 1 token (estimated) + Assert.Equal(3, tokenCount); + } + + [Fact] + public void ComputeByteCountTextContent() + { + List messages = + [ + new ChatMessage(ChatRole.User, [new TextContent("Hello")]), + ]; + + Assert.Equal(5, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountTextReasoningContent() + { + List messages = + [ + new ChatMessage(ChatRole.Assistant, [new TextReasoningContent("think") { ProtectedData = "secret" }]), + ]; + + // "think" = 5 bytes, "secret" = 6 bytes + Assert.Equal(11, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountDataContent() + { + byte[] payload = new byte[100]; + List messages = + [ + new ChatMessage(ChatRole.User, [new DataContent(payload, "image/png") { Name = "pic" }]), + ]; + + // 100 (data) + 9 ("image/png") + 3 ("pic") + Assert.Equal(112, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountUriContent() + { + List messages = + [ + new ChatMessage(ChatRole.User, [new UriContent(new Uri("https://example.com/image.png"), "image/png")]), + ]; + + // "https://example.com/image.png" = 29 bytes, "image/png" = 9 bytes + Assert.Equal(38, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountFunctionCallContentWithArguments() + { + List messages = + [ + new ChatMessage(ChatRole.Assistant, + [ + new FunctionCallContent("call1", "get_weather", new Dictionary { ["city"] = "Seattle" }), + ]), + ]; + + // "call1" = 5, "get_weather" = 11, "city" = 4, "Seattle" = 7 + Assert.Equal(27, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountFunctionCallContentWithoutArguments() + { + List messages = + [ + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]), + ]; + + // "c1" = 2, "fn" = 2 + Assert.Equal(4, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountFunctionResultContent() + { + List messages = + [ + new ChatMessage(ChatRole.Tool, [new FunctionResultContent("call1", "Sunny, 72°F")]), + ]; + + // "call1" = 5, "Sunny, 72°F" = 13 bytes (° is 2 bytes in UTF-8) + Assert.Equal(5 + System.Text.Encoding.UTF8.GetByteCount("Sunny, 72°F"), CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountErrorContent() + { + List messages = + [ + new ChatMessage(ChatRole.Assistant, [new ErrorContent("fail") { ErrorCode = "E001" }]), + ]; + + // "fail" = 4, "E001" = 4 + Assert.Equal(8, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountHostedFileContent() + { + List messages = + [ + new ChatMessage(ChatRole.Assistant, [new HostedFileContent("file-abc") { MediaType = "text/plain", Name = "readme.txt" }]), + ]; + + // "file-abc" = 8, "text/plain" = 10, "readme.txt" = 10 + Assert.Equal(28, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountMixedContentInSingleMessage() + { + List messages = + [ + new ChatMessage(ChatRole.User, + [ + new TextContent("Hello"), + new DataContent(new byte[50], "image/png"), + ]), + ]; + + // TextContent: "Hello" = 5 bytes + // DataContent: 50 (data) + 9 ("image/png") = 59 bytes + Assert.Equal(64, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountEmptyContentsReturnsZero() + { + List messages = + [ + new ChatMessage(ChatRole.User, []), + ]; + + Assert.Equal(0, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeByteCountUnknownContentTypeReturnsZero() + { + List messages = + [ + new ChatMessage(ChatRole.Assistant, [new UsageContent(new UsageDetails())]), + ]; + + Assert.Equal(0, CompactionMessageIndex.ComputeByteCount(messages)); + } + + [Fact] + public void ComputeTokenCountTextReasoningContentUsesTokenizer() + { + SimpleWordTokenizer tokenizer = new(); + List messages = + [ + new ChatMessage(ChatRole.Assistant, [new TextReasoningContent("deep thinking here") { ProtectedData = "hidden data" }]), + ]; + + // "deep thinking here" = 3 words, "hidden data" = 2 words → 5 tokens via tokenizer + Assert.Equal(5, CompactionMessageIndex.ComputeTokenCount(messages, tokenizer)); + } + + [Fact] + public void ComputeTokenCountNonTextContentEstimatesFromBytes() + { + SimpleWordTokenizer tokenizer = new(); + byte[] payload = new byte[40]; + List messages = + [ + new ChatMessage(ChatRole.User, [new DataContent(payload, "image/png")]), + ]; + + // DataContent: 40 (data) + 9 ("image/png") = 49 bytes → 49/4 = 12 tokens (estimated) + Assert.Equal(12, CompactionMessageIndex.ComputeTokenCount(messages, tokenizer)); + } + + [Fact] + public void ComputeTokenCountMixedTextAndNonTextContent() + { + SimpleWordTokenizer tokenizer = new(); + List messages = + [ + new ChatMessage(ChatRole.User, + [ + new TextContent("Hello world"), + new DataContent(new byte[40], "image/png"), + ]), + ]; + + // TextContent: "Hello world" = 2 tokens (tokenized) + // DataContent: 40 + 9 = 49 bytes → 12 tokens (estimated) + Assert.Equal(14, CompactionMessageIndex.ComputeTokenCount(messages, tokenizer)); + } + + [Fact] + public void CreateGroupByteCountIncludesAllContentTypes() + { + // Verify that CompactionMessageIndex.Create produces groups with accurate byte counts for non-text content + ChatMessage assistantMessage = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather", new Dictionary { ["city"] = "Seattle" })]); + ChatMessage toolResult = new(ChatRole.Tool, [new FunctionResultContent("call1", "Sunny")]); + List messages = [assistantMessage, toolResult]; + + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // ToolCall group: FunctionCallContent("call1","get_weather",{city=Seattle}) + FunctionResultContent("call1","Sunny") + // = (5 + 11 + 4 + 7) + (5 + 5) = 27 + 10 = 37 + Assert.Single(index.Groups); + Assert.Equal(37, index.Groups[0].ByteCount); + Assert.True(index.Groups[0].TokenCount > 0); + } + + /// + /// A simple tokenizer that counts whitespace-separated words as tokens. + /// + private sealed class SimpleWordTokenizer : Tokenizer + { + public override PreTokenizer? PreTokenizer => null; + public override Normalizer? Normalizer => null; + + protected override EncodeResults EncodeToTokens(string? text, ReadOnlySpan textSpan, EncodeSettings settings) + { + // Simple word-based encoding + string input = text ?? textSpan.ToString(); + if (string.IsNullOrWhiteSpace(input)) + { + return new EncodeResults + { + Tokens = [], + CharsConsumed = 0, + NormalizedText = null, + }; + } + + string[] words = input.Split(' '); + List tokens = []; + int offset = 0; + for (int i = 0; i < words.Length; i++) + { + tokens.Add(new EncodedToken(i, words[i], new Range(offset, offset + words[i].Length))); + offset += words[i].Length + 1; + } + + return new EncodeResults + { + Tokens = tokens, + CharsConsumed = input.Length, + NormalizedText = null, + }; + } + + public override OperationStatus Decode(IEnumerable ids, Span destination, out int idsConsumed, out int charsWritten) + { + idsConsumed = 0; + charsWritten = 0; + return OperationStatus.Done; + } + } + + [Fact] + public void CreateReasoningBeforeToolCallGroupsAtomic() + { + // Arrange — reasoning-only assistant message immediately before a tool-call assistant message + ChatMessage reasoning = new(ChatRole.Assistant, [new TextReasoningContent("I should look up the weather")]); + ChatMessage toolCall = new(ChatRole.Assistant, [new FunctionCallContent("c1", "get_weather")]); + ChatMessage toolResult = new(ChatRole.Tool, [new FunctionResultContent("c1", "Sunny")]); + + List messages = [reasoning, toolCall, toolResult]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert — all three messages in a single ToolCall group + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[0].Kind); + Assert.Equal(3, index.Groups[0].MessageCount); + Assert.Same(reasoning, index.Groups[0].Messages[0]); + Assert.Same(toolCall, index.Groups[0].Messages[1]); + Assert.Same(toolResult, index.Groups[0].Messages[2]); + } + + [Fact] + public void CreateMultipleReasoningBeforeToolCallGroupsAtomic() + { + // Arrange — multiple consecutive reasoning messages before a tool-call + ChatMessage reasoning1 = new(ChatRole.Assistant, [new TextReasoningContent("First thought")]); + ChatMessage reasoning2 = new(ChatRole.Assistant, [new TextReasoningContent("Second thought")]); + ChatMessage toolCall = new(ChatRole.Assistant, [new FunctionCallContent("c1", "search")]); + ChatMessage toolResult = new(ChatRole.Tool, [new FunctionResultContent("c1", "results")]); + + List messages = [reasoning1, reasoning2, toolCall, toolResult]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert — all four messages in a single ToolCall group + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[0].Kind); + Assert.Equal(4, index.Groups[0].MessageCount); + } + + [Fact] + public void CreateReasoningNotFollowedByToolCallIsAssistantText() + { + // Arrange — reasoning-only message followed by a user message (no tool call) + ChatMessage reasoning = new(ChatRole.Assistant, [new TextReasoningContent("Thinking...")]); + ChatMessage user = new(ChatRole.User, "Hello"); + + List messages = [reasoning, user]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert — reasoning becomes AssistantText, user stays User + Assert.Equal(2, index.Groups.Count); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + Assert.Equal(CompactionGroupKind.User, index.Groups[1].Kind); + } + + [Fact] + public void CreateReasoningAtEndOfConversationIsAssistantText() + { + // Arrange — reasoning-only message at the end with nothing following it + ChatMessage user = new(ChatRole.User, "Hello"); + ChatMessage reasoning = new(ChatRole.Assistant, [new TextReasoningContent("Thinking...")]); + + List messages = [user, reasoning]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Equal(2, index.Groups.Count); + Assert.Equal(CompactionGroupKind.User, index.Groups[0].Kind); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[1].Kind); + } + + [Fact] + public void CreateToolCallFollowedByReasoningInTail() + { + // Arrange — tool-call assistant followed by tool result and then reasoning-only messages + ChatMessage toolCall = new(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]); + ChatMessage toolResult = new(ChatRole.Tool, [new FunctionResultContent("c1", "data")]); + ChatMessage reasoning = new(ChatRole.Assistant, [new TextReasoningContent("Analyzing result...")]); + + List messages = [toolCall, toolResult, reasoning]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert — reasoning after tool result should be included in the same ToolCall group + Assert.Single(index.Groups); + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[0].Kind); + Assert.Equal(3, index.Groups[0].MessageCount); + } + + [Fact] + public void CreateReasoningBetweenToolCallsGroupsCorrectly() + { + // Arrange — reasoning before first tool-call, then another reasoning+tool-call pair + ChatMessage reasoning1 = new(ChatRole.Assistant, [new TextReasoningContent("Plan: call get_weather")]); + ChatMessage toolCall1 = new(ChatRole.Assistant, [new FunctionCallContent("c1", "get_weather")]); + ChatMessage toolResult1 = new(ChatRole.Tool, [new FunctionResultContent("c1", "Sunny")]); + ChatMessage user = new(ChatRole.User, "What else?"); + ChatMessage reasoning2 = new(ChatRole.Assistant, [new TextReasoningContent("Plan: call get_time")]); + ChatMessage toolCall2 = new(ChatRole.Assistant, [new FunctionCallContent("c2", "get_time")]); + ChatMessage toolResult2 = new(ChatRole.Tool, [new FunctionResultContent("c2", "3 PM")]); + + List messages = [reasoning1, toolCall1, toolResult1, user, reasoning2, toolCall2, toolResult2]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert — two ToolCall groups with reasoning included, plus one User group + Assert.Equal(3, index.Groups.Count); + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[0].Kind); + Assert.Equal(3, index.Groups[0].MessageCount); // reasoning1 + toolCall1 + toolResult1 + Assert.Equal(CompactionGroupKind.User, index.Groups[1].Kind); + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[2].Kind); + Assert.Equal(3, index.Groups[2].MessageCount); // reasoning2 + toolCall2 + toolResult2 + } + + [Fact] + public void CreateReasoningFollowedByNonReasoningAssistantNotGrouped() + { + // Arrange — reasoning-only followed by plain assistant text (not tool call) + ChatMessage reasoning = new(ChatRole.Assistant, [new TextReasoningContent("Thinking...")]); + ChatMessage plainAssistant = new(ChatRole.Assistant, "Here's my answer."); + + List messages = [reasoning, plainAssistant]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert — each becomes its own AssistantText group + Assert.Equal(2, index.Groups.Count); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[1].Kind); + } + + [Fact] + public void CreateMixedReasoningAndToolCallTurnIndex() + { + // Arrange — verify turn index is correctly assigned when reasoning precedes tool call + ChatMessage system = new(ChatRole.System, "You are helpful."); + ChatMessage user = new(ChatRole.User, "Help me"); + ChatMessage reasoning = new(ChatRole.Assistant, [new TextReasoningContent("Let me think")]); + ChatMessage toolCall = new(ChatRole.Assistant, [new FunctionCallContent("c1", "helper")]); + ChatMessage toolResult = new(ChatRole.Tool, [new FunctionResultContent("c1", "done")]); + + List messages = [system, user, reasoning, toolCall, toolResult]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert + Assert.Equal(3, index.Groups.Count); + Assert.Null(index.Groups[0].TurnIndex); // System + Assert.Equal(1, index.Groups[1].TurnIndex); // User turn 1 + Assert.Equal(1, index.Groups[2].TurnIndex); // ToolCall inherits turn 1 + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[2].Kind); + Assert.Equal(3, index.Groups[2].MessageCount); // reasoning + toolCall + toolResult + } + + [Fact] + public void CreateAssistantWithMixedReasoningAndTextNotGroupedAsReasoning() + { + // Arrange — assistant with both reasoning and text content is NOT "only reasoning" + ChatMessage mixedAssistant = new(ChatRole.Assistant, [ + new TextReasoningContent("Thinking"), + new TextContent("And also speaking"), + ]); + ChatMessage toolCall = new(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]); + ChatMessage toolResult = new(ChatRole.Tool, [new FunctionResultContent("c1", "data")]); + + List messages = [mixedAssistant, toolCall, toolResult]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert — mixedAssistant has non-reasoning content, so it's AssistantText, not grouped with ToolCall + Assert.Equal(2, index.Groups.Count); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[1].Kind); + } + + [Fact] + public void CreateEmptyContentsAssistantIsAssistantText() + { + // Arrange — assistant message with empty contents (edge case for HasOnlyReasoning) + ChatMessage emptyAssistant = new(ChatRole.Assistant, []); + ChatMessage user = new(ChatRole.User, "Hello"); + + List messages = [emptyAssistant, user]; + + // Act + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Assert — empty contents falls through to AssistantText + Assert.Equal(2, index.Groups.Count); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[0].Kind); + } + + [Fact] + public void UpdateIncrementallyAppendsReasoningToolCallGroup() + { + // Arrange — create initial index, then add reasoning+tool-call messages + List messages = + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]; + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + Assert.Equal(2, index.Groups.Count); + + // Add reasoning + tool-call + messages.Add(new ChatMessage(ChatRole.Assistant, [new TextReasoningContent("Let me search")])); + messages.Add(new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "search")])); + messages.Add(new ChatMessage(ChatRole.Tool, [new FunctionResultContent("c1", "found")])); + + // Act + index.Update(messages); + + // Assert — new messages form a single ToolCall group (delta append) + Assert.Equal(3, index.Groups.Count); + Assert.Equal(CompactionGroupKind.User, index.Groups[0].Kind); + Assert.Equal(CompactionGroupKind.AssistantText, index.Groups[1].Kind); + Assert.Equal(CompactionGroupKind.ToolCall, index.Groups[2].Kind); + Assert.Equal(3, index.Groups[2].MessageCount); // reasoning + toolCall + toolResult + } +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionProviderTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionProviderTests.cs new file mode 100644 index 0000000000..317f7d86ed --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionProviderTests.cs @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; +using Moq; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the class. +/// +public sealed class CompactionProviderTests +{ + [Fact] + public void ConstructorThrowsOnNullStrategy() + { + Assert.Throws(() => new CompactionProvider(null!)); + } + + [Fact] + public void StateKeysReturnsExpectedKey() + { + // Arrange + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + CompactionProvider provider = new(strategy); + + // Act & Assert — default state key is the strategy type name + Assert.Single(provider.StateKeys); + Assert.Equal(nameof(TruncationCompactionStrategy), provider.StateKeys[0]); + } + + [Fact] + public void StateKeysAreStableAcrossEquivalentInstances() + { + // Arrange — two providers with equivalent (but distinct) strategies + CompactionProvider provider1 = new(new TruncationCompactionStrategy(CompactionTriggers.TokensExceed(100000))); + CompactionProvider provider2 = new(new TruncationCompactionStrategy(CompactionTriggers.TokensExceed(100000))); + + // Act & Assert — default keys must be identical for session state stability + Assert.Equal(provider1.StateKeys[0], provider2.StateKeys[0]); + } + + [Fact] + public void StateKeysReturnsCustomKeyWhenProvided() + { + // Arrange + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + CompactionProvider provider = new(strategy, stateKey: "my-custom-key"); + + // Act & Assert + Assert.Single(provider.StateKeys); + Assert.Equal("my-custom-key", provider.StateKeys[0]); + } + + [Fact] + public async Task InvokingAsyncNoSessionPassesThroughAsync() + { + // Arrange — no session → passthrough + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + CompactionProvider provider = new(strategy); + + Mock mockAgent = new() { CallBase = true }; + List messages = + [ + new ChatMessage(ChatRole.User, "Hello"), + ]; + + AIContextProvider.InvokingContext context = new( + mockAgent.Object, + session: null, + new AIContext { Messages = messages }); + + // Act + AIContext result = await provider.InvokingAsync(context); + + // Assert — original context returned unchanged + Assert.Same(messages, result.Messages); + } + + [Fact] + public async Task InvokingAsyncNullMessagesPassesThroughAsync() + { + // Arrange — messages is null → passthrough + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + CompactionProvider provider = new(strategy); + + Mock mockAgent = new() { CallBase = true }; + TestAgentSession session = new(); + AIContextProvider.InvokingContext context = new( + mockAgent.Object, + session, + new AIContext { Messages = null }); + + // Act + AIContext result = await provider.InvokingAsync(context); + + // Assert — original context returned unchanged + Assert.Null(result.Messages); + } + + [Fact] + public async Task InvokingAsyncAppliesCompactionWhenTriggeredAsync() + { + // Arrange — strategy that always triggers and keeps only 1 group + TruncationCompactionStrategy strategy = new(_ => true, minimumPreservedGroups: 1); + CompactionProvider provider = new(strategy); + + Mock mockAgent = new() { CallBase = true }; + TestAgentSession session = new(); + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]; + + AIContextProvider.InvokingContext context = new( + mockAgent.Object, + session, + new AIContext { Messages = messages }); + + // Act + AIContext result = await provider.InvokingAsync(context); + + // Assert — compaction should have reduced the message count + Assert.NotNull(result.Messages); + List resultList = [.. result.Messages!]; + Assert.True(resultList.Count < messages.Count); + } + + [Fact] + public async Task InvokingAsyncNoCompactionNeededReturnsOriginalMessagesAsync() + { + // Arrange — trigger never fires → no compaction + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + CompactionProvider provider = new(strategy); + + Mock mockAgent = new() { CallBase = true }; + TestAgentSession session = new(); + List messages = + [ + new ChatMessage(ChatRole.User, "Hello"), + ]; + + AIContextProvider.InvokingContext context = new( + mockAgent.Object, + session, + new AIContext { Messages = messages }); + + // Act + AIContext result = await provider.InvokingAsync(context); + + // Assert — original messages passed through + Assert.NotNull(result.Messages); + List resultList = [.. result.Messages!]; + Assert.Single(resultList); + Assert.Equal("Hello", resultList[0].Text); + } + + [Fact] + public async Task InvokingAsyncPreservesInstructionsAndToolsAsync() + { + // Arrange + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + CompactionProvider provider = new(strategy); + + Mock mockAgent = new() { CallBase = true }; + TestAgentSession session = new(); + List messages = [new ChatMessage(ChatRole.User, "Hello")]; + AITool[] tools = [AIFunctionFactory.Create(() => "tool", "MyTool")]; + + AIContextProvider.InvokingContext context = new( + mockAgent.Object, + session, + new AIContext + { + Instructions = "Be helpful", + Messages = messages, + Tools = tools + }); + + // Act + AIContext result = await provider.InvokingAsync(context); + + // Assert — instructions and tools are preserved + Assert.Equal("Be helpful", result.Instructions); + Assert.Same(tools, result.Tools); + } + + [Fact] + public async Task InvokingAsyncWithExistingIndexUpdatesAsync() + { + // Arrange — call twice to exercise the "existing index" path + TruncationCompactionStrategy strategy = new(_ => true, minimumPreservedGroups: 1); + CompactionProvider provider = new(strategy); + + Mock mockAgent = new() { CallBase = true }; + TestAgentSession session = new(); + + List messages1 = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]; + + AIContextProvider.InvokingContext context1 = new( + mockAgent.Object, + session, + new AIContext { Messages = messages1 }); + + // First call — initializes state + await provider.InvokingAsync(context1); + + List messages2 = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + ]; + + AIContextProvider.InvokingContext context2 = new( + mockAgent.Object, + session, + new AIContext { Messages = messages2 }); + + // Act — second call exercises the update path + AIContext result = await provider.InvokingAsync(context2); + + // Assert + Assert.NotNull(result.Messages); + } + + [Fact] + public async Task InvokingAsyncWithNonListEnumerableCreatesListCopyAsync() + { + // Arrange — pass IEnumerable (not List) to exercise the list copy branch + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + CompactionProvider provider = new(strategy); + + Mock mockAgent = new() { CallBase = true }; + TestAgentSession session = new(); + + // Use an IEnumerable (not a List) to trigger the copy path + IEnumerable messages = [new ChatMessage(ChatRole.User, "Hello")]; + + AIContextProvider.InvokingContext context = new( + mockAgent.Object, + session, + new AIContext { Messages = messages }); + + // Act + AIContext result = await provider.InvokingAsync(context); + + // Assert + Assert.NotNull(result.Messages); + List resultList = [.. result.Messages!]; + Assert.Single(resultList); + Assert.Equal("Hello", resultList[0].Text); + } + + [Fact] + public async Task CompactAsyncThrowsOnNullStrategyAsync() + { + List messages = [new ChatMessage(ChatRole.User, "Hello")]; + + await Assert.ThrowsAsync(() => CompactionProvider.CompactAsync(null!, messages)); + } + + [Fact] + public async Task CompactAsyncReturnsAllMessagesWhenTriggerDoesNotFireAsync() + { + // Arrange — trigger never fires → no compaction + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]; + + // Act + IEnumerable result = await CompactionProvider.CompactAsync(strategy, messages); + + // Assert — all messages preserved + List resultList = [.. result]; + Assert.Equal(messages.Count, resultList.Count); + Assert.Equal("Q1", resultList[0].Text); + Assert.Equal("A1", resultList[1].Text); + Assert.Equal("Q2", resultList[2].Text); + } + + [Fact] + public async Task CompactAsyncReducesMessagesWhenTriggeredAsync() + { + // Arrange — strategy that always triggers and keeps only 1 group + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 1); + List messages = + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]; + + // Act + IEnumerable result = await CompactionProvider.CompactAsync(strategy, messages); + + // Assert — compaction should have reduced the message count + List resultList = [.. result]; + Assert.True(resultList.Count < messages.Count); + } + + [Fact] + public async Task CompactAsyncHandlesEmptyMessageListAsync() + { + // Arrange + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 1); + List messages = []; + + // Act + IEnumerable result = await CompactionProvider.CompactAsync(strategy, messages); + + // Assert + Assert.Empty(result); + } + + [Fact] + public async Task CompactAsyncWorksWithNonListEnumerableAsync() + { + // Arrange — IEnumerable (not a List) to exercise the list copy branch + TruncationCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(100000)); + IEnumerable messages = [new ChatMessage(ChatRole.User, "Hello")]; + + // Act + IEnumerable result = await CompactionProvider.CompactAsync(strategy, messages); + + // Assert + List resultList = [.. result]; + Assert.Single(resultList); + Assert.Equal("Hello", resultList[0].Text); + } + + [Fact] + public void CompactionStateAssignment() + { + // Arrange + CompactionProvider.State state = new(); + + // Assert + Assert.NotNull(state.MessageGroups); + Assert.Empty(state.MessageGroups); + + // Act + state.MessageGroups = [new CompactionMessageGroup(CompactionGroupKind.User, [], 0, 0, 0)]; + + // Assert + Assert.Single(state.MessageGroups); + } + + private sealed class TestAgentSession : AgentSession; +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionStrategyTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionStrategyTests.cs new file mode 100644 index 0000000000..5088c573c3 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionStrategyTests.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Logging; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the abstract base class. +/// +public class CompactionStrategyTests +{ + [Fact] + public void ConstructorNullTriggerThrows() + { + // Act & Assert + Assert.Throws(() => new TestStrategy(null!)); + } + + [Fact] + public async Task CompactAsyncTriggerNotMetReturnsFalseAsync() + { + // Arrange — trigger never fires, but enough non-system groups to pass short-circuit + TestStrategy strategy = new(_ => false); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.False(result); + Assert.Equal(0, strategy.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncTriggerMetCallsApplyAsync() + { + // Arrange — trigger always fires, enough non-system groups + TestStrategy strategy = new(_ => true, applyFunc: _ => true); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.True(result); + Assert.Equal(1, strategy.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncReturnsFalseWhenApplyReturnsFalseAsync() + { + // Arrange — trigger fires but Apply does nothing + TestStrategy strategy = new(_ => true, applyFunc: _ => false); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.False(result); + Assert.Equal(1, strategy.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncSingleNonSystemGroupShortCircuitsAsync() + { + // Arrange — trigger would fire, but only 1 non-system group → short-circuit + TestStrategy strategy = new(_ => true, applyFunc: _ => true); + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "Hello")]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — short-circuited before trigger or Apply + Assert.False(result); + Assert.Equal(0, strategy.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncSingleNonSystemGroupWithSystemShortCircuitsAsync() + { + // Arrange — system group + 1 non-system group → still short-circuits + TestStrategy strategy = new(_ => true, applyFunc: _ => true); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "Hello"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — system groups don't count, still only 1 non-system group + Assert.False(result); + Assert.Equal(0, strategy.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncTwoNonSystemGroupsProceedsToTriggerAsync() + { + // Arrange — exactly 2 non-system groups: boundary passes, trigger fires + TestStrategy strategy = new(_ => true, applyFunc: _ => true); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — not short-circuited, Apply was called + Assert.True(result); + Assert.Equal(1, strategy.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncDefaultTargetIsInverseOfTriggerAsync() + { + // Arrange — trigger fires when groups > 2 + // Default target should be: stop when groups <= 2 (i.e., !trigger) + CompactionTrigger trigger = CompactionTriggers.GroupsExceed(2); + TestStrategy strategy = new(trigger, applyFunc: index => + { + // Exclude oldest non-system group one at a time + foreach (CompactionMessageGroup group in index.Groups) + { + if (!group.IsExcluded && group.Kind != CompactionGroupKind.System) + { + group.IsExcluded = true; + // Target (default = !trigger) returns true when groups <= 2 + // So the strategy would check Target after this exclusion + break; + } + } + + return true; + }); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — trigger fires (4 > 2), Apply is called + Assert.True(result); + Assert.Equal(1, strategy.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncCustomTargetIsPassedToStrategyAsync() + { + // Arrange — custom target that always signals stop + bool targetCalled = false; + bool CustomTarget(CompactionMessageIndex _) + { + targetCalled = true; + return true; + } + + TestStrategy strategy = new(_ => true, CustomTarget, _ => + { + // Access the target from within the strategy + return true; + }); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert — the custom target is accessible (verified by TestStrategy checking it) + Assert.Equal(1, strategy.ApplyCallCount); + // The target is accessible to derived classes via the protected property + Assert.True(strategy.InvokeTarget(index)); + Assert.True(targetCalled); + } + + /// + /// A concrete test implementation of for testing the base class. + /// + private sealed class TestStrategy : CompactionStrategy + { + private readonly Func? _applyFunc; + + public TestStrategy( + CompactionTrigger trigger, + CompactionTrigger? target = null, + Func? applyFunc = null) + : base(trigger, target) + { + this._applyFunc = applyFunc; + } + + public int ApplyCallCount { get; private set; } + + /// + /// Exposes the protected Target property for test verification. + /// + public bool InvokeTarget(CompactionMessageIndex index) => this.Target(index); + + protected override ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken) + { + this.ApplyCallCount++; + bool result = this._applyFunc?.Invoke(index) ?? false; + return new(result); + } + } +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionTriggersTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionTriggersTests.cs new file mode 100644 index 0000000000..e057496e2b --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionTriggersTests.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft. All rights reserved. + +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for and . +/// +public class CompactionTriggersTests +{ + [Fact] + public void TokensExceedReturnsTrueWhenAboveThreshold() + { + // Arrange — use a long message to guarantee tokens > 0 + CompactionTrigger trigger = CompactionTriggers.TokensExceed(0); + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "Hello world")]); + + // Act & Assert + Assert.True(trigger(index)); + } + + [Fact] + public void TokensExceedReturnsFalseWhenBelowThreshold() + { + CompactionTrigger trigger = CompactionTriggers.TokensExceed(999_999); + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "Hi")]); + + Assert.False(trigger(index)); + } + + [Fact] + public void MessagesExceedReturnsExpectedResult() + { + CompactionTrigger trigger = CompactionTriggers.MessagesExceed(2); + CompactionMessageIndex small = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "A"), + new ChatMessage(ChatRole.User, "B"), + ]); + CompactionMessageIndex large = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "A"), + new ChatMessage(ChatRole.User, "B"), + new ChatMessage(ChatRole.User, "C"), + ]); + + Assert.False(trigger(small)); + Assert.True(trigger(large)); + } + + [Fact] + public void TurnsExceedReturnsExpectedResult() + { + CompactionTrigger trigger = CompactionTriggers.TurnsExceed(1); + CompactionMessageIndex oneTurn = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + ]); + CompactionMessageIndex twoTurns = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + Assert.False(trigger(oneTurn)); + Assert.True(trigger(twoTurns)); + } + + [Fact] + public void GroupsExceedReturnsExpectedResult() + { + CompactionTrigger trigger = CompactionTriggers.GroupsExceed(2); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "A"), + new ChatMessage(ChatRole.Assistant, "B"), + new ChatMessage(ChatRole.User, "C"), + ]); + + Assert.True(trigger(index)); + } + + [Fact] + public void HasToolCallsReturnsTrueWhenToolCallGroupExists() + { + CompactionTrigger trigger = CompactionTriggers.HasToolCalls(); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]), + new ChatMessage(ChatRole.Tool, "result"), + ]); + + Assert.True(trigger(index)); + } + + [Fact] + public void HasToolCallsReturnsFalseWhenNoToolCallGroup() + { + CompactionTrigger trigger = CompactionTriggers.HasToolCalls(); + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + Assert.False(trigger(index)); + } + + [Fact] + public void AllRequiresAllConditions() + { + CompactionTrigger trigger = CompactionTriggers.All( + CompactionTriggers.TokensExceed(0), + CompactionTriggers.MessagesExceed(5)); + + CompactionMessageIndex small = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "A")]); + + // Tokens > 0 is true, but messages > 5 is false + Assert.False(trigger(small)); + } + + [Fact] + public void AnyRequiresAtLeastOneCondition() + { + CompactionTrigger trigger = CompactionTriggers.Any( + CompactionTriggers.TokensExceed(999_999), + CompactionTriggers.MessagesExceed(0)); + + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "A")]); + + // Tokens not exceeded, but messages > 0 is true + Assert.True(trigger(index)); + } + + [Fact] + public void AllEmptyTriggersReturnsTrue() + { + CompactionTrigger trigger = CompactionTriggers.All(); + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "A")]); + Assert.True(trigger(index)); + } + + [Fact] + public void AnyEmptyTriggersReturnsFalse() + { + CompactionTrigger trigger = CompactionTriggers.Any(); + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "A")]); + Assert.False(trigger(index)); + } + + [Fact] + public void TokensBelowReturnsTrueWhenBelowThreshold() + { + CompactionTrigger trigger = CompactionTriggers.TokensBelow(999_999); + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "Hi")]); + + Assert.True(trigger(index)); + } + + [Fact] + public void TokensBelowReturnsFalseWhenAboveThreshold() + { + CompactionTrigger trigger = CompactionTriggers.TokensBelow(0); + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "Hello world")]); + + Assert.False(trigger(index)); + } + + [Fact] + public void AlwaysReturnsTrue() + { + CompactionMessageIndex index = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "A")]); + Assert.True(CompactionTriggers.Always(index)); + } +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/PipelineCompactionStrategyTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/PipelineCompactionStrategyTests.cs new file mode 100644 index 0000000000..3d1a7d8dfb --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/PipelineCompactionStrategyTests.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; +using Microsoft.Extensions.Logging; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the class. +/// +public class PipelineCompactionStrategyTests +{ + [Fact] + public async Task CompactAsyncExecutesAllStrategiesInOrderAsync() + { + // Arrange + List executionOrder = []; + TestCompactionStrategy strategy1 = new( + _ => + { + executionOrder.Add("first"); + return false; + }); + + TestCompactionStrategy strategy2 = new( + _ => + { + executionOrder.Add("second"); + return false; + }); + + PipelineCompactionStrategy pipeline = new(strategy1, strategy2); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + await pipeline.CompactAsync(groups); + + // Assert + Assert.Equal(["first", "second"], executionOrder); + } + + [Fact] + public async Task CompactAsyncReturnsFalseWhenNoStrategyCompactsAsync() + { + // Arrange + TestCompactionStrategy strategy1 = new(_ => false); + + PipelineCompactionStrategy pipeline = new(strategy1); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await pipeline.CompactAsync(groups); + + // Assert + Assert.False(result); + } + + [Fact] + public async Task CompactAsyncReturnsTrueWhenAnyStrategyCompactsAsync() + { + // Arrange + TestCompactionStrategy strategy1 = new(_ => false); + TestCompactionStrategy strategy2 = new(_ => true); + + PipelineCompactionStrategy pipeline = new(strategy1, strategy2); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await pipeline.CompactAsync(groups); + + // Assert + Assert.True(result); + } + + [Fact] + public async Task CompactAsyncContinuesAfterFirstCompactionAsync() + { + // Arrange + TestCompactionStrategy strategy1 = new(_ => true); + TestCompactionStrategy strategy2 = new(_ => false); + + PipelineCompactionStrategy pipeline = new(strategy1, strategy2); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + await pipeline.CompactAsync(groups); + + // Assert — both strategies were called + Assert.Equal(1, strategy1.ApplyCallCount); + Assert.Equal(1, strategy2.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncComposesStrategiesEndToEndAsync() + { + // Arrange — pipeline: first exclude oldest 2 non-system groups, then exclude 2 more + static void ExcludeOldest2(CompactionMessageIndex index) + { + int excluded = 0; + foreach (CompactionMessageGroup group in index.Groups) + { + if (!group.IsExcluded && group.Kind != CompactionGroupKind.System && excluded < 2) + { + group.IsExcluded = true; + excluded++; + } + } + } + + TestCompactionStrategy phase1 = new( + index => + { + ExcludeOldest2(index); + return true; + }); + + TestCompactionStrategy phase2 = new( + index => + { + ExcludeOldest2(index); + return true; + }); + + PipelineCompactionStrategy pipeline = new(phase1, phase2); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // Act + bool result = await pipeline.CompactAsync(groups); + + // Assert — system is preserved, phase1 excluded Q1+A1, phase2 excluded Q2+A2 → System + Q3 + Assert.True(result); + Assert.Equal(2, groups.IncludedGroupCount); + + List included = [.. groups.GetIncludedMessages()]; + Assert.Equal(2, included.Count); + Assert.Equal("You are helpful.", included[0].Text); + Assert.Equal("Q3", included[1].Text); + + Assert.Equal(1, phase1.ApplyCallCount); + Assert.Equal(1, phase2.ApplyCallCount); + } + + [Fact] + public async Task CompactAsyncEmptyPipelineReturnsFalseAsync() + { + // Arrange + PipelineCompactionStrategy pipeline = new(new List()); + CompactionMessageIndex groups = CompactionMessageIndex.Create([new ChatMessage(ChatRole.User, "Hello")]); + + // Act + bool result = await pipeline.CompactAsync(groups); + + // Assert + Assert.False(result); + } + + /// + /// A simple test implementation of that delegates to a synchronous callback. + /// + private sealed class TestCompactionStrategy : CompactionStrategy + { + private readonly Func _applyFunc; + + public TestCompactionStrategy(Func applyFunc) + : base(CompactionTriggers.Always) + { + this._applyFunc = applyFunc; + } + + public int ApplyCallCount { get; private set; } + + protected override ValueTask CompactCoreAsync(CompactionMessageIndex index, ILogger logger, CancellationToken cancellationToken) + { + this.ApplyCallCount++; + return new(this._applyFunc(index)); + } + } +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/SlidingWindowCompactionStrategyTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/SlidingWindowCompactionStrategyTests.cs new file mode 100644 index 0000000000..46a5cc3be6 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/SlidingWindowCompactionStrategyTests.cs @@ -0,0 +1,311 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the class. +/// +public class SlidingWindowCompactionStrategyTests +{ + [Fact] + public async Task CompactAsyncBelowMaxTurnsReturnsFalseAsync() + { + // Arrange — trigger requires > 3 turns, conversation has 2 + SlidingWindowCompactionStrategy strategy = new(CompactionTriggers.TurnsExceed(3)); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.False(result); + } + + [Fact] + public async Task CompactAsyncExceedsMaxTurnsExcludesOldestTurnsAsync() + { + // Arrange — trigger on > 2 turns, conversation has 3 + SlidingWindowCompactionStrategy strategy = new(CompactionTriggers.TurnsExceed(2)); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + new ChatMessage(ChatRole.Assistant, "A3"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + // Turn 1 (Q1 + A1) should be excluded + Assert.True(groups.Groups[0].IsExcluded); + Assert.True(groups.Groups[1].IsExcluded); + // Turn 2 and 3 should remain + Assert.False(groups.Groups[2].IsExcluded); + Assert.False(groups.Groups[3].IsExcluded); + Assert.False(groups.Groups[4].IsExcluded); + Assert.False(groups.Groups[5].IsExcluded); + } + + [Fact] + public async Task CompactAsyncPreservesSystemMessagesAsync() + { + // Arrange — trigger on > 1 turn + SlidingWindowCompactionStrategy strategy = new(CompactionTriggers.TurnsExceed(1)); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + Assert.False(groups.Groups[0].IsExcluded); // System preserved + Assert.True(groups.Groups[1].IsExcluded); // Turn 1 excluded + Assert.True(groups.Groups[2].IsExcluded); // Turn 1 response excluded + Assert.False(groups.Groups[3].IsExcluded); // Turn 2 kept + } + + [Fact] + public async Task CompactAsyncPreservesToolCallGroupsInKeptTurnsAsync() + { + // Arrange — trigger on > 1 turn + SlidingWindowCompactionStrategy strategy = new(CompactionTriggers.TurnsExceed(1)); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("call1", "search")]), + new ChatMessage(ChatRole.Tool, "Results"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + // Turn 1 excluded + Assert.True(groups.Groups[0].IsExcluded); + Assert.True(groups.Groups[1].IsExcluded); + // Turn 2 kept (user + tool call group) + Assert.False(groups.Groups[2].IsExcluded); + Assert.False(groups.Groups[3].IsExcluded); + } + + [Fact] + public async Task CompactAsyncTriggerNotMetReturnsFalseAsync() + { + // Arrange — trigger requires > 99 turns + SlidingWindowCompactionStrategy strategy = new(CompactionTriggers.TurnsExceed(99)); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.False(result); + } + + [Fact] + public async Task CompactAsyncIncludedMessagesContainOnlyKeptTurnsAsync() + { + // Arrange — trigger on > 1 turn + SlidingWindowCompactionStrategy strategy = new(CompactionTriggers.TurnsExceed(1)); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "System"), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + // Act + await strategy.CompactAsync(groups); + + // Assert + List included = [.. groups.GetIncludedMessages()]; + Assert.Equal(3, included.Count); + Assert.Equal("System", included[0].Text); + Assert.Equal("Q2", included[1].Text); + Assert.Equal("A2", included[2].Text); + } + + [Fact] + public async Task CompactAsyncCustomTargetStopsExcludingEarlyAsync() + { + // Arrange — trigger on > 1 turn, custom target stops after removing 1 turn + int removeCount = 0; + bool TargetAfterOne(CompactionMessageIndex _) => ++removeCount >= 1; + + SlidingWindowCompactionStrategy strategy = new( + CompactionTriggers.TurnsExceed(1), + minimumPreservedTurns: 0, + target: TargetAfterOne); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + new ChatMessage(ChatRole.Assistant, "A3"), + new ChatMessage(ChatRole.User, "Q4"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — only turn 1 excluded (target stopped after 1 removal) + Assert.True(result); + Assert.True(index.Groups[0].IsExcluded); // Q1 (turn 1) + Assert.True(index.Groups[1].IsExcluded); // A1 (turn 1) + Assert.False(index.Groups[2].IsExcluded); // Q2 (turn 2) — kept + Assert.False(index.Groups[3].IsExcluded); // A2 (turn 2) + } + + [Fact] + public async Task CompactAsyncMinimumPreservedStopsCompactionAsync() + { + // Arrange — always trigger with never-satisfied target, but MinimumPreserved = 2 is hard floor + SlidingWindowCompactionStrategy strategy = new( + CompactionTriggers.TurnsExceed(1), + minimumPreservedTurns: 2, + target: _ => false); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + new ChatMessage(ChatRole.Assistant, "A3"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — target never says stop, but MinimumPreserved=2 protects the last 2 turns + Assert.True(result); + Assert.Equal(4, index.IncludedGroupCount); + // Turn 1 excluded + Assert.True(index.Groups[0].IsExcluded); // Q1 + Assert.True(index.Groups[1].IsExcluded); // A1 + // Last 2 turns must be preserved + Assert.False(index.Groups[2].IsExcluded); // Q2 + Assert.False(index.Groups[3].IsExcluded); // A2 + Assert.False(index.Groups[4].IsExcluded); // Q3 + Assert.False(index.Groups[5].IsExcluded); // A3 + } + + [Fact] + public async Task CompactAsyncSkipsExcludedAndSystemGroupsInEnumerationAsync() + { + // Arrange — includes system and pre-excluded groups that must be skipped + SlidingWindowCompactionStrategy strategy = new( + CompactionTriggers.TurnsExceed(1), + minimumPreservedTurns: 0); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "System prompt"), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + // Pre-exclude one group + index.Groups[1].IsExcluded = true; + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — system preserved, pre-excluded skipped + Assert.True(result); + Assert.False(index.Groups[0].IsExcluded); // System preserved + } + + [Fact] + public async Task CompactAsyncPreservesTurnIndexZeroAsync() + { + // Arrange — assistant message before first user turn gets TurnIndex = 0 + SlidingWindowCompactionStrategy strategy = new( + CompactionTriggers.TurnsExceed(1), + minimumPreservedTurns: 0, + target: _ => false); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.Assistant, "Welcome!"), // TurnIndex = 0 + new ChatMessage(ChatRole.User, "Q1"), // TurnIndex = 1 + new ChatMessage(ChatRole.Assistant, "A1"), // TurnIndex = 1 + new ChatMessage(ChatRole.User, "Q2"), // TurnIndex = 2 + new ChatMessage(ChatRole.Assistant, "A2"), // TurnIndex = 2 + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — TurnIndex = 0 is always preserved even with minimumPreservedTurns = 0 + Assert.True(result); + Assert.False(index.Groups[0].IsExcluded); // Welcome (TurnIndex 0) preserved + Assert.True(index.Groups[1].IsExcluded); // Q1 (TurnIndex 1) excluded + Assert.True(index.Groups[2].IsExcluded); // A1 (TurnIndex 1) excluded + Assert.True(index.Groups[3].IsExcluded); // Q2 (TurnIndex 2) excluded + Assert.True(index.Groups[4].IsExcluded); // A2 (TurnIndex 2) excluded + } + + [Fact] + public async Task CompactAsyncPreservesNullTurnIndexAsync() + { + // Arrange — system messages (TurnIndex = null) should never be removed + SlidingWindowCompactionStrategy strategy = new( + CompactionTriggers.TurnsExceed(0), + minimumPreservedTurns: 0, + target: _ => false); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — system message (TurnIndex null) always preserved + Assert.True(result); + Assert.False(index.Groups[0].IsExcluded); // System (TurnIndex null) preserved + Assert.True(index.Groups[1].IsExcluded); // Q1 excluded + Assert.True(index.Groups[2].IsExcluded); // A1 excluded + } +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/SummarizationCompactionStrategyTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/SummarizationCompactionStrategyTests.cs new file mode 100644 index 0000000000..2ab000e544 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/SummarizationCompactionStrategyTests.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; +using Moq; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the class. +/// +public class SummarizationCompactionStrategyTests +{ + /// + /// Creates a mock that returns the specified summary text. + /// + private static IChatClient CreateMockChatClient(string summaryText = "Summary of conversation.") + { + Mock mock = new(); + mock.Setup(c => c.GetResponseAsync( + It.IsAny>(), + It.IsAny(), + It.IsAny())) + .ReturnsAsync(new ChatResponse([new ChatMessage(ChatRole.Assistant, summaryText)])); + return mock.Object; + } + + [Fact] + public async Task CompactAsyncTriggerNotMetReturnsFalseAsync() + { + // Arrange — trigger requires > 100000 tokens + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient(), + CompactionTriggers.TokensExceed(100000), + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.False(result); + Assert.Equal(2, index.IncludedGroupCount); + } + + [Fact] + public async Task CompactAsyncSummarizesOldGroupsAsync() + { + // Arrange — always trigger, preserve 1 recent group + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient("Key facts from earlier."), + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "First question"), + new ChatMessage(ChatRole.Assistant, "First answer"), + new ChatMessage(ChatRole.User, "Second question"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.True(result); + + List included = [.. index.GetIncludedMessages()]; + + // Should have: summary + preserved recent group (Second question) + Assert.Equal(2, included.Count); + Assert.Contains("[Summary]", included[0].Text); + Assert.Contains("Key facts from earlier.", included[0].Text); + Assert.Equal("Second question", included[1].Text); + } + + [Fact] + public async Task CompactAsyncPreservesSystemMessagesAsync() + { + // Arrange + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient(), + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "Old question"), + new ChatMessage(ChatRole.Assistant, "Old answer"), + new ChatMessage(ChatRole.User, "Recent question"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert + List included = [.. index.GetIncludedMessages()]; + + Assert.Equal("You are helpful.", included[0].Text); + Assert.Equal(ChatRole.System, included[0].Role); + } + + [Fact] + public async Task CompactAsyncInsertsSummaryGroupAtCorrectPositionAsync() + { + // Arrange + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient("Summary text."), + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "System prompt."), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert — summary should be inserted after system, before preserved group + CompactionMessageGroup summaryGroup = index.Groups.First(g => g.Kind == CompactionGroupKind.Summary); + Assert.NotNull(summaryGroup); + Assert.Contains("[Summary]", summaryGroup.Messages[0].Text); + Assert.True(summaryGroup.Messages[0].AdditionalProperties!.ContainsKey(CompactionMessageGroup.SummaryPropertyKey)); + } + + [Fact] + public async Task CompactAsyncHandlesEmptyLlmResponseAsync() + { + // Arrange — LLM returns whitespace + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient(" "), + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert — should use fallback text + List included = [.. index.GetIncludedMessages()]; + Assert.Contains("[Summary unavailable]", included[0].Text); + } + + [Fact] + public async Task CompactAsyncNothingToSummarizeReturnsFalseAsync() + { + // Arrange — preserve 5 but only 2 non-system groups + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient(), + CompactionTriggers.Always, + minimumPreservedGroups: 5); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.False(result); + } + + [Fact] + public async Task CompactAsyncUsesCustomPromptAsync() + { + // Arrange — capture the messages sent to the chat client + List? capturedMessages = null; + Mock mockClient = new(); + mockClient.Setup(c => c.GetResponseAsync( + It.IsAny>(), + It.IsAny(), + It.IsAny())) + .Callback, ChatOptions?, CancellationToken>((msgs, _, _) => + capturedMessages = [.. msgs]) + .ReturnsAsync(new ChatResponse([new ChatMessage(ChatRole.Assistant, "Custom summary.")])); + + const string CustomPrompt = "Summarize in bullet points only."; + SummarizationCompactionStrategy strategy = new( + mockClient.Object, + CompactionTriggers.Always, + minimumPreservedGroups: 1, + summarizationPrompt: CustomPrompt); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert — the custom prompt should be the system message, followed by the original messages + Assert.NotNull(capturedMessages); + Assert.Equal(2, capturedMessages.Count); + Assert.Equal(ChatRole.System, capturedMessages![0].Role); + Assert.Equal(CustomPrompt, capturedMessages[0].Text); + Assert.Equal(ChatRole.User, capturedMessages[1].Role); + Assert.Equal("Q1", capturedMessages[1].Text); + } + + [Fact] + public async Task CompactAsyncSetsExcludeReasonAsync() + { + // Arrange + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient(), + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Old"), + new ChatMessage(ChatRole.User, "New"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert + CompactionMessageGroup excluded = index.Groups.First(g => g.IsExcluded); + Assert.NotNull(excluded.ExcludeReason); + Assert.Contains("SummarizationCompactionStrategy", excluded.ExcludeReason); + } + + [Fact] + public async Task CompactAsyncTargetStopsMarkingEarlyAsync() + { + // Arrange — 4 non-system groups, preserve 1, target met after 1 exclusion + int exclusionCount = 0; + bool TargetAfterOne(CompactionMessageIndex _) => ++exclusionCount >= 1; + + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient("Partial summary."), + CompactionTriggers.Always, + minimumPreservedGroups: 1, + target: TargetAfterOne); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert — only 1 group should have been summarized (target met after first exclusion) + int excludedCount = index.Groups.Count(g => g.IsExcluded); + Assert.Equal(1, excludedCount); + } + + [Fact] + public async Task CompactAsyncPreservesMultipleRecentGroupsAsync() + { + // Arrange — preserve 2 + SummarizationCompactionStrategy strategy = new( + CreateMockChatClient("Summary."), + CompactionTriggers.Always, + minimumPreservedGroups: 2); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert — 2 oldest excluded, 2 newest preserved + 1 summary inserted + List included = [.. index.GetIncludedMessages()]; + Assert.Equal(3, included.Count); // summary + Q2 + A2 + Assert.Contains("[Summary]", included[0].Text); + Assert.Equal("Q2", included[1].Text); + Assert.Equal("A2", included[2].Text); + } + + [Fact] + public async Task CompactAsyncWithSystemBetweenSummarizableGroupsAsync() + { + // Arrange — system group between user/assistant groups to exercise skip logic in loop + IChatClient mockClient = CreateMockChatClient("[Summary]"); + SummarizationCompactionStrategy strategy = new( + mockClient, + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.System, "System note"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — summary inserted at 0, system group shifted to index 2 + Assert.True(result); + Assert.Equal(CompactionGroupKind.Summary, index.Groups[0].Kind); + Assert.Equal(CompactionGroupKind.System, index.Groups[2].Kind); + Assert.False(index.Groups[2].IsExcluded); // System never excluded + } + + [Fact] + public async Task CompactAsyncMaxSummarizableBoundsLoopExitAsync() + { + // Arrange — large MinimumPreserved so maxSummarizable is small, target never stops + IChatClient mockClient = CreateMockChatClient("[Summary]"); + SummarizationCompactionStrategy strategy = new( + mockClient, + CompactionTriggers.Always, + minimumPreservedGroups: 3, + target: _ => false); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + new ChatMessage(ChatRole.Assistant, "A3"), + ]); + + // Act — should only summarize 6-3 = 3 groups (not all 6) + bool result = await strategy.CompactAsync(index); + + // Assert — 3 preserved + 1 summary = 4 included + Assert.True(result); + Assert.Equal(4, index.IncludedGroupCount); + } + + [Fact] + public async Task CompactAsyncWithPreExcludedGroupAsync() + { + // Arrange — pre-exclude a group so the count and loop both must skip it + IChatClient mockClient = CreateMockChatClient("[Summary]"); + SummarizationCompactionStrategy strategy = new( + mockClient, + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + index.Groups[0].IsExcluded = true; // Pre-exclude Q1 + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert + Assert.True(result); + Assert.True(index.Groups[0].IsExcluded); // Still excluded + } + + [Fact] + public async Task CompactAsyncWithEmptyTextMessageInGroupAsync() + { + // Arrange — a message with null text (FunctionCallContent) in a summarized group + IChatClient mockClient = CreateMockChatClient("[Summary]"); + SummarizationCompactionStrategy strategy = new( + mockClient, + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + List messages = + [ + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + ]; + + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + + // Act — the tool-call group's message has null text + bool result = await strategy.CompactAsync(index); + + // Assert — compaction succeeded despite null text + Assert.True(result); + } + + #region Error resilience + + [Fact] + public async Task CompactAsyncLlmFailureRestoresGroupsAsync() + { + // Arrange — chat client throws a non-cancellation exception + Mock mockClient = new(); + mockClient.Setup(c => c.GetResponseAsync( + It.IsAny>(), + It.IsAny(), + It.IsAny())) + .ThrowsAsync(new InvalidOperationException("Service unavailable")); + + SummarizationCompactionStrategy strategy = new( + mockClient.Object, + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + int originalGroupCount = index.Groups.Count; + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — returns false, all groups restored to non-excluded + Assert.False(result); + Assert.Equal(originalGroupCount, index.Groups.Count); + Assert.All(index.Groups, g => Assert.False(g.IsExcluded)); + Assert.All(index.Groups, g => Assert.Null(g.ExcludeReason)); + } + + [Fact] + public async Task CompactAsyncLlmFailurePreservesAllOriginalMessagesAsync() + { + // Arrange — verify that after failure, GetIncludedMessages returns all original messages + Mock mockClient = new(); + mockClient.Setup(c => c.GetResponseAsync( + It.IsAny>(), + It.IsAny(), + It.IsAny())) + .ThrowsAsync(new HttpRequestException("Timeout")); + + SummarizationCompactionStrategy strategy = new( + mockClient.Object, + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + List originalIncluded = [.. index.GetIncludedMessages()]; + + // Act + await strategy.CompactAsync(index); + + // Assert — all original messages still included + List afterIncluded = [.. index.GetIncludedMessages()]; + Assert.Equal(originalIncluded.Count, afterIncluded.Count); + for (int i = 0; i < originalIncluded.Count; i++) + { + Assert.Same(originalIncluded[i], afterIncluded[i]); + } + } + + [Fact] + public async Task CompactAsyncLlmFailureDoesNotInsertSummaryGroupAsync() + { + // Arrange + Mock mockClient = new(); + mockClient.Setup(c => c.GetResponseAsync( + It.IsAny>(), + It.IsAny(), + It.IsAny())) + .ThrowsAsync(new InvalidOperationException("API error")); + + SummarizationCompactionStrategy strategy = new( + mockClient.Object, + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(index); + + // Assert — no Summary group was inserted + Assert.DoesNotContain(index.Groups, g => g.Kind == CompactionGroupKind.Summary); + } + + [Fact] + public async Task CompactAsyncCancellationPropagatesAsync() + { + // Arrange — OperationCanceledException should NOT be caught + Mock mockClient = new(); + mockClient.Setup(c => c.GetResponseAsync( + It.IsAny>(), + It.IsAny(), + It.IsAny())) + .ThrowsAsync(new OperationCanceledException("Cancelled")); + + SummarizationCompactionStrategy strategy = new( + mockClient.Object, + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act & Assert — OperationCanceledException propagates + await Assert.ThrowsAsync( + () => strategy.CompactAsync(index).AsTask()); + } + + [Fact] + public async Task CompactAsyncTaskCancellationPropagatesAsync() + { + // Arrange — TaskCanceledException (subclass of OperationCanceledException) should also propagate + Mock mockClient = new(); + mockClient.Setup(c => c.GetResponseAsync( + It.IsAny>(), + It.IsAny(), + It.IsAny())) + .ThrowsAsync(new TaskCanceledException("Task cancelled")); + + SummarizationCompactionStrategy strategy = new( + mockClient.Object, + CompactionTriggers.Always, + minimumPreservedGroups: 1); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act & Assert — TaskCanceledException propagates (inherits from OperationCanceledException) + await Assert.ThrowsAsync( + () => strategy.CompactAsync(index).AsTask()); + } + + [Fact] + public async Task CompactAsyncLlmFailureWithMultipleExcludedGroupsRestoresAllAsync() + { + // Arrange — multiple groups excluded before failure, all must be restored + Mock mockClient = new(); + mockClient.Setup(c => c.GetResponseAsync( + It.IsAny>(), + It.IsAny(), + It.IsAny())) + .ThrowsAsync(new InvalidOperationException("Rate limited")); + + SummarizationCompactionStrategy strategy = new( + mockClient.Object, + CompactionTriggers.Always, + minimumPreservedGroups: 1, + target: _ => false); // Never stop — exclude as many as possible + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "System prompt"), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — all non-system groups restored + Assert.False(result); + Assert.All(index.Groups, g => Assert.False(g.IsExcluded)); + Assert.All(index.Groups, g => Assert.Null(g.ExcludeReason)); + Assert.Equal(6, index.IncludedGroupCount); + } + + #endregion +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ToolResultCompactionStrategyTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ToolResultCompactionStrategyTests.cs new file mode 100644 index 0000000000..b941439988 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/ToolResultCompactionStrategyTests.cs @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the class. +/// +public class ToolResultCompactionStrategyTests +{ + [Fact] + public async Task CompactAsyncTriggerNotMetReturnsFalseAsync() + { + // Arrange — trigger requires > 1000 tokens + ToolResultCompactionStrategy strategy = new(CompactionTriggers.TokensExceed(1000)); + + ChatMessage toolCall = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather")]); + ChatMessage toolResult = new(ChatRole.Tool, "Sunny"); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "What's the weather?"), + toolCall, + toolResult, + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.False(result); + } + + [Fact] + public async Task CompactAsyncCollapsesOldToolGroupsAsync() + { + // Arrange — always trigger + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 1); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather")]), + new ChatMessage(ChatRole.Tool, "Sunny and 72°F"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + + List included = [.. groups.GetIncludedMessages()]; + // Q1 + collapsed tool summary + Q2 + Assert.Equal(3, included.Count); + Assert.Equal("Q1", included[0].Text); + Assert.Equal("[Tool Calls]\nget_weather:\n - Sunny and 72°F", included[1].Text); + Assert.Equal("Q2", included[2].Text); + } + + [Fact] + public async Task CompactAsyncPreservesRecentToolGroupsAsync() + { + // Arrange — protect 2 recent non-system groups (the tool group + Q2) + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 3); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("call1", "search")]), + new ChatMessage(ChatRole.Tool, "Results"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert — all groups are in the protected window, nothing to collapse + Assert.False(result); + } + + [Fact] + public async Task CompactAsyncPreservesSystemMessagesAsync() + { + // Arrange + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 1); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("call1", "fn")]), + new ChatMessage(ChatRole.Tool, "result"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(groups); + + // Assert + List included = [.. groups.GetIncludedMessages()]; + Assert.Equal("You are helpful.", included[0].Text); + } + + [Fact] + public async Task CompactAsyncExtractsMultipleToolNamesAsync() + { + // Arrange — assistant calls two tools + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 1); + + ChatMessage multiToolCall = new(ChatRole.Assistant, + [ + new FunctionCallContent("c1", "get_weather"), + new FunctionCallContent("c2", "search_docs"), + ]); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + multiToolCall, + new ChatMessage(ChatRole.Tool, "Sunny"), + new ChatMessage(ChatRole.Tool, "Found 3 docs"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(groups); + + // Assert + List included = [.. groups.GetIncludedMessages()]; + string collapsed = included[1].Text!; + Assert.Equal("[Tool Calls]\nget_weather:\n - Sunny\nsearch_docs:\n - Found 3 docs", collapsed); + } + + [Fact] + public async Task CompactAsyncNoToolGroupsReturnsFalseAsync() + { + // Arrange — trigger fires but no tool groups to collapse + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 0); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.False(result); + } + + [Fact] + public async Task CompactAsyncCompoundTriggerRequiresTokensAndToolCallsAsync() + { + // Arrange — compound: tokens > 0 AND has tool calls + ToolResultCompactionStrategy strategy = new( + CompactionTriggers.All( + CompactionTriggers.TokensExceed(0), + CompactionTriggers.HasToolCalls()), + minimumPreservedGroups: 1); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]), + new ChatMessage(ChatRole.Tool, "result"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + } + + [Fact] + public async Task CompactAsyncTargetStopsCollapsingEarlyAsync() + { + // Arrange — 2 tool groups, target met after first collapse + int collapseCount = 0; + bool TargetAfterOne(CompactionMessageIndex _) => ++collapseCount >= 1; + + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 1, + target: TargetAfterOne); + + CompactionMessageIndex index = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "fn1")]), + new ChatMessage(ChatRole.Tool, "result1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c2", "fn2")]), + new ChatMessage(ChatRole.Tool, "result2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — only first tool group collapsed, second left intact + Assert.True(result); + + // Count collapsed tool groups (excluded with ToolCall kind) + int collapsedToolGroups = 0; + foreach (CompactionMessageGroup group in index.Groups) + { + if (group.IsExcluded && group.Kind == CompactionGroupKind.ToolCall) + { + collapsedToolGroups++; + } + } + + Assert.Equal(1, collapsedToolGroups); + } + + [Fact] + public async Task CompactAsyncSkipsPreExcludedAndSystemGroupsAsync() + { + // Arrange — pre-excluded and system groups in the enumeration + ToolResultCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 0); + + List messages = + [ + new ChatMessage(ChatRole.System, "System prompt"), + new ChatMessage(ChatRole.User, "Q0"), + new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("c1", "fn")]), + new ChatMessage(ChatRole.Tool, "Result 1"), + new ChatMessage(ChatRole.User, "Q1"), + ]; + + CompactionMessageIndex index = CompactionMessageIndex.Create(messages); + // Pre-exclude the last user group + index.Groups[index.Groups.Count - 1].IsExcluded = true; + + // Act + bool result = await strategy.CompactAsync(index); + + // Assert — system never excluded, pre-excluded skipped + Assert.True(result); + Assert.False(index.Groups[0].IsExcluded); // System stays + } + + [Fact] + public async Task CompactAsyncDeduplicatesDuplicateToolNamesAsync() + { + // Arrange — same tool called multiple times + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 1); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, + [ + new FunctionCallContent("c1", "get_weather"), + new FunctionCallContent("c2", "get_weather"), + ]), + new ChatMessage(ChatRole.Tool, "Sunny"), + new ChatMessage(ChatRole.Tool, "Rainy"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(groups); + + // Assert — duplicate names listed once with all results + List included = [.. groups.GetIncludedMessages()]; + Assert.Equal("[Tool Calls]\nget_weather:\n - Sunny\n - Rainy", included[1].Text); + } + + [Fact] + public async Task CompactAsyncIncludesResultsFromFunctionResultContentAsync() + { + // Arrange — tool results provided as FunctionResultContent (matched by CallId) + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 1); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, + [ + new FunctionCallContent("c1", "get_weather"), + new FunctionCallContent("c2", "search_docs"), + ]), + new ChatMessage(ChatRole.Tool, [new FunctionResultContent("c1", "Sunny and 72°F")]), + new ChatMessage(ChatRole.Tool, [new FunctionResultContent("c2", "Found 3 docs")]), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(groups); + + // Assert — results matched by CallId and included in summary + List included = [.. groups.GetIncludedMessages()]; + Assert.Equal("[Tool Calls]\nget_weather:\n - Sunny and 72°F\nsearch_docs:\n - Found 3 docs", included[1].Text); + } + + [Fact] + public async Task CompactAsyncDeduplicatesWithFunctionResultContentAsync() + { + // Arrange — same tool called multiple times with FunctionResultContent + ToolResultCompactionStrategy strategy = new( + trigger: _ => true, + minimumPreservedGroups: 1); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, + [ + new FunctionCallContent("c1", "get_weather"), + new FunctionCallContent("c2", "get_weather"), + new FunctionCallContent("c3", "search_docs"), + ]), + new ChatMessage(ChatRole.Tool, [new FunctionResultContent("c1", "Sunny")]), + new ChatMessage(ChatRole.Tool, [new FunctionResultContent("c2", "Rainy")]), + new ChatMessage(ChatRole.Tool, [new FunctionResultContent("c3", "Found 3 docs")]), + new ChatMessage(ChatRole.User, "Q2"), + ]); + + // Act + await strategy.CompactAsync(groups); + + // Assert — duplicate tool name results listed under same key + List included = [.. groups.GetIncludedMessages()]; + Assert.Equal("[Tool Calls]\nget_weather:\n - Sunny\n - Rainy\nsearch_docs:\n - Found 3 docs", included[1].Text); + } +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/TruncationCompactionStrategyTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/TruncationCompactionStrategyTests.cs new file mode 100644 index 0000000000..e0e48d07e4 --- /dev/null +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/TruncationCompactionStrategyTests.cs @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft. All rights reserved. + +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Agents.AI.Compaction; +using Microsoft.Extensions.AI; + +namespace Microsoft.Agents.AI.UnitTests.Compaction; + +/// +/// Contains tests for the class. +/// +public class TruncationCompactionStrategyTests +{ + [Fact] + public async Task CompactAsyncAlwaysTriggerCompactsToPreserveRecentAsync() + { + // Arrange — always-trigger means always compact + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 1); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "First"), + new ChatMessage(ChatRole.Assistant, "Response 1"), + new ChatMessage(ChatRole.User, "Second"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + Assert.Equal(1, groups.Groups.Count(g => !g.IsExcluded)); + } + + [Fact] + public async Task CompactAsyncTriggerNotMetReturnsFalseAsync() + { + // Arrange — trigger requires > 1000 tokens, conversation is tiny + TruncationCompactionStrategy strategy = new( + minimumPreservedGroups: 1, + trigger: CompactionTriggers.TokensExceed(1000)); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.False(result); + Assert.Equal(2, groups.IncludedGroupCount); + } + + [Fact] + public async Task CompactAsyncTriggerMetExcludesOldestGroupsAsync() + { + // Arrange — trigger on groups > 2 + TruncationCompactionStrategy strategy = new( + minimumPreservedGroups: 1, + trigger: CompactionTriggers.GroupsExceed(2)); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "First"), + new ChatMessage(ChatRole.Assistant, "Response 1"), + new ChatMessage(ChatRole.User, "Second"), + new ChatMessage(ChatRole.Assistant, "Response 2"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert — incremental: excludes until GroupsExceed(2) is no longer met → 2 groups remain + Assert.True(result); + Assert.Equal(2, groups.IncludedGroupCount); + // Oldest 2 excluded, newest 2 kept + Assert.True(groups.Groups[0].IsExcluded); + Assert.True(groups.Groups[1].IsExcluded); + Assert.False(groups.Groups[2].IsExcluded); + Assert.False(groups.Groups[3].IsExcluded); + } + + [Fact] + public async Task CompactAsyncPreservesSystemMessagesAsync() + { + // Arrange + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 1); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "You are helpful."), + new ChatMessage(ChatRole.User, "First"), + new ChatMessage(ChatRole.Assistant, "Response 1"), + new ChatMessage(ChatRole.User, "Second"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + // System message should be preserved + Assert.False(groups.Groups[0].IsExcluded); + Assert.Equal(CompactionGroupKind.System, groups.Groups[0].Kind); + // Oldest non-system groups excluded + Assert.True(groups.Groups[1].IsExcluded); + Assert.True(groups.Groups[2].IsExcluded); + // Most recent kept + Assert.False(groups.Groups[3].IsExcluded); + } + + [Fact] + public async Task CompactAsyncPreservesToolCallGroupAtomicityAsync() + { + // Arrange + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 1); + + ChatMessage assistantToolCall = new(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather")]); + ChatMessage toolResult = new(ChatRole.Tool, "Sunny"); + ChatMessage finalResponse = new(ChatRole.User, "Thanks!"); + + CompactionMessageIndex groups = CompactionMessageIndex.Create([assistantToolCall, toolResult, finalResponse]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + // Tool call group should be excluded as one atomic unit + Assert.True(groups.Groups[0].IsExcluded); + Assert.Equal(CompactionGroupKind.ToolCall, groups.Groups[0].Kind); + Assert.Equal(2, groups.Groups[0].Messages.Count); + Assert.False(groups.Groups[1].IsExcluded); + } + + [Fact] + public async Task CompactAsyncSetsExcludeReasonAsync() + { + // Arrange + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 1); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Old"), + new ChatMessage(ChatRole.User, "New"), + ]); + + // Act + await strategy.CompactAsync(groups); + + // Assert + Assert.NotNull(groups.Groups[0].ExcludeReason); + Assert.Contains("TruncationCompactionStrategy", groups.Groups[0].ExcludeReason); + } + + [Fact] + public async Task CompactAsyncSkipsAlreadyExcludedGroupsAsync() + { + // Arrange + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 1); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Already excluded"), + new ChatMessage(ChatRole.User, "Included 1"), + new ChatMessage(ChatRole.User, "Included 2"), + ]); + groups.Groups[0].IsExcluded = true; + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + Assert.True(groups.Groups[0].IsExcluded); // was already excluded + Assert.True(groups.Groups[1].IsExcluded); // newly excluded + Assert.False(groups.Groups[2].IsExcluded); // kept + } + + [Fact] + public async Task CompactAsyncMinimumPreservedKeepsMultipleAsync() + { + // Arrange — keep 2 most recent + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 2); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.True(result); + Assert.True(groups.Groups[0].IsExcluded); + Assert.True(groups.Groups[1].IsExcluded); + Assert.False(groups.Groups[2].IsExcluded); + Assert.False(groups.Groups[3].IsExcluded); + } + + [Fact] + public async Task CompactAsyncNothingToRemoveReturnsFalseAsync() + { + // Arrange — preserve 5 but only 2 groups + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 5); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Hello"), + new ChatMessage(ChatRole.Assistant, "Hi!"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert + Assert.False(result); + } + + [Fact] + public async Task CompactAsyncCustomTargetStopsEarlyAsync() + { + // Arrange — always trigger, custom target stops after 1 exclusion + int targetChecks = 0; + bool TargetAfterOne(CompactionMessageIndex _) => ++targetChecks >= 1; + + TruncationCompactionStrategy strategy = new( + CompactionTriggers.Always, + minimumPreservedGroups: 1, + target: TargetAfterOne); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert — only 1 group excluded (target met after first) + Assert.True(result); + Assert.True(groups.Groups[0].IsExcluded); + Assert.False(groups.Groups[1].IsExcluded); + Assert.False(groups.Groups[2].IsExcluded); + Assert.False(groups.Groups[3].IsExcluded); + } + + [Fact] + public async Task CompactAsyncIncrementalStopsAtTargetAsync() + { + // Arrange — trigger on groups > 2, target is default (inverse of trigger: groups <= 2) + TruncationCompactionStrategy strategy = new( + CompactionTriggers.GroupsExceed(2), + minimumPreservedGroups: 1); + + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + new ChatMessage(ChatRole.User, "Q3"), + ]); + + // Act — 5 groups, trigger fires (5 > 2), compacts until groups <= 2 + bool result = await strategy.CompactAsync(groups); + + // Assert — should stop at 2 included groups (not go all the way to 1) + Assert.True(result); + Assert.Equal(2, groups.IncludedGroupCount); + } + + [Fact] + public async Task CompactAsyncLoopExitsWhenMaxRemovableReachedAsync() + { + // Arrange — target never stops (always false), so the loop must exit via removed >= maxRemovable + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 2, target: CompactionTriggers.Never); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + new ChatMessage(ChatRole.Assistant, "A2"), + ]); + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert — only 2 removed (maxRemovable = 4 - 2 = 2), 2 preserved + Assert.True(result); + Assert.Equal(2, groups.IncludedGroupCount); + Assert.True(groups.Groups[0].IsExcluded); + Assert.True(groups.Groups[1].IsExcluded); + Assert.False(groups.Groups[2].IsExcluded); + Assert.False(groups.Groups[3].IsExcluded); + } + + [Fact] + public async Task CompactAsyncSkipsPreExcludedAndSystemGroupsAsync() + { + // Arrange — has excluded + system groups that the loop must skip + TruncationCompactionStrategy strategy = new(CompactionTriggers.Always, minimumPreservedGroups: 1); + CompactionMessageIndex groups = CompactionMessageIndex.Create( + [ + new ChatMessage(ChatRole.System, "System"), + new ChatMessage(ChatRole.User, "Q1"), + new ChatMessage(ChatRole.Assistant, "A1"), + new ChatMessage(ChatRole.User, "Q2"), + ]); + // Pre-exclude one group + groups.Groups[1].IsExcluded = true; + + // Act + bool result = await strategy.CompactAsync(groups); + + // Assert — system preserved, pre-excluded skipped, A1 removed, Q2 preserved + Assert.True(result); + Assert.False(groups.Groups[0].IsExcluded); // System + Assert.True(groups.Groups[1].IsExcluded); // Pre-excluded Q1 + Assert.True(groups.Groups[2].IsExcluded); // Newly excluded A1 + Assert.False(groups.Groups[3].IsExcluded); // Preserved Q2 + } +} diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Microsoft.Agents.AI.UnitTests.csproj b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Microsoft.Agents.AI.UnitTests.csproj index 7fa417b184..ffa4417f34 100644 --- a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Microsoft.Agents.AI.UnitTests.csproj +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Microsoft.Agents.AI.UnitTests.csproj @@ -16,6 +16,7 @@ + From 60d50934215042ac5dfd74d4ccab6ec2858ee798 Mon Sep 17 00:00:00 2001 From: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com> Date: Wed, 11 Mar 2026 10:47:08 +0000 Subject: [PATCH 30/44] .NET: SDK Patch Bump (10.0.200) - Address false positive trigger of IL2026/IL3050 diagnostics in hosting projects (#4586) * Suppress IL2026/IL3050 with targeted pragmas on affected methods Add #pragma warning disable/restore for IL2026 and IL3050 only around the specific methods where dotnet format incorrectly adds [RequiresUnreferencedCode] and [RequiresDynamicCode] attributes despite proper interceptors configuration in the csproj. See https://github.com/dotnet/sdk/issues/51136 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Upgrade to .NET SDK 10.0.200 and remove IL2026/IL3050 workarounds Bump global.json to SDK 10.0.200 which fixes the dotnet format bug that incorrectly added [RequiresUnreferencedCode] and [RequiresDynamicCode] attributes (https://github.com/dotnet/sdk/issues/51136). Remove all #pragma warning disable IL2026/IL3050 workarounds from source files and the --exclude-diagnostics flag from the CI format workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/dotnet-format.yml | 3 +-- dotnet/global.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet-format.yml b/.github/workflows/dotnet-format.yml index 8d7c9febb7..8bdaeba8a3 100644 --- a/.github/workflows/dotnet-format.yml +++ b/.github/workflows/dotnet-format.yml @@ -86,11 +86,10 @@ jobs: run: docker pull mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet }} # This step will run dotnet format on each of the unique csproj files and fail if any changes are made - # exclude-diagnostics should be removed after fixes for IL2026 and IL3050 are out: https://github.com/dotnet/sdk/issues/51136 - name: Run dotnet format if: steps.find-csproj.outputs.csproj_files != '' run: | for csproj in ${{ steps.find-csproj.outputs.csproj_files }}; do echo "Running dotnet format on $csproj" - docker run --rm -v $(pwd):/app -w /app mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet }} /bin/sh -c "dotnet format $csproj --verify-no-changes --verbosity diagnostic --exclude-diagnostics IL2026 IL3050" + docker run --rm -v $(pwd):/app -w /app mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet }} /bin/sh -c "dotnet format $csproj --verify-no-changes --verbosity diagnostic" done diff --git a/dotnet/global.json b/dotnet/global.json index 482aa6b8d3..42bb8863a3 100644 --- a/dotnet/global.json +++ b/dotnet/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.100", + "version": "10.0.200", "rollForward": "minor", "allowPrerelease": false }, From 2f8fd5f82fec57d88c192afa1f78be1c90031378 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Wed, 11 Mar 2026 14:22:56 +0000 Subject: [PATCH 31/44] .NET: Add FinishReason to AgentResponses (#4617) * Add FinishReason to AgentResponses * Address PR comments --- .../src/Microsoft.Agents.AI.A2A/A2AAgent.cs | 13 ++++++++ .../AgentResponse.cs | 18 +++++++++++ .../AgentResponseExtensions.cs | 2 ++ .../AgentResponseUpdate.cs | 10 ++++++ .../AIAgentChatCompletionsProcessor.cs | 4 +-- .../AgentResponseExtensions.cs | 4 +-- .../MessageMerger.cs | 8 +++++ .../A2AAgentTests.cs | 20 +++++++++--- .../AgentResponseTests.cs | 8 +++++ .../AgentResponseUpdateExtensionsTests.cs | 4 +++ .../AgentResponseUpdateTests.cs | 6 ++++ .../MessageMergerTests.cs | 31 +++++++++++++++++++ 12 files changed, 118 insertions(+), 10 deletions(-) diff --git a/dotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.cs b/dotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.cs index 2393f59202..9d98857e9b 100644 --- a/dotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI.A2A/A2AAgent.cs @@ -127,6 +127,7 @@ public sealed class A2AAgent : AIAgent { AgentId = this.Id, ResponseId = message.MessageId, + FinishReason = ChatFinishReason.Stop, RawRepresentation = message, Messages = [message.ToChatMessage()], AdditionalProperties = message.Metadata?.ToAdditionalProperties(), @@ -141,6 +142,7 @@ public sealed class A2AAgent : AIAgent { AgentId = this.Id, ResponseId = agentTask.Id, + FinishReason = MapTaskStateToFinishReason(agentTask.Status.State), RawRepresentation = agentTask, Messages = agentTask.ToChatMessages() ?? [], ContinuationToken = CreateContinuationToken(agentTask.Id, agentTask.Status.State), @@ -328,6 +330,7 @@ public sealed class A2AAgent : AIAgent { AgentId = this.Id, ResponseId = message.MessageId, + FinishReason = ChatFinishReason.Stop, RawRepresentation = message, Role = ChatRole.Assistant, MessageId = message.MessageId, @@ -342,6 +345,7 @@ public sealed class A2AAgent : AIAgent { AgentId = this.Id, ResponseId = task.Id, + FinishReason = MapTaskStateToFinishReason(task.Status.State), RawRepresentation = task, Role = ChatRole.Assistant, Contents = task.ToAIContents(), @@ -365,7 +369,16 @@ public sealed class A2AAgent : AIAgent responseUpdate.Contents = artifactUpdateEvent.Artifact.ToAIContents(); responseUpdate.RawRepresentation = artifactUpdateEvent; } + else if (taskUpdateEvent is TaskStatusUpdateEvent statusUpdateEvent) + { + responseUpdate.FinishReason = MapTaskStateToFinishReason(statusUpdateEvent.Status.State); + } return responseUpdate; } + + private static ChatFinishReason? MapTaskStateToFinishReason(TaskState state) + { + return state == TaskState.Completed ? ChatFinishReason.Stop : null; + } } diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.cs index 313c64350b..081e054efc 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponse.cs @@ -61,6 +61,7 @@ public class AgentResponse this.AdditionalProperties = response.AdditionalProperties; this.CreatedAt = response.CreatedAt; + this.FinishReason = response.FinishReason; this.Messages = response.Messages; this.RawRepresentation = response; this.ResponseId = response.ResponseId; @@ -84,6 +85,7 @@ public class AgentResponse this.AdditionalProperties = response.AdditionalProperties; this.CreatedAt = response.CreatedAt; + this.FinishReason = response.FinishReason; this.Messages = response.Messages; this.RawRepresentation = response; this.ResponseId = response.ResponseId; @@ -190,6 +192,21 @@ public class AgentResponse /// public DateTimeOffset? CreatedAt { get; set; } + /// + /// Gets or sets the reason for the agent response finishing. + /// + /// + /// A value indicating why the response finished (e.g., stop, length, content filter, tool calls), + /// or if the finish reason is not available. + /// + /// + /// + /// This property is particularly useful for detecting non-normal completions, such as content filtering + /// or token limit truncation, which may require special handling by the caller. + /// + /// + public ChatFinishReason? FinishReason { get; set; } + /// /// Gets or sets the resource usage information for generating this response. /// @@ -276,6 +293,7 @@ public class AgentResponse RawRepresentation = message.RawRepresentation, Role = message.Role, + FinishReason = this.FinishReason, AgentId = this.AgentId, ResponseId = this.ResponseId, MessageId = message.MessageId, diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseExtensions.cs index 75ff6fb359..52edccea1c 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseExtensions.cs @@ -38,6 +38,7 @@ public static class AgentResponseExtensions { AdditionalProperties = response.AdditionalProperties, CreatedAt = response.CreatedAt, + FinishReason = response.FinishReason, Messages = response.Messages, RawRepresentation = response, ResponseId = response.ResponseId, @@ -71,6 +72,7 @@ public static class AgentResponseExtensions AuthorName = responseUpdate.AuthorName, Contents = responseUpdate.Contents, CreatedAt = responseUpdate.CreatedAt, + FinishReason = responseUpdate.FinishReason, MessageId = responseUpdate.MessageId, RawRepresentation = responseUpdate, ResponseId = responseUpdate.ResponseId, diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs index 3dbe1ada8d..3610c36cdf 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AgentResponseUpdate.cs @@ -70,6 +70,7 @@ public class AgentResponseUpdate this.AuthorName = chatResponseUpdate.AuthorName; this.Contents = chatResponseUpdate.Contents; this.CreatedAt = chatResponseUpdate.CreatedAt; + this.FinishReason = chatResponseUpdate.FinishReason; this.MessageId = chatResponseUpdate.MessageId; this.RawRepresentation = chatResponseUpdate; this.ResponseId = chatResponseUpdate.ResponseId; @@ -153,6 +154,15 @@ public class AgentResponseUpdate /// public ResponseContinuationToken? ContinuationToken { get; set; } + /// + /// Gets or sets the reason for the agent response finishing. + /// + /// + /// A value indicating why the response finished (e.g., stop, length, content filter, tool calls), + /// or if the finish reason is not available or not yet determined (mid-stream). + /// + public ChatFinishReason? FinishReason { get; set; } + /// public override string ToString() => this.Text; diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/ChatCompletions/AIAgentChatCompletionsProcessor.cs b/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/ChatCompletions/AIAgentChatCompletionsProcessor.cs index 42443dc2ca..f0c9286c68 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/ChatCompletions/AIAgentChatCompletionsProcessor.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/ChatCompletions/AIAgentChatCompletionsProcessor.cs @@ -72,9 +72,7 @@ internal static class AIAgentChatCompletionsProcessor await foreach (var agentResponseUpdate in agent.RunStreamingAsync(chatMessages, options: options, cancellationToken: cancellationToken).WithCancellation(cancellationToken)) { - var finishReason = (agentResponseUpdate.RawRepresentation is ChatResponseUpdate { FinishReason: not null } chatResponseUpdate) - ? chatResponseUpdate.FinishReason.ToString() - : "stop"; + var finishReason = agentResponseUpdate.FinishReason?.ToString() ?? "stop"; var choiceChunks = new List(); CompletionUsage? usageDetails = null; diff --git a/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/ChatCompletions/AgentResponseExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/ChatCompletions/AgentResponseExtensions.cs index 95d7df0231..823f0e7fef 100644 --- a/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/ChatCompletions/AgentResponseExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/ChatCompletions/AgentResponseExtensions.cs @@ -34,9 +34,7 @@ internal static class AgentResponseExtensions var chatCompletionChoices = new List(); var index = 0; - var finishReason = (agentResponse.RawRepresentation is ChatResponse { FinishReason: not null } chatResponse) - ? chatResponse.FinishReason.ToString() - : "stop"; // "stop" is a natural stop point; returning this by-default + var finishReason = agentResponse.FinishReason?.ToString() ?? ChatFinishReason.Stop.Value; // "stop" is a natural stop point; returning this by-default foreach (var message in agentResponse.Messages) { diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/MessageMerger.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/MessageMerger.cs index de4a8b89f7..4b702034ce 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/MessageMerger.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/MessageMerger.cs @@ -124,6 +124,7 @@ internal sealed class MessageMerger List messages = []; Dictionary responses = []; HashSet agentIds = []; + HashSet finishReasons = []; foreach (string responseId in this._mergeStates.Keys) { @@ -156,6 +157,11 @@ internal sealed class MessageMerger createdTimes.Add(response.CreatedAt.Value); } + if (response.FinishReason.HasValue) + { + finishReasons.Add(response.FinishReason.Value); + } + usage = MergeUsage(usage, response.Usage); additionalProperties = MergeProperties(additionalProperties, response.AdditionalProperties); } @@ -182,6 +188,7 @@ internal sealed class MessageMerger AgentId = primaryAgentId ?? primaryAgentName ?? (agentIds.Count == 1 ? agentIds.First() : null), + FinishReason = finishReasons.Count == 1 ? finishReasons.First() : null, CreatedAt = DateTimeOffset.UtcNow, Usage = usage, AdditionalProperties = additionalProperties @@ -207,6 +214,7 @@ internal sealed class MessageMerger AgentId = incoming.AgentId ?? current.AgentId, AdditionalProperties = MergeProperties(current.AdditionalProperties, incoming.AdditionalProperties), CreatedAt = incoming.CreatedAt ?? current.CreatedAt, + FinishReason = incoming.FinishReason ?? current.FinishReason, Messages = current.Messages.Concat(incoming.Messages).ToList(), ResponseId = current.ResponseId, RawRepresentation = rawRepresentation, diff --git a/dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/A2AAgentTests.cs b/dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/A2AAgentTests.cs index 50d83c140d..514922dd26 100644 --- a/dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/A2AAgentTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/A2AAgentTests.cs @@ -126,6 +126,7 @@ public sealed class A2AAgentTests : IDisposable Assert.Single(result.Messages); Assert.Equal(ChatRole.Assistant, result.Messages[0].Role); Assert.Equal("Hello! How can I help you today?", result.Messages[0].Text); + Assert.Equal(ChatFinishReason.Stop, result.FinishReason); } [Fact] @@ -249,8 +250,7 @@ public sealed class A2AAgentTests : IDisposable Assert.Equal("stream-1", updates[0].MessageId); Assert.Equal(this._agent.Id, updates[0].AgentId); Assert.Equal("stream-1", updates[0].ResponseId); - - Assert.NotNull(updates[0].RawRepresentation); + Assert.Equal(ChatFinishReason.Stop, updates[0].FinishReason); Assert.IsType(updates[0].RawRepresentation); Assert.Equal("stream-1", ((AgentMessage)updates[0].RawRepresentation!).MessageId); } @@ -501,8 +501,7 @@ public sealed class A2AAgentTests : IDisposable Assert.NotNull(result); Assert.Equal(this._agent.Id, result.AgentId); Assert.Equal("task-789", result.ResponseId); - - Assert.NotNull(result.RawRepresentation); + Assert.Null(result.FinishReason); Assert.IsType(result.RawRepresentation); Assert.Equal("task-789", ((AgentTask)result.RawRepresentation).Id); @@ -552,6 +551,15 @@ public sealed class A2AAgentTests : IDisposable { Assert.Null(result.ContinuationToken); } + + if (taskState is TaskState.Completed) + { + Assert.Equal(ChatFinishReason.Stop, result.FinishReason); + } + else + { + Assert.Null(result.FinishReason); + } } [Fact] @@ -661,6 +669,7 @@ public sealed class A2AAgentTests : IDisposable Assert.Equal(MessageId, update0.ResponseId); Assert.Equal(this._agent.Id, update0.AgentId); Assert.Equal(MessageText, update0.Text); + Assert.Equal(ChatFinishReason.Stop, update0.FinishReason); Assert.IsType(update0.RawRepresentation); Assert.Equal(MessageId, ((AgentMessage)update0.RawRepresentation!).MessageId); } @@ -702,6 +711,7 @@ public sealed class A2AAgentTests : IDisposable Assert.Equal(ChatRole.Assistant, update0.Role); Assert.Equal(TaskId, update0.ResponseId); Assert.Equal(this._agent.Id, update0.AgentId); + Assert.Null(update0.FinishReason); Assert.IsType(update0.RawRepresentation); Assert.Equal(TaskId, ((AgentTask)update0.RawRepresentation!).Id); @@ -741,6 +751,7 @@ public sealed class A2AAgentTests : IDisposable Assert.Equal(ChatRole.Assistant, update0.Role); Assert.Equal(TaskId, update0.ResponseId); Assert.Equal(this._agent.Id, update0.AgentId); + Assert.Null(update0.FinishReason); Assert.IsType(update0.RawRepresentation); // Assert - session should be updated with context and task IDs @@ -784,6 +795,7 @@ public sealed class A2AAgentTests : IDisposable Assert.Equal(ChatRole.Assistant, update0.Role); Assert.Equal(TaskId, update0.ResponseId); Assert.Equal(this._agent.Id, update0.AgentId); + Assert.Null(update0.FinishReason); Assert.IsType(update0.RawRepresentation); // Assert - artifact content should be in the update diff --git a/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseTests.cs b/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseTests.cs index e1425b3144..6d24c821bc 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseTests.cs @@ -53,6 +53,7 @@ public class AgentResponseTests { AdditionalProperties = [], CreatedAt = new DateTimeOffset(2022, 1, 1, 0, 0, 0, TimeSpan.Zero), + FinishReason = ChatFinishReason.ContentFilter, Messages = [new(ChatRole.Assistant, "This is a test message.")], RawRepresentation = new object(), ResponseId = "responseId", @@ -63,6 +64,7 @@ public class AgentResponseTests AgentResponse response = new(chatResponse); Assert.Same(chatResponse.AdditionalProperties, response.AdditionalProperties); Assert.Equal(chatResponse.CreatedAt, response.CreatedAt); + Assert.Equal(chatResponse.FinishReason, response.FinishReason); Assert.Same(chatResponse.Messages, response.Messages); Assert.Equal(chatResponse.ResponseId, response.ResponseId); Assert.Same(chatResponse, response.RawRepresentation as ChatResponse); @@ -105,6 +107,10 @@ public class AgentResponseTests Assert.Null(response.ContinuationToken); response.ContinuationToken = ResponseContinuationToken.FromBytes(new byte[] { 1, 2, 3 }); Assert.Equivalent(ResponseContinuationToken.FromBytes(new byte[] { 1, 2, 3 }), response.ContinuationToken); + + Assert.Null(response.FinishReason); + response.FinishReason = ChatFinishReason.Length; + Assert.Equal(ChatFinishReason.Length, response.FinishReason); } [Fact] @@ -188,6 +194,7 @@ public class AgentResponseTests ResponseId = "12345", CreatedAt = new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero), AdditionalProperties = new() { ["key1"] = "value1", ["key2"] = 42 }, + FinishReason = ChatFinishReason.ContentFilter, Usage = new UsageDetails { TotalTokenCount = 100 @@ -205,6 +212,7 @@ public class AgentResponseTests Assert.Equal(new DateTimeOffset(2024, 11, 10, 9, 20, 0, TimeSpan.Zero), update0.CreatedAt); Assert.Equal("customRole", update0.Role?.Value); Assert.Equal("Text", update0.Text); + Assert.Equal(ChatFinishReason.ContentFilter, update0.FinishReason); AgentResponseUpdate update1 = updates[1]; Assert.Equal("value1", update1.AdditionalProperties?["key1"]); diff --git a/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateExtensionsTests.cs b/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateExtensionsTests.cs index 790298ddf9..89cff04de8 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateExtensionsTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateExtensionsTests.cs @@ -334,6 +334,7 @@ public class AgentResponseUpdateExtensionsTests { ResponseId = "test-response-id", CreatedAt = new DateTimeOffset(2024, 1, 1, 12, 0, 0, TimeSpan.Zero), + FinishReason = ChatFinishReason.ContentFilter, Usage = new UsageDetails { TotalTokenCount = 50 }, AdditionalProperties = new() { ["key"] = "value" }, ContinuationToken = ResponseContinuationToken.FromBytes(new byte[] { 1, 2, 3 }), @@ -346,6 +347,7 @@ public class AgentResponseUpdateExtensionsTests Assert.NotNull(result); Assert.Equal("test-response-id", result.ResponseId); Assert.Equal(new DateTimeOffset(2024, 1, 1, 12, 0, 0, TimeSpan.Zero), result.CreatedAt); + Assert.Equal(ChatFinishReason.ContentFilter, result.FinishReason); Assert.Same(agentResponse.Messages, result.Messages); Assert.Same(agentResponse, result.RawRepresentation); Assert.Same(agentResponse.Usage, result.Usage); @@ -392,6 +394,7 @@ public class AgentResponseUpdateExtensionsTests ResponseId = "update-id", MessageId = "message-id", CreatedAt = new DateTimeOffset(2024, 1, 1, 12, 0, 0, TimeSpan.Zero), + FinishReason = ChatFinishReason.ToolCalls, AdditionalProperties = new() { ["key"] = "value" }, ContinuationToken = ResponseContinuationToken.FromBytes(new byte[] { 1, 2, 3 }), }; @@ -405,6 +408,7 @@ public class AgentResponseUpdateExtensionsTests Assert.Equal("update-id", result.ResponseId); Assert.Equal("message-id", result.MessageId); Assert.Equal(new DateTimeOffset(2024, 1, 1, 12, 0, 0, TimeSpan.Zero), result.CreatedAt); + Assert.Equal(ChatFinishReason.ToolCalls, result.FinishReason); Assert.Equal(ChatRole.Assistant, result.Role); Assert.Same(agentResponseUpdate.Contents, result.Contents); Assert.Same(agentResponseUpdate, result.RawRepresentation); diff --git a/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateTests.cs b/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateTests.cs index 7fda5f680b..b563661b61 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Abstractions.UnitTests/AgentResponseUpdateTests.cs @@ -24,6 +24,7 @@ public class AgentResponseUpdateTests Assert.Null(update.CreatedAt); Assert.Equal(string.Empty, update.ToString()); Assert.Null(update.ContinuationToken); + Assert.Null(update.FinishReason); } [Fact] @@ -50,6 +51,7 @@ public class AgentResponseUpdateTests Assert.Equal(chatResponseUpdate.AuthorName, response.AuthorName); Assert.Same(chatResponseUpdate.Contents, response.Contents); Assert.Equal(chatResponseUpdate.CreatedAt, response.CreatedAt); + Assert.Equal(chatResponseUpdate.FinishReason, response.FinishReason); Assert.Equal(chatResponseUpdate.MessageId, response.MessageId); Assert.Same(chatResponseUpdate, response.RawRepresentation as ChatResponseUpdate); Assert.Equal(chatResponseUpdate.ResponseId, response.ResponseId); @@ -109,6 +111,10 @@ public class AgentResponseUpdateTests Assert.Null(update.ContinuationToken); update.ContinuationToken = ResponseContinuationToken.FromBytes(new byte[] { 1, 2, 3 }); Assert.Equivalent(ResponseContinuationToken.FromBytes(new byte[] { 1, 2, 3 }), update.ContinuationToken); + + Assert.Null(update.FinishReason); + update.FinishReason = ChatFinishReason.ToolCalls; + Assert.Equal(ChatFinishReason.ToolCalls, update.FinishReason); } [Fact] diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/MessageMergerTests.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/MessageMergerTests.cs index 93448aa327..704e25b14a 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/MessageMergerTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/MessageMergerTests.cs @@ -37,5 +37,36 @@ public class MessageMergerTests response.CreatedAt.Should().NotBe(creationTime); response.Messages[0].CreatedAt.Should().Be(creationTime); response.Messages[0].Contents.Should().HaveCount(1); + response.FinishReason.Should().BeNull(); + } + + [Fact] + public void Test_MessageMerger_PropagatesFinishReasonFromUpdates() + { + // Arrange + string responseId = Guid.NewGuid().ToString("N"); + string messageId = Guid.NewGuid().ToString("N"); + + MessageMerger merger = new(); + + foreach (AgentResponseUpdate update in "Hello".ToAgentRunStream(agentId: TestAgentId1, messageId: messageId, responseId: responseId)) + { + merger.AddUpdate(update); + } + + // Add a final update with FinishReason set + merger.AddUpdate(new AgentResponseUpdate + { + ResponseId = responseId, + MessageId = messageId, + FinishReason = ChatFinishReason.ContentFilter, + Role = ChatRole.Assistant, + }); + + // Act + AgentResponse response = merger.ComputeMerged(responseId); + + // Assert - FinishReason from the update should propagate through + response.FinishReason.Should().Be(ChatFinishReason.ContentFilter); } } From 23ebfbc9374cfcd20e1c82623b699f552c1abbef Mon Sep 17 00:00:00 2001 From: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> Date: Wed, 11 Mar 2026 18:28:30 +0000 Subject: [PATCH 32/44] Python: Support skill scripts execution (#4558) * support skill scripts execution * fix mixed line endings * address comments and fix syntax issues * use few try/except instead of one * change samples * validate either script path or script resource is set not both * fix: separate LLM args from runtime kwargs in skill script execution * address pr review comments * address PR review comments * Update python/packages/core/agent_framework/_skills.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update python/packages/core/agent_framework/_skills.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update python/packages/core/agent_framework/_skills.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * 1. Fixing the caching bug where parameters_schema would re-inspect on every call when the result was None 2. Updating the arguments tool description to be more generic (not CLI-specific) * fix failing tests * address pr review comments * address pr review comments * allow resource function returning any instead of sting * address PR review comments --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- python/packages/core/AGENTS.md | 9 + .../packages/core/agent_framework/__init__.py | 10 +- .../packages/core/agent_framework/_skills.py | 566 ++++++- .../packages/core/tests/core/test_skills.py | 1414 ++++++++++++++++- python/samples/02-agents/skills/README.md | 55 + .../02-agents/skills/basic_skill/README.md | 68 - .../skills/basic_skill/basic_skill.py | 88 - .../skills/expense-report/SKILL.md | 40 - .../assets/expense-report-template.md | 5 - .../expense-report/references/POLICY_FAQ.md | 55 - .../skills/code_defined_skill/README.md | 49 + .../code_defined_skill/code_defined_skill.py | 173 ++ .../02-agents/skills/code_skill/README.md | 57 - .../02-agents/skills/code_skill/code_skill.py | 161 -- .../skills/file_based_skill/README.md | 69 + .../file_based_skill/file_based_skill.py | 94 ++ .../skills/unit-converter/SKILL.md | 11 + .../references/CONVERSION_TABLES.md | 10 + .../skills/unit-converter/scripts/convert.py | 29 + .../02-agents/skills/mixed_skills/README.md | 100 ++ .../skills/mixed_skills/mixed_skills.py | 160 ++ .../skills/unit-converter/SKILL.md | 11 + .../references/CONVERSION_TABLES.md | 10 + .../skills/unit-converter/scripts/convert.py | 29 + .../skills/script_approval/README.md | 50 + .../skills/script_approval/script_approval.py | 124 ++ .../skills/subprocess_script_runner.py | 75 + 27 files changed, 2994 insertions(+), 528 deletions(-) create mode 100644 python/samples/02-agents/skills/README.md delete mode 100644 python/samples/02-agents/skills/basic_skill/README.md delete mode 100644 python/samples/02-agents/skills/basic_skill/basic_skill.py delete mode 100644 python/samples/02-agents/skills/basic_skill/skills/expense-report/SKILL.md delete mode 100644 python/samples/02-agents/skills/basic_skill/skills/expense-report/assets/expense-report-template.md delete mode 100644 python/samples/02-agents/skills/basic_skill/skills/expense-report/references/POLICY_FAQ.md create mode 100644 python/samples/02-agents/skills/code_defined_skill/README.md create mode 100644 python/samples/02-agents/skills/code_defined_skill/code_defined_skill.py delete mode 100644 python/samples/02-agents/skills/code_skill/README.md delete mode 100644 python/samples/02-agents/skills/code_skill/code_skill.py create mode 100644 python/samples/02-agents/skills/file_based_skill/README.md create mode 100644 python/samples/02-agents/skills/file_based_skill/file_based_skill.py create mode 100644 python/samples/02-agents/skills/file_based_skill/skills/unit-converter/SKILL.md create mode 100644 python/samples/02-agents/skills/file_based_skill/skills/unit-converter/references/CONVERSION_TABLES.md create mode 100644 python/samples/02-agents/skills/file_based_skill/skills/unit-converter/scripts/convert.py create mode 100644 python/samples/02-agents/skills/mixed_skills/README.md create mode 100644 python/samples/02-agents/skills/mixed_skills/mixed_skills.py create mode 100644 python/samples/02-agents/skills/mixed_skills/skills/unit-converter/SKILL.md create mode 100644 python/samples/02-agents/skills/mixed_skills/skills/unit-converter/references/CONVERSION_TABLES.md create mode 100644 python/samples/02-agents/skills/mixed_skills/skills/unit-converter/scripts/convert.py create mode 100644 python/samples/02-agents/skills/script_approval/README.md create mode 100644 python/samples/02-agents/skills/script_approval/script_approval.py create mode 100644 python/samples/02-agents/skills/subprocess_script_runner.py diff --git a/python/packages/core/AGENTS.md b/python/packages/core/AGENTS.md index a270bc1686..859858f0ef 100644 --- a/python/packages/core/AGENTS.md +++ b/python/packages/core/AGENTS.md @@ -13,6 +13,7 @@ agent_framework/ ├── _tools.py # Tool definitions and function invocation ├── _middleware.py # Middleware system for request/response interception ├── _sessions.py # AgentSession and context provider abstractions +├── _skills.py # Agent Skills system (models, executors, provider) ├── _mcp.py # Model Context Protocol support ├── _workflows/ # Workflow orchestration (sequential, concurrent, handoff, etc.) ├── openai/ # Built-in OpenAI client @@ -63,6 +64,14 @@ agent_framework/ - **`BaseContextProvider`** - Base class for context providers (RAG, memory systems) - **`BaseHistoryProvider`** - Base class for conversation history storage +### Skills (`_skills.py`) + +- **`Skill`** - A skill definition bundling instructions (`content`) with metadata, resources, and scripts. Supports `@skill.resource` and `@skill.script` decorators for adding components. +- **`SkillResource`** - Named supplementary content attached to a skill; holds either static `content` or a dynamic `function` (sync or async). Exactly one must be provided. +- **`SkillScript`** - An executable script attached to a skill; holds either an inline `function` (code-defined, runs in-process) or a `path` to a file on disk (file-based, delegated to a runner). Exactly one must be provided. +- **`SkillScriptRunner`** - Protocol for file-based script execution. Any callable matching `(skill, script, args) -> Any` satisfies it. Code-defined scripts do not use a runner. +- **`SkillsProvider`** - Context provider (extends `BaseContextProvider`) that discovers file-based skills from `SKILL.md` files and/or accepts code-defined `Skill` instances. Follows progressive disclosure: advertise → load → read resources / run scripts. + ### Workflows (`_workflows/`) - **`Workflow`** - Graph-based workflow definition diff --git a/python/packages/core/agent_framework/__init__.py b/python/packages/core/agent_framework/__init__.py index ef03652898..d7bc38220a 100644 --- a/python/packages/core/agent_framework/__init__.py +++ b/python/packages/core/agent_framework/__init__.py @@ -59,7 +59,13 @@ from ._sessions import ( register_state_type, ) from ._settings import SecretString, load_settings -from ._skills import Skill, SkillResource, SkillsProvider +from ._skills import ( + Skill, + SkillResource, + SkillScript, + SkillScriptRunner, + SkillsProvider, +) from ._telemetry import ( AGENT_FRAMEWORK_USER_AGENT, APP_INFO, @@ -271,6 +277,8 @@ __all__ = [ "SingleEdgeGroup", "Skill", "SkillResource", + "SkillScript", + "SkillScriptRunner", "SkillsProvider", "SubWorkflowRequestMessage", "SubWorkflowResponseMessage", diff --git a/python/packages/core/agent_framework/_skills.py b/python/packages/core/agent_framework/_skills.py index fc71329a5f..b7b91919e8 100644 --- a/python/packages/core/agent_framework/_skills.py +++ b/python/packages/core/agent_framework/_skills.py @@ -26,13 +26,14 @@ Only use skills from trusted sources. from __future__ import annotations import inspect +import json import logging import os import re from collections.abc import Callable, Sequence from html import escape as xml_escape from pathlib import Path, PurePosixPath -from typing import TYPE_CHECKING, Any, ClassVar, Final +from typing import TYPE_CHECKING, Any, ClassVar, Final, Protocol, runtime_checkable from ._sessions import BaseContextProvider from ._tools import FunctionTool @@ -93,6 +94,7 @@ class SkillResource: description: Optional human-readable summary shown when advertising the resource. content: Static content string. Mutually exclusive with *function*. function: Callable (sync or async) that returns content on demand. + May return any type; the value is passed through as-is. Mutually exclusive with *content*. """ if not name or not name.strip(): @@ -115,6 +117,110 @@ class SkillResource: self._accepts_kwargs = any(p.kind == inspect.Parameter.VAR_KEYWORD for p in sig.parameters.values()) +class SkillScript: + """An executable script attached to a skill. + + .. warning:: Experimental + + This API is experimental and subject to change or removal + in future versions without notice. + + A script represents executable code that an agent can run. It holds + either an inline ``function`` callable (code-defined scripts) or + a ``path`` to a script file on disk (file-based scripts). + Exactly one must be provided. + + When ``function`` is set the script is treated as **code-based** + and the function is invoked directly in-process. When ``path`` is + set the script is treated as **file-based** and delegated to the + configured :class:`SkillScriptRunner`. + + Attributes: + name: Script identifier. + description: Optional human-readable summary, or ``None``. + function: Callable that implements the script, or ``None``. + path: Relative path to the script file from the skill directory, or + ``None`` for code-defined scripts. + + Examples: + Code-defined script: + + .. code-block:: python + + SkillScript(name="analyze", function=analyze_data, description="Run analysis") + + File-based script (discovered from disk): + + .. code-block:: python + + SkillScript(name="process.py", path="scripts/process.py") + """ + + def __init__( + self, + *, + name: str, + description: str | None = None, + function: Callable[..., Any] | None = None, + path: str | None = None, + ) -> None: + """Initialize a SkillScript. + + Args: + name: Identifier for this script (e.g. ``"analyze"``, ``"process.py"``). + description: Optional human-readable summary. + function: Callable (sync or async) that implements the script. + Set for code-defined scripts; ``None`` for file-based scripts. + Mutually exclusive with *path*. + path: Relative path to the script file from the skill directory. + Set automatically for file-based scripts discovered from disk; + ``None`` for code-defined scripts. + Mutually exclusive with *function*. + """ + if not name or not name.strip(): + raise ValueError("Script name cannot be empty.") + if function is None and path is None: + raise ValueError(f"Script '{name}' must have either function or path.") + if function is not None and path is not None: + raise ValueError(f"Script '{name}' must have either function or path, not both.") + + self.name = name + self.description = description + self.function = function + self.path = path + self._parameters_schema: dict[str, Any] | None = None + self._parameters_schema_resolved: bool = False + + # Precompute whether the function accepts **kwargs to avoid + # repeated inspect.signature() calls on every invocation. + self._accepts_kwargs: bool = False + if function is not None: + sig = inspect.signature(function) + self._accepts_kwargs = any( + p.kind == inspect.Parameter.VAR_KEYWORD for p in sig.parameters.values() + ) + + @property + def parameters_schema(self) -> dict[str, Any] | None: + """JSON Schema describing the script's parameters. + + .. warning:: Experimental + + This API is experimental and subject to change or removal + in future versions without notice. + + Lazily generated from the callable's signature on first access. + Returns ``None`` for file-based scripts or functions with no + introspectable parameters. + """ + if not self._parameters_schema_resolved and self.function is not None: + tool = FunctionTool(name=self.function.__name__, func=self.function) + schema = tool.parameters() + self._parameters_schema = schema if schema and schema.get("properties") else None + self._parameters_schema_resolved = True + return self._parameters_schema + + class Skill: """A skill definition with optional resources. @@ -124,15 +230,16 @@ class Skill: in future versions without notice. A skill bundles a set of instructions (``content``) with metadata and - zero or more :class:`SkillResource` instances. Resources can be - supplied at construction time or added later via the :meth:`resource` - decorator. + zero or more :class:`SkillResource` and :class:`SkillScript` instances. + Resources and scripts can be supplied at construction time or added later + via the :meth:`resource` and :meth:`script` decorators. Attributes: name: Skill name (lowercase letters, numbers, hyphens only). description: Human-readable description of the skill. content: The skill instructions body. resources: Mutable list of :class:`SkillResource` instances. + scripts: Mutable list of :class:`SkillScript` instances. path: Absolute path to the skill directory on disk, or ``None`` for code-defined skills. @@ -171,6 +278,7 @@ class Skill: description: str, content: str, resources: list[SkillResource] | None = None, + scripts: list[SkillScript] | None = None, path: str | None = None, ) -> None: """Initialize a Skill. @@ -180,6 +288,7 @@ class Skill: description: Human-readable description of the skill (≤1024 chars). content: The skill instructions body. resources: Pre-built resources to attach to this skill. + scripts: Pre-built scripts to attach to this skill. path: Absolute path to the skill directory on disk. Set automatically for file-based skills; leave as ``None`` for code-defined skills. """ @@ -192,6 +301,7 @@ class Skill: self.description = description self.content = content self.resources: list[SkillResource] = resources if resources is not None else [] + self.scripts: list[SkillScript] = scripts if scripts is not None else [] self.path = path def resource( @@ -227,7 +337,7 @@ class Skill: .. code-block:: python @skill.resource - def get_schema() -> str: + def get_schema() -> Any: return "schema..." With arguments: @@ -235,7 +345,7 @@ class Skill: .. code-block:: python @skill.resource(name="custom-name", description="Custom desc") - async def get_data() -> str: + async def get_data() -> Any: return "data..." """ @@ -255,10 +365,118 @@ class Skill: return decorator return decorator(func) + def script( + self, + func: Callable[..., Any] | None = None, + *, + name: str | None = None, + description: str | None = None, + ) -> Any: + """Decorator that registers a callable as a script on this skill. + + Supports bare usage (``@skill.script``) and parameterized usage + (``@skill.script(name="custom", description="...")``). The + decorated function is returned unchanged; a new + :class:`SkillScript` is appended to :attr:`scripts`. + + Args: + func: The function being decorated. Populated automatically when + the decorator is applied without parentheses. + + Keyword Args: + name: Script name override. Defaults to ``func.__name__``. + description: Script description override. Defaults to the + function's docstring (via :func:`inspect.getdoc`). + + Returns: + The original function unchanged, or a secondary decorator when + called with keyword arguments. + + Examples: + Bare decorator: + + .. code-block:: python + + @skill.script + def analyze_data(query: str) -> str: + \"\"\"Run data analysis.\"\"\" + return run_analysis(query) + + With arguments: + + .. code-block:: python + + @skill.script(name="fetch", description="Fetch remote data") + async def fetch_data(url: str) -> str: + return await http_get(url) + """ + + def decorator(f: Callable[..., Any]) -> Callable[..., Any]: + script_name = name or f.__name__ + script_description = description or (inspect.getdoc(f) or None) + self.scripts.append( + SkillScript( + name=script_name, + description=script_description, + function=f, + ) + ) + return f + + if func is None: + return decorator + return decorator(func) + # endregion -# region Constants +# region Script Runners + + +@runtime_checkable +class SkillScriptRunner(Protocol): + """Protocol for skill script runners. + + .. warning:: Experimental + + This API is experimental and subject to change or removal + in future versions without notice. + + A script runner determines how **file-based** skill scripts are + run. Implementations decide the execution strategy + (e.g., local subprocess, hosted code execution environment, + user-provided callable). + + Code-defined scripts (registered via the ``@skill.script`` decorator) + are always executed **in-process** and do not use a script runner. + + Any callable (sync or async) matching the ``__call__`` signature + satisfies this protocol. + """ + + def __call__( + self, skill: Skill, script: SkillScript, args: dict[str, Any] | None = None + ) -> Any: + """Run a skill script. + + The :class:`SkillsProvider` resolves skill and script names + before calling this method, so implementations receive fully + resolved objects. + + Args: + skill: The skill that owns the script. + script: The script to run. + args: Optional keyword arguments for the script. + + Returns: + The result. May be any type; the framework + serialises it automatically via + :meth:`~FunctionTool.parse_result`. + """ + ... + + +# endregion SKILL_FILE_NAME: Final[str] = "SKILL.md" MAX_SEARCH_DEPTH: Final[int] = 2 @@ -273,8 +491,7 @@ DEFAULT_RESOURCE_EXTENSIONS: Final[tuple[str, ...]] = ( ".xml", ".txt", ) - -# endregion +DEFAULT_SCRIPT_EXTENSIONS: Final[tuple[str, ...]] = (".py",) # region Patterns and prompt template @@ -307,13 +524,19 @@ Each skill provides specialized instructions, reference documents, and assets fo When a task aligns with a skill's domain, follow these steps in exact order: -1. Use `load_skill` to retrieve the skill's instructions. -2. Follow the provided guidance. -3. Use `read_skill_resource` to read any referenced resources, using the name exactly as listed +- Use `load_skill` to retrieve the skill's instructions. +- Follow the provided guidance. +- Use `read_skill_resource` to read any referenced resources, using the name exactly as listed (e.g. `"style-guide"` not `"style-guide.md"`, `"references/FAQ.md"` not `"FAQ.md"`). - +{runner_instructions} Only load what is needed, when it is needed.""" +SCRIPT_RUNNER_INSTRUCTIONS: Final[str] = ( + "\n- Use `run_skill_script` to run referenced scripts, using the name exactly as listed." + "\n- Pass script arguments inside `args` as a JSON object" + ' (e.g. `args: {"length": 24}`), not as top-level tool parameters.\n' +) + # endregion # region SkillsProvider @@ -381,8 +604,11 @@ class SkillsProvider(BaseContextProvider): skill_paths: str | Path | Sequence[str | Path] | None = None, *, skills: Sequence[Skill] | None = None, + script_runner: SkillScriptRunner | None = None, instruction_template: str | None = None, resource_extensions: tuple[str, ...] | None = None, + script_extensions: tuple[str, ...] | None = None, + require_script_approval: bool = False, source_id: str | None = None, ) -> None: """Initialize a SkillsProvider. @@ -395,21 +621,69 @@ class SkillsProvider(BaseContextProvider): Keyword Args: skills: Code-defined :class:`Skill` instances to register. + script_runner: Strategy for running **file-based** skill + scripts. The provider resolves skill and script names, then + calls the runner directly. This parameter only + affects scripts discovered from disk (via *skill_paths*); + code-defined scripts (registered with ``@skill.script``) are + always executed in-process and ignore this setting. + When ``None``, file-based scripts are not executable. instruction_template: Custom system-prompt template for advertising skills. Must contain a ``{skills}`` placeholder for the generated skills list. Uses a built-in template when ``None``. resource_extensions: File extensions recognized as discoverable resources. Defaults to ``DEFAULT_RESOURCE_EXTENSIONS`` (``(".md", ".json", ".yaml", ".yml", ".csv", ".xml", ".txt")``). + script_extensions: File extensions recognized as discoverable + scripts. Defaults to ``DEFAULT_SCRIPT_EXTENSIONS`` + (``(".py",)``). + require_script_approval: When ``True``, skill script execution + requires explicit user approval before running. Instead of + executing immediately, the agent pauses and returns a + ``function_approval_request`` via ``result.user_input_requests``. + The application should present the request to the user, then + call ``request.to_function_approval_response(approved=True)`` + (or ``False`` to reject) and pass the response back with + ``agent.run(approval_response, session=session)``. + Rejected scripts are not executed and the agent is informed + the user declined. Defaults to ``False``. See + ``samples/02-agents/skills/script_approval/script_approval.py`` + for the full approval loop pattern. source_id: Unique identifier for this provider instance. """ super().__init__(source_id or self.DEFAULT_SOURCE_ID) - self._skills = _load_skills(skill_paths, skills, resource_extensions or DEFAULT_RESOURCE_EXTENSIONS) + self._skills = _load_skills( + skill_paths, + skills, + resource_extensions or DEFAULT_RESOURCE_EXTENSIONS, + script_extensions or DEFAULT_SCRIPT_EXTENSIONS, + ) - self._instructions = _create_instructions(instruction_template, self._skills) + # File-based skills (skill.path set) have scripts discovered from disk + has_file_scripts = any(s.scripts for s in self._skills.values() if s.path is not None) - self._tools = self._create_tools() + # Code-defined skills (skill.path is None) have scripts with callable functions + has_code_scripts = any(s.scripts for s in self._skills.values() if s.path is None) + + if has_file_scripts and script_runner is None: + raise ValueError( + "File-based skills with scripts were provided but no 'script_runner' was provided. " + "Pass a SkillScriptRunner callable to SkillsProvider." + ) + + self._script_runner = script_runner + + self._instructions = _create_instructions( + prompt_template=instruction_template, + skills=self._skills, + include_script_runner_instructions=has_file_scripts or has_code_scripts + ) + + self._tools = self._create_tools( + include_script_runner_tool=has_file_scripts or has_code_scripts, + require_script_approval=require_script_approval, + ) async def before_run( self, @@ -425,6 +699,11 @@ class SkillsProvider(BaseContextProvider): skill is registered, appends the skill-list system prompt and the ``load_skill`` / ``read_skill_resource`` tools to *context*. + When any registered skill defines one or more scripts (file-based or + code-based), the system prompt also includes script-runner + instructions (embedded via the ``{runner_instructions}`` placeholder), + and the ``run_skill_script`` tool is included alongside the base tools. + Args: agent: The agent instance about to run. session: The current agent session. @@ -434,17 +713,30 @@ class SkillsProvider(BaseContextProvider): if not self._skills: return - if self._instructions: - context.extend_instructions(self.source_id, self._instructions) + context.extend_instructions(self.source_id, self._instructions) # type: ignore[arg-type] context.extend_tools(self.source_id, self._tools) - def _create_tools(self) -> list[FunctionTool]: + def _create_tools( + self, + include_script_runner_tool: bool, + require_script_approval: bool = False, + ) -> list[FunctionTool]: """Create the ``load_skill`` and ``read_skill_resource`` tool definitions. + When *include_script_runner_tool* is ``True``, also creates + ``run_skill_script``. + + Args: + include_script_runner_tool: Whether to include the + ``run_skill_script`` tool in the returned list. + require_script_approval: When ``True``, the + ``run_skill_script`` tool pauses for user approval + before each invocation. + Returns: - A two-element list of :class:`FunctionTool` instances. + A list of :class:`FunctionTool` instances. """ - return [ + tools = [ FunctionTool( name="load_skill", description="Loads the full instructions for a specific skill.", @@ -475,6 +767,45 @@ class SkillsProvider(BaseContextProvider): ), ] + if include_script_runner_tool: + tools.append( + FunctionTool( + name="run_skill_script", + description="Runs a script associated with a skill.", + func=self._run_skill_script, + approval_mode="always_require" if require_script_approval else "never_require", + input_model={ + "type": "object", + "properties": { + "skill_name": {"type": "string", "description": "The name of the skill."}, + "script_name": { + "type": "string", + "description": ( + "The name of the script to run as listed in the skill, " + "preserving any directory prefix exactly as shown. " + "Do not add or remove path prefixes." + ), + }, + "args": { + "type": ["object", "null"], + "additionalProperties": True, + "default": None, + "description": ( + "Arguments to pass to the script as key-value pairs. " + "Use parameter names as keys without leading dashes " + '(e.g. {"length": 24, "uppercase": true}). ' + "How these values are mapped to the underlying script " + "is determined by the script implementation or configured runner." + ), + }, + }, + "required": ["skill_name", "script_name"], + }, + ) + ) + + return tools + def _load_skill(self, skill_name: str) -> str: """Return the full instructions for the named skill. @@ -516,9 +847,79 @@ class SkillsProvider(BaseContextProvider): resource_lines = "\n".join(_create_resource_element(r) for r in skill.resources) content += f"\n\n\n{resource_lines}\n" + if skill.scripts: + script_lines = "\n".join(_create_script_element(s) for s in skill.scripts) + content += f"\n\n\n{script_lines}\n" + return content - async def _read_skill_resource(self, skill_name: str, resource_name: str, **kwargs: Any) -> str: + async def _run_skill_script( + self, skill_name: str, script_name: str, args: dict[str, Any] | None = None, **kwargs: Any + ) -> Any: + """Run a named script from a skill. + + For code-defined scripts (those with a ``function`` and no ``path``), + the function is invoked directly in-process. For file-based scripts + the configured :class:`SkillScriptRunner` is used. + + Args: + skill_name: The name of the owning skill. + script_name: The script name to look up (case-insensitive). + args: Optional keyword arguments for the script, provided by the + agent/LLM. These are mapped to the function's declared + parameters. + **kwargs: Runtime keyword arguments forwarded only to script + functions that accept ``**kwargs`` (e.g. arguments passed via + ``agent.run(user_id="123")``). + + Returns: + The result, or a user-facing error message on + failure. + """ + if not skill_name or not skill_name.strip(): + return "Error: Skill name cannot be empty." + + if not script_name or not script_name.strip(): + return "Error: Script name cannot be empty." + + skill = self._skills.get(skill_name) + if not skill: + return f"Error: Skill '{skill_name}' not found." + + script = next((s for s in skill.scripts if s.name.lower() == script_name.lower()), None) + if not script: + return f"Error: Script '{script_name}' not found in skill '{skill_name}'." + + # Code-defined scripts: run the function directly + if script.function is not None: + try: + if script._accepts_kwargs: # pyright: ignore[reportPrivateUsage] + result = script.function(**(args or {}), **kwargs) + else: + result = script.function(**(args or {})) + if inspect.isawaitable(result): + result = await result + return result + except Exception: + logger.exception("Error running code-defined script '%s' in skill '%s'", script_name, skill_name) + return f"Error: Failed to run script '{script_name}' in skill '{skill_name}'." + + # File-based scripts: delegate to the runner + if self._script_runner is None: + return ( + f"Error: Script '{script_name}' in skill '{skill_name}' requires a runner. " + "Provide a script_runner for file-based scripts." + ) + try: + result = self._script_runner(skill, script, args) + if inspect.isawaitable(result): + result = await result + return result + except Exception: + logger.exception("Error running file-based script '%s' in skill '%s'", script_name, skill_name) + return f"Error: Failed to run script '{script_name}' in skill '{skill_name}'." + + async def _read_skill_resource(self, skill_name: str, resource_name: str, **kwargs: Any) -> Any: """Read a named resource from a skill. Resolves the resource by case-insensitive name lookup. Static @@ -533,7 +934,7 @@ class SkillsProvider(BaseContextProvider): ``agent.run(user_id="123")``). Returns: - The resource content string, or a user-facing error message on + The resource content (any type), or a user-facing error message on failure. """ if not skill_name or not skill_name.strip(): @@ -565,13 +966,10 @@ class SkillsProvider(BaseContextProvider): ) else: result = resource.function(**kwargs) if resource._accepts_kwargs else resource.function() # pyright: ignore[reportPrivateUsage] - return str(result) - except Exception as exc: + return result + except Exception: logger.exception("Failed to read resource '%s' from skill '%s'", resource_name, skill_name) - return ( - f"Error ({type(exc).__name__}): Failed to read resource" - f" '{resource_name}' from skill '{skill_name}'." - ) + return f"Error: Failed to read resource '{resource_name}' from skill '{skill_name}'." return f"Error: Resource '{resource.name}' has no content or function." @@ -707,6 +1105,60 @@ def _discover_resource_files( return resources +def _discover_script_files( + skill_dir_path: str, + extensions: tuple[str, ...] = DEFAULT_SCRIPT_EXTENSIONS, +) -> list[str]: + """Scan a skill directory for script files matching *extensions*. + + Recursively walks *skill_dir_path* and collects files whose extension + is in *extensions*. Each candidate is validated against path-traversal + and symlink-escape checks; unsafe files are skipped with a warning. + + Args: + skill_dir_path: Absolute path to the skill directory to scan. + extensions: Tuple of allowed script extensions (e.g. ``(".py",)``). + + Returns: + Relative script paths (forward-slash-separated) for every + discovered file that passes security checks. + """ + skill_dir = Path(skill_dir_path).absolute() + root_directory_path = str(skill_dir) + scripts: list[str] = [] + normalized_extensions = {e.lower() for e in extensions} + + for script_file in skill_dir.rglob("*"): + if not script_file.is_file(): + continue + + if script_file.suffix.lower() not in normalized_extensions: + continue + + script_full_path = str(Path(os.path.normpath(script_file)).absolute()) + + if not _is_path_within_directory(script_full_path, root_directory_path): + logger.warning( + "Skipping script '%s': resolves outside skill directory '%s'", + script_file, + skill_dir_path, + ) + continue + + if _has_symlink_in_path(script_full_path, root_directory_path): + logger.warning( + "Skipping script '%s': symlink detected in path under skill directory '%s'", + script_file, + skill_dir_path, + ) + continue + + rel_path = script_file.relative_to(skill_dir) + scripts.append(_normalize_resource_path(str(rel_path))) + + return scripts + + def _validate_skill_metadata( name: str | None, description: str | None, @@ -902,6 +1354,7 @@ def _read_file_skill_resource(skill: Skill, resource_name: str) -> str: def _discover_file_skills( skill_paths: str | Path | Sequence[str | Path] | None, resource_extensions: tuple[str, ...] = DEFAULT_RESOURCE_EXTENSIONS, + script_extensions: tuple[str, ...] = DEFAULT_SCRIPT_EXTENSIONS, ) -> dict[str, Skill]: """Discover, parse, and load all file-based skills from the given paths. @@ -912,6 +1365,7 @@ def _discover_file_skills( Args: skill_paths: Directory path(s) to scan, or ``None`` to skip. resource_extensions: File extensions recognized as resources. + script_extensions: File extensions recognized as scripts. Returns: A dict mapping skill name → :class:`Skill`. @@ -955,6 +1409,10 @@ def _discover_file_skills( reader = (lambda s, r: lambda: _read_file_skill_resource(s, r))(file_skill, rn) file_skill.resources.append(SkillResource(name=rn, function=reader)) + # Discover and attach file-based scripts as SkillScript instances + for sn in _discover_script_files(skill_path, script_extensions): + file_skill.scripts.append(SkillScript(name=sn, path=sn)) + skills[file_skill.name] = file_skill logger.info("Loaded skill: %s", file_skill.name) @@ -966,6 +1424,7 @@ def _load_skills( skill_paths: str | Path | Sequence[str | Path] | None, skills: Sequence[Skill] | None, resource_extensions: tuple[str, ...], + script_extensions: tuple[str, ...], ) -> dict[str, Skill]: """Discover and merge skills from file paths and code-defined skills. @@ -977,11 +1436,12 @@ def _load_skills( skill_paths: Directory path(s) to scan for ``SKILL.md`` files, or ``None``. skills: Code-defined :class:`Skill` instances, or ``None``. resource_extensions: File extensions recognized as discoverable resources. + script_extensions: File extensions recognized as discoverable scripts. Returns: A dict mapping skill name → :class:`Skill`. """ - result = _discover_file_skills(skill_paths, resource_extensions) + result = _discover_file_skills(skill_paths, resource_extensions, script_extensions) if skills: for code_skill in skills: @@ -1017,19 +1477,50 @@ def _create_resource_element(resource: SkillResource) -> str: return f" " +def _create_script_element(script: SkillScript) -> str: + """Create an XML ``" + return f"