Commit Graph

22 Commits

  • [BREAKING] Obsoleting ReflectingExecutor in favor of source gen (#3380)
    * Initial working version with tests.
    
    * Updates to validate class data once instead of for each handler method. Also updated Diagnostics Ids to format of MAFGENWF{NUM}
    
    * Formatting and trying to fix generation project pack.
    
    * Another atempt at getting the genrators project to build.
    
    * More attempts to fix generator build and pack.
    
    * Fixing file encodings.
    
    * Initail round of cleanup.
    
    * Trying to fix packing.
    
    * Still trying to fix pipeline pack.
    
    * Remove obsolescence markers, sample updates, and docs from generator branch.
    
    This commit separates the generator core functionality from the
    deprecation of ReflectingExecutor. The removed changes will be
    re-added in a dependent branch (wf-obsolete-reflector).
    
    馃 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
    
    * Mark ReflectingExecutor and IMessageHandler as obsolete.
    
    This commit deprecates the reflection-based handler discovery approach
    in favor of the new [MessageHandler] attribute with source generation.
    
    Changes:
    - Add [Obsolete] to ReflectingExecutor<T>, IMessageHandler<T>, IMessageHandler<T,R>
    - Add #pragma to suppress warnings in internal reflection code
    - Update Concurrent sample to use new [MessageHandler] pattern
    - Add Directory.Build.props for samples to include generator
    - Add documentation files explaining the migration
    
    馃 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
    
    * Obsoleteing Reflector-based workflow code generation in favor of Source Generators and updating some samples to use new pattern.
    
    This commit deprecates the reflection-based handler discovery approach
    in favor of the new [MessageHandler] attribute with source generation.
    
    Changes:
    - Add [Obsolete] to ReflectingExecutor<T>, IMessageHandler<T>, IMessageHandler<T,R>
    - Add #pragma to suppress warnings in internal reflection code
    - Update Concurrent sample to use new [MessageHandler] pattern
    - Add Directory.Build.props for samples to include generator
    - Add documentation files explaining the migration
    
    馃 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
    
    * Cleaning up temporary design and progress files.
    
    ---------
    
    Co-authored-by: alliscode <bentho@microsoft.com>
    Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • .NET: Upgrade to .NET 10 (#2128)
    * Upgrade to .NET 10
    
    - Require .NET 10 SDK
    - Include net10.0 assets in all assemblies
    - Move net9.0-only targets to net10.0
    - Update LangVersion to latest
    - Remove complicated distinctions between debug target TFMs and release target TFMs
    - Remove unnecessary package dependencies when built into netcoreapp
    - Clean up some ifdefs
    - Clean up some analyzer warnings
    
    * Fix CI
  • .NET: [BREAKING] refactor: Normalize WorkflowBuilder APIs (#1935)
    * [BREAKING] refactor: Normalize WorkflowBuilder APIs
    
    * "partitioner" => "assigner"
    * normalize ordering so sources always to the left of targets for edges
    * normalize parameter ordering so sources and targets are always first arguments
    * remove `params` (users should use collection expressions instead)
    
    * refactor: Align name with Python
  • .NET: [Breaking Change] Moving MAAI.AzureAI V1 Package -> MAAI.AzureAI.Persistent (V1) (#1902)
    * Update AzureAI -> AzureAI.Persistent
    
    * Fix sample reference
  • .NET: Add workflow as an agent with observability sample (#1612)
    * Add workflow as an agent with observability sample
    
    * Address comment
    
    * Fix formatting
    
    * enable sensitive data
    
    * enable sensitive data for sub agents
    
    * adjust aggregator handlers
  • refactor: [BREAKING] Remove generic Workflow<T> (#1551)
    Remove input type checking in favour of explicit `.DescribeProtocolAsync()` flow. Also removes `.AsAgentAsync()` as the validation happens at workflow run time. This makes it easier to use Workflows with DI without resorting to async-over-sync.
  • .NET: Remove reflection samples (#1460)
    * Removing usage of ReflectingExecutor<T> from workflow samples.
    
    * Removing uneeded changes.
    
    * Clean up.
    
    * Update dotnet/samples/GettingStarted/Workflows/_Foundational/01_ExecutorsAndEdges/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/GettingStarted/Workflows/_Foundational/01_ExecutorsAndEdges/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/GettingStarted/Workflows/_Foundational/02_Streaming/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/GettingStarted/Workflows/_Foundational/02_Streaming/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Updates per PR feedback.
    
    * Undo changes to generated file.
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: [BREAKING] Propagate CancellationToken into Workflow Executors and message handlers (#1280)
    * feat: Propagate CancellationToken to Executors
    
    * Also adds cancellation propagation to `Executor`-accessible APIs
    * Adds registrators for cancellable handlers to `RouteBuilder`
    * [BREAKING]: Adds `CancellationToken` to `IMessageHandler.HandleAsync`
    
    * test: Re-enable Concurrent Orchestration test
    
    * refactor: Delete unused IInputCoordinator
    
    * refactor: Remove superfluous argument qualifications
  • [BREAKING] .NET: Workflow Off-Thread Execution Mode (#1233)
    * Updates to async run loop.
    
    * fix: Workflow Onwership can be release by nonowner
    
    * fix: Incorrect handling of blockOnPending in StreamingRun
    
    Depending on whether we are running in streaming on non-streaming mode, we may be using the StreamingRun in different ways. Unfortunately, the only place we can really know what is the actual state of execution is in the RunEventStream implementations.
    
    This resulted in blocking where blocking was unneeded and occasionally not-blocking when blocking was needed.
    
    The fix is to move the logic of handling this blocking into RunEventStream implementations.
    
    * fix: Fix cleanup on error and end run
    
    This ensures we clean up the background resources correctly.
    
    * fix: Ensure we let the run loop proceed when shutting down
    
    * fix: Add timeout for Input Waiting
    
    * fix: Make the samples properly clean up `Run`s and `StreamingRun`s
    
    * fix: Simplify Declarative Workflow Run disposal pattern
    
    * Also fixes missing .Disposal() in Integration tests
    
    ---------
    
    Co-authored-by: Ben Thomas <ben.thomas@microsoft.com>
  • .NET: Re-enable ImplicitUsings in samples and clean up NoWarns (#1060)
    * Re-enable ImplicitUsings in samples and clean up NoWarns
    
    * Fix dotnet format
    
    * More dotnet format
    
    * More dotnet format
    
    ---------
    
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • .NET: Fix some more static analysis diagnostics (#1025)
    * S1006
    
    * S2219
    
    * S3236
    
    * S3260
    
    * S1125
    
    * IDE0063
    
    * IDE0062
    
    * IDE0028
  • .Net: Visualizing dotnet workflows (#882)
    * Adding more test for workflow vizualization.
    
    * Improving README for sample.
    
    * More cleanup.
    
    * Removing rendering of workflow visualization and adding basic support for mermaid format.
    
    * Adding basic mermaid tests.
    
    * Improving sample. Switching to another branch.
    
    * About to merge from main.
    
    * Formatting.
    
    * More fromatting.
    
    * Removng uneeded call to ToUpper.
    
    * Adding README.
    
    * Moving samples under workflow to workflows.
    
    * Removing uneeded README for map-reduce sample.
  • .NET: Rename workflows projects (#975)
    * Renaming Microsoft.Agent.Workflows to Microsoft.Agents.AI.Workflows
    
    * Removing local settings.
    
    * Removing remining old files from merge.
  • .NET: Change Runtime namespaces to Microsoft.Agents.AI.Runtime (#957)
    * Rename MEAI.Runtime to MAAI.Runtime.
    
    * Missed.
  • Rename AI Agent packages to use Microsoft.Agents.AI (#913)
    * Rename AI Agent packages to use Microsoft.Agents.AI
    
    * Fix for build
    
    * Fix formatting
    
    * Fix formatting
    
    * Ignore in VSTHRD200 in migration samples
    
    * Ignore in VSTHRD200 in migration samples
    
    * Add some missing projects and run format
    
    * Fix build errors
    
    * Address code review feedback
    
    * Fix merge issues
    
    ---------
    
    Co-authored-by: Mark Wallace <markwallace@microsoft.com>
  • .NET: Update Workflow Input/Output Redesign (#881)
    * feat: Make Executor id field mandatory
    
    When checkpointing is involved, it is critical to keep executor ids consistent between runs, even when recreating a new object tree for the workflow.
    
    The default id-setting mechanism generated a guid for part of the id, making it not work when restoring from a checkpoint.
    
    This change prevents this situation from arising.
    
    * feat: Enable running untyped Workflows
    
    With the change to enable delay-instantiation of executors and support for async Executor factory methods, we must instantiate the starting executor to know what are the valid input types for the workflow.
    
    To avoid forcing instantiation every time, and to better support workflows with multiple input types, we enable support for build and interacting with the base Workflow type without type annotations, and remove the requirement to know a valid input type when initiating a run.
    
    * feat: Support Output from any executor and multiple outputs.
  • .NET: Workflow getting started samples in .Net (Second batch) (#650)
    * Add loop and agents in workflows samples
    
    * Add foundry agent and workflow as agent samples
    
    * Checkpoint sample WIP
    
    * Checkpoint sample 1 Done
    
    * Add HIL samples
    
    * Fix formatting
    
    * Force folder name change step 1
    
    * Force folder name change step 2
    
    * Fix formatting
    
    * Fix formatting
    
    * Add checkpoint and rehydrate sample
    
    * _Foundational
    
    * Fix formatting
  • .NET Workflows - Update structure of samples (#645)
    * Updated
    
    * Typos
    
    * Update readme fwiw