Commit Graph

17 Commits

  • .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
  • .NET: [BREAKING] Change *Provider StateKey to list of StateKeys (#4395)
    * Change *Provider StateKey to list of StateKeys
    
    * Add more statekey validation tests
    
    * Address PR comments
  • [BREAKING] Add response filter for store input in *Providers (#4327)
    * Add response filter for store input for *Providers
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address feedback
    
    * Apply suggestions from code review
    
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
  • .NET: Fix case-sensitive property mismatch in CosmosChatHistoryProvider queries (#3485)
    * Initial plan
    
    * Fix case-sensitivity bug in Cosmos queries and add tests
    
    Co-authored-by: markwallace-microsoft <127216156+markwallace-microsoft@users.noreply.github.com>
    
    * Fix style issues and update tests for new API
    
    Co-authored-by: westey-m <164392973+westey-m@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: westey <164392973+westey-m@users.noreply.github.com>
  • .NET: [BREAKING] Workflows API Review Naming Changes (Part 1?) (#4090)
    * refactor: Normalize Run/RunStreaming with AIAgent
    
    * refactor: Clarify Session vs. Run -level concepts
    
    * Rename RunId to SessionId to better match Run/Session terminology in AIAgent
    * [BREAKING]: Will break existing checkpointed sessions in CosmosDb due to field rename
    
    * refactor: Rename and simplify interface around getting typed data out of ExternalRequest/Response
    
    * Also adds hints around using value types in PortableValue
    
    * refactor: Rename AddFanInEdge to AddFanInBarrierEdge
    
    This will prevent a breaking change later when we introduce a programmable FanIn edge, analogous to the FanOut edge's EdgeSelector.
    
    The goal, in the long run is to support a number of different FanIn scenarios, with naive FanIn (no barrier) by default, similar to FanOut.
    
    * refactor: AsAgent(this Workflow, ...) => AsAIAgent(...)
    
    * misc - part1: SwitchBuilder internal
    
    ---------
    
    Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
  • .NET: Surface downstream experimental flags and remove unnecessary suppressions (#3968)
    * Surface downstream experimental flags and remove unecessary suppressions
    
    * Fix format error
    
    * Fix file encoding.
    
    * Address PR comments.
  • .NET: [BREAKING] Refactor providers to move common functionality to base (#3900)
    * Move common functionality to provider base classes
    
    Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR comments.
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: [BREAKING] Add session StateBag for state storage and support multiple providers on the Agent (#3806)
    * .NET: [BREAKING] Add session statebag to use for state storage instead of inside providers (#3737)
    
    * Add a StateBag to AgentSession and pass Agent and AgentSession to AIContextProvider and ChatHistoryProviders
    
    * Convert all AIContextProviders to use the statebag
    
    * Update InMemoryChatHistoryProvider to use StateBag
    
    * Update Comsos and Workflow ChatHistoryProviders
    
    * Update 3rd party chat history storage sample.
    
    * Remove serialize method from providers
    
    * Replacing provider factories with properties
    
    * Remove Providers from Session and flatten state bag serialization
    
    * Update samples to use getservice on agent
    
    * Updated additional session types to serialize statebag
    
    * Fix regression
    
    * Address PR comments
    
    * Address PR comments.
    
    * Fix formatting
    
    * Fix unit tests
    
    * Remove InMemoryAgentSession since it is not required anymore.
    
    * Address PR comments
    
    * Convert sessions for A2AAgent, ChatClientAgent, CopilotStudioAgent and GithubCopilotAgent to use regular json serialization.
    
    * Fix durable agent session jso usgae
    
    * Add jso to InMemory and Workflow ChatHistoryProviders
    
    * Update InMemoryChatHistoryProvider to use an options class for it's many optional settings.
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR feedback
    
    * Fix verification bug.
    
    * Improve state bag thread safety
    
    * Address PR comments and fix unit tests
    
    * Address PR comments
    
    * Fix unit test
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Add a public StateKey property to providers (#3810)
    
    * .NET: [BREAKING] Update providers in such a way that they can participate in a pipeline (#3846)
    
    * Make providers pipeline capable
    
    * Fix unit tests
    
    * Move source stamping to providers from base class
    
    * Also update samples.
    
    * Address PR comments
    
    * Rename AsAgentRequestMessageSourcedMessage to WithAgentRequestMessageSource
    
    * .NET: [BREAKING] Add consistent message filtering to all providers. (#3851)
    
    * Add consistent message filtering to all providers.
    
    * Remove old chat history filtering classes
    
    * Fix merge issues
    
    * Fix unit test
    
    * Enforce non-nullable property
    
    * Fix merging bug and make troubleshooting source info easier by adding tostring implementation
    
    * .NET: [BREAKING] Add support for multiple AIContextProviders on a ChatClientAgent (#3863)
    
    * Add support for multiple AIContextProviders on a ChatClientAgent
    
    * Address PR comments and fix tests
    
    * Address PR comments.
    
    * .NET: [BREAKING]Delay AIContext Materialization until the end of the pipeline is reached. (#3883)
    
    * Delay AIContext Materialization until the end of the pipeline is reached.
    
    * Address PR comments.
    
    * Address PR comments
    
    * Modify InvokedContext to be immutable (#3888)
    
    * .NET: Address Feedback on StateBag feature branch PR (#3910)
    
    * Address Feedback on statebag feature branch PR
    
    * Update dotnet/src/Microsoft.Agents.AI.DurableTask/CHANGELOG.md
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR comments
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: [BREAKING] Add ability to mark the source of Agent request messages and use that for filtering (#3540)
    * Add ability to mark the source of Agent request messages and use that for filtering
    
    * Add support for source, in addition to source type, and add unit tests for automatic stamping
    
    * Address PR comments.
    
    * Add merge fixes
    
    * Address PR comments
  • .NET: Rename ChatMessageStore to ChatHistoryProvider (#3375)
    * Rename ChatMessageStore to ChatHistoryProvider
    
    * Fix merge issue
    
    * Fixed PR comments
    
    * Fix tests after property rename
    
    * Add unit tests and fix merge issues
    
    * Fix encoding
  • .NET: [Breaking] Allow passing auth token credential to cosmosdb extensions (#3250)
    * allow passing token credentials to cosmosdb extensions
    
    * Update dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosDBWorkflowExtensions.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosDBWorkflowExtensions.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/src/Microsoft.Agents.AI.CosmosNoSql/CosmosDBChatExtensions.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: [BREAKING] Change GetNewThread and DeserializeThread to async (#3152)
    * Change GetNewThread and DeserializeThread plus ChatMessageStore and AIContextProvider Factories to async
    
    * Merge fixes
  • .NET: [BREAKING] Refactor ChatMessageStore methods to be similar to AIContextProvider and add filtering support (#2604)
    * Refactor ChatMessageStore methods to be similar to AIContextProvider
    
    * Fix file encoding
    
    * Ensure that AIContextProvider messages area also persisted.
    
    * Update formatting and seal context classes
    
    * Improve formatting
    
    * Remove optional messages from constructor and add unit test
    
    * Add ChatMessageStore filtering via a decorator
    
    * Update sample and cosmos message store to store AIContextProvider messages in right order. Fix unit tests.
    
    * Update Workflowmessage store to use aicontext provider messages.
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Apply suggestions from code review
    
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
    
    * Improve xml docs messaging
    
    * Address code review comments.
    
    * Also notify message store on failure
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
  • .NET: Cosmos DB UT Fast Skip (For Non-Configured Local envs) (#2906)
    * Cosmos DB UT Fast Skip (Non-Configured Local envs) + Long running UT skip in pipeline when no CosmosDB changes happened
    
    * Force a CosmosDB source code change to trigger the pipeline
    
    * Address possible string boolean mismatch
    
    * Add debug
    
    * Enabling emulator always when running IT
  • .NET: Add Cosmos DB implementations for ChatMessageStore and CheckpointStore. (#1838)
    * draft commit
    
    * Added Cosmos agent thread and tests
    
    * revert unnecessary changes and fix tests
    
    * add multi-tenant support with hierarchical partition keys (and tests).
    
    * enhance transactional batch
    
    * address review comments
    
    * Address PR review comments from @westey-m
    
    * Merge upstream/main - resolve slnx conflicts
    
    * use param validation helpers
    
    * Replace useManagedIdentity boolean with TokenCredential parameter
    
    * Remove redundant suppressions and fix tests
    
    * Rename project from Microsoft.Agents.AI.Abstractions.CosmosNoSql to Microsoft.Agents.AI.CosmosNoSql
    
    * Refactor constructors to use chaining pattern
    
    * Reorder deserialization constructor parameters for consistency
    
    * Remove database/container IDs from serialized state
    
    * Remove auto-generation of MessageId
    
    * Optimize AddMessagesAsync to avoid enumeration when possible
    
    * Add MaxMessagesToRetrieve to limit context window
    
    * Make Role nullable instead of defaulting
    
    * Fix net472 build without rebasing 19 commits
    
    * Add Cosmos DB emulator to CI workflow
    
    * Fix Cosmos DB emulator tests: use Skip.If instead of Assert.Fail and start emulator before unit tests
    
    * Replace Skip.If() with conditional return to fix compilation
    
    * Use env var to skip Cosmos tests on non-Windows CI
    
    * Add Xunit.SkippableFact package to properly skip Cosmos tests on Linux
    
    * Change [Fact] to [SkippableFact] for proper test skipping behavior
    
    * Remove stale Microsoft.Agents.AI.Abstractions.CosmosNoSql directory
    
    * Fix code formatting: add braces, this. qualifications, and final newlines
    
    * Fix file encoding to UTF-8 with BOM, fix import ordering, and remove unnecessary using directives
    
    * Convert backing fields to auto-properties and remove Azure.Identity using directive
    
    * Fix CosmosChatMessageStore.cs encoding back to UTF-8 with BOM
    
    * Fix test file formatting: indentation, encoding, imports, this. qualifications, naming conventions, and simplify new expressions
    
    * Fix const field naming violations: Remove s_ prefix from const fields and add this. qualification to Dispose call
    
    * Add local .editorconfig for Cosmos DB tests to suppress IDE0005 false positives from multi-targeting
    
    * Fix IDE1006 naming violations: Rename TestDatabaseId to s_testDatabaseId and add final newlines
    
    * Address PR review comments
    
    Address Wesley's review comments:
    
    - Remove Cosmos DB package references from core projects
    
    - Delete duplicate test files from old package structure
    
    - Remove redundant parameter validation from extension methods
    
    Address Kiran's review comments:
    
    - Remove redundant 429 retry logic (SDK handles automatically)
    
    - Add explicit RequestEntityTooLarge error handling
    
    - Remove dead code in GetMessageCountAsync
    
    - Add defensive partition key validation comments
    
    * Fix IDE0001 formatting error in AgentProviderExtensions.cs. Use type alias to resolve namespace conflict between Azure.AI.Agents.Persistent.RunStatus and Microsoft.Agents.AI.Workflows.RunStatus. This eliminates the need for global:: qualifier which triggered the formatter warning.
    
    * Update package versions for Aspire 13.0.0 compatibility
    
    * Fix TargetFrameworks in Cosmos DB projects
    
    - Replace  with  which is defined in Directory.Build.props
    - Fix package reference from System.Linq.Async to System.Linq.AsyncEnumerable to match Directory.Packages.props
    
    * Remove redundant counter, add partition key validation, use factory pattern for deserialization