@google/gemini-cli-core 0.34.0-nightly.20260307.6c3a90645 → 0.34.0-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/docs/CONTRIBUTING.md +42 -18
- package/dist/docs/assets/theme-ansi-dark.png +0 -0
- package/dist/docs/assets/theme-ansi-light.png +0 -0
- package/dist/docs/assets/theme-atom-one-dark.png +0 -0
- package/dist/docs/assets/theme-ayu-dark.png +0 -0
- package/dist/docs/assets/theme-ayu-light.png +0 -0
- package/dist/docs/assets/theme-default-dark.png +0 -0
- package/dist/docs/assets/theme-default-light.png +0 -0
- package/dist/docs/assets/theme-dracula-dark.png +0 -0
- package/dist/docs/assets/theme-github-dark.png +0 -0
- package/dist/docs/assets/theme-github-light.png +0 -0
- package/dist/docs/assets/theme-google-light.png +0 -0
- package/dist/docs/assets/theme-holiday-dark.png +0 -0
- package/dist/docs/assets/theme-shades-of-purple-dark.png +0 -0
- package/dist/docs/assets/theme-solarized-dark.png +0 -0
- package/dist/docs/assets/theme-solarized-light.png +0 -0
- package/dist/docs/assets/theme-xcode-light.png +0 -0
- package/dist/docs/changelogs/preview.md +10 -3
- package/dist/docs/cli/cli-reference.md +21 -5
- package/dist/docs/cli/gemini-md.md +1 -1
- package/dist/docs/cli/headless.md +3 -2
- package/dist/docs/cli/notifications.md +58 -0
- package/dist/docs/cli/plan-mode.md +96 -91
- package/dist/docs/cli/session-management.md +24 -0
- package/dist/docs/cli/settings.md +4 -3
- package/dist/docs/cli/telemetry.md +1017 -750
- package/dist/docs/cli/themes.md +26 -16
- package/dist/docs/cli/tutorials/automation.md +12 -11
- package/dist/docs/cli/tutorials/mcp-setup.md +3 -3
- package/dist/docs/cli/tutorials/memory-management.md +1 -1
- package/dist/docs/cli/tutorials/session-management.md +4 -4
- package/dist/docs/core/remote-agents.md +1 -1
- package/dist/docs/core/subagents.md +2 -2
- package/dist/docs/extensions/reference.md +8 -2
- package/dist/docs/extensions/releasing.md +26 -0
- package/dist/docs/get-started/authentication.md +8 -8
- package/dist/docs/get-started/gemini-3.md +1 -1
- package/dist/docs/get-started/index.md +1 -1
- package/dist/docs/get-started/installation.md +1 -1
- package/dist/docs/hooks/best-practices.md +1 -1
- package/dist/docs/hooks/index.md +6 -6
- package/dist/docs/hooks/reference.md +3 -3
- package/dist/docs/local-development.md +71 -27
- package/dist/docs/reference/commands.md +48 -11
- package/dist/docs/reference/configuration.md +30 -12
- package/dist/docs/reference/keyboard-shortcuts.md +21 -17
- package/dist/docs/reference/policy-engine.md +34 -12
- package/dist/docs/release-confidence.md +2 -2
- package/dist/docs/resources/quota-and-pricing.md +1 -1
- package/dist/docs/resources/tos-privacy.md +5 -5
- package/dist/docs/resources/troubleshooting.md +2 -2
- package/dist/docs/sidebar.json +6 -1
- package/dist/docs/tools/file-system.md +2 -2
- package/dist/docs/tools/mcp-server.md +29 -16
- package/dist/src/agents/a2a-client-manager.js +38 -25
- package/dist/src/agents/a2a-client-manager.js.map +1 -1
- package/dist/src/agents/a2a-client-manager.test.js +43 -3
- package/dist/src/agents/a2a-client-manager.test.js.map +1 -1
- package/dist/src/agents/a2a-errors.d.ts +65 -0
- package/dist/src/agents/a2a-errors.js +164 -0
- package/dist/src/agents/a2a-errors.js.map +1 -0
- package/dist/src/agents/a2a-errors.test.d.ts +6 -0
- package/dist/src/agents/a2a-errors.test.js +183 -0
- package/dist/src/agents/a2a-errors.test.js.map +1 -0
- package/dist/src/agents/a2aUtils.d.ts +34 -3
- package/dist/src/agents/a2aUtils.js +226 -27
- package/dist/src/agents/a2aUtils.js.map +1 -1
- package/dist/src/agents/a2aUtils.test.js +192 -2
- package/dist/src/agents/a2aUtils.test.js.map +1 -1
- package/dist/src/agents/agent-scheduler.js +7 -1
- package/dist/src/agents/agent-scheduler.js.map +1 -1
- package/dist/src/agents/agent-scheduler.test.js +37 -6
- package/dist/src/agents/agent-scheduler.test.js.map +1 -1
- package/dist/src/agents/agentLoader.d.ts +6 -2
- package/dist/src/agents/agentLoader.js +30 -7
- package/dist/src/agents/agentLoader.js.map +1 -1
- package/dist/src/agents/agentLoader.test.js +115 -7
- package/dist/src/agents/agentLoader.test.js.map +1 -1
- package/dist/src/agents/auth-provider/factory.d.ts +2 -0
- package/dist/src/agents/auth-provider/factory.js +9 -3
- package/dist/src/agents/auth-provider/factory.js.map +1 -1
- package/dist/src/agents/auth-provider/factory.test.js +62 -1
- package/dist/src/agents/auth-provider/factory.test.js.map +1 -1
- package/dist/src/agents/auth-provider/oauth2-provider.d.ts +65 -0
- package/dist/src/agents/auth-provider/oauth2-provider.js +233 -0
- package/dist/src/agents/auth-provider/oauth2-provider.js.map +1 -0
- package/dist/src/agents/auth-provider/oauth2-provider.test.d.ts +6 -0
- package/dist/src/agents/auth-provider/oauth2-provider.test.js +490 -0
- package/dist/src/agents/auth-provider/oauth2-provider.test.js.map +1 -0
- package/dist/src/agents/auth-provider/types.d.ts +4 -1
- package/dist/src/agents/browser/automationOverlay.d.ts +26 -0
- package/dist/src/agents/browser/automationOverlay.js +100 -0
- package/dist/src/agents/browser/automationOverlay.js.map +1 -0
- package/dist/src/agents/browser/browserAgentFactory.js +9 -0
- package/dist/src/agents/browser/browserAgentFactory.js.map +1 -1
- package/dist/src/agents/browser/browserAgentFactory.test.js +54 -0
- package/dist/src/agents/browser/browserAgentFactory.test.js.map +1 -1
- package/dist/src/agents/browser/browserAgentInvocation.d.ts +1 -10
- package/dist/src/agents/browser/browserAgentInvocation.js +289 -12
- package/dist/src/agents/browser/browserAgentInvocation.js.map +1 -1
- package/dist/src/agents/browser/browserAgentInvocation.test.js +295 -0
- package/dist/src/agents/browser/browserAgentInvocation.test.js.map +1 -1
- package/dist/src/agents/browser/browserManager.d.ts +5 -0
- package/dist/src/agents/browser/browserManager.js +62 -15
- package/dist/src/agents/browser/browserManager.js.map +1 -1
- package/dist/src/agents/browser/browserManager.test.js +68 -0
- package/dist/src/agents/browser/browserManager.test.js.map +1 -1
- package/dist/src/agents/browser/mcpToolWrapper.d.ts +1 -1
- package/dist/src/agents/browser/mcpToolWrapper.js +3 -1
- package/dist/src/agents/browser/mcpToolWrapper.js.map +1 -1
- package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.js +2 -0
- package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.js.map +1 -1
- package/dist/src/agents/generalist-agent.test.js +8 -1
- package/dist/src/agents/generalist-agent.test.js.map +1 -1
- package/dist/src/agents/local-executor.js +23 -1
- package/dist/src/agents/local-executor.js.map +1 -1
- package/dist/src/agents/local-executor.test.js +15 -13
- package/dist/src/agents/local-executor.test.js.map +1 -1
- package/dist/src/agents/local-invocation.js +3 -1
- package/dist/src/agents/local-invocation.js.map +1 -1
- package/dist/src/agents/registry.d.ts +3 -0
- package/dist/src/agents/registry.js +25 -4
- package/dist/src/agents/registry.js.map +1 -1
- package/dist/src/agents/registry.test.js +77 -1
- package/dist/src/agents/registry.test.js.map +1 -1
- package/dist/src/agents/remote-invocation.d.ts +6 -0
- package/dist/src/agents/remote-invocation.js +20 -2
- package/dist/src/agents/remote-invocation.js.map +1 -1
- package/dist/src/agents/remote-invocation.test.js +40 -0
- package/dist/src/agents/remote-invocation.test.js.map +1 -1
- package/dist/src/availability/policyHelpers.js +1 -3
- package/dist/src/availability/policyHelpers.js.map +1 -1
- package/dist/src/availability/policyHelpers.test.js +15 -7
- package/dist/src/availability/policyHelpers.test.js.map +1 -1
- package/dist/src/billing/billing.js +2 -1
- package/dist/src/billing/billing.js.map +1 -1
- package/dist/src/billing/billing.test.js +3 -3
- package/dist/src/billing/billing.test.js.map +1 -1
- package/dist/src/code_assist/oauth2.js +1 -0
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/server.js +5 -0
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/commands/memory.js +2 -2
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/memory.test.js +2 -2
- package/dist/src/commands/memory.test.js.map +1 -1
- package/dist/src/commands/types.d.ts +6 -1
- package/dist/src/config/agent-loop-context.d.ts +22 -0
- package/dist/src/config/agent-loop-context.js +7 -0
- package/dist/src/config/agent-loop-context.js.map +1 -0
- package/dist/src/config/config.d.ts +38 -5
- package/dist/src/config/config.js +82 -37
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +48 -2
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/models.js +2 -1
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/storage.d.ts +2 -0
- package/dist/src/config/storage.js +6 -0
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/config/storage.test.js +3 -3
- package/dist/src/config/storage.test.js.map +1 -1
- package/dist/src/confirmation-bus/message-bus.js +1 -1
- package/dist/src/confirmation-bus/message-bus.js.map +1 -1
- package/dist/src/confirmation-bus/message-bus.test.js +1 -1
- package/dist/src/confirmation-bus/message-bus.test.js.map +1 -1
- package/dist/src/confirmation-bus/types.d.ts +7 -0
- package/dist/src/confirmation-bus/types.js.map +1 -1
- package/dist/src/core/apiKeyCredentialStorage.d.ts +5 -0
- package/dist/src/core/apiKeyCredentialStorage.js +28 -11
- package/dist/src/core/apiKeyCredentialStorage.js.map +1 -1
- package/dist/src/core/apiKeyCredentialStorage.test.js +61 -16
- package/dist/src/core/apiKeyCredentialStorage.test.js.map +1 -1
- package/dist/src/core/client.d.ts +2 -2
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/coreToolScheduler.js +1 -1
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +1 -0
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/geminiChat.d.ts +3 -3
- package/dist/src/core/geminiChat.js +13 -26
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +1 -0
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/geminiChat_network_retry.test.js +1 -0
- package/dist/src/core/geminiChat_network_retry.test.js.map +1 -1
- package/dist/src/core/logger.d.ts +1 -1
- package/dist/src/fallback/handler.d.ts +1 -0
- package/dist/src/fallback/handler.js +6 -2
- package/dist/src/fallback/handler.js.map +1 -1
- package/dist/src/fallback/handler.test.js +1 -0
- package/dist/src/fallback/handler.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/hooks/hookAggregator.js +1 -0
- package/dist/src/hooks/hookAggregator.js.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/oauth-provider.js +2 -0
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-token-storage.d.ts +5 -1
- package/dist/src/mcp/oauth-token-storage.js +10 -3
- package/dist/src/mcp/oauth-token-storage.js.map +1 -1
- package/dist/src/mcp/oauth-utils.js +2 -0
- package/dist/src/mcp/oauth-utils.js.map +1 -1
- package/dist/src/output/stream-json-formatter.d.ts +1 -1
- package/dist/src/output/stream-json-formatter.js +25 -14
- package/dist/src/output/stream-json-formatter.js.map +1 -1
- package/dist/src/output/stream-json-formatter.test.js +39 -0
- package/dist/src/output/stream-json-formatter.test.js.map +1 -1
- package/dist/src/output/types.d.ts +8 -0
- package/dist/src/policy/config.d.ts +15 -1
- package/dist/src/policy/config.js +46 -16
- package/dist/src/policy/config.js.map +1 -1
- package/dist/src/policy/persistence.test.js +96 -102
- package/dist/src/policy/persistence.test.js.map +1 -1
- package/dist/src/policy/policy-engine.d.ts +1 -1
- package/dist/src/policy/policy-engine.js +20 -8
- package/dist/src/policy/policy-engine.js.map +1 -1
- package/dist/src/policy/policy-engine.test.js +30 -0
- package/dist/src/policy/policy-engine.test.js.map +1 -1
- package/dist/src/policy/policy-updater.test.js +4 -3
- package/dist/src/policy/policy-updater.test.js.map +1 -1
- package/dist/src/policy/toml-loader.js +7 -0
- package/dist/src/policy/toml-loader.js.map +1 -1
- package/dist/src/policy/types.d.ts +5 -0
- package/dist/src/policy/types.js.map +1 -1
- package/dist/src/policy/utils.d.ts +16 -0
- package/dist/src/policy/utils.js +32 -6
- package/dist/src/policy/utils.js.map +1 -1
- package/dist/src/policy/utils.test.js +17 -16
- package/dist/src/policy/utils.test.js.map +1 -1
- package/dist/src/prompts/promptProvider.test.js +6 -1
- package/dist/src/prompts/promptProvider.test.js.map +1 -1
- package/dist/src/prompts/snippets.js +1 -1
- package/dist/src/prompts/snippets.js.map +1 -1
- package/dist/src/routing/routingStrategy.d.ts +1 -1
- package/dist/src/routing/strategies/approvalModeStrategy.js +7 -6
- package/dist/src/routing/strategies/approvalModeStrategy.js.map +1 -1
- package/dist/src/routing/strategies/approvalModeStrategy.test.js +31 -1
- package/dist/src/routing/strategies/approvalModeStrategy.test.js.map +1 -1
- package/dist/src/routing/strategies/classifierStrategy.js +4 -4
- package/dist/src/routing/strategies/classifierStrategy.js.map +1 -1
- package/dist/src/routing/strategies/classifierStrategy.test.js +5 -0
- package/dist/src/routing/strategies/classifierStrategy.test.js.map +1 -1
- package/dist/src/routing/strategies/numericalClassifierStrategy.js +4 -4
- package/dist/src/routing/strategies/numericalClassifierStrategy.js.map +1 -1
- package/dist/src/routing/strategies/numericalClassifierStrategy.test.js +5 -0
- package/dist/src/routing/strategies/numericalClassifierStrategy.test.js.map +1 -1
- package/dist/src/safety/context-builder.js.map +1 -1
- package/dist/src/scheduler/policy.d.ts +2 -1
- package/dist/src/scheduler/policy.js +38 -6
- package/dist/src/scheduler/policy.js.map +1 -1
- package/dist/src/scheduler/policy.test.js +132 -2
- package/dist/src/scheduler/policy.test.js.map +1 -1
- package/dist/src/scheduler/scheduler.d.ts +2 -1
- package/dist/src/scheduler/scheduler.js +8 -5
- package/dist/src/scheduler/scheduler.js.map +1 -1
- package/dist/src/scheduler/scheduler.test.js +3 -1
- package/dist/src/scheduler/scheduler.test.js.map +1 -1
- package/dist/src/scheduler/scheduler_parallel.test.js +2 -1
- package/dist/src/scheduler/scheduler_parallel.test.js.map +1 -1
- package/dist/src/scheduler/scheduler_waiting_callback.test.js +1 -1
- package/dist/src/scheduler/scheduler_waiting_callback.test.js.map +1 -1
- package/dist/src/scheduler/tool-executor.d.ts +3 -2
- package/dist/src/scheduler/tool-executor.js +12 -7
- package/dist/src/scheduler/tool-executor.js.map +1 -1
- package/dist/src/scheduler/tool-executor.test.js +68 -1
- package/dist/src/scheduler/tool-executor.test.js.map +1 -1
- package/dist/src/services/FolderTrustDiscoveryService.js +3 -1
- package/dist/src/services/FolderTrustDiscoveryService.js.map +1 -1
- package/dist/src/services/chatCompressionService.js +2 -0
- package/dist/src/services/chatCompressionService.js.map +1 -1
- package/dist/src/services/chatRecordingService.d.ts +7 -1
- package/dist/src/services/chatRecordingService.js +55 -24
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/chatRecordingService.test.js +102 -0
- package/dist/src/services/chatRecordingService.test.js.map +1 -1
- package/dist/src/services/environmentSanitization.js +4 -0
- package/dist/src/services/environmentSanitization.js.map +1 -1
- package/dist/src/services/environmentSanitization.test.js +21 -0
- package/dist/src/services/environmentSanitization.test.js.map +1 -1
- package/dist/src/services/keychainService.d.ts +0 -1
- package/dist/src/services/keychainService.js +2 -4
- package/dist/src/services/keychainService.js.map +1 -1
- package/dist/src/services/loopDetectionService.js +9 -2
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.d.ts +7 -1
- package/dist/src/services/shellExecutionService.js +224 -78
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +247 -4
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/services/toolOutputMaskingService.d.ts +2 -2
- package/dist/src/services/toolOutputMaskingService.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +53 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +76 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +4 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +9 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/semantic.js +2 -0
- package/dist/src/telemetry/semantic.js.map +1 -1
- package/dist/src/tools/edit.js +51 -30
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/glob.js +6 -0
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/grep.js +6 -0
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/ls.js +6 -0
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/mcp-client.d.ts +5 -1
- package/dist/src/tools/mcp-client.js +5 -0
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/mcp-tool.d.ts +1 -1
- package/dist/src/tools/mcp-tool.js +1 -1
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/read-file.js +6 -0
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-many-files.js +8 -0
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +1 -1
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/shell.d.ts +1 -1
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/tool-names.d.ts +10 -5
- package/dist/src/tools/tool-names.js +21 -6
- package/dist/src/tools/tool-names.js.map +1 -1
- package/dist/src/tools/tools.d.ts +7 -1
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/trackerTools.js +1 -1
- package/dist/src/tools/trackerTools.js.map +1 -1
- package/dist/src/tools/web-fetch.js +14 -0
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-search.js +7 -1
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/write-file.js +6 -0
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/utils/checkpointUtils.d.ts +1 -1
- package/dist/src/utils/editCorrector.js +1 -0
- package/dist/src/utils/editCorrector.js.map +1 -1
- package/dist/src/utils/editor.js +18 -5
- package/dist/src/utils/editor.js.map +1 -1
- package/dist/src/utils/editor.test.js +56 -2
- package/dist/src/utils/editor.test.js.map +1 -1
- package/dist/src/utils/fetch.d.ts +46 -0
- package/dist/src/utils/fetch.js +190 -16
- package/dist/src/utils/fetch.js.map +1 -1
- package/dist/src/utils/fetch.test.d.ts +6 -0
- package/dist/src/utils/fetch.test.js +206 -0
- package/dist/src/utils/fetch.test.js.map +1 -0
- package/dist/src/utils/fileUtils.js +1 -1
- package/dist/src/utils/fileUtils.js.map +1 -1
- package/dist/src/utils/googleErrors.d.ts +0 -4
- package/dist/src/utils/googleErrors.js +29 -5
- package/dist/src/utils/googleErrors.js.map +1 -1
- package/dist/src/utils/googleErrors.test.js +67 -0
- package/dist/src/utils/googleErrors.test.js.map +1 -1
- package/dist/src/utils/googleQuotaErrors.js +31 -10
- package/dist/src/utils/googleQuotaErrors.js.map +1 -1
- package/dist/src/utils/googleQuotaErrors.test.js +105 -3
- package/dist/src/utils/googleQuotaErrors.test.js.map +1 -1
- package/dist/src/utils/markdownUtils.d.ts +22 -0
- package/dist/src/utils/markdownUtils.js +126 -0
- package/dist/src/utils/markdownUtils.js.map +1 -0
- package/dist/src/utils/markdownUtils.test.d.ts +6 -0
- package/dist/src/utils/markdownUtils.test.js +107 -0
- package/dist/src/utils/markdownUtils.test.js.map +1 -0
- package/dist/src/utils/oauth-flow.js +13 -3
- package/dist/src/utils/oauth-flow.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -1
- package/dist/src/utils/paths.js +37 -7
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/paths.test.js +34 -2
- package/dist/src/utils/paths.test.js.map +1 -1
- package/dist/src/utils/sessionUtils.js +20 -11
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/sessionUtils.test.js +34 -0
- package/dist/src/utils/sessionUtils.test.js.map +1 -1
- package/dist/src/utils/workspaceContext.d.ts +0 -4
- package/dist/src/utils/workspaceContext.js +2 -27
- package/dist/src/utils/workspaceContext.js.map +1 -1
- package/dist/src/voice/responseFormatter.d.ts +38 -0
- package/dist/src/voice/responseFormatter.js +130 -0
- package/dist/src/voice/responseFormatter.js.map +1 -0
- package/dist/src/voice/responseFormatter.test.d.ts +6 -0
- package/dist/src/voice/responseFormatter.test.js +214 -0
- package/dist/src/voice/responseFormatter.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -4
- package/dist/docs/assets/theme-ansi.png +0 -0
- package/dist/docs/assets/theme-atom-one.png +0 -0
- package/dist/docs/assets/theme-ayu.png +0 -0
- package/dist/docs/assets/theme-default.png +0 -0
- package/dist/docs/assets/theme-dracula.png +0 -0
- package/dist/docs/assets/theme-github.png +0 -0
- package/dist/google-gemini-cli-core-0.34.0-nightly.20260304.28af4e127.tgz +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://github.com/google-gemini/gemini-cli/blob/main/LICENSE)
|
|
7
7
|
[](https://codewiki.google/github.com/google-gemini/gemini-cli?utm_source=badge&utm_medium=github&utm_campaign=github.com/google-gemini/gemini-cli)
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
Gemini CLI is an open-source AI agent that brings the power of Gemini directly
|
|
12
12
|
into your terminal. It provides lightweight access to Gemini, giving you the
|
|
@@ -147,7 +147,7 @@ Integrate Gemini CLI directly into your GitHub workflows with
|
|
|
147
147
|
|
|
148
148
|
Choose the authentication method that best fits your needs:
|
|
149
149
|
|
|
150
|
-
### Option 1:
|
|
150
|
+
### Option 1: Sign in with Google (OAuth login using your Google Account)
|
|
151
151
|
|
|
152
152
|
**✨ Best for:** Individual developers as well as anyone who has a Gemini Code
|
|
153
153
|
Assist License. (see
|
|
@@ -161,7 +161,7 @@ for details)
|
|
|
161
161
|
- **No API key management** - just sign in with your Google account
|
|
162
162
|
- **Automatic updates** to latest models
|
|
163
163
|
|
|
164
|
-
#### Start Gemini CLI, then choose
|
|
164
|
+
#### Start Gemini CLI, then choose _Sign in with Google_ and follow the browser authentication flow when prompted
|
|
165
165
|
|
|
166
166
|
```bash
|
|
167
167
|
gemini
|
|
@@ -60,20 +60,45 @@ All submissions, including submissions by project members, require review. We
|
|
|
60
60
|
use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
|
|
61
61
|
for this purpose.
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
issues, and other frontend-specific best practices that are easy to miss.
|
|
63
|
+
To assist with the review process, we provide an automated review tool that
|
|
64
|
+
helps detect common anti-patterns, testing issues, and other best practices that
|
|
65
|
+
are easy to miss.
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
#### Using the automated review tool
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
You can run the review tool in two ways:
|
|
70
|
+
|
|
71
|
+
1. **Using the helper script (Recommended):** We provide a script that
|
|
72
|
+
automatically handles checking out the PR into a separate worktree,
|
|
73
|
+
installing dependencies, building the project, and launching the review
|
|
74
|
+
tool.
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
./scripts/review.sh <PR_NUMBER> [model]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Warning:** If you run `scripts/review.sh`, you must have first verified
|
|
81
|
+
that the code for the PR being reviewed is safe to run and does not contain
|
|
82
|
+
data exfiltration attacks.
|
|
83
|
+
|
|
84
|
+
**Authors are strongly encouraged to run this script on their own PRs**
|
|
85
|
+
immediately after creation. This allows you to catch and fix simple issues
|
|
86
|
+
locally before a maintainer performs a full review.
|
|
87
|
+
|
|
88
|
+
**Note on Models:** By default, the script uses the latest Pro model
|
|
89
|
+
(`gemini-3.1-pro-preview`). If you do not have enough Pro quota, you can run
|
|
90
|
+
it with the latest Flash model instead:
|
|
91
|
+
`./scripts/review.sh <PR_NUMBER> gemini-3-flash-preview`.
|
|
92
|
+
|
|
93
|
+
2. **Manually from within Gemini CLI:** If you already have the PR checked out
|
|
94
|
+
and built, you can run the tool directly from the CLI prompt:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
/review-frontend <PR_NUMBER>
|
|
98
|
+
```
|
|
73
99
|
|
|
74
|
-
Replace `<PR_NUMBER>` with your pull request number.
|
|
75
|
-
|
|
76
|
-
augment their manual review process.
|
|
100
|
+
Replace `<PR_NUMBER>` with your pull request number. Reviewers should use this
|
|
101
|
+
tool to augment, not replace, their manual review process.
|
|
77
102
|
|
|
78
103
|
### Self-assigning and unassigning issues
|
|
79
104
|
|
|
@@ -267,7 +292,8 @@ npm run test:e2e
|
|
|
267
292
|
```
|
|
268
293
|
|
|
269
294
|
For more detailed information on the integration testing framework, please see
|
|
270
|
-
the
|
|
295
|
+
the
|
|
296
|
+
[Integration Tests documentation](https://geminicli.com/docs/integration-tests).
|
|
271
297
|
|
|
272
298
|
### Linting and preflight checks
|
|
273
299
|
|
|
@@ -320,11 +346,9 @@ npm run lint
|
|
|
320
346
|
|
|
321
347
|
- Please adhere to the coding style, patterns, and conventions used throughout
|
|
322
348
|
the existing codebase.
|
|
323
|
-
- Consult
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
AI-assisted development, including conventions for React, comments, and Git
|
|
327
|
-
usage.
|
|
349
|
+
- Consult [GEMINI.md](../GEMINI.md) (typically found in the project root) for
|
|
350
|
+
specific instructions related to AI-assisted development, including
|
|
351
|
+
conventions for React, comments, and Git usage.
|
|
328
352
|
- **Imports:** Pay special attention to import paths. The project uses ESLint to
|
|
329
353
|
enforce restrictions on relative imports between packages.
|
|
330
354
|
|
|
@@ -548,7 +572,7 @@ Before submitting your documentation pull request, please:
|
|
|
548
572
|
|
|
549
573
|
If you have questions about contributing documentation:
|
|
550
574
|
|
|
551
|
-
- Check our [FAQ](/docs/resources/faq
|
|
575
|
+
- Check our [FAQ](https://geminicli.com/docs/resources/faq).
|
|
552
576
|
- Review existing documentation for examples.
|
|
553
577
|
- Open [an issue](https://github.com/google-gemini/gemini-cli/issues) to discuss
|
|
554
578
|
your proposed changes.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Preview release: v0.33.0-preview.
|
|
1
|
+
# Preview release: v0.33.0-preview.14
|
|
2
2
|
|
|
3
|
-
Released: March
|
|
3
|
+
Released: March 10, 2026
|
|
4
4
|
|
|
5
5
|
Our preview release includes the latest, new, and experimental features. This
|
|
6
6
|
release may not be as stable as our [latest weekly release](latest.md).
|
|
@@ -29,6 +29,13 @@ npm install -g @google/gemini-cli@preview
|
|
|
29
29
|
|
|
30
30
|
## What's Changed
|
|
31
31
|
|
|
32
|
+
- fix(patch): cherry-pick 1b69637 to release/v0.33.0-preview.13-pr-21467
|
|
33
|
+
[CONFLICTS] by @gemini-cli-robot in
|
|
34
|
+
[#21930](https://github.com/google-gemini/gemini-cli/pull/21930)
|
|
35
|
+
- fix(patch): cherry-pick e5615f4 to release/v0.33.0-preview.12-pr-21037 to
|
|
36
|
+
patch version v0.33.0-preview.12 and create version 0.33.0-preview.13 by
|
|
37
|
+
@gemini-cli-robot in
|
|
38
|
+
[#21922](https://github.com/google-gemini/gemini-cli/pull/21922)
|
|
32
39
|
- fix(patch): cherry-pick 7ec477d to release/v0.33.0-preview.3-pr-21305 to patch
|
|
33
40
|
version v0.33.0-preview.3 and create version 0.33.0-preview.4 by
|
|
34
41
|
@gemini-cli-robot in
|
|
@@ -198,4 +205,4 @@ npm install -g @google/gemini-cli@preview
|
|
|
198
205
|
[#20991](https://github.com/google-gemini/gemini-cli/pull/20991)
|
|
199
206
|
|
|
200
207
|
**Full Changelog**:
|
|
201
|
-
https://github.com/google-gemini/gemini-cli/compare/v0.32.0-preview.0...v0.33.0-preview.
|
|
208
|
+
https://github.com/google-gemini/gemini-cli/compare/v0.32.0-preview.0...v0.33.0-preview.14
|
|
@@ -8,7 +8,8 @@ and parameters.
|
|
|
8
8
|
| Command | Description | Example |
|
|
9
9
|
| ---------------------------------- | ---------------------------------- | ------------------------------------------------------------ |
|
|
10
10
|
| `gemini` | Start interactive REPL | `gemini` |
|
|
11
|
-
| `gemini "query"`
|
|
11
|
+
| `gemini -p "query"` | Query non-interactively | `gemini -p "summarize README.md"` |
|
|
12
|
+
| `gemini "query"` | Query and continue interactively | `gemini "explain this project"` |
|
|
12
13
|
| `cat file \| gemini` | Process piped content | `cat logs.txt \| gemini`<br>`Get-Content logs.txt \| gemini` |
|
|
13
14
|
| `gemini -i "query"` | Execute and continue interactively | `gemini -i "What is the purpose of this project?"` |
|
|
14
15
|
| `gemini -r "latest"` | Continue most recent session | `gemini -r "latest"` |
|
|
@@ -20,9 +21,24 @@ and parameters.
|
|
|
20
21
|
|
|
21
22
|
### Positional arguments
|
|
22
23
|
|
|
23
|
-
| Argument | Type | Description
|
|
24
|
-
| -------- | ----------------- |
|
|
25
|
-
| `query` | string (variadic) | Positional prompt. Defaults to
|
|
24
|
+
| Argument | Type | Description |
|
|
25
|
+
| -------- | ----------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| `query` | string (variadic) | Positional prompt. Defaults to interactive mode in a TTY. Use `-p/--prompt` for non-interactive execution. |
|
|
27
|
+
|
|
28
|
+
## Interactive commands
|
|
29
|
+
|
|
30
|
+
These commands are available within the interactive REPL.
|
|
31
|
+
|
|
32
|
+
| Command | Description |
|
|
33
|
+
| -------------------- | ---------------------------------------- |
|
|
34
|
+
| `/skills reload` | Reload discovered skills from disk |
|
|
35
|
+
| `/agents reload` | Reload the agent registry |
|
|
36
|
+
| `/commands reload` | Reload custom slash commands |
|
|
37
|
+
| `/memory reload` | Reload context files (e.g., `GEMINI.md`) |
|
|
38
|
+
| `/mcp reload` | Restart and reload MCP servers |
|
|
39
|
+
| `/extensions reload` | Reload all active extensions |
|
|
40
|
+
| `/help` | Show help for all commands |
|
|
41
|
+
| `/quit` | Exit the interactive session |
|
|
26
42
|
|
|
27
43
|
## CLI Options
|
|
28
44
|
|
|
@@ -32,7 +48,7 @@ and parameters.
|
|
|
32
48
|
| `--version` | `-v` | - | - | Show CLI version number and exit |
|
|
33
49
|
| `--help` | `-h` | - | - | Show help information |
|
|
34
50
|
| `--model` | `-m` | string | `auto` | Model to use. See [Model Selection](#model-selection) for available values. |
|
|
35
|
-
| `--prompt` | `-p` | string | - | Prompt text. Appended to stdin input if provided.
|
|
51
|
+
| `--prompt` | `-p` | string | - | Prompt text. Appended to stdin input if provided. Forces non-interactive mode. |
|
|
36
52
|
| `--prompt-interactive` | `-i` | string | - | Execute prompt and continue in interactive mode |
|
|
37
53
|
| `--sandbox` | `-s` | boolean | `false` | Run in a sandboxed environment for safer execution |
|
|
38
54
|
| `--approval-mode` | - | string | `default` | Approval mode for tool execution. Choices: `default`, `auto_edit`, `yolo` |
|
|
@@ -63,7 +63,7 @@ You can interact with the loaded context files by using the `/memory` command.
|
|
|
63
63
|
- **`/memory show`**: Displays the full, concatenated content of the current
|
|
64
64
|
hierarchical memory. This lets you inspect the exact instructional context
|
|
65
65
|
being provided to the model.
|
|
66
|
-
- **`/memory
|
|
66
|
+
- **`/memory reload`**: Forces a re-scan and reload of all `GEMINI.md` files
|
|
67
67
|
from all configured locations.
|
|
68
68
|
- **`/memory add <text>`**: Appends your text to your global
|
|
69
69
|
`~/.gemini/GEMINI.md` file. This lets you add persistent memories on the fly.
|
|
@@ -6,7 +6,7 @@ structured text or JSON output without an interactive terminal UI.
|
|
|
6
6
|
## Technical reference
|
|
7
7
|
|
|
8
8
|
Headless mode is triggered when the CLI is run in a non-TTY environment or when
|
|
9
|
-
providing a query
|
|
9
|
+
providing a query with the `-p` (or `--prompt`) flag.
|
|
10
10
|
|
|
11
11
|
### Output formats
|
|
12
12
|
|
|
@@ -31,7 +31,8 @@ Returns a stream of newline-delimited JSON (JSONL) events.
|
|
|
31
31
|
- `tool_use`: Tool call requests with arguments.
|
|
32
32
|
- `tool_result`: Output from executed tools.
|
|
33
33
|
- `error`: Non-fatal warnings and system errors.
|
|
34
|
-
- `result`: Final outcome with aggregated statistics
|
|
34
|
+
- `result`: Final outcome with aggregated statistics and per-model token usage
|
|
35
|
+
breakdowns.
|
|
35
36
|
|
|
36
37
|
## Exit codes
|
|
37
38
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Notifications (experimental)
|
|
2
|
+
|
|
3
|
+
Gemini CLI can send system notifications to alert you when a session completes
|
|
4
|
+
or when it needs your attention, such as when it's waiting for you to approve a
|
|
5
|
+
tool call.
|
|
6
|
+
|
|
7
|
+
> **Note:** This is a preview feature currently under active development.
|
|
8
|
+
> Preview features may be available on the **Preview** channel or may need to be
|
|
9
|
+
> enabled under `/settings`.
|
|
10
|
+
|
|
11
|
+
Notifications are particularly useful when running long-running tasks or using
|
|
12
|
+
[Plan Mode](./plan-mode.md), letting you switch to other windows while Gemini
|
|
13
|
+
CLI works in the background.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
Currently, system notifications are only supported on macOS.
|
|
18
|
+
|
|
19
|
+
### Terminal support
|
|
20
|
+
|
|
21
|
+
The CLI uses the OSC 9 terminal escape sequence to trigger system notifications.
|
|
22
|
+
This is supported by several modern terminal emulators. If your terminal does
|
|
23
|
+
not support OSC 9 notifications, Gemini CLI falls back to a system alert sound
|
|
24
|
+
to get your attention.
|
|
25
|
+
|
|
26
|
+
## Enable notifications
|
|
27
|
+
|
|
28
|
+
Notifications are disabled by default. You can enable them using the `/settings`
|
|
29
|
+
command or by updating your `settings.json` file.
|
|
30
|
+
|
|
31
|
+
1. Open the settings dialog by typing `/settings` in an interactive session.
|
|
32
|
+
2. Navigate to the **General** category.
|
|
33
|
+
3. Toggle the **Enable Notifications** setting to **On**.
|
|
34
|
+
|
|
35
|
+
Alternatively, add the following to your `settings.json`:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"general": {
|
|
40
|
+
"enableNotifications": true
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Types of notifications
|
|
46
|
+
|
|
47
|
+
Gemini CLI sends notifications for the following events:
|
|
48
|
+
|
|
49
|
+
- **Action required:** Triggered when the model is waiting for user input or
|
|
50
|
+
tool approval. This helps you know when the CLI has paused and needs you to
|
|
51
|
+
intervene.
|
|
52
|
+
- **Session complete:** Triggered when a session finishes successfully. This is
|
|
53
|
+
useful for tracking the completion of automated tasks.
|
|
54
|
+
|
|
55
|
+
## Next steps
|
|
56
|
+
|
|
57
|
+
- Start planning with [Plan Mode](./plan-mode.md).
|
|
58
|
+
- Configure your experience with other [settings](./settings.md).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Plan Mode
|
|
1
|
+
# Plan Mode
|
|
2
2
|
|
|
3
3
|
Plan Mode is a read-only environment for architecting robust solutions before
|
|
4
4
|
implementation. With Plan Mode, you can:
|
|
@@ -8,27 +8,8 @@ implementation. With Plan Mode, you can:
|
|
|
8
8
|
- **Design:** Understand problems, evaluate trade-offs, and choose a solution.
|
|
9
9
|
- **Plan:** Align on an execution strategy before any code is modified.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
> suggestions, or encounter issues:
|
|
14
|
-
>
|
|
15
|
-
> - [Open an issue] on GitHub.
|
|
16
|
-
> - Use the **/bug** command within Gemini CLI to file an issue.
|
|
17
|
-
|
|
18
|
-
## How to enable Plan Mode
|
|
19
|
-
|
|
20
|
-
Enable Plan Mode in **Settings** or by editing your configuration file.
|
|
21
|
-
|
|
22
|
-
- **Settings:** Use the `/settings` command and set **Plan** to `true`.
|
|
23
|
-
- **Configuration:** Add the following to your `settings.json`:
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
{
|
|
27
|
-
"experimental": {
|
|
28
|
-
"plan": true
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
```
|
|
11
|
+
Plan Mode is enabled by default. You can manage this setting using the
|
|
12
|
+
`/settings` command.
|
|
32
13
|
|
|
33
14
|
## How to enter Plan Mode
|
|
34
15
|
|
|
@@ -62,8 +43,11 @@ To start Plan Mode while using Gemini CLI:
|
|
|
62
43
|
- **Command:** Type `/plan` in the input box.
|
|
63
44
|
|
|
64
45
|
- **Natural Language:** Ask Gemini CLI to "start a plan for...". Gemini CLI
|
|
65
|
-
calls the
|
|
66
|
-
|
|
46
|
+
calls the
|
|
47
|
+
[`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode) tool
|
|
48
|
+
to switch modes.
|
|
49
|
+
> **Note:** This tool is not available when Gemini CLI is in
|
|
50
|
+
> [YOLO mode](../reference/configuration.md#command-line-arguments).
|
|
67
51
|
|
|
68
52
|
## How to use Plan Mode
|
|
69
53
|
|
|
@@ -74,7 +58,8 @@ Gemini CLI takes action.
|
|
|
74
58
|
will then enter Plan Mode (if it's not already) to research the task.
|
|
75
59
|
2. **Review research and provide input:** As Gemini CLI analyzes your codebase,
|
|
76
60
|
it may ask you questions or present different implementation options using
|
|
77
|
-
[`ask_user`]. Provide your preferences to help guide
|
|
61
|
+
[`ask_user`](../tools/ask-user.md). Provide your preferences to help guide
|
|
62
|
+
the design.
|
|
78
63
|
3. **Review the plan:** Once Gemini CLI has a proposed strategy, it creates a
|
|
79
64
|
detailed implementation plan as a Markdown file in your plans directory. You
|
|
80
65
|
can open and read this file to understand the proposed changes.
|
|
@@ -116,25 +101,33 @@ Plan Mode enforces strict safety policies to prevent accidental changes.
|
|
|
116
101
|
|
|
117
102
|
These are the only allowed tools:
|
|
118
103
|
|
|
119
|
-
- **FileSystem (Read):**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
- **
|
|
124
|
-
`
|
|
125
|
-
- **
|
|
104
|
+
- **FileSystem (Read):**
|
|
105
|
+
[`read_file`](../tools/file-system.md#2-read_file-readfile),
|
|
106
|
+
[`list_directory`](../tools/file-system.md#1-list_directory-readfolder),
|
|
107
|
+
[`glob`](../tools/file-system.md#4-glob-findfiles)
|
|
108
|
+
- **Search:** [`grep_search`](../tools/file-system.md#5-grep_search-searchtext),
|
|
109
|
+
[`google_web_search`](../tools/web-search.md)
|
|
110
|
+
- **Research Subagents:**
|
|
111
|
+
[`codebase_investigator`](../core/subagents.md#codebase-investigator),
|
|
112
|
+
[`cli_help`](../core/subagents.md#cli-help-agent)
|
|
113
|
+
- **Interaction:** [`ask_user`](../tools/ask-user.md)
|
|
114
|
+
- **MCP tools (Read):** Read-only [MCP tools](../tools/mcp-server.md) (for
|
|
115
|
+
example, `github_read_issue`, `postgres_read_schema`) are allowed.
|
|
116
|
+
- **Planning (Write):**
|
|
117
|
+
[`write_file`](../tools/file-system.md#3-write_file-writefile) and
|
|
118
|
+
[`replace`](../tools/file-system.md#6-replace-edit) only allowed for `.md`
|
|
126
119
|
files in the `~/.gemini/tmp/<project>/<session-id>/plans/` directory or your
|
|
127
120
|
[custom plans directory](#custom-plan-directory-and-policies).
|
|
128
|
-
- **Memory:** [`save_memory`]
|
|
129
|
-
- **Skills:** [`activate_skill`] (allows loading specialized
|
|
130
|
-
resources in a read-only manner)
|
|
121
|
+
- **Memory:** [`save_memory`](../tools/memory.md)
|
|
122
|
+
- **Skills:** [`activate_skill`](../cli/skills.md) (allows loading specialized
|
|
123
|
+
instructions and resources in a read-only manner)
|
|
131
124
|
|
|
132
125
|
### Custom planning with skills
|
|
133
126
|
|
|
134
|
-
You can use [Agent Skills] to customize how Gemini CLI
|
|
135
|
-
specific types of tasks. When a skill is activated
|
|
136
|
-
specialized instructions and procedural workflows will
|
|
137
|
-
design, and planning phases.
|
|
127
|
+
You can use [Agent Skills](../cli/skills.md) to customize how Gemini CLI
|
|
128
|
+
approaches planning for specific types of tasks. When a skill is activated
|
|
129
|
+
during Plan Mode, its specialized instructions and procedural workflows will
|
|
130
|
+
guide the research, design, and planning phases.
|
|
138
131
|
|
|
139
132
|
For example:
|
|
140
133
|
|
|
@@ -151,10 +144,32 @@ based on the task description.
|
|
|
151
144
|
|
|
152
145
|
### Custom policies
|
|
153
146
|
|
|
154
|
-
Plan Mode's default tool restrictions are managed by the
|
|
155
|
-
defined in the built-in
|
|
156
|
-
enforces the read-only state,
|
|
157
|
-
|
|
147
|
+
Plan Mode's default tool restrictions are managed by the
|
|
148
|
+
[policy engine](../reference/policy-engine.md) and defined in the built-in
|
|
149
|
+
[`plan.toml`] file. The built-in policy (Tier 1) enforces the read-only state,
|
|
150
|
+
but you can customize these rules by creating your own policies in your
|
|
151
|
+
`~/.gemini/policies/` directory (Tier 2).
|
|
152
|
+
|
|
153
|
+
#### Global vs. mode-specific rules
|
|
154
|
+
|
|
155
|
+
As described in the
|
|
156
|
+
[policy engine documentation](../reference/policy-engine.md#approval-modes), any
|
|
157
|
+
rule that does not explicitly specify `modes` is considered "always active" and
|
|
158
|
+
will apply to Plan Mode as well.
|
|
159
|
+
|
|
160
|
+
If you want a rule to apply to other modes but _not_ to Plan Mode, you must
|
|
161
|
+
explicitly specify the target modes. For example, to allow `npm test` in default
|
|
162
|
+
and Auto-Edit modes but not in Plan Mode:
|
|
163
|
+
|
|
164
|
+
```toml
|
|
165
|
+
[[rule]]
|
|
166
|
+
toolName = "run_shell_command"
|
|
167
|
+
commandPrefix = "npm test"
|
|
168
|
+
decision = "allow"
|
|
169
|
+
priority = 100
|
|
170
|
+
# By omitting "plan", this rule will not be active in Plan Mode.
|
|
171
|
+
modes = ["default", "autoEdit"]
|
|
172
|
+
```
|
|
158
173
|
|
|
159
174
|
#### Example: Automatically approve read-only MCP tools
|
|
160
175
|
|
|
@@ -173,8 +188,8 @@ priority = 100
|
|
|
173
188
|
modes = ["plan"]
|
|
174
189
|
```
|
|
175
190
|
|
|
176
|
-
For more information on how the policy engine works, see the
|
|
177
|
-
docs.
|
|
191
|
+
For more information on how the policy engine works, see the
|
|
192
|
+
[policy engine](../reference/policy-engine.md) docs.
|
|
178
193
|
|
|
179
194
|
#### Example: Allow git commands in Plan Mode
|
|
180
195
|
|
|
@@ -194,9 +209,12 @@ modes = ["plan"]
|
|
|
194
209
|
|
|
195
210
|
#### Example: Enable custom subagents in Plan Mode
|
|
196
211
|
|
|
197
|
-
Built-in research [subagents] like
|
|
198
|
-
|
|
199
|
-
subagents
|
|
212
|
+
Built-in research [subagents](../core/subagents.md) like
|
|
213
|
+
[`codebase_investigator`](../core/subagents.md#codebase-investigator) and
|
|
214
|
+
[`cli_help`](../core/subagents.md#cli-help-agent) are enabled by default in Plan
|
|
215
|
+
Mode. You can enable additional
|
|
216
|
+
[custom subagents](../core/subagents.md#creating-custom-subagents) by adding a
|
|
217
|
+
rule to your policy.
|
|
200
218
|
|
|
201
219
|
`~/.gemini/policies/research-subagents.toml`
|
|
202
220
|
|
|
@@ -235,10 +253,11 @@ locations defined within a project's workspace cannot be used to escape and
|
|
|
235
253
|
overwrite sensitive files elsewhere. Any user-configured directory must reside
|
|
236
254
|
within the project boundary.
|
|
237
255
|
|
|
238
|
-
Using a custom directory requires updating your
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
256
|
+
Using a custom directory requires updating your
|
|
257
|
+
[policy engine](../reference/policy-engine.md) configurations to allow
|
|
258
|
+
`write_file` and `replace` in that specific location. For example, to allow
|
|
259
|
+
writing to the `.gemini/plans` directory within your project, create a policy
|
|
260
|
+
file at `~/.gemini/policies/plan-custom-directory.toml`:
|
|
242
261
|
|
|
243
262
|
```toml
|
|
244
263
|
[[rule]]
|
|
@@ -254,13 +273,16 @@ argsPattern = "\"file_path\":\"[^\"]+[\\\\/]+\\.gemini[\\\\/]+plans[\\\\/]+[\\w-
|
|
|
254
273
|
## Planning workflows
|
|
255
274
|
|
|
256
275
|
Plan Mode provides building blocks for structured research and design. These are
|
|
257
|
-
implemented as [extensions] using core planning tools
|
|
258
|
-
|
|
276
|
+
implemented as [extensions](../extensions/index.md) using core planning tools
|
|
277
|
+
like [`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode),
|
|
278
|
+
[`exit_plan_mode`](../tools/planning.md#2-exit_plan_mode-exitplanmode), and
|
|
279
|
+
[`ask_user`](../tools/ask-user.md).
|
|
259
280
|
|
|
260
281
|
### Built-in planning workflow
|
|
261
282
|
|
|
262
283
|
The built-in planner uses an adaptive workflow to analyze your project, consult
|
|
263
|
-
you on trade-offs via [`ask_user`], and draft a plan for
|
|
284
|
+
you on trade-offs via [`ask_user`](../tools/ask-user.md), and draft a plan for
|
|
285
|
+
your approval.
|
|
264
286
|
|
|
265
287
|
### Custom planning workflows
|
|
266
288
|
|
|
@@ -272,23 +294,29 @@ You can install or create specialized planners to suit your workflow.
|
|
|
272
294
|
"tracks" and stores persistent artifacts in your project's `conductor/`
|
|
273
295
|
directory:
|
|
274
296
|
|
|
275
|
-
- **Automate transitions:** Switches to read-only mode via
|
|
276
|
-
|
|
297
|
+
- **Automate transitions:** Switches to read-only mode via
|
|
298
|
+
[`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode).
|
|
299
|
+
- **Streamline decisions:** Uses [`ask_user`](../tools/ask-user.md) for
|
|
300
|
+
architectural choices.
|
|
277
301
|
- **Maintain project context:** Stores artifacts in the project directory using
|
|
278
302
|
[custom plan directory and policies](#custom-plan-directory-and-policies).
|
|
279
|
-
- **Handoff execution:** Transitions to implementation via
|
|
303
|
+
- **Handoff execution:** Transitions to implementation via
|
|
304
|
+
[`exit_plan_mode`](../tools/planning.md#2-exit_plan_mode-exitplanmode).
|
|
280
305
|
|
|
281
306
|
#### Build your own
|
|
282
307
|
|
|
283
308
|
Since Plan Mode is built on modular building blocks, you can develop your own
|
|
284
|
-
custom planning workflow as an [extensions]. By
|
|
285
|
-
[custom policies](#custom-policies), you can define
|
|
286
|
-
and stores plans for your specific domain.
|
|
309
|
+
custom planning workflow as an [extensions](../extensions/index.md). By
|
|
310
|
+
leveraging core tools and [custom policies](#custom-policies), you can define
|
|
311
|
+
how Gemini CLI researches and stores plans for your specific domain.
|
|
287
312
|
|
|
288
313
|
To build a custom planning workflow, you can use:
|
|
289
314
|
|
|
290
|
-
- **Tool usage:** Use core tools like
|
|
291
|
-
[`
|
|
315
|
+
- **Tool usage:** Use core tools like
|
|
316
|
+
[`enter_plan_mode`](../tools/planning.md#1-enter_plan_mode-enterplanmode),
|
|
317
|
+
[`ask_user`](../tools/ask-user.md), and
|
|
318
|
+
[`exit_plan_mode`](../tools/planning.md#2-exit_plan_mode-exitplanmode) to
|
|
319
|
+
manage the research and design process.
|
|
292
320
|
- **Customization:** Set your own storage locations and policy rules using
|
|
293
321
|
[custom plan directories](#custom-plan-directory-and-policies) and
|
|
294
322
|
[custom policies](#custom-policies).
|
|
@@ -302,8 +330,9 @@ high-reasoning model routing.
|
|
|
302
330
|
|
|
303
331
|
## Automatic Model Routing
|
|
304
332
|
|
|
305
|
-
When using an [auto model], Gemini CLI
|
|
306
|
-
|
|
333
|
+
When using an [auto model](../reference/configuration.md#model), Gemini CLI
|
|
334
|
+
automatically optimizes [model routing](../cli/telemetry.md#model-routing) based
|
|
335
|
+
on the current phase of your task:
|
|
307
336
|
|
|
308
337
|
1. **Planning Phase:** While in Plan Mode, the CLI routes requests to a
|
|
309
338
|
high-reasoning **Pro** model to ensure robust architectural decisions and
|
|
@@ -334,7 +363,8 @@ associated plan files and task trackers.
|
|
|
334
363
|
- **Default behavior:** Sessions (and their plans) are retained for **30 days**.
|
|
335
364
|
- **Configuration:** You can customize this behavior via the `/settings` command
|
|
336
365
|
(search for **Session Retention**) or in your `settings.json` file. See
|
|
337
|
-
[session retention] for more
|
|
366
|
+
[session retention](../cli/session-management.md#session-retention) for more
|
|
367
|
+
details.
|
|
338
368
|
|
|
339
369
|
Manual deletion also removes all associated artifacts:
|
|
340
370
|
|
|
@@ -344,32 +374,7 @@ Manual deletion also removes all associated artifacts:
|
|
|
344
374
|
If you use a [custom plans directory](#custom-plan-directory-and-policies),
|
|
345
375
|
those files are not automatically deleted and must be managed manually.
|
|
346
376
|
|
|
347
|
-
[`list_directory`]: /docs/tools/file-system.md#1-list_directory-readfolder
|
|
348
|
-
[`read_file`]: /docs/tools/file-system.md#2-read_file-readfile
|
|
349
|
-
[`grep_search`]: /docs/tools/file-system.md#5-grep_search-searchtext
|
|
350
|
-
[`write_file`]: /docs/tools/file-system.md#3-write_file-writefile
|
|
351
|
-
[`glob`]: /docs/tools/file-system.md#4-glob-findfiles
|
|
352
|
-
[`google_web_search`]: /docs/tools/web-search.md
|
|
353
|
-
[`replace`]: /docs/tools/file-system.md#6-replace-edit
|
|
354
|
-
[MCP tools]: /docs/tools/mcp-server.md
|
|
355
|
-
[`save_memory`]: /docs/tools/memory.md
|
|
356
|
-
[`activate_skill`]: /docs/cli/skills.md
|
|
357
|
-
[`codebase_investigator`]: /docs/core/subagents.md#codebase-investigator
|
|
358
|
-
[`cli_help`]: /docs/core/subagents.md#cli-help-agent
|
|
359
|
-
[subagents]: /docs/core/subagents.md
|
|
360
|
-
[custom subagents]: /docs/core/subagents.md#creating-custom-subagents
|
|
361
|
-
[policy engine]: /docs/reference/policy-engine.md
|
|
362
|
-
[`enter_plan_mode`]: /docs/tools/planning.md#1-enter_plan_mode-enterplanmode
|
|
363
|
-
[`exit_plan_mode`]: /docs/tools/planning.md#2-exit_plan_mode-exitplanmode
|
|
364
|
-
[`ask_user`]: /docs/tools/ask-user.md
|
|
365
|
-
[YOLO mode]: /docs/reference/configuration.md#command-line-arguments
|
|
366
377
|
[`plan.toml`]:
|
|
367
378
|
https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/policy/policies/plan.toml
|
|
368
|
-
[auto model]: /docs/reference/configuration.md#model
|
|
369
|
-
[model routing]: /docs/cli/telemetry.md#model-routing
|
|
370
|
-
[preferred external editor]: /docs/reference/configuration.md#general
|
|
371
|
-
[session retention]: /docs/cli/session-management.md#session-retention
|
|
372
|
-
[extensions]: /docs/extensions/
|
|
373
379
|
[Conductor]: https://github.com/gemini-cli-extensions/conductor
|
|
374
380
|
[open an issue]: https://github.com/google-gemini/gemini-cli/issues
|
|
375
|
-
[Agent Skills]: /docs/cli/skills.md
|