Commit Graph

18 Commits

  • Python: replace pre-commit with prek, add PEP 723 script deps, clean up dev dependencies (#3748)
    * python: replace pre-commit with prek, add PEP 723 script deps, clean up dev dependencies
    
    - Replace pre-commit with prek (Rust-native, faster pre-commit alternative)
    - Move supported hooks to repo: builtin for zero-clone speed
    - Add new builtin hooks: trailing-whitespace, check-merge-conflict, detect-private-key, check-added-large-files
    - Update all hook versions to latest (pre-commit-hooks v6, pyupgrade v3.21.2, bandit 1.9.3, uv-pre-commit 0.10.0)
    - Add PEP 723 inline script metadata to 34 samples with external deps
    - Remove autogen-agentchat/autogen-ext from dev deps (now declared per-sample)
    - Remove unused dev deps: pytest-env, tomli-w
    - Add agent-framework-core>=1.0.0b260130 lower bound to all 21 packages
    - Update CI workflow to use j178/prek-action
    - Update docs: DEV_SETUP.md, AGENTS.md, CODING_STANDARD.md, SAMPLE_GUIDELINES.md
    
    * updated lock
    
    * python: fix prek config paths for local execution and CI workflow
    
    Remove global 'files: ^python/' filter and strip python/ prefix from all path patterns in .pre-commit-config.yaml so prek finds files when run from the python/ directory. Update CI workflow to use --cd python instead of --config path. Include trailing whitespace fixes and dev dependency cleanup.
    
    * python: move helper scripts to scripts/ folder and exclude from checks
    
    * python: exclude AGENTS.md from prek markdown code lint
    
    * python: exclude AGENTS.md and azure_ai_search sample from markdown lint
    
    * fix m365 sample
    
    * python: ignore CPY rule for samples with PEP 723 headers
    
    * fix in dev_setup
    
    * python: replace aiofiles with regular open in samples
    
    * python: suppress reportUnusedImport in markdown code block checker
    
    * python: use samples pyright config for markdown code block checker
    
    Write a temp pyrightconfig.json matching pyrightconfig.samples.json rules (typeCheckingMode=off, only reportMissingImports and reportAttributeAccessIssue). Filter output to only fail on these rules since syntax-level errors (top-level await, undefined vars) are expected in README documentation snippets.
    
    * python: use markdown-code-lint with fixed globs instead of prek file list
    
    The prek-markdown-code-lint task received all changed files including non-README markdown and files with pre-existing broken imports. Replace with the standard markdown-code-lint task which uses the correct glob patterns (README.md, packages/**/README.md, samples/**/*.md).
    
    * python: exclude READMEs with pre-existing broken imports from markdown lint
    
    * python: fix broken README code snippets instead of excluding them
    
    - ag-ui: replace TextContent (removed) with content.type == 'text'
    - durabletask: fix import path to durabletask.worker.TaskHubGrpcWorker
    - orchestrations: use constructor params instead of .participants() method
    - observability: mark deprecated code blocks as plain text, filter
      reportMissingImports to agent_framework modules only
    - remove README excludes from markdown-code-lint task
    
    * add revision to gaia download
    
    * feat(python): parallelize checks across packages
    
    Run (package × task) cross-product in parallel using ThreadPoolExecutor
    and subprocesses. Key changes:
    
    - Add scripts/task_runner.py with shared parallel execution engine
    - Update run_tasks_in_packages_if_exists.py to accept multiple tasks
    - Update run_tasks_in_changed_packages.py with --files flag and parallel support
    - Add check-packages poe task (fmt+lint+pyright+mypy in parallel)
    - Add prek-markdown-code-lint and prek-samples-check with change detection
    - Split CI code quality workflow into parallel prek and mypy jobs
    - Update DEV_SETUP.md to document new parallel behavior
    
    Core package changes still trigger checks on all packages.
    
    * feat(ci): split code quality into 4 parallel jobs
    
    Split the single prek job into parallel jobs:
    - pre-commit-hooks: lightweight hooks (SKIP=poe-check)
    - package-checks: fmt/lint/pyright/mypy via check-packages
    - samples-markdown: samples-lint, samples-syntax, markdown-code-lint
    - mypy: change-detected mypy checks
    
    All 4 jobs run concurrently (×2 Python versions = 8 runners).
    
    * feat(ci): use only Python 3.10 for code quality checks
    
    * refactor(python): add future annotations and remove quoted types
    
    Add `from __future__ import annotations` to 93 package files that
    used quoted string annotations, then run pyupgrade --py310-plus to
    remove the now-unnecessary quotes.
    
    Fixes https://github.com/microsoft/agent-framework/issues/3578
  • [BREAKING] Python: Move single-config fluent methods to constructor parameters (#3693)
    * Move single-config fluent methods to constructor parameters
    
    * Updates
    
    * Adjust magentic and group chat
  • [BREAKING] Python: Refactor workflow events to unified discriminated union pattern (#3690)
    * Refactor events
    
    * Merge main
    
    * Fixes
    
    * Cleanup
    
    * Update samples and tests
    
    * Remove unused imports
    
    * PR feedback
    
    * Merge main. Add properties for events to help typing
    
    * Formatting
    
    * Cleanup
    
    * use builtins.type to avoid shadowing by WorkflowEvent.type attribute
    
    * Final improvements
  • [BREAKING] Python: Refactor SharedState to State with sync methods and superstep caching (#3667)
    * Refactor SharedState to State with sync methods and superstep caching
    
    * Fixes
    
    * Address PR feedback
    
    * Remove dead links
    
    * Fix lab test import
  • Python: [Breaking] Simplified Content types to a single class with classmethod constructors. (#3252)
    * ported Content to a new model
    
    * fixed linting
    
    * fixes
    
    * fixed data format handling
    
    * fix for 3.10 mypy
    
    * fix
    
    * fix int test
  • Python: Add tool call/result content types and update connectors and samples (#2971)
    * Add new AI content types and image tool support
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Add Python content types for tool calls/results and image generation tool support
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Address review feedback for tool content and samples
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Tighten image generation typing and sample tools list
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Align image generation output typing
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Handle MCP naming, image options mapping, and connector tool content
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Allow MCP call in function approval request
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Remove raw image_generation tool remapping
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Restore Anthropic tool_use to function calls unless code execution
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Fix lint issues for hosted file docstring and MCP parsing
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Import ChatResponse types in Anthropic client
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Fix Anthropics citation type imports and MCP typing for handoff/tools
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * Skip lightning tests without agentlightning and fix function call import
    
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    
    * fix lint on lab package
    
    * rebuilt anthropic parsing
    
    * redid anthropic parsing
    
    * typo
    
    * updated parsing and added missing docstrings
    
    * fix tests
    
    * mypy fixes
    
    * second mypy fix
    
    * add new class to other samples
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
    Co-authored-by: eavanvalkenburg <github@vanvalkenburg.eu>
  • Python: [BREAKING] Observability updates (#2782)
    * fixes Python: Add env_file_path parameter to setup_observability() similar to AzureOpenAIChatClient
    Fixes #2186
    
    * WIP on updates using configure_azure_monitor
    
    * improved setup and clarity
    
    * fixed root .env.example
    
    * revert changes
    
    * updated files
    
    * updated sample
    
    * updated zero code
    
    * test fixes and fixed links
    
    * fix devui
    
    * removed planning docs
    
    * added enable method and updated readme and samples
    
    * clarified docstring
    
    * add return annotation
    
    * updated naming
    
    * update capatilized version
    
    * updated readme and some fixes
    
    * updated decorator name inline with the rest
    
    * feedback from comments addressed
  • Python: Update lab packages and installation instructions (#1687)
    * update lab packages and installation instructions
    
    * fix dep
  • Python: [BREAKING] Update Agent Framework Lab Lightning to use Agent-lightning v0.2.0 API (#1644)
    * Merge changes from AGL release
    
    * Merge changes from AGL release
    
    * fix mypy
    
    * fix tool call with pydantic
    
    * Apply suggestion from @ekzhu
    
    * fix lint
    
    ---------
    
    Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
  • Python: Update lab test trigger (#1632)
    * Update lab test trigger
    
    * fix tests
  • Python: [BREAKING] added SerializationMixin and applied to contents, agents, chat client… (#1012)
    * added SerializationMixin and applied to contents, agents, chat clients, removed AFBaseModel
    
    * fix annotations type
    
    * mypy fixes
    
    * fix tests
    
    * fix serializable subvalues and added large docstring
    
    * updated indents in code block
    
    * fixed exported urls
  • Python: Add Agent Framework Lab Lightning package with RL training examples (#937)
    * add math agent
    
    * .
    
    * update
    
    * update debug mode
    
    * add tau2 training
    
    * .
    
    * .
    
    * .
    
    * .
    
    * add tests
    
    * .
    
    * revert observability
    
    * update readme
    
    * fix task serialization issue
    
    * fix exception
    
    * add inline docs
    
    * update readme
    
    * update pyproject toml
    
    * minor fix
    
    * update and use git lfs
    
    * update
    
    * update ignore file to use lab specific
    
    * fix type
    
    * update depedency
    
    ---------
    
    Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
  • Python: consolidate lab packages into a single one; update contribution guidelines (#940)
    * consolidate lab packages into a single one; update contribution guidelines
    
    * update dep list
    
    * add poe tasks; fix tests and lint erros
    
    * add lab tests for CI
    
    * fix test
    
    * update root pyproject.toml
  • Python: [BREAKING] updated structure and samples (#875)
    * updated structure and samples
    
    * updated names and removed cross tests
    
    * updated projects etc
    
    * updated tests
    
    * updated test
    
    * test fixes
    
    * removed devui for now
    
    * updated all-tests task
    
    * removed old style configs
    
    * remove coverage from tests
    
    * updated to unit tests with all-tests
    
    * updated foundry everywhere
    
    * fix azure ai tests
    
    * fix merge tests
    
    * fix mypy
  • Python: Add tau2 benchmark integration with comprehensive testing and documentation (#817)
    * first commit to tau2-bench
    
    * tau2-bench agent
    
    * tau2 agent
    
    * add condition
    
    * checkpoint
    
    * bug fix
    
    * add tests
    
    * fix tests
    
    * add comments
    
    * add comments
    
    * minor fix
    
    * fix
    
    * batch test script
    
    * .
    
    * init.bak -> init.py
    
    * fix mypy
    
    * update readme
    
    * fix env
    
    * remove temp files
    
    * setup tests
    
    * fix gaia tasks
    
    * fix tau2 tests
    
    * fix coverage
    
    * fix default version
    
    * update cookiecutter template
    
    ---------
    
    Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>