@google/gemini-cli-core 0.36.0-preview.7 → 0.37.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/dist/docs/CONTRIBUTING.md +10 -7
- package/dist/docs/assets/theme-tokyonight-dark.png +0 -0
- package/dist/docs/changelogs/index.md +24 -0
- package/dist/docs/changelogs/latest.md +366 -459
- package/dist/docs/changelogs/preview.md +362 -356
- package/dist/docs/cli/acp-mode.md +126 -0
- package/dist/docs/cli/cli-reference.md +1 -1
- package/dist/docs/cli/notifications.md +5 -5
- package/dist/docs/cli/plan-mode.md +12 -8
- package/dist/docs/cli/sandbox.md +1 -1
- package/dist/docs/cli/settings.md +14 -13
- package/dist/docs/cli/themes.md +5 -0
- package/dist/docs/core/index.md +2 -2
- package/dist/docs/core/subagents.md +134 -23
- package/dist/docs/get-started/gemini-3.md +1 -1
- package/dist/docs/get-started/index.md +127 -1
- package/dist/docs/ide-integration/index.md +99 -24
- package/dist/docs/index.md +0 -2
- package/dist/docs/redirects.json +1 -0
- package/dist/docs/reference/commands.md +1 -3
- package/dist/docs/reference/configuration.md +183 -92
- package/dist/docs/reference/keyboard-shortcuts.md +14 -6
- package/dist/docs/reference/policy-engine.md +16 -30
- package/dist/docs/reference/tools.md +56 -23
- package/dist/docs/resources/quota-and-pricing.md +23 -9
- package/dist/docs/sidebar.json +11 -4
- package/dist/docs/tools/planning.md +6 -4
- package/dist/src/agents/agentLoader.d.ts +12 -12
- package/dist/src/agents/agentLoader.js +1 -0
- package/dist/src/agents/agentLoader.js.map +1 -1
- package/dist/src/agents/browser/automationOverlay.js +2 -10
- package/dist/src/agents/browser/automationOverlay.js.map +1 -1
- package/dist/src/agents/browser/browserAgentDefinition.js +10 -3
- package/dist/src/agents/browser/browserAgentDefinition.js.map +1 -1
- package/dist/src/agents/browser/browserAgentFactory.d.ts +4 -4
- package/dist/src/agents/browser/browserAgentFactory.js +15 -29
- package/dist/src/agents/browser/browserAgentFactory.js.map +1 -1
- package/dist/src/agents/browser/browserAgentFactory.test.js +41 -24
- package/dist/src/agents/browser/browserAgentFactory.test.js.map +1 -1
- package/dist/src/agents/browser/browserAgentInvocation.d.ts +1 -0
- package/dist/src/agents/browser/browserAgentInvocation.js +60 -27
- package/dist/src/agents/browser/browserAgentInvocation.js.map +1 -1
- package/dist/src/agents/browser/browserAgentInvocation.test.js +59 -5
- package/dist/src/agents/browser/browserAgentInvocation.test.js.map +1 -1
- package/dist/src/agents/browser/browserManager.d.ts +51 -8
- package/dist/src/agents/browser/browserManager.js +242 -70
- package/dist/src/agents/browser/browserManager.js.map +1 -1
- package/dist/src/agents/browser/browserManager.test.js +384 -17
- package/dist/src/agents/browser/browserManager.test.js.map +1 -1
- package/dist/src/agents/browser/inputBlocker.d.ts +4 -4
- package/dist/src/agents/browser/inputBlocker.js +8 -18
- package/dist/src/agents/browser/inputBlocker.js.map +1 -1
- package/dist/src/agents/browser/inputBlocker.test.js +31 -3
- package/dist/src/agents/browser/inputBlocker.test.js.map +1 -1
- package/dist/src/agents/browser/mcpToolWrapper.d.ts +1 -1
- package/dist/src/agents/browser/mcpToolWrapper.js +9 -6
- package/dist/src/agents/browser/mcpToolWrapper.js.map +1 -1
- package/dist/src/agents/browser/mcpToolWrapper.test.js +2 -2
- package/dist/src/agents/browser/mcpToolWrapper.test.js.map +1 -1
- package/dist/src/agents/browser/snapshotSuperseder.d.ts +31 -0
- package/dist/src/agents/browser/snapshotSuperseder.js +101 -0
- package/dist/src/agents/browser/snapshotSuperseder.js.map +1 -0
- package/dist/src/agents/browser/snapshotSuperseder.test.js +158 -0
- package/dist/src/agents/browser/snapshotSuperseder.test.js.map +1 -0
- package/dist/src/agents/local-executor.d.ts +4 -0
- package/dist/src/agents/local-executor.js +46 -19
- package/dist/src/agents/local-executor.js.map +1 -1
- package/dist/src/agents/local-executor.test.js +118 -18
- package/dist/src/agents/local-executor.test.js.map +1 -1
- package/dist/src/agents/local-invocation.d.ts +1 -0
- package/dist/src/agents/local-invocation.js +19 -9
- package/dist/src/agents/local-invocation.js.map +1 -1
- package/dist/src/agents/local-invocation.test.js +24 -0
- package/dist/src/agents/local-invocation.test.js.map +1 -1
- package/dist/src/agents/registry.js +16 -1
- package/dist/src/agents/registry.js.map +1 -1
- package/dist/src/agents/registry.test.js +67 -0
- package/dist/src/agents/registry.test.js.map +1 -1
- package/dist/src/agents/types.d.ts +9 -0
- package/dist/src/agents/types.js.map +1 -1
- package/dist/src/code_assist/oauth2.js +8 -3
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +57 -0
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/code_assist/setup.js +5 -2
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/code_assist/setup.test.js +27 -1
- package/dist/src/code_assist/setup.test.js.map +1 -1
- package/dist/src/code_assist/types.d.ts +80 -80
- package/dist/src/config/agent-loop-context.d.ts +2 -0
- package/dist/src/config/config.d.ts +81 -16
- package/dist/src/config/config.js +147 -51
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +89 -2
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/defaultModelConfigs.js +9 -0
- package/dist/src/config/defaultModelConfigs.js.map +1 -1
- package/dist/src/config/memory.d.ts +1 -0
- package/dist/src/config/memory.js +6 -0
- package/dist/src/config/memory.js.map +1 -1
- package/dist/src/config/storage.d.ts +1 -0
- package/dist/src/config/storage.js +4 -0
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/config/storage.test.js +5 -0
- package/dist/src/config/storage.test.js.map +1 -1
- package/dist/src/config/topicState.d.ts +21 -0
- package/dist/src/config/topicState.js +41 -0
- package/dist/src/config/topicState.js.map +1 -0
- package/dist/src/confirmation-bus/types.d.ts +9 -2
- package/dist/src/confirmation-bus/types.js +1 -0
- package/dist/src/confirmation-bus/types.js.map +1 -1
- package/dist/src/context/agentHistoryProvider.d.ts +45 -0
- package/dist/src/context/agentHistoryProvider.js +298 -0
- package/dist/src/context/agentHistoryProvider.js.map +1 -0
- package/dist/src/context/agentHistoryProvider.test.d.ts +6 -0
- package/dist/src/context/agentHistoryProvider.test.js +394 -0
- package/dist/src/context/agentHistoryProvider.test.js.map +1 -0
- package/dist/src/context/chatCompressionService.js.map +1 -0
- package/dist/src/context/chatCompressionService.test.js.map +1 -0
- package/dist/src/{services → context}/contextManager.d.ts +2 -0
- package/dist/src/{services → context}/contextManager.js +18 -9
- package/dist/src/context/contextManager.js.map +1 -0
- package/dist/src/{services → context}/contextManager.test.js +21 -6
- package/dist/src/context/contextManager.test.js.map +1 -0
- package/dist/src/context/toolDistillationService.d.ts +38 -0
- package/dist/src/context/toolDistillationService.js +170 -0
- package/dist/src/context/toolDistillationService.js.map +1 -0
- package/dist/src/context/toolDistillationService.test.d.ts +6 -0
- package/dist/src/context/toolDistillationService.test.js +83 -0
- package/dist/src/context/toolDistillationService.test.js.map +1 -0
- package/dist/src/{services → context}/toolOutputMaskingService.d.ts +2 -2
- package/dist/src/{services → context}/toolOutputMaskingService.js +7 -7
- package/dist/src/context/toolOutputMaskingService.js.map +1 -0
- package/dist/src/context/toolOutputMaskingService.test.d.ts +6 -0
- package/dist/src/{services → context}/toolOutputMaskingService.test.js +4 -5
- package/dist/src/context/toolOutputMaskingService.test.js.map +1 -0
- package/dist/src/context/truncation.d.ts +26 -0
- package/dist/src/context/truncation.js +102 -0
- package/dist/src/context/truncation.js.map +1 -0
- package/dist/src/core/client.d.ts +3 -1
- package/dist/src/core/client.js +23 -13
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +29 -34
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/contentGenerator.d.ts +0 -1
- package/dist/src/core/contentGenerator.js +2 -28
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/contentGenerator.test.js +1 -101
- package/dist/src/core/contentGenerator.test.js.map +1 -1
- package/dist/src/core/geminiChat.js +4 -5
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +71 -18
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/prompts-substitution.test.js +5 -0
- package/dist/src/core/prompts-substitution.test.js.map +1 -1
- package/dist/src/core/prompts.test.js +3 -0
- package/dist/src/core/prompts.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/index.d.ts +7 -3
- package/dist/src/index.js +9 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/policy/config.d.ts +1 -1
- package/dist/src/policy/config.js +5 -2
- package/dist/src/policy/config.js.map +1 -1
- package/dist/src/policy/policies/discovered.toml +7 -0
- package/dist/src/policy/policies/non-interactive.toml +7 -0
- package/dist/src/policy/policies/plan.toml +25 -0
- package/dist/src/policy/policies/read-only.toml +6 -0
- package/dist/src/policy/policies/sandbox-default.toml +3 -2
- package/dist/src/policy/policies/write.toml +21 -0
- package/dist/src/policy/policies/yolo.toml +1 -1
- package/dist/src/policy/policy-engine.d.ts +2 -4
- package/dist/src/policy/policy-engine.js +24 -37
- package/dist/src/policy/policy-engine.js.map +1 -1
- package/dist/src/policy/policy-engine.test.js +107 -29
- package/dist/src/policy/policy-engine.test.js.map +1 -1
- package/dist/src/policy/topic-policy.test.d.ts +6 -0
- package/dist/src/policy/topic-policy.test.js +48 -0
- package/dist/src/policy/topic-policy.test.js.map +1 -0
- package/dist/src/policy/types.d.ts +3 -6
- package/dist/src/policy/types.js.map +1 -1
- package/dist/src/prompts/promptProvider.js +20 -4
- package/dist/src/prompts/promptProvider.js.map +1 -1
- package/dist/src/prompts/promptProvider.test.js +84 -1
- package/dist/src/prompts/promptProvider.test.js.map +1 -1
- package/dist/src/prompts/snippets-memory-manager.test.js +1 -1
- package/dist/src/prompts/snippets-memory-manager.test.js.map +1 -1
- package/dist/src/prompts/snippets.d.ts +3 -4
- package/dist/src/prompts/snippets.js +33 -51
- package/dist/src/prompts/snippets.js.map +1 -1
- package/dist/src/prompts/snippets.legacy.d.ts +6 -4
- package/dist/src/prompts/snippets.legacy.js +32 -7
- package/dist/src/prompts/snippets.legacy.js.map +1 -1
- package/dist/src/sandbox/linux/LinuxSandboxManager.d.ts +11 -1
- package/dist/src/sandbox/linux/LinuxSandboxManager.js +261 -27
- package/dist/src/sandbox/linux/LinuxSandboxManager.js.map +1 -1
- package/dist/src/sandbox/linux/LinuxSandboxManager.test.js +430 -125
- package/dist/src/sandbox/linux/LinuxSandboxManager.test.js.map +1 -1
- package/dist/src/sandbox/macos/MacOsSandboxManager.d.ts +7 -22
- package/dist/src/sandbox/macos/MacOsSandboxManager.js +58 -57
- package/dist/src/sandbox/macos/MacOsSandboxManager.js.map +1 -1
- package/dist/src/sandbox/macos/MacOsSandboxManager.test.js +148 -103
- package/dist/src/sandbox/macos/MacOsSandboxManager.test.js.map +1 -1
- package/dist/src/sandbox/macos/baseProfile.d.ts +1 -1
- package/dist/src/sandbox/macos/baseProfile.js +0 -6
- package/dist/src/sandbox/macos/baseProfile.js.map +1 -1
- package/dist/src/sandbox/macos/seatbeltArgsBuilder.d.ts +10 -10
- package/dist/src/sandbox/macos/seatbeltArgsBuilder.js +80 -92
- package/dist/src/sandbox/macos/seatbeltArgsBuilder.js.map +1 -1
- package/dist/src/sandbox/macos/seatbeltArgsBuilder.test.js +135 -99
- package/dist/src/sandbox/macos/seatbeltArgsBuilder.test.js.map +1 -1
- package/dist/src/sandbox/{macos → utils}/commandSafety.d.ts +11 -0
- package/dist/src/sandbox/{macos → utils}/commandSafety.js +47 -14
- package/dist/src/sandbox/utils/commandSafety.js.map +1 -0
- package/dist/src/sandbox/utils/commandUtils.d.ts +9 -0
- package/dist/src/sandbox/utils/commandUtils.js +57 -0
- package/dist/src/sandbox/utils/commandUtils.js.map +1 -0
- package/dist/src/sandbox/utils/fsUtils.d.ts +11 -0
- package/dist/src/sandbox/utils/fsUtils.js +82 -0
- package/dist/src/sandbox/utils/fsUtils.js.map +1 -0
- package/dist/src/sandbox/utils/sandboxDenialUtils.d.ts +12 -0
- package/dist/src/sandbox/utils/sandboxDenialUtils.js +68 -0
- package/dist/src/sandbox/utils/sandboxDenialUtils.js.map +1 -0
- package/dist/src/sandbox/utils/sandboxDenialUtils.test.d.ts +6 -0
- package/dist/src/sandbox/utils/sandboxDenialUtils.test.js +37 -0
- package/dist/src/sandbox/utils/sandboxDenialUtils.test.js.map +1 -0
- package/dist/src/sandbox/utils/sandboxReadWriteUtils.d.ts +5 -0
- package/dist/src/sandbox/utils/sandboxReadWriteUtils.js +60 -0
- package/dist/src/sandbox/utils/sandboxReadWriteUtils.js.map +1 -0
- package/dist/src/sandbox/windows/GeminiSandbox.cs +257 -216
- package/dist/src/sandbox/windows/WindowsSandboxManager.d.ts +12 -2
- package/dist/src/sandbox/windows/WindowsSandboxManager.js +250 -38
- package/dist/src/sandbox/windows/WindowsSandboxManager.js.map +1 -1
- package/dist/src/sandbox/windows/WindowsSandboxManager.test.js +326 -9
- package/dist/src/sandbox/windows/WindowsSandboxManager.test.js.map +1 -1
- package/dist/src/sandbox/windows/commandSafety.d.ts +19 -0
- package/dist/src/sandbox/windows/commandSafety.js +128 -0
- package/dist/src/sandbox/windows/commandSafety.js.map +1 -0
- package/dist/src/sandbox/windows/commandSafety.test.d.ts +6 -0
- package/dist/src/sandbox/windows/commandSafety.test.js +42 -0
- package/dist/src/sandbox/windows/commandSafety.test.js.map +1 -0
- package/dist/src/sandbox/windows/windowsSandboxDenialUtils.d.ts +12 -0
- package/dist/src/sandbox/windows/windowsSandboxDenialUtils.js +68 -0
- package/dist/src/sandbox/windows/windowsSandboxDenialUtils.js.map +1 -0
- package/dist/src/sandbox/windows/windowsSandboxDenialUtils.test.d.ts +6 -0
- package/dist/src/sandbox/windows/windowsSandboxDenialUtils.test.js +68 -0
- package/dist/src/sandbox/windows/windowsSandboxDenialUtils.test.js.map +1 -0
- package/dist/src/scheduler/scheduler.js +12 -2
- package/dist/src/scheduler/scheduler.js.map +1 -1
- package/dist/src/scheduler/scheduler.test.js +52 -0
- package/dist/src/scheduler/scheduler.test.js.map +1 -1
- package/dist/src/scheduler/scheduler_hooks.test.js +1 -0
- package/dist/src/scheduler/scheduler_hooks.test.js.map +1 -1
- package/dist/src/scheduler/state-manager.js +1 -1
- package/dist/src/scheduler/state-manager.js.map +1 -1
- package/dist/src/scheduler/state-manager.test.js +10 -0
- package/dist/src/scheduler/state-manager.test.js.map +1 -1
- package/dist/src/scheduler/tool-executor.js +7 -2
- package/dist/src/scheduler/tool-executor.js.map +1 -1
- package/dist/src/scheduler/tool-executor.test.js +38 -0
- package/dist/src/scheduler/tool-executor.test.js.map +1 -1
- package/dist/src/scheduler/types.d.ts +4 -2
- package/dist/src/services/chatRecordingService.d.ts +1 -13
- package/dist/src/services/chatRecordingService.js +45 -46
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/chatRecordingService.test.js +79 -10
- package/dist/src/services/chatRecordingService.test.js.map +1 -1
- package/dist/src/services/executionLifecycleService.d.ts +43 -6
- package/dist/src/services/executionLifecycleService.js +49 -12
- package/dist/src/services/executionLifecycleService.js.map +1 -1
- package/dist/src/services/executionLifecycleService.test.js +157 -3
- package/dist/src/services/executionLifecycleService.test.js.map +1 -1
- package/dist/src/services/fileDiscoveryService.d.ts +17 -2
- package/dist/src/services/fileDiscoveryService.js +84 -20
- package/dist/src/services/fileDiscoveryService.js.map +1 -1
- package/dist/src/services/fileDiscoveryService.test.js +67 -1
- package/dist/src/services/fileDiscoveryService.test.js.map +1 -1
- package/dist/src/services/modelConfigService.d.ts +11 -0
- package/dist/src/services/modelConfigService.js +67 -0
- package/dist/src/services/modelConfigService.js.map +1 -1
- package/dist/src/services/modelConfigService.test.js +30 -0
- package/dist/src/services/modelConfigService.test.js.map +1 -1
- package/dist/src/services/sandboxManager.d.ts +90 -8
- package/dist/src/services/sandboxManager.integration.test.js +438 -0
- package/dist/src/services/sandboxManager.integration.test.js.map +1 -0
- package/dist/src/services/sandboxManager.js +156 -13
- package/dist/src/services/sandboxManager.js.map +1 -1
- package/dist/src/services/sandboxManager.test.js +373 -117
- package/dist/src/services/sandboxManager.test.js.map +1 -1
- package/dist/src/services/sandboxManagerFactory.d.ts +2 -3
- package/dist/src/services/sandboxManagerFactory.js +10 -17
- package/dist/src/services/sandboxManagerFactory.js.map +1 -1
- package/dist/src/services/sandboxedFileSystemService.d.ts +1 -0
- package/dist/src/services/sandboxedFileSystemService.js +32 -3
- package/dist/src/services/sandboxedFileSystemService.js.map +1 -1
- package/dist/src/services/sandboxedFileSystemService.test.js +83 -12
- package/dist/src/services/sandboxedFileSystemService.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.d.ts +2 -0
- package/dist/src/services/shellExecutionService.js +45 -16
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +5 -4
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/services/test-data/resolved-aliases-retry.golden.json +4 -0
- package/dist/src/services/test-data/resolved-aliases.golden.json +4 -0
- package/dist/src/services/types.d.ts +14 -0
- package/dist/src/services/types.js +7 -0
- package/dist/src/services/types.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +6 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +5 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +2 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +3 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/loggers.js +1 -1
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +8 -3
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/metrics.d.ts +10 -1
- package/dist/src/telemetry/metrics.js +19 -4
- package/dist/src/telemetry/metrics.js.map +1 -1
- package/dist/src/telemetry/metrics.test.js +44 -0
- package/dist/src/telemetry/metrics.test.js.map +1 -1
- package/dist/src/telemetry/types.d.ts +3 -3
- package/dist/src/telemetry/types.js +9 -4
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/test-utils/mock-message-bus.d.ts +1 -1
- package/dist/src/test-utils/mock-message-bus.js +1 -1
- package/dist/src/test-utils/mock-message-bus.js.map +1 -1
- package/dist/src/tools/definitions/base-declarations.d.ts +6 -0
- package/dist/src/tools/definitions/base-declarations.js +7 -0
- package/dist/src/tools/definitions/base-declarations.js.map +1 -1
- package/dist/src/tools/definitions/coreTools.d.ts +2 -1
- package/dist/src/tools/definitions/coreTools.js +9 -3
- package/dist/src/tools/definitions/coreTools.js.map +1 -1
- package/dist/src/tools/definitions/dynamic-declaration-helpers.d.ts +4 -0
- package/dist/src/tools/definitions/dynamic-declaration-helpers.js +29 -2
- package/dist/src/tools/definitions/dynamic-declaration-helpers.js.map +1 -1
- package/dist/src/tools/definitions/model-family-sets/default-legacy.js +11 -6
- package/dist/src/tools/definitions/model-family-sets/default-legacy.js.map +1 -1
- package/dist/src/tools/definitions/model-family-sets/gemini-3.js +10 -4
- package/dist/src/tools/definitions/model-family-sets/gemini-3.js.map +1 -1
- package/dist/src/tools/definitions/trackerTools.js +3 -3
- package/dist/src/tools/definitions/trackerTools.js.map +1 -1
- package/dist/src/tools/definitions/types.d.ts +1 -0
- package/dist/src/tools/enter-plan-mode.js +15 -0
- package/dist/src/tools/enter-plan-mode.js.map +1 -1
- package/dist/src/tools/enter-plan-mode.test.js +25 -0
- package/dist/src/tools/enter-plan-mode.test.js.map +1 -1
- package/dist/src/tools/grep-utils.d.ts +2 -1
- package/dist/src/tools/grep-utils.js +22 -3
- package/dist/src/tools/grep-utils.js.map +1 -1
- package/dist/src/tools/grep.js +16 -3
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/grep.test.js +34 -6
- package/dist/src/tools/grep.test.js.map +1 -1
- package/dist/src/tools/ls.js +6 -4
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/ls.test.js +22 -7
- package/dist/src/tools/ls.test.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.js +6 -3
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +35 -0
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/tools/memoryTool.d.ts +9 -2
- package/dist/src/tools/memoryTool.js +39 -15
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/memoryTool.test.js +61 -2
- package/dist/src/tools/memoryTool.test.js.map +1 -1
- package/dist/src/tools/read-many-files.js +12 -4
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +17 -17
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/ripGrep.js +14 -1
- package/dist/src/tools/ripGrep.js.map +1 -1
- package/dist/src/tools/ripGrep.test.js +9 -9
- package/dist/src/tools/ripGrep.test.js.map +1 -1
- package/dist/src/tools/shell.d.ts +10 -0
- package/dist/src/tools/shell.js +97 -124
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +22 -3
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/tool-names.d.ts +4 -4
- package/dist/src/tools/tool-names.js +5 -3
- package/dist/src/tools/tool-names.js.map +1 -1
- package/dist/src/tools/tool-registry.js +11 -1
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tool-registry.test.js +43 -1
- package/dist/src/tools/tool-registry.test.js.map +1 -1
- package/dist/src/tools/tools.d.ts +12 -1
- package/dist/src/tools/tools.js +15 -0
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/tools.test.js +42 -1
- package/dist/src/tools/tools.test.js.map +1 -1
- package/dist/src/tools/topicTool.d.ts +29 -0
- package/dist/src/tools/topicTool.js +72 -0
- package/dist/src/tools/topicTool.js.map +1 -0
- package/dist/src/tools/topicTool.test.d.ts +6 -0
- package/dist/src/tools/topicTool.test.js +105 -0
- package/dist/src/tools/topicTool.test.js.map +1 -0
- package/dist/src/tools/web-fetch.js +38 -20
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-fetch.test.js +28 -0
- package/dist/src/tools/web-fetch.test.js.map +1 -1
- package/dist/src/utils/checkpointUtils.d.ts +4 -4
- package/dist/src/utils/errors.d.ts +3 -0
- package/dist/src/utils/errors.js +28 -6
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/errors.test.js +23 -0
- package/dist/src/utils/errors.test.js.map +1 -1
- package/dist/src/utils/getFolderStructure.js +1 -1
- package/dist/src/utils/getFolderStructure.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.d.ts +2 -2
- package/dist/src/utils/gitIgnoreParser.js +28 -50
- package/dist/src/utils/gitIgnoreParser.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.test.js +51 -185
- package/dist/src/utils/gitIgnoreParser.test.js.map +1 -1
- package/dist/src/utils/ignoreFileParser.d.ts +2 -2
- package/dist/src/utils/ignoreFileParser.js +6 -17
- package/dist/src/utils/ignoreFileParser.js.map +1 -1
- package/dist/src/utils/ignoreFileParser.test.js +40 -132
- package/dist/src/utils/ignoreFileParser.test.js.map +1 -1
- package/dist/src/utils/ignorePathUtils.d.ts +11 -0
- package/dist/src/utils/ignorePathUtils.js +39 -0
- package/dist/src/utils/ignorePathUtils.js.map +1 -0
- package/dist/src/utils/ignorePathUtils.test.d.ts +6 -0
- package/dist/src/utils/ignorePathUtils.test.js +70 -0
- package/dist/src/utils/ignorePathUtils.test.js.map +1 -0
- package/dist/src/utils/memoryDiscovery.d.ts +6 -4
- package/dist/src/utils/memoryDiscovery.js +66 -41
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +40 -0
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/memoryImportProcessor.d.ts +1 -1
- package/dist/src/utils/memoryImportProcessor.js +24 -15
- package/dist/src/utils/memoryImportProcessor.js.map +1 -1
- package/dist/src/utils/sessionOperations.d.ts +19 -0
- package/dist/src/utils/sessionOperations.js +101 -0
- package/dist/src/utils/sessionOperations.js.map +1 -0
- package/dist/src/utils/sessionOperations.test.d.ts +6 -0
- package/dist/src/utils/sessionOperations.test.js +92 -0
- package/dist/src/utils/sessionOperations.test.js.map +1 -0
- package/dist/src/utils/shell-utils.d.ts +15 -0
- package/dist/src/utils/shell-utils.js +43 -2
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/textUtils.d.ts +8 -0
- package/dist/src/utils/textUtils.js +16 -0
- package/dist/src/utils/textUtils.js.map +1 -1
- package/dist/src/utils/tokenCalculation.d.ts +2 -0
- package/dist/src/utils/tokenCalculation.js +2 -2
- package/dist/src/utils/tokenCalculation.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/docs/get-started/examples.md +0 -141
- package/dist/google-gemini-cli-core-0.36.0-preview.6.tgz +0 -0
- package/dist/src/sandbox/macos/MacOsSandboxManager.integration.test.js +0 -164
- package/dist/src/sandbox/macos/MacOsSandboxManager.integration.test.js.map +0 -1
- package/dist/src/sandbox/macos/commandSafety.js.map +0 -1
- package/dist/src/services/chatCompressionService.js.map +0 -1
- package/dist/src/services/chatCompressionService.test.js.map +0 -1
- package/dist/src/services/contextManager.js.map +0 -1
- package/dist/src/services/contextManager.test.js.map +0 -1
- package/dist/src/services/toolOutputMaskingService.js.map +0 -1
- package/dist/src/services/toolOutputMaskingService.test.js.map +0 -1
- /package/dist/src/{services/toolOutputMaskingService.test.d.ts → agents/browser/snapshotSuperseder.test.d.ts} +0 -0
- /package/dist/src/{services → context}/chatCompressionService.d.ts +0 -0
- /package/dist/src/{services → context}/chatCompressionService.js +0 -0
- /package/dist/src/{services → context}/chatCompressionService.test.d.ts +0 -0
- /package/dist/src/{services → context}/chatCompressionService.test.js +0 -0
- /package/dist/src/{services → context}/contextManager.test.d.ts +0 -0
- /package/dist/src/{sandbox/macos/MacOsSandboxManager.integration.test.d.ts → services/sandboxManager.integration.test.d.ts} +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# ACP Mode
|
|
2
|
+
|
|
3
|
+
ACP (Agent Client Protocol) mode is a special operational mode of Gemini CLI
|
|
4
|
+
designed for programmatic control, primarily for IDE and other developer tool
|
|
5
|
+
integrations. It uses a JSON-RPC protocol over stdio to communicate between
|
|
6
|
+
Gemini CLI agent and a client.
|
|
7
|
+
|
|
8
|
+
To start Gemini CLI in ACP mode, use the `--acp` flag:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
gemini --acp
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Agent Client Protocol (ACP)
|
|
15
|
+
|
|
16
|
+
ACP is an open protocol that standardizes how AI coding agents communicate with
|
|
17
|
+
code editors and IDEs. It addresses the challenge of fragmented distribution,
|
|
18
|
+
where agents traditionally needed custom integrations for each client. With ACP,
|
|
19
|
+
developers can implement their agent once, and it becomes compatible with any
|
|
20
|
+
ACP-compliant editor.
|
|
21
|
+
|
|
22
|
+
For a comprehensive introduction to ACP, including its architecture and
|
|
23
|
+
benefits, refer to the official
|
|
24
|
+
[ACP Introduction](https://agentclientprotocol.com/get-started/introduction)
|
|
25
|
+
documentation.
|
|
26
|
+
|
|
27
|
+
### Existing integrations using ACP
|
|
28
|
+
|
|
29
|
+
The ACP Agent Registry simplifies the distribution and management of
|
|
30
|
+
ACP-compatible agents across various IDEs. Gemini CLI is an ACP-compatible agent
|
|
31
|
+
and can be found in this registry.
|
|
32
|
+
|
|
33
|
+
For more general information about the registry, and how to use it with specific
|
|
34
|
+
IDEs like JetBrains and Zed, refer to the
|
|
35
|
+
[IDE Integration](../ide-integration/index.md) documentation.
|
|
36
|
+
|
|
37
|
+
You can also find more information on the official
|
|
38
|
+
[ACP Agent Registry](https://agentclientprotocol.com/get-started/registry) page.
|
|
39
|
+
|
|
40
|
+
## Architecture and protocol basics
|
|
41
|
+
|
|
42
|
+
ACP mode establishes a client-server relationship between your tool (the client)
|
|
43
|
+
and Gemini CLI (the server).
|
|
44
|
+
|
|
45
|
+
- **Communication:** The entire communication happens over standard input/output
|
|
46
|
+
(stdio) using the JSON-RPC 2.0 protocol.
|
|
47
|
+
- **Client's role:** The client is responsible for sending requests (e.g.,
|
|
48
|
+
prompts) and handling responses and notifications from Gemini CLI.
|
|
49
|
+
- **Gemini CLI's role:** In ACP mode, Gemini CLI listens for incoming JSON-RPC
|
|
50
|
+
requests, processes them, and sends back responses.
|
|
51
|
+
|
|
52
|
+
The core of the ACP implementation can be found in
|
|
53
|
+
`packages/cli/src/acp/acpClient.ts`.
|
|
54
|
+
|
|
55
|
+
### Extending with MCP
|
|
56
|
+
|
|
57
|
+
ACP can be used with the Model Context Protocol (MCP). This lets an ACP client
|
|
58
|
+
(like an IDE) expose its own functionality as "tools" that the Gemini model can
|
|
59
|
+
use.
|
|
60
|
+
|
|
61
|
+
1. The client implements an **MCP server** that advertises its tools.
|
|
62
|
+
2. During the ACP `initialize` handshake, the client provides the connection
|
|
63
|
+
details for its MCP server.
|
|
64
|
+
3. Gemini CLI connects to the MCP server, discovers the available tools, and
|
|
65
|
+
makes them available to the AI model.
|
|
66
|
+
4. When the model decides to use one of these tools, Gemini CLI sends a tool
|
|
67
|
+
call request to the MCP server.
|
|
68
|
+
|
|
69
|
+
This mechanism lets for a powerful, two-way integration where the agent can
|
|
70
|
+
leverage the IDE's capabilities to perform tasks. The MCP client logic is in
|
|
71
|
+
`packages/core/src/tools/mcp-client.ts`.
|
|
72
|
+
|
|
73
|
+
## Capabilities and supported methods
|
|
74
|
+
|
|
75
|
+
The ACP protocol exposes a number of methods for ACP clients (e.g. IDEs) to
|
|
76
|
+
control Gemini CLI.
|
|
77
|
+
|
|
78
|
+
### Core methods
|
|
79
|
+
|
|
80
|
+
- `initialize`: Establishes the initial connection and lets the client to
|
|
81
|
+
register its MCP server.
|
|
82
|
+
- `authenticate`: Authenticates the user.
|
|
83
|
+
- `newSession`: Starts a new chat session.
|
|
84
|
+
- `loadSession`: Loads a previous session.
|
|
85
|
+
- `prompt`: Sends a prompt to the agent.
|
|
86
|
+
- `cancel`: Cancels an ongoing prompt.
|
|
87
|
+
|
|
88
|
+
### Session control
|
|
89
|
+
|
|
90
|
+
- `setSessionMode`: Allows changing the approval level for tool calls (e.g., to
|
|
91
|
+
`auto-approve`).
|
|
92
|
+
- `unstable_setSessionModel`: Changes the model for the current session.
|
|
93
|
+
|
|
94
|
+
### File system proxy
|
|
95
|
+
|
|
96
|
+
ACP includes a proxied file system service. This means that when the agent needs
|
|
97
|
+
to read or write files, it does so through the ACP client. This is a security
|
|
98
|
+
feature that ensures the agent only has access to the files that the client (and
|
|
99
|
+
by extension, the user) has explicitly allowed.
|
|
100
|
+
|
|
101
|
+
## Debugging and telemetry
|
|
102
|
+
|
|
103
|
+
You can get insights into the ACP communication and the agent's behavior through
|
|
104
|
+
debugging logs and telemetry.
|
|
105
|
+
|
|
106
|
+
### Debugging logs
|
|
107
|
+
|
|
108
|
+
To enable general debugging logs, start Gemini CLI with the `--debug` flag:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
gemini --acp --debug
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Telemetry
|
|
115
|
+
|
|
116
|
+
For more detailed telemetry, you can use the following environment variables to
|
|
117
|
+
capture telemetry data to a file:
|
|
118
|
+
|
|
119
|
+
- `GEMINI_TELEMETRY_ENABLED=true`
|
|
120
|
+
- `GEMINI_TELEMETRY_TARGET=local`
|
|
121
|
+
- `GEMINI_TELEMETRY_OUTFILE=/path/to/your/log.json`
|
|
122
|
+
|
|
123
|
+
This will write a JSON log file containing detailed information about all the
|
|
124
|
+
events happening within the agent, including ACP requests and responses. The
|
|
125
|
+
integration test `integration-tests/acp-telemetry.test.ts` provides a working
|
|
126
|
+
example of how to set this up.
|
|
@@ -52,7 +52,7 @@ These commands are available within the interactive REPL.
|
|
|
52
52
|
| `--prompt-interactive` | `-i` | string | - | Execute prompt and continue in interactive mode |
|
|
53
53
|
| `--worktree` | `-w` | string | - | Start Gemini in a new git worktree. If no name is provided, one is generated automatically. Requires `experimental.worktrees: true` in settings. |
|
|
54
54
|
| `--sandbox` | `-s` | boolean | `false` | Run in a sandboxed environment for safer execution |
|
|
55
|
-
| `--approval-mode` | - | string | `default` | Approval mode for tool execution. Choices: `default`, `auto_edit`, `yolo`
|
|
55
|
+
| `--approval-mode` | - | string | `default` | Approval mode for tool execution. Choices: `default`, `auto_edit`, `yolo`, `plan` |
|
|
56
56
|
| `--yolo` | `-y` | boolean | `false` | **Deprecated.** Auto-approve all actions. Use `--approval-mode=yolo` instead. |
|
|
57
57
|
| `--experimental-acp` | - | boolean | - | Start in ACP (Agent Code Pilot) mode. **Experimental feature.** |
|
|
58
58
|
| `--experimental-zed-integration` | - | boolean | - | Run in Zed editor integration mode. **Experimental feature.** |
|
|
@@ -15,14 +15,14 @@ CLI works in the background.
|
|
|
15
15
|
|
|
16
16
|
## Requirements
|
|
17
17
|
|
|
18
|
-
Currently, system notifications are only supported on macOS.
|
|
19
|
-
|
|
20
18
|
### Terminal support
|
|
21
19
|
|
|
22
20
|
The CLI uses the OSC 9 terminal escape sequence to trigger system notifications.
|
|
23
|
-
This is supported by several modern terminal emulators
|
|
24
|
-
|
|
25
|
-
to get your
|
|
21
|
+
This is supported by several modern terminal emulators including iTerm2,
|
|
22
|
+
WezTerm, Ghostty, and Kitty. If your terminal does not support OSC 9
|
|
23
|
+
notifications, Gemini CLI falls back to a terminal bell (BEL) to get your
|
|
24
|
+
attention. Most terminals respond to BEL with a taskbar flash or system alert
|
|
25
|
+
sound.
|
|
26
26
|
|
|
27
27
|
## Enable notifications
|
|
28
28
|
|
|
@@ -39,7 +39,9 @@ To start Plan Mode while using Gemini CLI:
|
|
|
39
39
|
the rotation when Gemini CLI is actively processing or showing confirmation
|
|
40
40
|
dialogs.
|
|
41
41
|
|
|
42
|
-
- **Command:** Type `/plan` in the input box.
|
|
42
|
+
- **Command:** Type `/plan [goal]` in the input box. The `[goal]` is optional;
|
|
43
|
+
for example, `/plan implement authentication` will switch to Plan Mode and
|
|
44
|
+
immediately submit the prompt to the model.
|
|
43
45
|
|
|
44
46
|
- **Natural Language:** Ask Gemini CLI to "start a plan for...". Gemini CLI
|
|
45
47
|
calls the
|
|
@@ -54,19 +56,21 @@ Gemini CLI takes action.
|
|
|
54
56
|
|
|
55
57
|
1. **Provide a goal:** Start by describing what you want to achieve. Gemini CLI
|
|
56
58
|
will then enter Plan Mode (if it's not already) to research the task.
|
|
57
|
-
2. **
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
2. **Discuss and agree on strategy:** As Gemini CLI analyzes your codebase, it
|
|
60
|
+
will discuss its findings and proposed strategy with you to ensure
|
|
61
|
+
alignment. It may ask you questions or present different implementation
|
|
62
|
+
options using [`ask_user`](../tools/ask-user.md). **Gemini CLI will stop and
|
|
63
|
+
wait for your confirmation** before drafting the formal plan. You should
|
|
64
|
+
reach an informal agreement on the approach before proceeding.
|
|
65
|
+
3. **Review the plan:** Once you've agreed on the strategy, Gemini CLI creates
|
|
66
|
+
a detailed implementation plan as a Markdown file in your plans directory.
|
|
63
67
|
- **View:** You can open and read this file to understand the proposed
|
|
64
68
|
changes.
|
|
65
69
|
- **Edit:** Press `Ctrl+X` to open the plan directly in your configured
|
|
66
70
|
external editor.
|
|
67
71
|
|
|
68
72
|
4. **Approve or iterate:** Gemini CLI will present the finalized plan for your
|
|
69
|
-
approval.
|
|
73
|
+
formal approval.
|
|
70
74
|
- **Approve:** If you're satisfied with the plan, approve it to start the
|
|
71
75
|
implementation immediately: **Yes, automatically accept edits** or **Yes,
|
|
72
76
|
manually accept edits**.
|
package/dist/docs/cli/sandbox.md
CHANGED
|
@@ -92,7 +92,7 @@ To set up runsc:
|
|
|
92
92
|
2. Configure the Docker daemon to use the runsc runtime.
|
|
93
93
|
3. Verify the installation.
|
|
94
94
|
|
|
95
|
-
###
|
|
95
|
+
### 5. LXC/LXD (Linux only, experimental)
|
|
96
96
|
|
|
97
97
|
Full-system container sandboxing using LXC/LXD. Unlike Docker/Podman, LXC
|
|
98
98
|
containers run a complete Linux system with `systemd`, `snapd`, and other system
|
|
@@ -29,8 +29,9 @@ they appear in the UI.
|
|
|
29
29
|
| Vim Mode | `general.vimMode` | Enable Vim keybindings | `false` |
|
|
30
30
|
| Default Approval Mode | `general.defaultApprovalMode` | The default approval mode for tool execution. 'default' prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is read-only mode. YOLO mode (auto-approve all actions) can only be enabled via command line (--yolo or --approval-mode=yolo). | `"default"` |
|
|
31
31
|
| Enable Auto Update | `general.enableAutoUpdate` | Enable automatic updates. | `true` |
|
|
32
|
-
| Enable Notifications | `general.enableNotifications` | Enable run-event notifications for action-required prompts and session completion.
|
|
33
|
-
| Plan
|
|
32
|
+
| Enable Notifications | `general.enableNotifications` | Enable run-event notifications for action-required prompts and session completion. | `false` |
|
|
33
|
+
| Enable Plan Mode | `general.plan.enabled` | Enable Plan Mode for read-only safety during planning. | `true` |
|
|
34
|
+
| Plan Directory | `general.plan.directory` | The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory. A custom directory requires a policy to allow write access in Plan Mode. | `undefined` |
|
|
34
35
|
| Plan Model Routing | `general.plan.modelRouting` | Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pro for the planning phase and Flash for the implementation phase. | `true` |
|
|
35
36
|
| Retry Fetch Errors | `general.retryFetchErrors` | Retry on "exception TypeError: fetch failed sending request" errors. | `true` |
|
|
36
37
|
| Max Chat Model Attempts | `general.maxAttempts` | Maximum number of attempts for requests to the main chat model. Cannot exceed 10. | `10` |
|
|
@@ -59,6 +60,7 @@ they appear in the UI.
|
|
|
59
60
|
| Hide Tips | `ui.hideTips` | Hide helpful tips in the UI | `false` |
|
|
60
61
|
| Escape Pasted @ Symbols | `ui.escapePastedAtSymbols` | When enabled, @ symbols in pasted text are escaped to prevent unintended @path expansion. | `false` |
|
|
61
62
|
| Show Shortcuts Hint | `ui.showShortcutsHint` | Show the "? for shortcuts" hint above the input. | `true` |
|
|
63
|
+
| Compact Tool Output | `ui.compactToolOutput` | Display tool outputs (like directory listings and file reads) in a compact, structured format. | `false` |
|
|
62
64
|
| Hide Banner | `ui.hideBanner` | Hide the application banner | `false` |
|
|
63
65
|
| Hide Context Summary | `ui.hideContextSummary` | Hide the context summary (GEMINI.md, MCP servers) above the input. | `false` |
|
|
64
66
|
| Hide CWD | `ui.footer.hideCWD` | Hide the current working directory in the footer. | `false` |
|
|
@@ -155,17 +157,16 @@ they appear in the UI.
|
|
|
155
157
|
|
|
156
158
|
### Experimental
|
|
157
159
|
|
|
158
|
-
| UI Label
|
|
159
|
-
|
|
|
160
|
-
| Enable
|
|
161
|
-
|
|
|
162
|
-
| Use OSC 52
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
| Topic & Update Narration | `experimental.topicUpdateNarration` | Enable the experimental Topic & Update communication model for reduced chattiness and structured progress reporting. | `false` |
|
|
160
|
+
| UI Label | Setting | Description | Default |
|
|
161
|
+
| ------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
162
|
+
| Enable Git Worktrees | `experimental.worktrees` | Enable automated Git worktree management for parallel work. | `false` |
|
|
163
|
+
| Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 for pasting. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |
|
|
164
|
+
| Use OSC 52 Copy | `experimental.useOSC52Copy` | Use OSC 52 for copying. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |
|
|
165
|
+
| Model Steering | `experimental.modelSteering` | Enable model steering (user hints) to guide the model during tool execution. | `false` |
|
|
166
|
+
| Direct Web Fetch | `experimental.directWebFetch` | Enable web fetch behavior that bypasses LLM summarization. | `false` |
|
|
167
|
+
| Memory Manager Agent | `experimental.memoryManager` | Replace the built-in save_memory tool with a memory manager subagent that supports adding, removing, de-duplicating, and organizing memories. | `false` |
|
|
168
|
+
| Enable Context Management | `experimental.contextManagement` | Enable logic for context management. | `false` |
|
|
169
|
+
| Topic & Update Narration | `experimental.topicUpdateNarration` | Enable the experimental Topic & Update communication model for reduced chattiness and structured progress reporting. | `false` |
|
|
169
170
|
|
|
170
171
|
### Skills
|
|
171
172
|
|
package/dist/docs/cli/themes.md
CHANGED
|
@@ -19,6 +19,7 @@ using the `/theme` command within Gemini CLI:
|
|
|
19
19
|
- `Holiday`
|
|
20
20
|
- `Shades Of Purple`
|
|
21
21
|
- `Solarized Dark`
|
|
22
|
+
- `Tokyo Night`
|
|
22
23
|
- **Light themes:**
|
|
23
24
|
- `ANSI Light`
|
|
24
25
|
- `Ayu Light`
|
|
@@ -252,6 +253,10 @@ identify their source, for example: `shades-of-green (green-extension)`.
|
|
|
252
253
|
|
|
253
254
|
<img src="/docs/assets/theme-solarized-dark.png" alt="Solarized Dark theme" width="600">
|
|
254
255
|
|
|
256
|
+
### Tokyo Night
|
|
257
|
+
|
|
258
|
+
<img src="/docs/assets/theme-tokyonight-dark.png" alt="Tokyo Night theme" width="600">
|
|
259
|
+
|
|
255
260
|
## Light themes
|
|
256
261
|
|
|
257
262
|
### ANSI Light
|
package/dist/docs/core/index.md
CHANGED
|
@@ -7,8 +7,8 @@ requests sent from `packages/cli`. For a general overview of Gemini CLI, see the
|
|
|
7
7
|
|
|
8
8
|
## Navigating this section
|
|
9
9
|
|
|
10
|
-
- **[Sub-agents
|
|
11
|
-
|
|
10
|
+
- **[Sub-agents](./subagents.md):** Learn how to create and use specialized
|
|
11
|
+
sub-agents for complex tasks.
|
|
12
12
|
- **[Core tools reference](../reference/tools.md):** Information on how tools
|
|
13
13
|
are defined, registered, and used by the core.
|
|
14
14
|
- **[Memory Import Processor](../reference/memport.md):** Documentation for the
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
# Subagents
|
|
1
|
+
# Subagents
|
|
2
2
|
|
|
3
3
|
Subagents are specialized agents that operate within your main Gemini CLI
|
|
4
4
|
session. They are designed to handle specific, complex tasks—like deep codebase
|
|
5
5
|
analysis, documentation lookup, or domain-specific reasoning—without cluttering
|
|
6
6
|
the main agent's context or toolset.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> Subagents are currently an experimental feature.
|
|
11
|
-
>
|
|
12
|
-
To use custom subagents, you must ensure they are enabled in your
|
|
13
|
-
`settings.json` (enabled by default):
|
|
8
|
+
Subagents are enabled by default. To disable them, set `enableAgents` to `false`
|
|
9
|
+
in your `settings.json`:
|
|
14
10
|
|
|
15
11
|
```json
|
|
16
12
|
{
|
|
17
|
-
"experimental": { "enableAgents":
|
|
13
|
+
"experimental": { "enableAgents": false }
|
|
18
14
|
}
|
|
19
15
|
```
|
|
20
16
|
|
|
@@ -226,19 +222,65 @@ the `click_at` tool for precise, coordinate-based interactions.
|
|
|
226
222
|
> The visual agent requires API key or Vertex AI authentication. It is
|
|
227
223
|
> not available when using "Sign in with Google".
|
|
228
224
|
|
|
225
|
+
#### Sandbox support
|
|
226
|
+
|
|
227
|
+
The browser agent adjusts its behavior automatically when running inside a
|
|
228
|
+
sandbox.
|
|
229
|
+
|
|
230
|
+
##### macOS seatbelt (`sandbox-exec`)
|
|
231
|
+
|
|
232
|
+
When the CLI runs under the macOS seatbelt sandbox, `persistent` and `isolated`
|
|
233
|
+
session modes are forced to `isolated` with `headless` enabled. This avoids
|
|
234
|
+
permission errors caused by seatbelt file-system restrictions on persistent
|
|
235
|
+
browser profiles. If `sessionMode` is set to `existing`, no override is applied.
|
|
236
|
+
|
|
237
|
+
##### Container sandboxes (Docker / Podman)
|
|
238
|
+
|
|
239
|
+
Chrome is not available inside the container, so the browser agent is
|
|
240
|
+
**disabled** unless `sessionMode` is set to `"existing"`. When enabled with
|
|
241
|
+
`existing` mode, the agent automatically connects to Chrome on the host via the
|
|
242
|
+
resolved IP of `host.docker.internal:9222` instead of using local pipe
|
|
243
|
+
discovery. Port `9222` is currently hardcoded and cannot be customized.
|
|
244
|
+
|
|
245
|
+
To use the browser agent in a Docker sandbox:
|
|
246
|
+
|
|
247
|
+
1. Start Chrome on the host with remote debugging enabled:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
# Option A: Launch Chrome from the command line
|
|
251
|
+
google-chrome --remote-debugging-port=9222
|
|
252
|
+
|
|
253
|
+
# Option B: Enable in Chrome settings
|
|
254
|
+
# Navigate to chrome://inspect/#remote-debugging and enable
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
2. Configure `sessionMode` and allowed domains in your project's
|
|
258
|
+
`.gemini/settings.json`:
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"agents": {
|
|
263
|
+
"overrides": {
|
|
264
|
+
"browser_agent": { "enabled": true }
|
|
265
|
+
},
|
|
266
|
+
"browser": {
|
|
267
|
+
"sessionMode": "existing",
|
|
268
|
+
"allowedDomains": ["example.com"]
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
3. Launch the CLI with port forwarding:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
GEMINI_SANDBOX=docker SANDBOX_PORTS=9222 gemini
|
|
278
|
+
```
|
|
279
|
+
|
|
229
280
|
## Creating custom subagents
|
|
230
281
|
|
|
231
282
|
You can create your own subagents to automate specific workflows or enforce
|
|
232
|
-
specific personas.
|
|
233
|
-
`settings.json`:
|
|
234
|
-
|
|
235
|
-
```json
|
|
236
|
-
{
|
|
237
|
-
"experimental": {
|
|
238
|
-
"enableAgents": true
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
```
|
|
283
|
+
specific personas.
|
|
242
284
|
|
|
243
285
|
### Agent definition files
|
|
244
286
|
|
|
@@ -290,6 +332,7 @@ it yourself; just report it.
|
|
|
290
332
|
| `description` | string | Yes | Short description of what the agent does. This is visible to the main agent to help it decide when to call this subagent. |
|
|
291
333
|
| `kind` | string | No | `local` (default) or `remote`. |
|
|
292
334
|
| `tools` | array | No | List of tool names this agent can use. Supports wildcards: `*` (all tools), `mcp_*` (all MCP tools), `mcp_server_*` (all tools from a server). **If omitted, it inherits all tools from the parent session.** |
|
|
335
|
+
| `mcpServers` | object | No | Configuration for inline Model Context Protocol (MCP) servers isolated to this specific agent. |
|
|
293
336
|
| `model` | string | No | Specific model to use (e.g., `gemini-3-preview`). Defaults to `inherit` (uses the main session model). |
|
|
294
337
|
| `temperature` | number | No | Model temperature (0.0 - 2.0). Defaults to `1`. |
|
|
295
338
|
| `max_turns` | number | No | Maximum number of conversation turns allowed for this agent before it must return. Defaults to `30`. |
|
|
@@ -317,6 +360,78 @@ Each subagent runs in its own isolated context loop. This means:
|
|
|
317
360
|
subagents **cannot** call other subagents. If a subagent is granted the `*`
|
|
318
361
|
tool wildcard, it will still be unable to see or invoke other agents.
|
|
319
362
|
|
|
363
|
+
## Subagent tool isolation
|
|
364
|
+
|
|
365
|
+
Subagent tool isolation moves Gemini CLI away from a single global tool
|
|
366
|
+
registry. By providing isolated execution environments, you can ensure that
|
|
367
|
+
subagents only interact with the parts of the system they are designed for. This
|
|
368
|
+
prevents unintended side effects, improves reliability by avoiding state
|
|
369
|
+
contamination, and enables fine-grained permission control.
|
|
370
|
+
|
|
371
|
+
With this feature, you can:
|
|
372
|
+
|
|
373
|
+
- **Specify tool access:** Define exactly which tools an agent can access using
|
|
374
|
+
a `tools` list in the agent definition.
|
|
375
|
+
- **Define inline MCP servers:** Configure Model Context Protocol (MCP) servers
|
|
376
|
+
(which provide a standardized way to connect AI models to external tools and
|
|
377
|
+
data sources) directly in the subagent's markdown frontmatter, isolating them
|
|
378
|
+
to that specific agent.
|
|
379
|
+
- **Maintain state isolation:** Ensure that subagents only interact with their
|
|
380
|
+
own set of tools and servers, preventing side effects and state contamination.
|
|
381
|
+
- **Apply subagent-specific policies:** Enforce granular rules in your
|
|
382
|
+
[Policy Engine](../reference/policy-engine.md) TOML configuration based on the
|
|
383
|
+
executing subagent's name.
|
|
384
|
+
|
|
385
|
+
### Configuring isolated tools and servers
|
|
386
|
+
|
|
387
|
+
You can configure tool isolation for a subagent by updating its markdown
|
|
388
|
+
frontmatter. This allows you to explicitly state which tools the subagent can
|
|
389
|
+
use, rather than relying on the global registry.
|
|
390
|
+
|
|
391
|
+
Add an `mcpServers` object to define inline MCP servers that are unique to the
|
|
392
|
+
agent.
|
|
393
|
+
|
|
394
|
+
**Example:**
|
|
395
|
+
|
|
396
|
+
```yaml
|
|
397
|
+
---
|
|
398
|
+
name: my-isolated-agent
|
|
399
|
+
tools:
|
|
400
|
+
- grep_search
|
|
401
|
+
- read_file
|
|
402
|
+
mcpServers:
|
|
403
|
+
my-custom-server:
|
|
404
|
+
command: 'node'
|
|
405
|
+
args: ['path/to/server.js']
|
|
406
|
+
---
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Subagent-specific policies
|
|
410
|
+
|
|
411
|
+
You can enforce fine-grained control over subagents using the
|
|
412
|
+
[Policy Engine's](../reference/policy-engine.md) TOML configuration. This allows
|
|
413
|
+
you to grant or restrict permissions specifically for an agent, without
|
|
414
|
+
affecting the rest of your CLI session.
|
|
415
|
+
|
|
416
|
+
To restrict a policy rule to a specific subagent, add the `subagent` property to
|
|
417
|
+
the `[[rules]]` block in your `policy.toml` file.
|
|
418
|
+
|
|
419
|
+
**Example:**
|
|
420
|
+
|
|
421
|
+
```toml
|
|
422
|
+
[[rules]]
|
|
423
|
+
name = "Allow pr-creator to push code"
|
|
424
|
+
subagent = "pr-creator"
|
|
425
|
+
description = "Permit pr-creator to push branches automatically."
|
|
426
|
+
action = "allow"
|
|
427
|
+
toolName = "run_shell_command"
|
|
428
|
+
commandPrefix = "git push"
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
In this configuration, the policy rule only triggers if the executing subagent's
|
|
432
|
+
name matches `pr-creator`. Rules without the `subagent` property apply
|
|
433
|
+
universally to all agents.
|
|
434
|
+
|
|
320
435
|
## Managing subagents
|
|
321
436
|
|
|
322
437
|
You can manage subagents interactively using the `/agents` command or
|
|
@@ -406,15 +521,11 @@ If you need to further tune your subagent, you can do so by selecting the model
|
|
|
406
521
|
to optimize for with `/model` and then asking the model why it does not think
|
|
407
522
|
that your subagent was called with a specific prompt and the given description.
|
|
408
523
|
|
|
409
|
-
## Remote subagents (Agent2Agent)
|
|
524
|
+
## Remote subagents (Agent2Agent)
|
|
410
525
|
|
|
411
526
|
Gemini CLI can also delegate tasks to remote subagents using the Agent-to-Agent
|
|
412
527
|
(A2A) protocol.
|
|
413
528
|
|
|
414
|
-
<!-- prettier-ignore -->
|
|
415
|
-
> [!NOTE]
|
|
416
|
-
> Remote subagents are currently an experimental feature.
|
|
417
|
-
|
|
418
529
|
See the [Remote Subagents documentation](remote-agents) for detailed
|
|
419
530
|
configuration, authentication, and usage instructions.
|
|
420
531
|
|
|
@@ -62,7 +62,133 @@ Once installed and authenticated, you can start using Gemini CLI by issuing
|
|
|
62
62
|
commands and prompts in your terminal. Ask it to generate code, explain files,
|
|
63
63
|
and more.
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
<!-- prettier-ignore -->
|
|
66
|
+
> [!NOTE]
|
|
67
|
+
> These examples demonstrate potential capabilities. Your actual
|
|
68
|
+
> results can vary based on the model used and your project environment.
|
|
69
|
+
|
|
70
|
+
### Rename your photographs based on content
|
|
71
|
+
|
|
72
|
+
You can use Gemini CLI to automate file management tasks that require visual
|
|
73
|
+
analysis. In this example, Gemini CLI renames images based on their actual
|
|
74
|
+
subject matter.
|
|
75
|
+
|
|
76
|
+
Scenario: You have a folder containing the following files:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
photos/photo1.png
|
|
80
|
+
photos/photo2.png
|
|
81
|
+
photos/photo3.png
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Give Gemini the following prompt:
|
|
85
|
+
|
|
86
|
+
```cli
|
|
87
|
+
Rename the photos in my "photos" directory based on their contents.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Result: Gemini asks for permission to rename your files.
|
|
91
|
+
|
|
92
|
+
Select **Allow once** and your files are renamed:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
photos/yellow_flowers.png
|
|
96
|
+
photos/antique_dresser.png
|
|
97
|
+
photos/green_android_robot.png
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Explain a repository by reading its code
|
|
101
|
+
|
|
102
|
+
Gemini CLI is effective for rapid codebase exploration. The following example
|
|
103
|
+
shows how to ask Gemini CLI to fetch, analyze, and summarize a remote project.
|
|
104
|
+
|
|
105
|
+
Scenario: You want to understand how a popular open-source utility works by
|
|
106
|
+
inspecting its code, not just its README.
|
|
107
|
+
|
|
108
|
+
Give Gemini CLI the following prompt:
|
|
109
|
+
|
|
110
|
+
```cli
|
|
111
|
+
Clone the 'chalk' repository from https://github.com/chalk/chalk, read its key source files, and explain how it works.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Result: Gemini performs a sequence of actions to answer your request.
|
|
115
|
+
|
|
116
|
+
1. First, it asks for permission to run `git clone` to download the repository.
|
|
117
|
+
2. Next, it finds the important source files and asks for permission to read
|
|
118
|
+
them.
|
|
119
|
+
3. Finally, after analyzing the code, it provides a summary.
|
|
120
|
+
|
|
121
|
+
Gemini CLI returns an explanation based on the actual source code:
|
|
122
|
+
|
|
123
|
+
```markdown
|
|
124
|
+
The `chalk` library is a popular npm package for styling terminal output with
|
|
125
|
+
colors. After analyzing the source code, here's how it works:
|
|
126
|
+
|
|
127
|
+
- **Core functionality:** The main file sets up a chainable API. Each color or
|
|
128
|
+
modifier (like `bold` or `italic`) is a getter that appends the corresponding
|
|
129
|
+
ANSI escape code to an internal stack.
|
|
130
|
+
|
|
131
|
+
- **Chainable API:** When you call `chalk.red.bold('Hello')`, you are accessing
|
|
132
|
+
getters. The `red` getter adds the red color code, and the `bold` getter adds
|
|
133
|
+
the bold code.
|
|
134
|
+
|
|
135
|
+
- **Output generation:** When the chain is treated as a string (e.g., in
|
|
136
|
+
`console.log`), a final `toString()` method is called. This method joins all
|
|
137
|
+
the stored ANSI codes, wraps them around the input string ('Hello'), and adds
|
|
138
|
+
a reset code at the end. This produces the final, styled string that the
|
|
139
|
+
terminal can render.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Combine two spreadsheets into one spreadsheet
|
|
143
|
+
|
|
144
|
+
Gemini CLI can process and transform data across multiple files. Use this
|
|
145
|
+
capability to merge reports or reformat data sets without manual copying.
|
|
146
|
+
|
|
147
|
+
Scenario: You have two .csv files: `Revenue - 2023.csv` and
|
|
148
|
+
`Revenue - 2024.csv`. Each file contains monthly revenue figures.
|
|
149
|
+
|
|
150
|
+
Give Gemini CLI the following prompt:
|
|
151
|
+
|
|
152
|
+
```cli
|
|
153
|
+
Combine the two .csv files into a single .csv file, with each year a different column.
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Result: Gemini CLI reads each file and then asks for permission to write a new
|
|
157
|
+
file. Provide your permission and Gemini CLI provides the combined data:
|
|
158
|
+
|
|
159
|
+
```csv
|
|
160
|
+
Month,2023,2024
|
|
161
|
+
January,0,1000
|
|
162
|
+
February,0,1200
|
|
163
|
+
March,0,2400
|
|
164
|
+
April,900,500
|
|
165
|
+
May,1000,800
|
|
166
|
+
June,1000,900
|
|
167
|
+
July,1200,1000
|
|
168
|
+
August,1800,400
|
|
169
|
+
September,2000,2000
|
|
170
|
+
October,2400,3400
|
|
171
|
+
November,3400,1800
|
|
172
|
+
December,2100,9000
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Run unit tests
|
|
176
|
+
|
|
177
|
+
Gemini CLI can generate boilerplate code and tests based on your existing
|
|
178
|
+
implementation. This example demonstrates how to request code coverage for a
|
|
179
|
+
JavaScript component.
|
|
180
|
+
|
|
181
|
+
Scenario: You've written a simple login page. You wish to write unit tests to
|
|
182
|
+
ensure that your login page has code coverage.
|
|
183
|
+
|
|
184
|
+
Give Gemini CLI the following prompt:
|
|
185
|
+
|
|
186
|
+
```cli
|
|
187
|
+
Write unit tests for Login.js.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Result: Gemini CLI asks for permission to write a new file and creates a test
|
|
191
|
+
for your login page.
|
|
66
192
|
|
|
67
193
|
## Check usage and quota
|
|
68
194
|
|