Skip to content

Commit 11f22b8

Browse files
authored
Merge branch 'main' into feat/openapi-tool-httpx-client-factory
2 parents 3074cd8 + e16629b commit 11f22b8

64 files changed

Lines changed: 2463 additions & 663 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/adk-sample-creator/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Use snake_case for the folder name (e.g., `dynamic_nodes`, `fan_out_fan_in`).
2727

2828
The `agent.py` should focus on demonstrating a specific feature or agent pattern. Use absolute imports for testing convenience.
2929

30+
> [!IMPORTANT]
31+
> **Model Selection**: Do not set the `model` parameter explicitly (e.g., `model="gemini-2.5-flash"`) on `Agent` instances in sample agents. Instead, let them default to the system-configured model, unless a specific model is explicitly requested by the user.
32+
3033
Choose one of the following patterns:
3134

3235
#### Pattern A: Workflows (for complex graphs)
@@ -74,7 +77,6 @@ from google.adk.tools import google_search # example
7477
```python
7578
root_agent = Agent(
7679
name="standalone_assistant",
77-
model="gemini-2.5-flash",
7880
instruction="You are a helpful assistant.",
7981
description="An assistant that can help with queries.",
8082
tools=[google_search],

.github/workflows/check-file-contents.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,37 @@ jobs:
100100
else
101101
echo "✅ No relevant Python files found."
102102
fi
103+
104+
- name: Check for hardcoded googleapis.com endpoints
105+
run: |
106+
git fetch origin ${GITHUB_BASE_REF}
107+
CHANGED_FILES=$(git diff --diff-filter=ACMR --name-only origin/${GITHUB_BASE_REF}...HEAD | grep -E '\.py$' || true)
108+
if [ -n "$CHANGED_FILES" ]; then
109+
echo "Checking for hardcoded endpoints in: $CHANGED_FILES"
110+
111+
# 1. Identify files containing any googleapis.com URL.
112+
set +e
113+
FILES_WITH_ENDPOINTS=$(grep -lE 'https?://[a-zA-Z0-9.-]+\.googleapis\.com' $CHANGED_FILES)
114+
115+
# 2. From those, identify files that are MISSING the required mTLS version.
116+
if [ -n "$FILES_WITH_ENDPOINTS" ]; then
117+
FILES_MISSING_MTLS=$(grep -L '.mtls.googleapis.com' $FILES_WITH_ENDPOINTS)
118+
fi
119+
set -e
120+
121+
if [ -n "$FILES_MISSING_MTLS" ]; then
122+
echo "❌ Found hardcoded googleapis.com endpoints without mTLS support."
123+
echo "The following files must define both standard and mTLS (.mtls.googleapis.com) endpoints"
124+
echo "to support dynamic endpoint selection as required by security policy:"
125+
echo "$FILES_MISSING_MTLS"
126+
echo ""
127+
echo "To fix this, please follow these steps:"
128+
echo "1. Initialize an AuthorizedSession with your credentials."
129+
echo "2. Use 'mtls.has_default_client_cert_source() from google-auth' to check for available client certificates."
130+
echo "3. If certificates are present, use 'session.configure_mtls_channel()'."
131+
echo "4. Dynamically select the '.mtls.' variant of the endpoint when mTLS is active."
132+
exit 1
133+
else
134+
echo "✅ All hardcoded endpoints have corresponding mTLS definitions or no endpoints found."
135+
fi
136+
fi

.github/workflows/copybara-pr-handler.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,19 @@ jobs:
5858
console.log(`Committer: ${committer}`);
5959
6060
// Check if this is a Copybara commit
61-
if (committer !== 'Copybara-Service') {
61+
const isCopybara = committer === 'Copybara-Service' ||
62+
commit.author?.email === 'genai-sdk-bot@google.com' ||
63+
message.includes('GitOrigin-RevId:') ||
64+
message.includes('PiperOrigin-RevId:');
65+
66+
if (!isCopybara) {
6267
console.log('Not a Copybara commit, skipping');
6368
continue;
6469
}
6570
6671
// Extract PR number from commit message
67-
// Pattern: "Merge https://github.com/google/adk-python/pull/3333"
68-
const prMatch = message.match(/Merge https:\/\/github\.com\/google\/adk-python\/pull\/(\d+)/);
72+
// Pattern matches both "Merge https://..." and "Merge: https://..."
73+
const prMatch = message.match(/Merge:?\s+https:\/\/github\.com\/google\/adk-python\/pull\/(\d+)/);
6974
7075
if (!prMatch) {
7176
console.log('No PR number found in Copybara commit message');

.github/workflows/issue-monitor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ jobs:
5858
REPO: ${{ github.event.repository.name }}
5959
CONCURRENCY_LIMIT: 3
6060
INITIAL_FULL_SCAN: ${{ github.event.inputs.full_scan == 'true' }}
61-
LLM_MODEL_NAME: "gemini-2.5-flash"
61+
LLM_MODEL_NAME: "gemini-3.5-flash"
6262
PYTHONPATH: contributing/samples/adk_team
6363
run: python -m adk_issue_monitoring_agent.main

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ name: Pre-commit Checks
1616

1717
on:
1818
push:
19-
branches: [main, v2]
19+
branches: [main, v1, v2]
2020
paths:
2121
- '**.py'
2222
- '.pre-commit-config.yaml'
2323
- 'pyproject.toml'
2424
pull_request:
25-
branches: [main, v2]
25+
branches: [main, v1, v2]
2626
paths:
2727
- '**.py'
2828
- '.pre-commit-config.yaml'

.github/workflows/python-unit-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ name: Python Unit Tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main, v1, v2]
66
pull_request:
7-
branches: [ main, v2 ]
7+
branches: [main, v1, v2]
88

99
permissions:
1010
contents: read
1111

1212
jobs:
1313
test:
1414
runs-on: ubuntu-latest
15+
timeout-minutes: 10
1516
strategy:
1617
matrix:
1718
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

.github/workflows/stale-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
OWNER: ${{ github.repository_owner }}
3939
REPO: adk-python
4040
CONCURRENCY_LIMIT: 3
41-
LLM_MODEL_NAME: "gemini-2.5-flash"
41+
LLM_MODEL_NAME: "gemini-3.5-flash"
4242
PYTHONPATH: contributing/samples/adk_team
4343

4444
run: python -m adk_stale_agent.main

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Thumbs.db
104104
.adk/
105105
.claude/
106106
.jetski*
107+
.antigravity*
107108
CLAUDE.md
108109
.cursor/
109110
.cursorrules

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ root_agent = Workflow(
9393
# Interactive CLI
9494
adk run path/to/my_agent
9595

96-
# Web UI
96+
# Web UI (supports multi-agent directories or pointing directly to a single agent folder)
9797
adk web path/to/agents_dir
9898
```
9999

