Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Android CI

on:
pull_request:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Android CI / build
# zizmor: ignore[unpinned-images]
runs-on: ubuntu-24.04
timeout-minutes: 10

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up JDK 17
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Build and test library
run: |
chmod +x ./gradlew
./gradlew test assembleRelease --no-daemon
working-directory: client/android/GoogleMapsA2UI
84 changes: 84 additions & 0 deletions .github/workflows/cleanup-stale-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Cleanup Stale Draft PRs

on:
schedule:
- cron: '0 2 * * *' # Daily at 02:00 UTC
workflow_dispatch:
inputs:
older_than_days:
description: 'Close draft PRs older than N days'
required: false
default: '3'
type: string
dry_run:
description: 'Dry run (simulate without closing PRs or deleting branches)'
required: false
default: false
type: boolean

permissions:
pull-requests: write
contents: write

jobs:
cleanup:
name: Cleanup Draft PRs
# zizmor: ignore[unpinned-images]
runs-on: ubuntu-latest
steps:
- name: Close stale draft PRs and delete branches
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
INPUT_DAYS: ${{ inputs.older_than_days }}
INPUT_DRY_RUN: ${{ inputs.dry_run }}
run: |
DAYS="${INPUT_DAYS:-3}"
DRY_RUN="${INPUT_DRY_RUN:-false}"

echo "Searching for open draft PRs with head branch matching 'test_*' older than $DAYS day(s)..."

CUTOFF_EPOCH=$(date -d "$DAYS days ago" +%s)
echo "Cutoff timestamp: $CUTOFF_EPOCH ($(date -d "@$CUTOFF_EPOCH" --utc --iso-8601=seconds))"

PRS_JSON=$(gh pr list --repo "$GH_REPO" --state open --draft --json number,headRefName,updatedAt)

echo "$PRS_JSON" | jq -c '.[]' | while read -r pr; do
PR_NUMBER=$(echo "$pr" | jq -r '.number')
HEAD_REF=$(echo "$pr" | jq -r '.headRefName')
UPDATED_AT=$(echo "$pr" | jq -r '.updatedAt')

# Only target Copybara presubmit branches (prefix test_)
if [[ ! "$HEAD_REF" =~ ^test_ ]]; then
echo "Skipping PR #$PR_NUMBER (head branch '$HEAD_REF' does not match 'test_*')"
continue
fi

PR_EPOCH=$(date -d "$UPDATED_AT" +%s)
if [ "$PR_EPOCH" -lt "$CUTOFF_EPOCH" ]; then
echo "PR #$PR_NUMBER ($HEAD_REF, updated at $UPDATED_AT) is older than $DAYS day(s)."
if [ "$DRY_RUN" = "true" ]; then
echo "[DRY RUN] Would close PR #$PR_NUMBER and delete branch '$HEAD_REF'"
else
echo "Closing PR #$PR_NUMBER and deleting branch '$HEAD_REF'..."
gh pr close "$PR_NUMBER" --repo "$GH_REPO" --comment "Automatically closing stale presubmit draft PR and cleaning up branch." --delete-branch || \
gh pr close "$PR_NUMBER" --repo "$GH_REPO" --comment "Automatically closing stale presubmit draft PR."
fi
else
echo "Keeping PR #$PR_NUMBER ($HEAD_REF, updated at $UPDATED_AT) - active within $DAYS day(s)."
fi
done
45 changes: 45 additions & 0 deletions .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: iOS CI

on:
pull_request:
branches: [ main ]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: iOS CI / build
# Pinned to macos-15 so the bundled Xcode and iOS Simulator lineup stay stable.
# zizmor: ignore[unpinned-images]
runs-on: macos-15
timeout-minutes: 30

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Build and test package
run: |
xcodebuild test \
-scheme GoogleMapsA2UI \
-destination 'platform=iOS Simulator,name=iPhone 16' \
-skipPackagePluginValidation \
CODE_SIGNING_ALLOWED=NO
working-directory: client/ios/GoogleMapsA2UI
3 changes: 3 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ on:

jobs:
build:
name: Python CI / build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

on:
workflow_dispatch:
inputs:
dry_run:
description: "Run in dry-run mode (no tags, no publish)"
type: boolean
default: true

permissions:
contents: write
Expand Down Expand Up @@ -45,7 +50,7 @@ jobs:

- name: Install dependencies
working-directory: client/web
run: npm ci
run: npm install

- name: Setup Node for Publishing
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
Expand All @@ -60,5 +65,15 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_WOMBAT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_WOMBAT_TOKEN }}
NODE_PATH: ${{ github.workspace }}/client/web/node_modules
run: npx --prefix client/web semantic-release
DRY_RUN: ${{ inputs.dry_run }}
REF_NAME: ${{ github.ref_name }}
run: |
EXTRA_ARGS=""
if [ "$DRY_RUN" != "false" ]; then
EXTRA_ARGS="--dry-run"
fi
if [ "$REF_NAME" != "main" ]; then
EXTRA_ARGS="$EXTRA_ARGS --branches $REF_NAME"
fi
npx --prefix client/web semantic-release $EXTRA_ARGS

1 change: 1 addition & 0 deletions .github/workflows/web-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ permissions:

jobs:
build:
name: Web CI / build
# zizmor: ignore[unpinned-images]
runs-on: ubuntu-24.04
steps:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Zizmor

on:
Expand All @@ -24,3 +38,6 @@ jobs:

- name: Run zizmor
uses: zizmorcore/zizmor-action@195d10ad90f31d8cd6ea1efd6ecc12969ddbe73f # v0.5.1
with:
args: --ignore insufficient-cooldown

29 changes: 28 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,34 @@
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"breaking": true,
"release": "patch"
},
{
"type": "feat",
"release": "patch"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
}
]
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ Agentic UI Toolkit requires an API Key to use Google Maps Platform products. To

Your API Key must have the following APIs enabled in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials):

* Geocoding API
* Maps JavaScript API
* Places UI Kit
* Routes API
Expand Down
3 changes: 3 additions & 0 deletions agent/python_agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ AI Maps Grounding.
`DIRECTIONS`) and structured parameter extraction for low latency.
* `agent_with_grounding.py`: Contains `MAUIAgentWithGrounding`, extending the
base agent with Vertex AI Grounding capabilities.
* `template_tool.py`: Contains standard ADK `BaseTool` implementations
(`RenderLocalSearchTemplateTool`, `RenderDirectionsTemplateTool`,
`RenderTextOnlyTemplateTool`, and `TemplateToolset`) for template rendering.
* `agent_config.py`: Contains `AgentConfig` and `FallbackMode` configurations
(`TEXT` vs `DYNAMIC`).
* `extractor.py` & `merger.py`: Parameter extraction schemas and template
Expand Down
22 changes: 21 additions & 1 deletion agent/python_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# GMP A2UI Python Agent Package
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from template_tool import (
BaseTemplateTool,
RenderDirectionsTemplateTool,
RenderLocalSearchTemplateTool,
RenderTextOnlyTemplateTool,
TemplateToolset,
)
Loading
Loading