Commit Graph

4721 Commits

Author SHA1 Message Date
Abhijit Balaji
527161d7ef fix(cli): remove unused PolicyIntegrityManager import in AppContainer 2026-02-18 15:32:17 -08:00
Abhijit Balaji
d08bc96fab refactor(cli): abstract workspace policy resolution logic
Centralized the workspace policy discovery and integrity verification
logic into a new 'resolveWorkspacePolicyState' helper in the policy
module. This significantly simplifies 'loadCliConfig' in config.ts,
reducing its imperative bloat and removing low-level core dependencies
from the main configuration flow.

- Moved workspace integrity check and directory discovery to policy.ts
- Refactored loadCliConfig to use the new declarative resolver
- Added comprehensive unit tests for the resolver using real temp dirs
- Cleaned up redundant function arguments in core and CLI calls
- Verified project integrity with 'npm run preflight'
2026-02-18 15:20:48 -08:00
Abhijit Balaji
c95e05454c refactor(policy): consolidate workspacePoliciesDir into PolicySettings
Simplified createPolicyEngineConfig signature by moving workspacePoliciesDir into the PolicySettings interface. Updated all core and CLI call sites and tests to align with the consolidated settings structure.
2026-02-18 15:20:48 -08:00
Abhijit Balaji
662654c5d2 feat(policy): implement hot-reloading for workspace policies
This change eliminates the need for a CLI restart when a user accepts new or
changed project-level policies. Workspace rules are now dynamically injected
into the active PolicyEngine instance.

Key improvements:
- Added Config.loadWorkspacePolicies() to handle mid-session rule injection.
- Fully encapsulated acceptance and integrity logic within PolicyUpdateDialog.
- Integrated centralized keybindings (Command.ESCAPE) for dialog dismissal.
- Refactored PolicyIntegrityManager tests to use a real temporary directory
  instead of filesystem mocks for improved reliability.
- Updated copyright headers to 2026 across affected files.
- Added UI snapshot tests for the policy update dialog.

Addresses review feedback from PR #18682.
2026-02-18 15:20:41 -08:00
Abhijit Balaji
8feff1cc9b refactor(policy): rename "Project" policies to "Workspace" policies
Updates the terminology and configuration for the intermediate policy tier
from "Project" to "Workspace" to better align with the Gemini CLI ecosystem.

Key changes:
- Renamed `PROJECT_POLICY_TIER` to `WORKSPACE_POLICY_TIER`.
- Renamed `getProjectPoliciesDir` to `getWorkspacePoliciesDir`.
- Updated integrity scope from `project` to `workspace`.
- Updated UI dialogs and documentation.
- Renamed related test files.
2026-02-18 15:20:11 -08:00
Abhijit Balaji
d8f1db6161 test(cli): improve project policy config test coverage
Updates config.test.ts to fix createPolicyEngineConfig mock expectations and expands project-policy-cli.test.ts to cover integrity check scenarios (NEW, MISMATCH) and interactive confirmation flows.
2026-02-18 15:20:10 -08:00
Abhijit Balaji
73b3cb86eb fix(policy): refactor policy dialog to remove process.exit and fix integration tests
- Refactored `PolicyUpdateDialog` to remove side effects (`process.exit`, `relaunchApp`) and delegate logic to parent.
- Updated `AppContainer` to handle relaunch logic.
- Added comprehensive unit tests for `PolicyUpdateDialog`.
- Fixed `project-policy-cli.test.ts` to correctly mock `PolicyIntegrityManager`.
- Fixed typo in `packages/core/src/policy/config.ts`.
2026-02-18 15:20:10 -08:00
Abhijit Balaji
c73e47bbbe feat(policy): implement project policy integrity verification
Adds a security mechanism to detect and prompt for confirmation when project-level policies are added or modified. This prevents unauthorized policy changes from being applied silently.

