Skip to content

Commit c895b24

Browse files
authored
Merge branch 'google-gemini:main' into main
2 parents 9f0c661 + da50a1e commit c895b24

File tree

141 files changed

+6231
-2253
lines changed

Some content is hidden

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

141 files changed

+6231
-2253
lines changed

.gcp/release-docker.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,14 @@ steps:
5757
args:
5858
- -c
5959
- |
60-
export GEMINI_SANDBOX_IMAGE_TAG=$$(cat /workspace/image_tag.txt)
61-
echo "Using Docker image tag for publish: $$GEMINI_SANDBOX_IMAGE_TAG"
62-
npm run publish:sandbox
60+
set -e
61+
IMAGE_TAG=$(cat /workspace/image_tag.txt)
62+
BASE_IMAGE_URI=$(npm run -s config get sandboxImageUri)
63+
IMAGE_URI_NO_TAG=${BASE_IMAGE_URI%:*}
64+
FINAL_IMAGE_URI="${IMAGE_URI_NO_TAG}:${IMAGE_TAG}"
65+
66+
echo "Pushing sandbox image: ${FINAL_IMAGE_URI}"
67+
$_CONTAINER_TOOL push "${FINAL_IMAGE_URI}"
6368
env:
6469
- 'GEMINI_SANDBOX=$_CONTAINER_TOOL'
6570

.github/workflows/ci.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292

