Commit Graph

1850 Commits

Author SHA1 Message Date
Mahima Shanware
6f0d7b8adb fix(rebase): Resolve conflicts from rebase onto abhijit-2592
Manually resolved merge conflicts in CLI and Core config files that occurred during the rebase of the extensible plan mode feature branch onto `abhijit-2592/read-proj-dir-policy-file`.
2026-02-19 19:34:33 +00:00
Mahima Shanware
12ee556f3b Fix: Enable write_file in Plan Mode via workspace policy 2026-02-19 18:35:34 +00:00
Mahima Shanware
c1dfcd9a2d feat: implement extensible plan mode with custom directory configuration
- Adds 'general.plan' configuration object for plan settings (directory).
- Updates 'experimental.plan' to a boolean flag for enablement.
- Implements dynamic high-priority policy for custom plan directories in core.
- Adds migration logic for previous configuration formats.
- Updates documentation and schema.
2026-02-19 18:34:02 +00: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
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
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
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
joshualitt
87f5dd15d6 feat(core): experimental in-progress steering hints (2 of 2) (#19307) 2026-02-18 22:05:50 +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
Jerop Kipruto
8f6a711a3a fix(core): clarify plan mode constraints and exit mechanism (#19438) 2026-02-18 20:09:59 +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
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
Yuna Seol
8aca3068cf feat: add role-specific statistics to telemetry and UI (cont. #15234) (#18824)
Co-authored-by: Yuna Seol <yunaseol@google.com>
2026-02-17 17:32:30 +00:00
Adib234
14aabbbe8b feat(plan): support project exploration without planning when in plan mode (#18992) 2026-02-17 16:52:59 +00:00
Abhi
bf9ca33c18 feat(telemetry): add keychain availability and token storage metrics (#18971) 2026-02-17 15:11:38 +00:00
Gaurav
bbf6800778 fix(telemetry): replace JSON.stringify with safeJsonStringify in file exporters (#19244) 2026-02-17 15:01:54 +00:00
N. Taylor Mullen
39d36108d7 feat(core): support custom reasoning models by default (#19227) 2026-02-16 20:47:58 +00:00
Gaurav
8979fc5f6a fix(core): propagate User-Agent header to setup-phase CodeAssist API calls (#19182) 2026-02-16 03:20:22 +00:00
N. Taylor Mullen
6eec9f3350 fix(core): Encourage non-interactive flags for scaffolding commands (#18804) 2026-02-15 20:26:59 +00:00
N. Taylor Mullen
884acda2dc test: fix hook integration test flakiness on Windows CI (#18665) 2026-02-15 19:42:13 +00:00
Aishanee Shah
5559d40f31 refactor(core): complete centralization of core tool definitions (#18991) 2026-02-14 04:55:02 +00:00
Michael Bleigh
a129dbcdd4 feat(sdk): implement support for custom skills (#19031) 2026-02-14 02:09:31 +00:00
Jerop Kipruto
9df604b01b feat(plan): hide plan write and edit operations on plans in Plan Mode (#19012) 2026-02-13 23:15:21 +00:00
Tommaso Sciortino
e7e4c68c5c fix windows escaping (and broken tests) (#19011) 2026-02-13 22:19:08 +00:00
N. Taylor Mullen
c2f62b2a2b docs: fix inconsistent commandRegex example in policy engine (#19027) 2026-02-13 20:02:07 +00:00
Sandy Tao
e844a57bfc feat(core): fallback to chat-base when using unrecognized models for chat (#19016) 2026-02-13 19:00:08 +00:00
Sandy Tao
9c285eaf15 fix(core): Prevent loop detection false positives on lists with long shared prefixes (#18975) 2026-02-13 10:58:46 -08:00
Jerop Kipruto
60be42f095 refactor(core): adopt CoreToolCallStatus enum for type safety (#18998) 2026-02-13 16:27:20 +00:00
N. Taylor Mullen
d0c6a56c65 fix(core): ensure --yolo does not force headless mode (#18976) 2026-02-13 15:43:50 +00:00
Adib234
d5dfae6bbf fix(plan): make question type required in AskUser tool (#18959) 2026-02-13 15:03:52 +00:00
Michael Bleigh
b61a123da8 feat(sdk): implements SessionContext for SDK tool calls (#18862) 2026-02-13 07:28:48 +00:00
Michael Bleigh
bed3eae0e1 feat(sdk): initial package bootstrap for SDK (#18861) 2026-02-13 06:08:27 +00:00
Tommaso Sciortino
d82f66973f Fix drag and drop escaping (#18965) 2026-02-13 02:27:56 +00:00
Aishanee Shah
b62c6566be refactor(core): centralize tool definitions (Group 1: replace, search, grep) (#18944) 2026-02-13 02:05:33 +00:00
Allen Hutchison
696198be87 feat(policy): add --policy flag for user defined policies (#18500)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-13 00:25:23 +00:00
Jerop Kipruto
8275871963 Hide AskUser tool validation errors from UI (agent self-corrects) (#18954) 2026-02-12 21:49:07 +00:00
Adib234
0b3130cec7 fix(plan): isolate plan files per session (#18757) 2026-02-12 19:02:59 +00:00
Sandy Tao
2e91c03e08 feat: add strict seatbelt profiles and remove unusable closed profiles (#18876) 2026-02-12 18:33:54 +00:00