- PolicyIntegrityManager calculates and persists policy directory hashes.
- Config integrates integrity checks during startup.
- PolicyUpdateDialog prompts users in interactive mode.
- --accept-changed-policies flag supports non-interactive workflows.
- toml-loader refactored to expose file reading logic.
2026-02-18 15:19:44 -08:00
Abhijit Balaji
53511d6ed4 fix: Update test expectations to match createPolicyEngineConfig signature changes from rebase 2026-02-18 15:19:01 -08:00
Abhijit Balaji
3a24b0c975 feat(policy): change priority hierarchy to Admin > User > Project > Default
Updates the policy engine to prioritize User policies over Project-specific policies.
This change is a security measure to ensure that users maintain control over their
environment and are not inadvertently compromised by policies defined in a cloned
repository.

Key Changes:
- Swapped Tier 2 (now Project) and Tier 3 (now User).
- Updated documentation to reflect the new hierarchy.
- Updated all built-in policy TOML files with correct tier information.
- Adjusted all tests and integration test expectations to match new priority values.
2026-02-18 15:19:00 -08:00
Abhijit Balaji
f34a3ee1df docs(policy): document project-level policy support
Adds the 'Project' tier (Base 3) to the policy engine documentation.
Updates the priority hierarchy, location table, and formula examples
to reflect the new Project -> User precedence.
2026-02-18 15:19:00 -08:00
Abhijit Balaji
322de4309d feat(policy): implement project-level policy support
Introduces a new 'Project' tier (Tier 3) for policies, allowing users to define
project-specific rules in `$PROJECT_ROOT/.gemini/policies`.

Key Changes:
- **Core**: Added `PROJECT_POLICY_TIER` (3) and bumped `ADMIN_POLICY_TIER` to 4.
  Updated `getPolicyDirectories`, `getPolicyTier`, and `createPolicyEngineConfig` to handle
  project-level policy directories.
- **Storage**: Added `getProjectPoliciesDir()` to the `Storage` class.
- **CLI**: Updated `loadCliConfig` to securely load project policies.
  Crucially, project policies are **only loaded if the workspace is trusted**.
- **Tests**: Added comprehensive tests for both core policy logic and CLI integration,
  verifying priority hierarchy (Admin > Project > User > Default) and trust checks.

