@google/gemini-cli 0.13.0-nightly.20251103.9187f6f6 → 0.13.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/google-gemini-cli-0.13.0-nightly.20251031.c89bc30d.tgz +0 -0
- package/dist/package.json +3 -3
- package/dist/src/commands/mcp/list.test.js +25 -21
- package/dist/src/commands/mcp/list.test.js.map +1 -1
- package/dist/src/config/config.js +8 -84
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +13 -30
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension-manager.d.ts +18 -6
- package/dist/src/config/extension-manager.js +25 -19
- package/dist/src/config/extension-manager.js.map +1 -1
- package/dist/src/config/extension.test.js +9 -9
- package/dist/src/config/extension.test.js.map +1 -1
- package/dist/src/config/extensions/extensionSettings.test.js +39 -43
- package/dist/src/config/extensions/extensionSettings.test.js.map +1 -1
- package/dist/src/config/extensions/github.test.js +133 -165
- package/dist/src/config/extensions/github.test.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +3 -0
- package/dist/src/config/keyBindings.js +29 -7
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/keyBindings.test.js +17 -0
- package/dist/src/config/keyBindings.test.js.map +1 -1
- package/dist/src/config/policy.d.ts +0 -7
- package/dist/src/config/policy.js +10 -177
- package/dist/src/config/policy.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +103 -21
- package/dist/src/config/settingsSchema.js +352 -21
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +40 -1
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/gemini.js +15 -5
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +2 -0
- package/dist/src/gemini.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/nonInteractiveCli.js +68 -1
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +4 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +22 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +2 -2
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.test.js +4 -2
- package/dist/src/services/McpPromptLoader.test.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +2 -1
- package/dist/src/test-utils/render.js +3 -2
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/AppContainer.js +32 -15
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +160 -0
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +14 -14
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.test.js +4 -0
- package/dist/src/ui/commands/mcpCommand.test.js.map +1 -1
- package/dist/src/ui/commands/policiesCommand.d.ts +7 -0
- package/dist/src/ui/commands/policiesCommand.js +59 -0
- package/dist/src/ui/commands/policiesCommand.js.map +1 -0
- package/dist/src/ui/commands/policiesCommand.test.js +83 -0
- package/dist/src/ui/commands/policiesCommand.test.js.map +1 -0
- package/dist/src/ui/components/Composer.js +1 -1
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/Composer.test.js +4 -1
- package/dist/src/ui/components/Composer.test.js.map +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.js +4 -6
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +22 -2
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +70 -5
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/dist/src/ui/components/MainContent.js +15 -4
- package/dist/src/ui/components/MainContent.js.map +1 -1
- package/dist/src/ui/components/Notifications.js +38 -5
- package/dist/src/ui/components/Notifications.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.js +32 -25
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/messages/InfoMessage.js +1 -1
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/WarningMessage.js +2 -2
- package/dist/src/ui/components/messages/WarningMessage.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +1 -0
- package/dist/src/ui/components/shared/text-buffer.js +23 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.test.js +246 -201
- package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.js +182 -132
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +144 -8
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/MouseContext.d.ts +21 -0
- package/dist/src/ui/contexts/MouseContext.js +89 -0
- package/dist/src/ui/contexts/MouseContext.js.map +1 -0
- package/dist/src/ui/contexts/MouseContext.test.js +164 -0
- package/dist/src/ui/contexts/MouseContext.test.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +70 -73
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +135 -368
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/useKeypress.test.js +17 -9
- package/dist/src/ui/hooks/useKeypress.test.js.map +1 -1
- package/dist/src/ui/hooks/useMouse.d.ts +17 -0
- package/dist/src/ui/hooks/useMouse.js +27 -0
- package/dist/src/ui/hooks/useMouse.js.map +1 -0
- package/dist/src/ui/hooks/useMouse.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMouse.test.js +57 -0
- package/dist/src/ui/hooks/useMouse.test.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.js +5 -4
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.test.js +24 -3
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +109 -200
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +27 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/themes/no-color.js +1 -0
- package/dist/src/ui/themes/no-color.js.map +1 -1
- package/dist/src/ui/themes/semantic-tokens.d.ts +1 -0
- package/dist/src/ui/themes/semantic-tokens.js +3 -0
- package/dist/src/ui/themes/semantic-tokens.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +1 -0
- package/dist/src/ui/themes/theme.js +4 -0
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +11 -10
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +11 -9
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/input.d.ts +17 -0
- package/dist/src/ui/utils/input.js +51 -0
- package/dist/src/ui/utils/input.js.map +1 -0
- package/dist/src/ui/utils/input.test.d.ts +6 -0
- package/dist/src/ui/utils/input.test.js +44 -0
- package/dist/src/ui/utils/input.test.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +13 -4
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -1
- package/dist/src/ui/utils/mouse.d.ts +31 -0
- package/dist/src/ui/utils/mouse.js +164 -0
- package/dist/src/ui/utils/mouse.js.map +1 -0
- package/dist/src/ui/utils/mouse.test.d.ts +6 -0
- package/dist/src/ui/utils/mouse.test.js +131 -0
- package/dist/src/ui/utils/mouse.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +11 -2
- package/dist/src/utils/events.js +1 -0
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/sandbox.js +16 -18
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/src/config/policy-toml-loader.d.ts +0 -46
- package/dist/src/config/policy-toml-loader.js +0 -314
- package/dist/src/config/policy-toml-loader.js.map +0 -1
- package/dist/src/config/policy-toml-loader.test.js +0 -626
- package/dist/src/config/policy-toml-loader.test.js.map +0 -1
- package/dist/src/config/policy.test.js +0 -1058
- package/dist/src/config/policy.test.js.map +0 -1
- /package/dist/src/{config/policy-toml-loader.test.d.ts → ui/commands/policiesCommand.test.d.ts} +0 -0
- /package/dist/src/{config/policy.test.d.ts → ui/contexts/MouseContext.test.d.ts} +0 -0
|
@@ -3,186 +3,19 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import path from 'node:path';
|
|
9
|
-
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import { loadPoliciesFromToml, } from './policy-toml-loader.js';
|
|
11
|
-
// Get the directory name of the current module
|
|
12
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
13
|
-
// Store policy loading errors to be displayed after UI is ready
|
|
14
|
-
let storedPolicyErrors = [];
|
|
15
|
-
function getPolicyDirectories() {
|
|
16
|
-
const DEFAULT_POLICIES_DIR = path.resolve(__dirname, 'policies');
|
|
17
|
-
const USER_POLICIES_DIR = Storage.getUserPoliciesDir();
|
|
18
|
-
const systemSettingsPath = getSystemSettingsPath();
|
|
19
|
-
const ADMIN_POLICIES_DIR = path.join(path.dirname(systemSettingsPath), 'policies');
|
|
20
|
-
return [
|
|
21
|
-
DEFAULT_POLICIES_DIR,
|
|
22
|
-
USER_POLICIES_DIR,
|
|
23
|
-
ADMIN_POLICIES_DIR,
|
|
24
|
-
].reverse();
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Determines the policy tier (1=default, 2=user, 3=admin) for a given directory.
|
|
28
|
-
* This is used by the TOML loader to assign priority bands.
|
|
29
|
-
*/
|
|
30
|
-
function getPolicyTier(dir) {
|
|
31
|
-
const DEFAULT_POLICIES_DIR = path.resolve(__dirname, 'policies');
|
|
32
|
-
const USER_POLICIES_DIR = Storage.getUserPoliciesDir();
|
|
33
|
-
const systemSettingsPath = getSystemSettingsPath();
|
|
34
|
-
const ADMIN_POLICIES_DIR = path.join(path.dirname(systemSettingsPath), 'policies');
|
|
35
|
-
// Normalize paths for comparison
|
|
36
|
-
const normalizedDir = path.resolve(dir);
|
|
37
|
-
const normalizedDefault = path.resolve(DEFAULT_POLICIES_DIR);
|
|
38
|
-
const normalizedUser = path.resolve(USER_POLICIES_DIR);
|
|
39
|
-
const normalizedAdmin = path.resolve(ADMIN_POLICIES_DIR);
|
|
40
|
-
if (normalizedDir === normalizedDefault)
|
|
41
|
-
return 1;
|
|
42
|
-
if (normalizedDir === normalizedUser)
|
|
43
|
-
return 2;
|
|
44
|
-
if (normalizedDir === normalizedAdmin)
|
|
45
|
-
return 3;
|
|
46
|
-
// Default to tier 1 if unknown
|
|
47
|
-
return 1;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Formats a policy file error for console logging.
|
|
51
|
-
*/
|
|
52
|
-
function formatPolicyError(error) {
|
|
53
|
-
const tierLabel = error.tier.toUpperCase();
|
|
54
|
-
let message = `[${tierLabel}] Policy file error in ${error.fileName}:\n`;
|
|
55
|
-
message += ` ${error.message}`;
|
|
56
|
-
if (error.details) {
|
|
57
|
-
message += `\n${error.details}`;
|
|
58
|
-
}
|
|
59
|
-
if (error.suggestion) {
|
|
60
|
-
message += `\n Suggestion: ${error.suggestion}`;
|
|
61
|
-
}
|
|
62
|
-
return message;
|
|
63
|
-
}
|
|
6
|
+
import { createPolicyEngineConfig as createCorePolicyEngineConfig, createPolicyUpdater as createCorePolicyUpdater, } from '@google/gemini-cli-core';
|
|
7
|
+
import {} from './settings.js';
|
|
64
8
|
export async function createPolicyEngineConfig(settings, approvalMode) {
|
|
65
|
-
|
|
66
|
-
//
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
storedPolicyErrors = errors.map((error) => formatPolicyError(error));
|
|
72
|
-
}
|
|
73
|
-
const rules = [...tomlRules];
|
|
74
|
-
// Priority system for policy rules:
|
|
75
|
-
// - Higher priority numbers win over lower priority numbers
|
|
76
|
-
// - When multiple rules match, the highest priority rule is applied
|
|
77
|
-
// - Rules are evaluated in order of priority (highest first)
|
|
78
|
-
//
|
|
79
|
-
// Priority bands (tiers):
|
|
80
|
-
// - Default policies (TOML): 1 + priority/1000 (e.g., priority 100 → 1.100)
|
|
81
|
-
// - User policies (TOML): 2 + priority/1000 (e.g., priority 100 → 2.100)
|
|
82
|
-
// - Admin policies (TOML): 3 + priority/1000 (e.g., priority 100 → 3.100)
|
|
83
|
-
//
|
|
84
|
-
// This ensures Admin > User > Default hierarchy is always preserved,
|
|
85
|
-
// while allowing user-specified priorities to work within each tier.
|
|
86
|
-
//
|
|
87
|
-
// Settings-based and dynamic rules (all in user tier 2.x):
|
|
88
|
-
// 2.95: Tools that the user has selected as "Always Allow" in the interactive UI
|
|
89
|
-
// 2.9: MCP servers excluded list (security: persistent server blocks)
|
|
90
|
-
// 2.4: Command line flag --exclude-tools (explicit temporary blocks)
|
|
91
|
-
// 2.3: Command line flag --allowed-tools (explicit temporary allows)
|
|
92
|
-
// 2.2: MCP servers with trust=true (persistent trusted servers)
|
|
93
|
-
// 2.1: MCP servers allowed list (persistent general server allows)
|
|
94
|
-
//
|
|
95
|
-
// TOML policy priorities (before transformation):
|
|
96
|
-
// 10: Write tools default to ASK_USER (becomes 1.010 in default tier)
|
|
97
|
-
// 15: Auto-edit tool override (becomes 1.015 in default tier)
|
|
98
|
-
// 50: Read-only tools (becomes 1.050 in default tier)
|
|
99
|
-
// 999: YOLO mode allow-all (becomes 1.999 in default tier)
|
|
100
|
-
// MCP servers that are explicitly excluded in settings.mcp.excluded
|
|
101
|
-
// Priority: 2.9 (highest in user tier for security - persistent server blocks)
|
|
102
|
-
if (settings.mcp?.excluded) {
|
|
103
|
-
for (const serverName of settings.mcp.excluded) {
|
|
104
|
-
rules.push({
|
|
105
|
-
toolName: `${serverName}__*`,
|
|
106
|
-
decision: PolicyDecision.DENY,
|
|
107
|
-
priority: 2.9,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
// Tools that are explicitly excluded in the settings.
|
|
112
|
-
// Priority: 2.4 (user tier - explicit temporary blocks)
|
|
113
|
-
if (settings.tools?.exclude) {
|
|
114
|
-
for (const tool of settings.tools.exclude) {
|
|
115
|
-
rules.push({
|
|
116
|
-
toolName: tool,
|
|
117
|
-
decision: PolicyDecision.DENY,
|
|
118
|
-
priority: 2.4,
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
// Tools that are explicitly allowed in the settings.
|
|
123
|
-
// Priority: 2.3 (user tier - explicit temporary allows)
|
|
124
|
-
if (settings.tools?.allowed) {
|
|
125
|
-
for (const tool of settings.tools.allowed) {
|
|
126
|
-
rules.push({
|
|
127
|
-
toolName: tool,
|
|
128
|
-
decision: PolicyDecision.ALLOW,
|
|
129
|
-
priority: 2.3,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// MCP servers that are trusted in the settings.
|
|
134
|
-
// Priority: 2.2 (user tier - persistent trusted servers)
|
|
135
|
-
if (settings.mcpServers) {
|
|
136
|
-
for (const [serverName, serverConfig] of Object.entries(settings.mcpServers)) {
|
|
137
|
-
if (serverConfig.trust) {
|
|
138
|
-
// Trust all tools from this MCP server
|
|
139
|
-
// Using pattern matching for MCP tool names which are formatted as "serverName__toolName"
|
|
140
|
-
rules.push({
|
|
141
|
-
toolName: `${serverName}__*`,
|
|
142
|
-
decision: PolicyDecision.ALLOW,
|
|
143
|
-
priority: 2.2,
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
// MCP servers that are explicitly allowed in settings.mcp.allowed
|
|
149
|
-
// Priority: 2.1 (user tier - persistent general server allows)
|
|
150
|
-
if (settings.mcp?.allowed) {
|
|
151
|
-
for (const serverName of settings.mcp.allowed) {
|
|
152
|
-
rules.push({
|
|
153
|
-
toolName: `${serverName}__*`,
|
|
154
|
-
decision: PolicyDecision.ALLOW,
|
|
155
|
-
priority: 2.1,
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return {
|
|
160
|
-
rules,
|
|
161
|
-
defaultDecision: PolicyDecision.ASK_USER,
|
|
9
|
+
// Explicitly construct PolicySettings from Settings to ensure type safety
|
|
10
|
+
// and avoid accidental leakage of other settings properties.
|
|
11
|
+
const policySettings = {
|
|
12
|
+
mcp: settings.mcp,
|
|
13
|
+
tools: settings.tools,
|
|
14
|
+
mcpServers: settings.mcpServers,
|
|
162
15
|
};
|
|
16
|
+
return createCorePolicyEngineConfig(policySettings, approvalMode);
|
|
163
17
|
}
|
|
164
18
|
export function createPolicyUpdater(policyEngine, messageBus) {
|
|
165
|
-
|
|
166
|
-
const toolName = message.toolName;
|
|
167
|
-
policyEngine.addRule({
|
|
168
|
-
toolName,
|
|
169
|
-
decision: PolicyDecision.ALLOW,
|
|
170
|
-
// User tier (2) + high priority (950/1000) = 2.95
|
|
171
|
-
// This ensures user "always allow" selections are high priority
|
|
172
|
-
// but still lose to admin policies (3.xxx) and settings excludes (200)
|
|
173
|
-
priority: 2.95,
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Gets and clears any policy errors that were stored during config loading.
|
|
179
|
-
* This should be called once the UI is ready to display errors.
|
|
180
|
-
*
|
|
181
|
-
* @returns Array of formatted error messages, or empty array if no errors
|
|
182
|
-
*/
|
|
183
|
-
export function getPolicyErrorsForUI() {
|
|
184
|
-
const errors = [...storedPolicyErrors];
|
|
185
|
-
storedPolicyErrors = []; // Clear after retrieving
|
|
186
|
-
return errors;
|
|
19
|
+
return createCorePolicyUpdater(policyEngine, messageBus);
|
|
187
20
|
}
|
|
188
21
|
//# sourceMappingURL=policy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../src/config/policy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../src/config/policy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAML,wBAAwB,IAAI,4BAA4B,EACxD,mBAAmB,IAAI,uBAAuB,GAC/C,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAiB,MAAM,eAAe,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,QAAkB,EAClB,YAA0B;IAE1B,0EAA0E;IAC1E,6DAA6D;IAC7D,MAAM,cAAc,GAAmB;QACrC,GAAG,EAAE,QAAQ,CAAC,GAAG;QACjB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,UAAU,EAAE,QAAQ,CAAC,UAAU;KAChC,CAAC;IAEF,OAAO,4BAA4B,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,YAA0B,EAC1B,UAAsB;IAEtB,OAAO,uBAAuB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -18,6 +18,18 @@ export interface SettingEnumOption {
|
|
|
18
18
|
value: string | number;
|
|
19
19
|
label: string;
|
|
20
20
|
}
|
|
21
|
+
export interface SettingCollectionDefinition {
|
|
22
|
+
type: SettingsType;
|
|
23
|
+
description?: string;
|
|
24
|
+
properties?: SettingsSchema;
|
|
25
|
+
/** Enum type options */
|
|
26
|
+
options?: readonly SettingEnumOption[];
|
|
27
|
+
/**
|
|
28
|
+
* Optional reference identifier for generators that emit a `$ref`.
|
|
29
|
+
* For example, a JSON schema generator can use this to point to a shared definition.
|
|
30
|
+
*/
|
|
31
|
+
ref?: string;
|
|
32
|
+
}
|
|
21
33
|
export declare enum MergeStrategy {
|
|
22
34
|
REPLACE = "replace",
|
|
23
35
|
CONCAT = "concat",
|
|
@@ -39,6 +51,18 @@ export interface SettingDefinition {
|
|
|
39
51
|
mergeStrategy?: MergeStrategy;
|
|
40
52
|
/** Enum type options */
|
|
41
53
|
options?: readonly SettingEnumOption[];
|
|
54
|
+
/**
|
|
55
|
+
* For collection types (e.g. arrays), describes the shape of each item.
|
|
56
|
+
*/
|
|
57
|
+
items?: SettingCollectionDefinition;
|
|
58
|
+
/**
|
|
59
|
+
* For map-like objects without explicit `properties`, describes the shape of the values.
|
|
60
|
+
*/
|
|
61
|
+
additionalProperties?: SettingCollectionDefinition;
|
|
62
|
+
/**
|
|
63
|
+
* Optional reference identifier for generators that emit a `$ref`.
|
|
64
|
+
*/
|
|
65
|
+
ref?: string;
|
|
42
66
|
}
|
|
43
67
|
export interface SettingsSchema {
|
|
44
68
|
[key: string]: SettingDefinition;
|
|
@@ -60,6 +84,10 @@ declare const SETTINGS_SCHEMA: {
|
|
|
60
84
|
readonly description: "Configuration for MCP servers.";
|
|
61
85
|
readonly showInDialog: false;
|
|
62
86
|
readonly mergeStrategy: MergeStrategy.SHALLOW_MERGE;
|
|
87
|
+
readonly additionalProperties: {
|
|
88
|
+
readonly type: "object";
|
|
89
|
+
readonly ref: "MCPServerConfig";
|
|
90
|
+
};
|
|
63
91
|
};
|
|
64
92
|
readonly general: {
|
|
65
93
|
readonly type: "object";
|
|
@@ -243,7 +271,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
243
271
|
readonly category: "UI";
|
|
244
272
|
readonly requiresRestart: false;
|
|
245
273
|
readonly default: string | undefined;
|
|
246
|
-
readonly description: "The color theme for the UI.";
|
|
274
|
+
readonly description: "The color theme for the UI. See the CLI themes guide for available options.";
|
|
247
275
|
readonly showInDialog: false;
|
|
248
276
|
};
|
|
249
277
|
readonly customThemes: {
|
|
@@ -254,6 +282,10 @@ declare const SETTINGS_SCHEMA: {
|
|
|
254
282
|
readonly default: Record<string, CustomTheme>;
|
|
255
283
|
readonly description: "Custom theme definitions.";
|
|
256
284
|
readonly showInDialog: false;
|
|
285
|
+
readonly additionalProperties: {
|
|
286
|
+
readonly type: "object";
|
|
287
|
+
readonly ref: "CustomTheme";
|
|
288
|
+
};
|
|
257
289
|
};
|
|
258
290
|
readonly hideWindowTitle: {
|
|
259
291
|
readonly type: "boolean";
|
|
@@ -392,14 +424,26 @@ declare const SETTINGS_SCHEMA: {
|
|
|
392
424
|
readonly description: "Use the entire width of the terminal for output.";
|
|
393
425
|
readonly showInDialog: true;
|
|
394
426
|
};
|
|
427
|
+
readonly useAlternateBuffer: {
|
|
428
|
+
readonly type: "boolean";
|
|
429
|
+
readonly label: "Use Alternate Screen Buffer";
|
|
430
|
+
readonly category: "UI";
|
|
431
|
+
readonly requiresRestart: true;
|
|
432
|
+
readonly default: false;
|
|
433
|
+
readonly description: "Use an alternate screen buffer for the UI, preserving shell history.";
|
|
434
|
+
readonly showInDialog: true;
|
|
435
|
+
};
|
|
395
436
|
readonly customWittyPhrases: {
|
|
396
437
|
readonly type: "array";
|
|
397
438
|
readonly label: "Custom Witty Phrases";
|
|
398
439
|
readonly category: "UI";
|
|
399
440
|
readonly requiresRestart: false;
|
|
400
441
|
readonly default: string[];
|
|
401
|
-
readonly description:
|
|
442
|
+
readonly description: string;
|
|
402
443
|
readonly showInDialog: false;
|
|
444
|
+
readonly items: {
|
|
445
|
+
readonly type: "string";
|
|
446
|
+
};
|
|
403
447
|
};
|
|
404
448
|
readonly accessibility: {
|
|
405
449
|
readonly type: "object";
|
|
@@ -489,6 +533,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
489
533
|
readonly default: TelemetrySettings | undefined;
|
|
490
534
|
readonly description: "Telemetry configuration.";
|
|
491
535
|
readonly showInDialog: false;
|
|
536
|
+
readonly ref: "TelemetrySettings";
|
|
492
537
|
};
|
|
493
538
|
readonly model: {
|
|
494
539
|
readonly type: "object";
|
|
@@ -525,8 +570,13 @@ declare const SETTINGS_SCHEMA: {
|
|
|
525
570
|
readonly default: Record<string, {
|
|
526
571
|
tokenBudget?: number;
|
|
527
572
|
}> | undefined;
|
|
528
|
-
readonly description:
|
|
573
|
+
readonly description: string;
|
|
529
574
|
readonly showInDialog: false;
|
|
575
|
+
readonly additionalProperties: {
|
|
576
|
+
readonly type: "object";
|
|
577
|
+
readonly description: "Per-tool summarization settings with an optional tokenBudget.";
|
|
578
|
+
readonly ref: "SummarizeToolOutputSettings";
|
|
579
|
+
};
|
|
530
580
|
};
|
|
531
581
|
readonly compressionThreshold: {
|
|
532
582
|
readonly type: "number";
|
|
@@ -558,12 +608,13 @@ declare const SETTINGS_SCHEMA: {
|
|
|
558
608
|
readonly showInDialog: false;
|
|
559
609
|
readonly properties: {
|
|
560
610
|
readonly fileName: {
|
|
561
|
-
readonly type: "
|
|
611
|
+
readonly type: "string";
|
|
562
612
|
readonly label: "Context File Name";
|
|
563
613
|
readonly category: "Context";
|
|
564
614
|
readonly requiresRestart: false;
|
|
565
615
|
readonly default: string | string[] | undefined;
|
|
566
|
-
readonly
|
|
616
|
+
readonly ref: "StringOrStringArray";
|
|
617
|
+
readonly description: "The name of the context file or files to load into memory. Accepts either a single string or an array of strings.";
|
|
567
618
|
readonly showInDialog: false;
|
|
568
619
|
};
|
|
569
620
|
readonly importFormat: {
|
|
@@ -590,8 +641,11 @@ declare const SETTINGS_SCHEMA: {
|
|
|
590
641
|
readonly category: "Context";
|
|
591
642
|
readonly requiresRestart: false;
|
|
592
643
|
readonly default: string[];
|
|
593
|
-
readonly description:
|
|
644
|
+
readonly description: string;
|
|
594
645
|
readonly showInDialog: false;
|
|
646
|
+
readonly items: {
|
|
647
|
+
readonly type: "string";
|
|
648
|
+
};
|
|
595
649
|
readonly mergeStrategy: MergeStrategy.CONCAT;
|
|
596
650
|
};
|
|
597
651
|
readonly loadMemoryFromIncludeDirectories: {
|
|
@@ -600,7 +654,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
600
654
|
readonly category: "Context";
|
|
601
655
|
readonly requiresRestart: false;
|
|
602
656
|
readonly default: false;
|
|
603
|
-
readonly description:
|
|
657
|
+
readonly description: string;
|
|
604
658
|
readonly showInDialog: true;
|
|
605
659
|
};
|
|
606
660
|
readonly fileFiltering: {
|
|
@@ -636,7 +690,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
636
690
|
readonly category: "Context";
|
|
637
691
|
readonly requiresRestart: true;
|
|
638
692
|
readonly default: true;
|
|
639
|
-
readonly description:
|
|
693
|
+
readonly description: string;
|
|
640
694
|
readonly showInDialog: true;
|
|
641
695
|
};
|
|
642
696
|
readonly disableFuzzySearch: {
|
|
@@ -662,12 +716,13 @@ declare const SETTINGS_SCHEMA: {
|
|
|
662
716
|
readonly showInDialog: false;
|
|
663
717
|
readonly properties: {
|
|
664
718
|
readonly sandbox: {
|
|
665
|
-
readonly type: "
|
|
719
|
+
readonly type: "string";
|
|
666
720
|
readonly label: "Sandbox";
|
|
667
721
|
readonly category: "Tools";
|
|
668
722
|
readonly requiresRestart: true;
|
|
669
723
|
readonly default: boolean | string | undefined;
|
|
670
|
-
readonly
|
|
724
|
+
readonly ref: "BooleanOrString";
|
|
725
|
+
readonly description: string;
|
|
671
726
|
readonly showInDialog: false;
|
|
672
727
|
};
|
|
673
728
|
readonly shell: {
|
|
@@ -685,7 +740,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
685
740
|
readonly category: "Tools";
|
|
686
741
|
readonly requiresRestart: true;
|
|
687
742
|
readonly default: true;
|
|
688
|
-
readonly description:
|
|
743
|
+
readonly description: string;
|
|
689
744
|
readonly showInDialog: true;
|
|
690
745
|
};
|
|
691
746
|
readonly pager: {
|
|
@@ -714,7 +769,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
714
769
|
readonly category: "Tools";
|
|
715
770
|
readonly requiresRestart: false;
|
|
716
771
|
readonly default: false;
|
|
717
|
-
readonly description:
|
|
772
|
+
readonly description: string;
|
|
718
773
|
readonly showInDialog: true;
|
|
719
774
|
};
|
|
720
775
|
readonly core: {
|
|
@@ -723,8 +778,11 @@ declare const SETTINGS_SCHEMA: {
|
|
|
723
778
|
readonly category: "Tools";
|
|
724
779
|
readonly requiresRestart: true;
|
|
725
780
|
readonly default: string[] | undefined;
|
|
726
|
-
readonly description:
|
|
781
|
+
readonly description: string;
|
|
727
782
|
readonly showInDialog: false;
|
|
783
|
+
readonly items: {
|
|
784
|
+
readonly type: "string";
|
|
785
|
+
};
|
|
728
786
|
};
|
|
729
787
|
readonly allowed: {
|
|
730
788
|
readonly type: "array";
|
|
@@ -732,8 +790,11 @@ declare const SETTINGS_SCHEMA: {
|
|
|
732
790
|
readonly category: "Advanced";
|
|
733
791
|
readonly requiresRestart: true;
|
|
734
792
|
readonly default: string[] | undefined;
|
|
735
|
-
readonly description:
|
|
793
|
+
readonly description: string;
|
|
736
794
|
readonly showInDialog: false;
|
|
795
|
+
readonly items: {
|
|
796
|
+
readonly type: "string";
|
|
797
|
+
};
|
|
737
798
|
};
|
|
738
799
|
readonly exclude: {
|
|
739
800
|
readonly type: "array";
|
|
@@ -743,6 +804,9 @@ declare const SETTINGS_SCHEMA: {
|
|
|
743
804
|
readonly default: string[] | undefined;
|
|
744
805
|
readonly description: "Tool names to exclude from discovery.";
|
|
745
806
|
readonly showInDialog: false;
|
|
807
|
+
readonly items: {
|
|
808
|
+
readonly type: "string";
|
|
809
|
+
};
|
|
746
810
|
readonly mergeStrategy: MergeStrategy.UNION;
|
|
747
811
|
};
|
|
748
812
|
readonly discoveryCommand: {
|
|
@@ -760,7 +824,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
760
824
|
readonly category: "Tools";
|
|
761
825
|
readonly requiresRestart: true;
|
|
762
826
|
readonly default: string | undefined;
|
|
763
|
-
readonly description:
|
|
827
|
+
readonly description: string;
|
|
764
828
|
readonly showInDialog: false;
|
|
765
829
|
};
|
|
766
830
|
readonly useRipgrep: {
|
|
@@ -805,7 +869,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
805
869
|
readonly category: "Tools";
|
|
806
870
|
readonly requiresRestart: true;
|
|
807
871
|
readonly default: false;
|
|
808
|
-
readonly description:
|
|
872
|
+
readonly description: string;
|
|
809
873
|
readonly showInDialog: true;
|
|
810
874
|
};
|
|
811
875
|
readonly enableHooks: {
|
|
@@ -845,6 +909,9 @@ declare const SETTINGS_SCHEMA: {
|
|
|
845
909
|
readonly default: string[] | undefined;
|
|
846
910
|
readonly description: "A list of MCP servers to allow.";
|
|
847
911
|
readonly showInDialog: false;
|
|
912
|
+
readonly items: {
|
|
913
|
+
readonly type: "string";
|
|
914
|
+
};
|
|
848
915
|
};
|
|
849
916
|
readonly excluded: {
|
|
850
917
|
readonly type: "array";
|
|
@@ -854,6 +921,9 @@ declare const SETTINGS_SCHEMA: {
|
|
|
854
921
|
readonly default: string[] | undefined;
|
|
855
922
|
readonly description: "A list of MCP servers to exclude.";
|
|
856
923
|
readonly showInDialog: false;
|
|
924
|
+
readonly items: {
|
|
925
|
+
readonly type: "string";
|
|
926
|
+
};
|
|
857
927
|
};
|
|
858
928
|
};
|
|
859
929
|
};
|
|
@@ -871,7 +941,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
871
941
|
readonly label: "Use Write Todos";
|
|
872
942
|
readonly category: "Advanced";
|
|
873
943
|
readonly requiresRestart: false;
|
|
874
|
-
readonly default:
|
|
944
|
+
readonly default: true;
|
|
875
945
|
readonly description: "Enable the write_todos_list tool.";
|
|
876
946
|
readonly showInDialog: false;
|
|
877
947
|
};
|
|
@@ -988,6 +1058,9 @@ declare const SETTINGS_SCHEMA: {
|
|
|
988
1058
|
readonly default: string[];
|
|
989
1059
|
readonly description: "Environment variables to exclude from project context.";
|
|
990
1060
|
readonly showInDialog: false;
|
|
1061
|
+
readonly items: {
|
|
1062
|
+
readonly type: "string";
|
|
1063
|
+
};
|
|
991
1064
|
readonly mergeStrategy: MergeStrategy.UNION;
|
|
992
1065
|
};
|
|
993
1066
|
readonly bugCommand: {
|
|
@@ -998,6 +1071,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
998
1071
|
readonly default: BugCommandSettings | undefined;
|
|
999
1072
|
readonly description: "Configuration for the bug report command.";
|
|
1000
1073
|
readonly showInDialog: false;
|
|
1074
|
+
readonly ref: "BugCommandSettings";
|
|
1001
1075
|
};
|
|
1002
1076
|
};
|
|
1003
1077
|
};
|
|
@@ -1051,7 +1125,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
1051
1125
|
readonly label: "Enable Codebase Investigator";
|
|
1052
1126
|
readonly category: "Experimental";
|
|
1053
1127
|
readonly requiresRestart: true;
|
|
1054
|
-
readonly default:
|
|
1128
|
+
readonly default: true;
|
|
1055
1129
|
readonly description: "Enable the Codebase Investigator agent.";
|
|
1056
1130
|
readonly showInDialog: true;
|
|
1057
1131
|
};
|
|
@@ -1060,7 +1134,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
1060
1134
|
readonly label: "Codebase Investigator Max Num Turns";
|
|
1061
1135
|
readonly category: "Experimental";
|
|
1062
1136
|
readonly requiresRestart: true;
|
|
1063
|
-
readonly default:
|
|
1137
|
+
readonly default: 10;
|
|
1064
1138
|
readonly description: "Maximum number of turns for the Codebase Investigator agent.";
|
|
1065
1139
|
readonly showInDialog: true;
|
|
1066
1140
|
};
|
|
@@ -1069,7 +1143,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
1069
1143
|
readonly label: "Max Time (Minutes)";
|
|
1070
1144
|
readonly category: "Experimental";
|
|
1071
1145
|
readonly requiresRestart: true;
|
|
1072
|
-
readonly default:
|
|
1146
|
+
readonly default: 3;
|
|
1073
1147
|
readonly description: "Maximum time for the Codebase Investigator agent (in minutes).";
|
|
1074
1148
|
readonly showInDialog: false;
|
|
1075
1149
|
};
|
|
@@ -1078,7 +1152,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
1078
1152
|
readonly label: "Thinking Budget";
|
|
1079
1153
|
readonly category: "Experimental";
|
|
1080
1154
|
readonly requiresRestart: true;
|
|
1081
|
-
readonly default:
|
|
1155
|
+
readonly default: 8192;
|
|
1082
1156
|
readonly description: "The thinking budget for the Codebase Investigator agent.";
|
|
1083
1157
|
readonly showInDialog: false;
|
|
1084
1158
|
};
|
|
@@ -1112,6 +1186,9 @@ declare const SETTINGS_SCHEMA: {
|
|
|
1112
1186
|
readonly default: string[];
|
|
1113
1187
|
readonly description: "List of disabled extensions.";
|
|
1114
1188
|
readonly showInDialog: false;
|
|
1189
|
+
readonly items: {
|
|
1190
|
+
readonly type: "string";
|
|
1191
|
+
};
|
|
1115
1192
|
readonly mergeStrategy: MergeStrategy.UNION;
|
|
1116
1193
|
};
|
|
1117
1194
|
readonly workspacesWithMigrationNudge: {
|
|
@@ -1122,6 +1199,9 @@ declare const SETTINGS_SCHEMA: {
|
|
|
1122
1199
|
readonly default: string[];
|
|
1123
1200
|
readonly description: "List of workspaces for which the migration nudge has been shown.";
|
|
1124
1201
|
readonly showInDialog: false;
|
|
1202
|
+
readonly items: {
|
|
1203
|
+
readonly type: "string";
|
|
1204
|
+
};
|
|
1125
1205
|
readonly mergeStrategy: MergeStrategy.UNION;
|
|
1126
1206
|
};
|
|
1127
1207
|
};
|
|
@@ -1138,6 +1218,8 @@ declare const SETTINGS_SCHEMA: {
|
|
|
1138
1218
|
};
|
|
1139
1219
|
};
|
|
1140
1220
|
export type SettingsSchemaType = typeof SETTINGS_SCHEMA;
|
|
1221
|
+
export type SettingsJsonSchemaDefinition = Record<string, unknown>;
|
|
1222
|
+
export declare const SETTINGS_SCHEMA_DEFINITIONS: Record<string, SettingsJsonSchemaDefinition>;
|
|
1141
1223
|
export declare function getSettingsSchema(): SettingsSchemaType;
|
|
1142
1224
|
type InferSettings<T extends SettingsSchema> = {
|
|
1143
1225
|
-readonly [K in keyof T]?: T[K] extends {
|