9393
- name: Publish Test Report (for non-forks)
9494
if: always() && (github.event.pull_request.head.repo.full_name == github.repository)
95-
uses: dorny/test-reporter@v1
95+
uses: dorny/test-reporter@v2
9696
with:
9797
name: Test Results (Node ${{ matrix.node-version }})
9898
path: packages/*/junit.xml
@@ -124,7 +124,7 @@ jobs:
124124
pull-requests: write # For commenting
125125
strategy:
126126
matrix:
127-
node-version: [20.x, 22.x, 24.x] # Should match the test job's matrix
127+
node-version: [22.x] # Reduce noise by only posting the comment once
128128
steps:
129129
- name: Checkout repository
130130
uses: actions/checkout@v4
@@ -144,3 +144,22 @@ jobs:
144144
core_full_text_summary_file: coverage_artifact/core/coverage/full-text-summary.txt
145145
node_version: ${{ matrix.node-version }}
146146
github_token: ${{ secrets.GITHUB_TOKEN }}
147+
148+
codeql:
149+
name: CodeQL
150+
runs-on: ubuntu-latest
151+
permissions:
152+
actions: read
153+
contents: read
154+
security-events: write
155+
steps:
156+
- name: Checkout
157+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
158+
159+
- name: Initialize CodeQL
160+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3
161+
with:
162+
languages: javascript
163+
164+
- name: Perform CodeQL Analysis
165+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3

.github/workflows/community-report.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
jobs:
1414
generate-report:
1515
name: Generate Report 📝
16+
if: ${{ github.repository == 'google-gemini/gemini-cli' }}
1617
runs-on: ubuntu-latest
1718
permissions:
1819
issues: write
@@ -24,7 +25,7 @@ jobs:
2425
steps:
2526
- name: Generate GitHub App Token 🔑
2627
id: generate_token
27-
uses: actions/create-github-app-token@v1
28+
uses: actions/create-github-app-token@v2
2829
with:
2930
app-id: ${{ secrets.APP_ID }}
3031
private-key: ${{ secrets.PRIVATE_KEY }}
@@ -162,14 +163,13 @@ jobs:
162163
163164
- name: 🤖 Get Insights from Report
164165
if: steps.report.outputs.report_body != ''
165-
uses: google-gemini/gemini-cli-action@41c0f1b3cbd1a0b284251bd1aac034edd07a3a2f
166+
uses: google-gemini/gemini-cli-action@df3f890f003d28c60a2a09d2c29e0126e4d1e2ff
166167
env:
167168
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
168169
with:
169170
version: 0.1.8-rc.0
170171
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
171172
OTLP_GCP_WIF_PROVIDER: ${{ secrets.OTLP_GCP_WIF_PROVIDER }}
172-
OTLP_GCP_SERVICE_ACCOUNT: ${{ secrets.OTLP_GCP_SERVICE_ACCOUNT }}
173173
OTLP_GOOGLE_CLOUD_PROJECT: ${{ secrets.OTLP_GOOGLE_CLOUD_PROJECT }}
174174
settings_json: |
175175
{

.github/workflows/gemini-automated-issue-triage.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
triage-issue:
99
timeout-minutes: 5
10+
if: ${{ github.repository == 'google-gemini/gemini-cli' }}
1011
permissions:
1112
issues: write
1213
contents: read
@@ -18,28 +19,32 @@ jobs:
1819
steps:
1920
- name: Generate GitHub App Token
2021
id: generate_token
21-
uses: actions/create-github-app-token@v1
22+
uses: actions/create-github-app-token@v2
2223
with:
2324
app-id: ${{ secrets.APP_ID }}
2425
private-key: ${{ secrets.PRIVATE_KEY }}
2526

2627
- name: Run Gemini Issue Triage
27-
uses: google-gemini/gemini-cli-action@41c0f1b3cbd1a0b284251bd1aac034edd07a3a2f
28+
uses: google-gemini/gemini-cli-action@df3f890f003d28c60a2a09d2c29e0126e4d1e2ff
2829
env:
2930
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
3031
with:
3132
version: 0.1.8-rc.0
3233
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
3334
OTLP_GCP_WIF_PROVIDER: ${{ secrets.OTLP_GCP_WIF_PROVIDER }}
34-
OTLP_GCP_SERVICE_ACCOUNT: ${{ secrets.OTLP_GCP_SERVICE_ACCOUNT }}
3535
OTLP_GOOGLE_CLOUD_PROJECT: ${{ secrets.OTLP_GOOGLE_CLOUD_PROJECT }}
3636
settings_json: |
3737
{
3838
"coreTools": [
3939
"run_shell_command(gh label list)",
4040
"run_shell_command(gh issue edit)",
4141
"run_shell_command(gh issue list)"
42-
]
42+
],
43+
"telemetry": {
44+
"enabled": true,
45+
"target": "gcp"
46+
},
47+
"sandbox": false
4348
}
4449
prompt: |
4550
You are an issue triage assistant. Analyze the current GitHub issue and apply the most appropriate existing labels.

.github/workflows/gemini-scheduled-issue-triage.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
jobs:
99
triage-issues:
1010
timeout-minutes: 10
11+
if: ${{ github.repository == 'google-gemini/gemini-cli' }}
1112
runs-on: ubuntu-latest
1213
permissions:
1314
contents: read
@@ -16,7 +17,7 @@ jobs:
1617
steps:
1718
- name: Generate GitHub App Token
1819
id: generate_token
19-
uses: actions/create-github-app-token@v1
20+
uses: actions/create-github-app-token@v2
2021
with:
2122
app-id: ${{ secrets.APP_ID }}
2223
private-key: ${{ secrets.PRIVATE_KEY }}
@@ -38,30 +39,33 @@ jobs:
3839
echo "📝 Setting output for GitHub Actions..."
3940
echo "issues_to_triage=$ISSUES" >> "$GITHUB_OUTPUT"
4041
41-
echo "💾 Writing issues to temporary file for Gemini CLI..."
42-
echo "$ISSUES" > /tmp/issues_to_triage.json
43-
4442
echo "✅ Found $(echo "$ISSUES" | jq 'length') issues to triage! 🎯"
4543
4644
- name: Run Gemini Issue Triage
4745
if: steps.find_issues.outputs.issues_to_triage != '[]'
48-
uses: google-gemini/gemini-cli-action@41c0f1b3cbd1a0b284251bd1aac034edd07a3a2f
46+
uses: google-gemini/gemini-cli-action@df3f890f003d28c60a2a09d2c29e0126e4d1e2ff
4947
env:
5048
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
49+
ISSUES_TO_TRIAGE: ${{ steps.find_issues.outputs.issues_to_triage }}
50+
REPOSITORY: ${{ github.repository }}
5151
with:
5252
version: 0.1.8-rc.0
5353
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
5454
OTLP_GCP_WIF_PROVIDER: ${{ secrets.OTLP_GCP_WIF_PROVIDER }}
55-
OTLP_GCP_SERVICE_ACCOUNT: ${{ secrets.OTLP_GCP_SERVICE_ACCOUNT }}
5655
OTLP_GOOGLE_CLOUD_PROJECT: ${{ secrets.OTLP_GOOGLE_CLOUD_PROJECT }}
5756
settings_json: |
5857
{
5958
"coreTools": [
59+
"run_shell_command(echo)",
6060
"run_shell_command(gh label list)",
6161
"run_shell_command(gh issue edit)",
62-
"run_shell_command(gh issue list)",
63-
"run_shell_command(cat /tmp/issues_to_triage.json)"
64-
]
62+
"run_shell_command(gh issue list)"
63+
],
64+
"telemetry": {
65+
"enabled": true,
66+
"target": "gcp"
67+
},
68+
"sandbox": false
6569
}
6670
prompt: |
6771
You are an issue triage assistant. Analyze issues and apply appropriate labels ONE AT A TIME.
@@ -70,7 +74,7 @@ jobs:
7074
7175
Steps:
7276
1. Run: `gh label list --repo ${{ github.repository }} --limit 100` to see available labels
73-
2. Run: `cat /tmp/issues_to_triage.json` to get the issues that need triaging
77+
2. Check environment variable for issues to triage: $ISSUES_TO_TRIAGE (JSON array of issues)
7478
3. Parse the JSON array from step 2 and for EACH INDIVIDUAL issue, apply appropriate labels using separate commands:
7579
- `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --add-label "label1"`
7680
- `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --add-label "label2"`

.github/workflows/gemini-scheduled-pr-triage.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
jobs:
99
audit-prs:
1010
timeout-minutes: 15
11+
if: ${{ github.repository == 'google-gemini/gemini-cli' }}
1112
permissions:
1213
contents: read
1314
id-token: write
@@ -22,7 +23,7 @@ jobs:
2223

2324
- name: Generate GitHub App Token
2425
id: generate_token
25-
uses: actions/create-github-app-token@v1
26+
uses: actions/create-github-app-token@v2
2627
with:
2728
app-id: ${{ secrets.APP_ID }}
2829
private-key: ${{ secrets.PRIVATE_KEY }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143

144144
- name: Install latest core package
145145
if: steps.vars.outputs.is_dry_run == 'false'
146-
run: npm install @google/gemini-cli-core@${{ steps.version.outputs.NPM_TAG }} --workspace=@google/gemini-cli --save-exact
146+
run: npm install @google/gemini-cli-core@${{ steps.version.outputs.RELEASE_VERSION }} --workspace=@google/gemini-cli --save-exact
147147

148148
- name: Publish @google/gemini-cli
149149
run: npm publish --workspace=@google/gemini-cli --tag=${{ steps.version.outputs.NPM_TAG }} ${{ steps.vars.outputs.is_dry_run == 'true' && '--dry-run' || '' }}

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ This command typically compiles TypeScript to JavaScript, bundles assets, and pr
118118

119119
### Enabling Sandboxing
120120

121-
Container-based [sandboxing](#sandboxing) is highly recommended and requires, at a minimum, setting `GEMINI_SANDBOX=true` in your `~/.env` and ensuring a container engine (e.g. `docker` or `podman`) is available. See [Sandboxing](#sandboxing) for details.
121+
[Sandboxing](#sandboxing) is highly recommended and requires, at a minimum, setting `GEMINI_SANDBOX=true` in your `~/.env` and ensuring a sandboxing provider (e.g. `macOS Seatbelt`, `docker`, or `podman`) is available. See [Sandboxing](#sandboxing) for details.
122122

123123
To build both the `gemini` CLI utility and the sandbox container, run `build:all` from the root directory:
124124

@@ -284,7 +284,7 @@ Container-based sandboxing mounts the project directory (and system temp directo
284284

285285
#### Proxied Networking
286286

287-
All sandboxing methods, including MacOS Seatbelt using `*-proxied` profiles, support restricting outbound network traffic through a custom proxy server that can be specified as `GEMINI_SANDBOX_PROXY_COMMAND=<command>`, where `<command>` must start a proxy server that listens on `:::8877` for relevant requests. See `scripts/example-proxy.js` for a minimal proxy that only allows `HTTPS` connections to `example.com:443` (e.g. `curl https://example.com`) and declines all other requests. The proxy is started and stopped automatically alongside the sandbox.
287+
All sandboxing methods, including MacOS Seatbelt using `*-proxied` profiles, support restricting outbound network traffic through a custom proxy server that can be specified as `GEMINI_SANDBOX_PROXY_COMMAND=<command>`, where `<command>` must start a proxy server that listens on `:::8877` for relevant requests. See `docs/examples/proxy-script.md` for a minimal proxy that only allows `HTTPS` connections to `example.com:443` (e.g. `curl https://example.com`) and declines all other requests. The proxy is started and stopped automatically alongside the sandbox.
288288

289289
## Manual Publish
290290

GEMINI.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,7 @@ Design for a good user experience - Provide clear, minimal, and non-blocking UI
179179
## Comments policy
180180

181181
Only write high-value comments if at all. Avoid talking to the user through comments.
182+
183+
## General style requirements
184+
185+
Use hyphens instead of underscores in flag names (e.g. `my-flag` instead of `my_flag`).

Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ help:
88
@echo "Usage:"
99
@echo " make install - Install npm dependencies"
1010
@echo " make build - Build the entire project"
11-
@echo " make build-sandbox - Build the sandbox container"
12-
@echo " make build-all - Build the project and the sandbox"
11+
@echo " make build-all - Build the entire project"
1312
@echo " make test - Run the test suite"
1413
@echo " make lint - Lint the code"
1514
@echo " make format - Format the code"
1615
@echo " make preflight - Run formatting, linting, and tests"
1716
@echo " make clean - Remove generated files"
1817
@echo " make start - Start the Gemini CLI"
1918
@echo " make debug - Start the Gemini CLI in debug mode"
20-
@echo " make release - Publish a new release"
19+
@echo ""
2120
@echo " make run-npx - Run the CLI using npx (for testing the published package)"
2221
@echo " make create-alias - Create a 'gemini' alias for your shell"
2322

@@ -27,8 +26,6 @@ install:
2726
build:
2827
npm run build
2928

30-
build-sandbox:
31-
npm run build:sandbox
3229

3330
build-all:
3431
npm run build:all
@@ -54,8 +51,6 @@ start:
5451
debug:
5552
npm run debug
5653

57-
release:
58-
npm run publish:release
5954

6055
run-npx:
6156
npx https://github.com/google-gemini/gemini-cli

0 commit comments

Comments
 (0)