Skip to content

Commit 981aa75

Browse files
Merge upstream/main into fix-todo-tray-label
2 parents 63b1d21 + ae0a3aa commit 981aa75

1,934 files changed

Lines changed: 1038550 additions & 50067 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.

.dockerignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Git history - not needed in build context
2+
.git
3+
4+
# Root node_modules - reinstalled inside container via npm ci
5+
node_modules
6+
7+
# Package-level node_modules - reinstalled inside container
8+
packages/*/node_modules
9+
10+
# Development and IDE files
11+
.github
12+
.vscode
13+
npm-debug.log*
14+
15+
# Misc
16+
.DS_Store
17+
*.tmp

.gcp/Dockerfile.development

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# --- STAGE 1: Base Runtime ---
2+
FROM docker.io/library/node:20-slim AS base
3+
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
python3 \
6+
python3-pip \
7+
python3-venv \
8+
curl \
9+
dnsutils \
10+
less \
11+
jq \
12+
ca-certificates \
13+
git \
14+
&& apt-get clean \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
# --- STAGE 2: Builder (Compile Main) ---
18+
FROM base AS builder
19+
WORKDIR /build
20+
COPY . .
21+
RUN npm ci --ignore-scripts
22+
RUN npm run bundle
23+
# Run the official release preparation script to move the bundle and assets into packages/cli
24+
RUN node scripts/prepare-npm-release.js
25+
26+
# --- STAGE 3: Development Environment ---
27+
FROM base AS development
28+
29+
WORKDIR /home/node/dev/main
30+
31+
# Set up npm global package folder
32+
RUN mkdir -p /usr/local/share/npm-global \
33+
&& chown -R node:node /usr/local/share/npm-global
34+
ENV NPM_CONFIG_PREFIX=/usr/local/share/npm-global
35+
ENV PATH=$PATH:/usr/local/share/npm-global/bin
36+
37+
# Copy package.json to extract versions for global tools
38+
COPY package.json /tmp/package.json
39+
40+
# Install Build Tools, Global Dev Tools (pinned), and Linters
41+
ARG ACTIONLINT_VER=1.7.7
42+
ARG SHELLCHECK_VER=0.11.0
43+
ARG YAMLLINT_VER=1.35.1
44+
45+
RUN apt-get update && apt-get install -y --no-install-recommends \
46+
make \
47+
g++ \
48+
gh \
49+
git \
50+
unzip \
51+
rsync \
52+
ripgrep \
53+
procps \
54+
psmisc \
55+
lsof \
56+
socat \
57+
tmux \
58+
docker.io \
59+
build-essential \
60+
libsecret-1-dev \
61+
libkrb5-dev \
62+
file \
63+
&& curl -sSLo /tmp/actionlint.tar.gz https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VER}/actionlint_${ACTIONLINT_VER}_linux_amd64.tar.gz \
64+
&& tar -xzf /tmp/actionlint.tar.gz -C /usr/local/bin actionlint \
65+
&& curl -sSLo /tmp/shellcheck.tar.xz https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VER}/shellcheck-v${SHELLCHECK_VER}.linux.x86_64.tar.xz \
66+
&& tar -xf /tmp/shellcheck.tar.xz -C /usr/local/bin --strip-components=1 shellcheck-v${SHELLCHECK_VER}/shellcheck \
67+
&& pip3 install --break-system-packages yamllint==${YAMLLINT_VER} \
68+
&& export TSX_VER=$(node -p "require('/tmp/package.json').devDependencies.tsx") \
69+
&& export VITEST_VER=$(node -p "require('/tmp/package.json').devDependencies.vitest") \
70+
&& export PRETTIER_VER=$(node -p "require('/tmp/package.json').devDependencies.prettier") \
71+
&& export ESLINT_VER=$(node -p "require('/tmp/package.json').devDependencies.eslint") \
72+
&& export CROSS_ENV_VER=$(node -p "require('/tmp/package.json').devDependencies['cross-env']") \
73+
&& npm install -g tsx@$TSX_VER vitest@$VITEST_VER prettier@$PRETTIER_VER eslint@$ESLINT_VER cross-env@$CROSS_ENV_VER typescript@5.3.3 \
74+
&& npm install -g @google/gemini-cli@nightly && mv /usr/local/share/npm-global/bin/gemini /usr/local/share/npm-global/bin/g-nightly \
75+
&& npm install -g @google/gemini-cli@preview && mv /usr/local/share/npm-global/bin/gemini /usr/local/share/npm-global/bin/g-preview \
76+
&& npm install -g @google/gemini-cli@latest && mv /usr/local/share/npm-global/bin/gemini /usr/local/share/npm-global/bin/g-stable \
77+
&& apt-get purge -y build-essential libsecret-1-dev libkrb5-dev \
78+
&& apt-get autoremove -y \
79+
&& apt-get clean \
80+
&& rm -rf /var/lib/apt/lists/* /tmp/* /root/.npm
81+
82+
# Copy the bundled CLI package to a permanent location and install it
83+
# We MUST not delete this source folder as 'npm install -g <folder>'
84+
# often symlinks to it for local folder installs.
85+
COPY --from=builder /build/packages/cli /usr/local/lib/gemini-cli
86+
RUN npm install -g /usr/local/lib/gemini-cli
87+
88+
USER node
89+
CMD ["/bin/bash"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
.git
3+
.gemini/workspaces
4+
dist
5+
!packages/*/dist/*.tgz
6+
bundle
7+
out
8+
*.log
9+
.env
10+
.DS_Store

.gcp/development-worker.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
substitutions:
2+
_IMAGE_NAME: 'development'
3+
_ARTIFACT_REGISTRY_REPO: 'us-docker.pkg.dev/gemini-code-dev/gemini-cli'
4+
5+
steps:
6+
# Step 1: Install root dependencies
7+
- name: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-builder'
8+
id: 'Install Dependencies'
9+
entrypoint: 'npm'
10+
args: ['install']
11+
12+
# Step 2: Authenticate for Docker
13+
- name: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-builder'
14+
id: 'Authenticate docker'
15+
entrypoint: 'npm'
16+
args: ['run', 'auth']
17+
18+
# Step 3: Build workspace packages
19+
- name: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-builder'
20+
id: 'Build packages'
21+
entrypoint: 'npm'
22+
args: ['run', 'build:packages']
23+
24+
# Step 4: Build Development Image
25+
- name: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-builder'
26+
id: 'Build Development Image'
27+
entrypoint: 'bash'
28+
env:
29+
- 'RAW_BRANCH_VALUE=${BRANCH_NAME}'
30+
args:
31+
- '-c'
32+
- |-
33+
IMAGE_BASE="${_ARTIFACT_REGISTRY_REPO}/${_IMAGE_NAME}"
34+
35+
# Determine the primary tag (branch name or 'latest' for main)
36+
# Use $$ for shell variables to avoid Cloud Build attempting premature substitution
37+
RAW_BRANCH="$$RAW_BRANCH_VALUE"
38+
if [ "$${RAW_BRANCH}" == "main" ]; then
39+
TAG_PRIMARY="latest"
40+
else
41+
TAG_PRIMARY=$$(echo "$${RAW_BRANCH}" | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]')
42+
fi
43+
44+
# Use SHORT_SHA if available (Cloud Build) or fallback to latest-dev
45+
TAG_SHA="$${SHORT_SHA:-latest-dev}"
46+
47+
echo "📦 Building Development Image for: $${RAW_BRANCH} -> $${TAG_PRIMARY} ($${TAG_SHA})"
48+
49+
docker build -f .gcp/Dockerfile.development \
50+
-t "$${IMAGE_BASE}:$${TAG_SHA}" \
51+
-t "$${IMAGE_BASE}:$${TAG_PRIMARY}" .
52+
53+
docker push "$${IMAGE_BASE}:$${TAG_SHA}"
54+
docker push "$${IMAGE_BASE}:$${TAG_PRIMARY}"
55+
56+
options:
57+
defaultLogsBucketBehavior: 'REGIONAL_USER_OWNED_BUCKET'
58+
dynamicSubstitutions: true

.gemini/commands/fix-behavioral-eval.toml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.gemini/commands/promote-behavioral-eval.toml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.gemini/commands/strict-development-rules.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,27 @@ Gemini CLI project.
5353
overriding values. Refer to `text-buffer.ts` for a canonical example.
5454
- **Logging**: Do not leave `console.log`, `console.warn`, or `console.error` in
5555
the code.
56-
- **State & Effects**: Ensure state initialization is explicit (e.g., use
57-
`undefined` rather than `true` as a default if the state is truly unknown).
58-
Carefully manage `useEffect` dependencies. Prefer a reducer whenever
59-
practical. NEVER disable `react-hooks/exhaustive-deps`; fix the code to
60-
correctly declare dependencies instead.
56+
- **State**: Ensure state initialization is explicit (e.g., use `undefined`
57+
rather than `true` as a default if the state is truly unknown). Prefer a
58+
reducer whenever practical. NEVER disable `react-hooks/exhaustive-deps`; fix
59+
the code to correctly declare dependencies instead. Evaluate all the React
60+
states in a component and ensure that the `useState` calls are necessary and
61+
not cases where values could be derived on render. Ensure there are no stale
62+
closures that are relying on a value from a previous render. React Components
63+
that modify Settings should effectively use the `useSettingsStore` pattern.
64+
Components that configure application Settings (e.g settings.json) are the
65+
only reasonable case for unsaved changes to drive UX; in these cases, the
66+
Settings store should only be written to on save. If the user experience does
67+
not utilize unsaved changes because there is no option to exit without saving
68+
or reverting the unsaved changes, then the component should directly read from
69+
and write to the Settings store without holding pending changes in component
70+
level UI state.
71+
- **Effect**: `useEffect` should not be used to synchronize React states, it
72+
should only be used for genuine side effects that occur outside of React.
73+
Contributors should be able to strongly justify the need for an effect.
74+
Consider whether the effect should instead be inside an event handler, or
75+
whether it is better off being computed on render. Carefully manage
76+
`useEffect` dependencies.
6177
- **Context & Props**: Avoid excessive property drilling. Leverage existing
6278
providers, extend them, or propose a new one if necessary. Only use providers
6379
for properties that are consistent across the entire application.

.gemini/settings.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
22
"experimental": {
3-
"plan": true,
43
"extensionReloading": true,
5-
"modelSteering": true
4+
"modelSteering": true,
5+
"autoMemory": true,
6+
"topicUpdateNarration": true,
7+
"voiceMode": true,
8+
"adk": {
9+
"agentSessionNoninteractiveEnabled": true
10+
}
611
},
712
"general": {
813
"devtools": true

0 commit comments

Comments
 (0)