11 Commits

Author SHA1 Message Date
George Weale c840dbe991 fix(samples): make the MCP auth sample actually enforce auth, move MCP samples off the deprecated toolset name, and correct code execution claims
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 963555685
2026-08-12 11:17:12 -07:00
Kathy Wu a61d8ecf29 fix(mcp): reject stdio MCP servers declared in agent configs by default
Loading an agent config that declared a stdio MCP server launched the
config-supplied `command` as a local process, before the model was ever
contacted. `McpToolset.from_config()` now rejects `stdio_server_params` and
`stdio_connection_params` unless the operator opts in by setting
`ADK_ALLOW_CONFIG_STDIO_MCP_SERVERS=1`. Remote transports
(`sse_connection_params`, `streamable_http_connection_params`) and toolsets
constructed in Python code are unaffected.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 962401277
2026-08-10 15:28:04 -07:00
George Weale 13168602af chore: remove stale internal references from samples and docs
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 960573273
2026-08-06 16:47:05 -07:00
Kathy Wu 3962d0bca8 fix: Add debug level logging to mcp sse agent sample
We gated the HTTP debug info behind debug level logging - this fixes the sample agent so that it returns the debug info

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 940676911
2026-06-30 15:04:41 -07:00
Shangjie Chen 8a7656b857 refactor(ci): Consolidate compliance checks into pre-commit hook
Move custom file compliance checks (logger pattern, future annotations,
cli imports, mTLS endpoints) from GHA inline bash scripts to a unified
python script (compliance_checks.py) and expose it as a local pre-commit hook.
Remove the compliance-check job from CI workflow.

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 940081615
2026-06-29 15:59:28 -07:00
Kathy Wu 4c4f77ae39 feat: HTTP traces for MCP server requests/errors
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 938200678
2026-06-25 14:38:56 -07:00
Milen Kovachev 3cbcefce9f chore: add missing Apache 2.0 license headers
Merge https://github.com/google/adk-python/pull/6155

**Please ensure you have read the [contribution guide](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) before creating a pull request.**

### Link to Issue or Description of Change

**1. Link to an existing issue (if applicable):**
N/A

**2. Or, if no issue exists, describe the change:**

**Problem:**
The repository is missing Apache 2.0 license headers across 155 files. This is required by Google OSPO.

**Solution:**
Prepended the standard Apache 2.0 open-source license header to all flagged files. The copyright year was dynamically assigned based on each file's first commit year in git history.

### Testing Plan

_Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes._

**Unit Tests:**

- [ ] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.

_Please include a summary of passed `pytest` results._
N/A - This PR only adds comments (license headers) to the top of files and contains zero functional code changes. No new tests are needed, and existing tests should pass as-is.

**Manual End-to-End (E2E) Tests:**
N/A - No functional code was changed.

### Checklist

- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [x] New and existing unit tests pass locally with my changes.
- [ ] I have manually tested my changes end-to-end.
- [ ] Any dependent changes have been merged and published in downstream modules.

### Additional context

Co-authored-by: Shangjie Chen <deanchen@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/6155 from milenvk:fix-missing-licenses d2a264b9a812fd997daf975ec37996e6b4b7a042
PiperOrigin-RevId: 936165783
2026-06-22 11:37:57 -07:00
Wei Sun (Jack) 22adbe12d6 ci(kokoro): install addlicense tool on pre-commit presubmits
Co-authored-by: Wei Sun (Jack) <weisun@google.com>
PiperOrigin-RevId: 932061051
2026-06-14 11:44:13 -07:00
Wei (Jack) Sun d3c21d716e docs: Align Python version to 3.10+ and update README badges
Merge https://github.com/google/adk-python/pull/6107

## Summary
- Fix README claiming Python 3.11+ while the package requires `>=3.10`; sync all docs (README, AGENTS.md, adk-setup skill, two sample READMEs) to 3.10+
- Swap the rate-limited shields.io PyPI downloads badge for a pepy.tech one (the old badge rendered "rate limited by upstream service")
- Add a Python Unit Tests CI status badge

## Test plan
- [ ] Confirm README badges render correctly on GitHub (downloads + unit test status)
- [ ] Verify Python version wording matches `requires-python = ">=3.10"` in pyproject.toml

Co-authored-by: Wei Sun (Jack) <weisun@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/6107 from google:docs/readme-badges-python-310 bdfa1c125375abe94c343389702994cbc8857e7d
PiperOrigin-RevId: 931539712
2026-06-13 00:26:26 -07:00
Kathy Wu fe497a4f5d feat: Migrate McpToolset to AsyncAuthorizedSession for mTLS support
Use Google's official async client to support mTLS for GCP API calls. This resolves the issue where we were failing mTLS policy due to unbound tokens.

Note: This CL also removes the legacy bound-token patch from mcp_tool.py and mcp_toolset.py, which constitutes a behavior change beyond the mTLS feature.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 931326860
2026-06-12 14:14:22 -07:00
Sasha Sobran 162279358c chore: switch main to v2.0.0 GA (transition to v2)
Co-authored-by: Bo Yang <ybo@google.com>
Co-authored-by: Wei Sun (Jack) <weisun@google.com>
Co-authored-by: George Weale <gweale@google.com>
Co-authored-by: Swapnil Agarwal <swapnilag@google.com>
Co-authored-by: Xuan Yang <xygoogle@google.com>
Co-authored-by: Shangjie Chen <deanchen@google.com>
Co-authored-by: Yifan Wang <wanyif@google.com>
Co-authored-by: Kathy Wu <wukathy@google.com>
2026-05-19 02:01:33 +00:00