This hierarchy ensures that project-specific rules override user defaults but are still
subject to system-wide admin enforcement.
2026-02-18 15:18:59 -08:00
Shreya Keshive
261788cf91 feat(admin): Admin settings should only apply if adminControlsApplicable = true and fetch errors should be fatal (#19453) 2026-02-18 22:54:07 +00:00
Jasmeet Bhatia
012392ad0a feat(cli): include /dir add directories in @ autocomplete suggestions (#19246) 2026-02-18 22:38:35 +00:00
garrettsparks
037061e2e0 use issuer instead of authorization_endpoint for oauth discovery (#17332)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-02-18 22:38:04 +00:00
Smitty
221ea360b9 fix(core): ripgrep fails when pattern looks like ripgrep flag (#18858)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-02-18 22:11:24 +00:00
N. Taylor Mullen
8910b2720f fix(cli): disable auto-completion on Shift+Tab to preserve mode cycling (#19451) 2026-02-18 22:08:38 +00:00
joshualitt
87f5dd15d6 feat(core): experimental in-progress steering hints (2 of 2) (#19307) 2026-02-18 22:05:50 +00:00
Adib234
81c8893e05 docs(plan): add documentation for plan mode command (#19467)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-18 22:03:09 +00:00
skyvanguard
178388d931 fix(cli): treat unknown slash commands as regular input instead of showing error (#17393)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-02-18 21:52:51 +00:00
imadraude
e7f97dfa44 fix(ui): move margin from top to bottom in ToolGroupMessage (#17198) 2026-02-18 21:51:03 +00:00
Godwin Iheuwa
f961e0d6b1 fix(core): ensure directory exists before writing conversation file (#18429)
Co-authored-by: godwiniheuwa <godwiniheuwa@users.noreply.github.com>
Co-authored-by: ruintheextinct <deepkarma001@gmail.com>
2026-02-18 21:13:54 +00:00
N. Taylor Mullen
14415316c0 feat(core): add support for MCP progress updates (#19046) 2026-02-18 20:46:12 +00:00
gemini-cli-robot
1cf05b0375 Changelog for v0.30.0-preview.0 (#19364)
Co-authored-by: g-samroberts <158088236+g-samroberts@users.noreply.github.com>
Co-authored-by: g-samroberts <samroberts@google.com>
2026-02-18 20:43:39 +00:00
Dev Randalpura
3099df1b7c fix(ui): preventing empty history items from being added (#19014) 2026-02-18 12:53:06 -08:00
gemini-cli-robot
758d419e33 Changelog for v0.29.0 (#19361)
Co-authored-by: g-samroberts <158088236+g-samroberts@users.noreply.github.com>
2026-02-18 20:30:52 +00:00
Dmitry Lyalin
78de533c48 feat(cli): add macOS run-event notifications (interactive only) (#19056)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-02-18 20:28:17 +00:00
Jerop Kipruto
8f6a711a3a fix(core): clarify plan mode constraints and exit mechanism (#19438) 2026-02-18 20:09:59 +00:00
Sandy Tao
65ad78b9c0 feat(devtools): migrate devtools package into monorepo (#18936) 2026-02-18 20:04:02 +00:00
christine betts
858918fe31 Add explicit color-convert dependency (#19460) 2026-02-18 19:55:21 +00:00
Adib234
9255e69abb fix(plan): allow safe fallback when experiment setting for plan is not enabled but approval mode at startup is plan (#19439)
Co-authored-by: Jerop Kipruto <jerop@google.com>
2026-02-18 19:54:04 +00:00
dependabot[bot]
e32111e609 chore(deps): bump tar from 7.5.7 to 7.5.8 (#19367)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 19:49:46 +00:00
Sandy Tao
2c1d6f8029 fix(cli): support legacy onConfirm callback in ToolActionsContext (#19369) 2026-02-18 19:46:09 +00:00
christine betts
8a8826654c Disable failing eval test (#19455) 2026-02-18 19:27:21 +00:00
Tommaso Sciortino
5f6b7c0158 feat(cli): add Alt+D for forward word deletion (#19300) 2026-02-18 09:19:26 -08:00
Mag1ck
65e0043fbf feat(cli): add gemini --resume hint on exit (#16285)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
2026-02-18 15:54:01 +00:00
Jack Wotherspoon
22763c98b0 fix: optimize height calculations for ask_user dialog (#19017) 2026-02-18 15:52:30 +00:00
N. Taylor Mullen
05be2b51fc docs: clarify preflight instructions in GEMINI.md (#19377) 2026-02-18 07:16:55 -08:00
N. Taylor Mullen
f1aa38b258 test(evals): add behavioral tests for tool output masking (#19172) 2026-02-18 05:07:25 +00:00
g-samroberts
4e11ddbf4a Release note generator fix (#19363) 2026-02-18 04:53:53 +00:00
Jacob Richman
fe65d562de Fix bottom border color (#19266) 2026-02-18 02:41:43 +00:00
Christian Gunderman
ce84b3cb5f Use ranged reads and limited searches and fuzzy editing improvements (#19240) 2026-02-17 23:54:08 +00:00
joshualitt
55c628e967 feat(core): experimental in-progress steering hints (1 of 3) (#19008) 2026-02-17 22:59:33 +00:00
Spencer
5e2f5df62c fix(paths): Add cross-platform path normalization (#18939) 2026-02-17 22:52:55 +00:00
Aishanee Shah
4fe86dbd4f refactor(core): modularize tool definitions by model family (#19269) 2026-02-17 22:26:38 +00:00
Jenna Inouye
216d7272bb Docs: Clarify extensions documentation. (#19277) 2026-02-17 21:57:27 +00:00
Pavan Shinde
b7004ad5ed docs: format UTC times in releases doc (#18169) 2026-02-17 21:25:03 +00:00
Valery Teplyakov
f1aa1683dd fix(acp): Wait for mcp initialization in acp (#18893) (#18894)
Co-authored-by: Mervap <megavaprold@gmail.com>
Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
2026-02-17 19:39:14 +00:00
Kevin Ramdass
b56361559d feat(config): add setting to make directory tree context configurable (#19053) 2026-02-17 19:19:26 +00:00
g-samroberts
c62601e90c Fix side breakage where anchors don't work in slugs. (#19261) 2026-02-17 18:38:00 +00:00