contributing/adk_project_overview_and_architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async def health_check():
8383

8484
By default, the ADK API server expects an explicit application context in all requests (e.g., via the `/apps/{app_name}/...` path or in the payload body).
8585

86-
However, if the environment variable `ADK_DEFAULT_APP_NAME` is set, the server will automatically resolve and fall back to the default application whenever a request lacks an explicit app name:
86+
However, if the environment variable `ADK_DEFAULT_APP_NAME` is set, or if the server is running in **single agent mode** (when pointing directly to a directory containing an agent instead of a directory of agents), the server will automatically resolve and fall back to that agent as the default application whenever a request lacks an explicit app name. In single agent mode, the local agent takes precedence over the `ADK_DEFAULT_APP_NAME` environment variable.
8787

8888
- **URL Path-Rewriting (Production Endpoints)**: Requests to production endpoints that omit the `/apps/{app_name}` prefix (such as `/users/{user_id}/sessions` or `/app-info`) are automatically rewritten by an internal ASGI middleware to target the default application. (Note: `/dev` and `/builder` endpoints are excluded from rewriting).
8989
- **Agent Execution & Streaming**: Requests to `/run`, `/run_sse`, or `/run_live` that omit the `app_name` parameter in their payload body or query string will automatically resolve to the default application.

0 commit comments

Comments
 (0)