@google/gemini-cli-core 0.24.0-nightly.20251227.37be16243 → 0.24.0-nightly.20260103.30f5c4af4
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/cli/settings.md +0 -1
- package/dist/docs/get-started/configuration.md +12 -14
- package/dist/docs/hooks/best-practices.md +177 -127
- package/dist/docs/hooks/index.md +22 -0
- package/dist/google-gemini-cli-core-0.24.0-nightly.20251227.37be16243.tgz +0 -0
- package/dist/src/agents/registry.d.ts +9 -1
- package/dist/src/agents/registry.js +74 -34
- package/dist/src/agents/registry.js.map +1 -1
- package/dist/src/agents/registry.test.js +79 -30
- package/dist/src/agents/registry.test.js.map +1 -1
- package/dist/src/agents/toml-loader.d.ts +14 -5
- package/dist/src/agents/toml-loader.js +98 -26
- package/dist/src/agents/toml-loader.js.map +1 -1
- package/dist/src/agents/toml-loader.test.js +121 -2
- package/dist/src/agents/toml-loader.test.js.map +1 -1
- package/dist/src/config/config.d.ts +23 -6
- package/dist/src/config/config.js +38 -36
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +2 -1
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/flashFallback.test.js +13 -0
- package/dist/src/config/flashFallback.test.js.map +1 -1
- package/dist/src/config/storage.d.ts +2 -0
- package/dist/src/config/storage.js +6 -0
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/config/storage.test.js +8 -0
- package/dist/src/config/storage.test.js.map +1 -1
- package/dist/src/confirmation-bus/message-bus.js +2 -1
- package/dist/src/confirmation-bus/message-bus.js.map +1 -1
- package/dist/src/core/client.d.ts +4 -0
- package/dist/src/core/client.js +156 -70
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +110 -6
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/coreToolHookTriggers.d.ts +2 -2
- package/dist/src/core/coreToolHookTriggers.js +74 -14
- package/dist/src/core/coreToolHookTriggers.js.map +1 -1
- package/dist/src/core/coreToolHookTriggers.test.d.ts +6 -0
- package/dist/src/core/coreToolHookTriggers.test.js +189 -0
- package/dist/src/core/coreToolHookTriggers.test.js.map +1 -0
- package/dist/src/core/coreToolScheduler.js +20 -22
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +1 -3
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js +0 -2
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
- package/dist/src/core/prompts.js +28 -4
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +40 -1
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +3 -3
- package/dist/src/generated/git-commit.js +3 -3
- package/dist/src/hooks/hookAggregator.js +7 -0
- package/dist/src/hooks/hookAggregator.js.map +1 -1
- package/dist/src/hooks/hookRunner.js +11 -0
- package/dist/src/hooks/hookRunner.js.map +1 -1
- package/dist/src/hooks/types.d.ts +5 -0
- package/dist/src/hooks/types.js +17 -1
- package/dist/src/hooks/types.js.map +1 -1
- package/dist/src/hooks/types.test.js +5 -1
- package/dist/src/hooks/types.test.js.map +1 -1
- package/dist/src/ide/ide-client.js +1 -1
- package/dist/src/ide/ide-client.js.map +1 -1
- package/dist/src/mcp/oauth-utils.js +1 -1
- package/dist/src/mcp/oauth-utils.js.map +1 -1
- package/dist/src/mcp/token-storage/keychain-token-storage.js +1 -1
- package/dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -1
- package/dist/src/policy/config.js +2 -1
- package/dist/src/policy/config.js.map +1 -1
- package/dist/src/policy/policies/write.toml +5 -0
- package/dist/src/policy/policy-engine.d.ts +4 -0
- package/dist/src/policy/policy-engine.js +59 -51
- package/dist/src/policy/policy-engine.js.map +1 -1
- package/dist/src/policy/policy-engine.test.js +66 -0
- package/dist/src/policy/policy-engine.test.js.map +1 -1
- package/dist/src/policy/policy-updater.test.js +2 -2
- package/dist/src/policy/policy-updater.test.js.map +1 -1
- package/dist/src/policy/types.d.ts +6 -0
- package/dist/src/routing/strategies/compositeStrategy.js +4 -2
- package/dist/src/routing/strategies/compositeStrategy.js.map +1 -1
- package/dist/src/routing/strategies/compositeStrategy.test.js +11 -10
- package/dist/src/routing/strategies/compositeStrategy.test.js.map +1 -1
- package/dist/src/services/skillManager.d.ts +61 -0
- package/dist/src/services/skillManager.js +157 -0
- package/dist/src/services/skillManager.js.map +1 -0
- package/dist/src/services/skillManager.test.d.ts +6 -0
- package/dist/src/services/skillManager.test.js +169 -0
- package/dist/src/services/skillManager.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +4 -6
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +0 -3
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/sdk.js +3 -4
- package/dist/src/telemetry/sdk.js.map +1 -1
- package/dist/src/tools/activate-skill.d.ts +27 -0
- package/dist/src/tools/activate-skill.js +115 -0
- package/dist/src/tools/activate-skill.js.map +1 -0
- package/dist/src/tools/activate-skill.test.d.ts +6 -0
- package/dist/src/tools/activate-skill.test.js +93 -0
- package/dist/src/tools/activate-skill.test.js.map +1 -0
- package/dist/src/tools/edit.test.js +1 -1
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.js +14 -7
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +28 -0
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/tools/memoryTool.js +0 -2
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/shell.d.ts +1 -3
- package/dist/src/tools/shell.js +6 -13
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +1 -8
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/smart-edit.test.js +1 -2
- package/dist/src/tools/smart-edit.test.js.map +1 -1
- package/dist/src/tools/tool-error.d.ts +2 -1
- package/dist/src/tools/tool-error.js +2 -0
- package/dist/src/tools/tool-error.js.map +1 -1
- package/dist/src/tools/tool-names.d.ts +2 -1
- package/dist/src/tools/tool-names.js +2 -0
- package/dist/src/tools/tool-names.js.map +1 -1
- package/dist/src/tools/tool-registry.js +1 -1
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/web-search.js +2 -1
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/write-file.js +2 -1
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/utils/debugLogger.js +1 -0
- package/dist/src/utils/debugLogger.js.map +1 -1
- package/dist/src/utils/editCorrector.js +5 -4
- package/dist/src/utils/editCorrector.js.map +1 -1
- package/dist/src/utils/errorReporting.d.ts +1 -1
- package/dist/src/utils/errorReporting.js +13 -12
- package/dist/src/utils/errorReporting.js.map +1 -1
- package/dist/src/utils/errorReporting.test.js +17 -14
- package/dist/src/utils/errorReporting.test.js.map +1 -1
- package/dist/src/utils/getFolderStructure.js +7 -2
- package/dist/src/utils/getFolderStructure.js.map +1 -1
- package/dist/src/utils/googleQuotaErrors.d.ts +3 -3
- package/dist/src/utils/googleQuotaErrors.js +9 -6
- package/dist/src/utils/googleQuotaErrors.js.map +1 -1
- package/dist/src/utils/googleQuotaErrors.test.js +7 -7
- package/dist/src/utils/googleQuotaErrors.test.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.js +1 -1
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/retry.js +8 -5
- package/dist/src/utils/retry.js.map +1 -1
- package/dist/src/utils/shell-utils.d.ts +6 -0
- package/dist/src/utils/shell-utils.js +72 -8
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/shell-utils.test.js +99 -1
- package/dist/src/utils/shell-utils.test.js.map +1 -1
- package/dist/src/utils/summarizer.test.js +3 -2
- package/dist/src/utils/summarizer.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -1
- package/dist/google-gemini-cli-core-0.24.0-nightly.20251226.546baf993.tgz +0 -0
|
@@ -33,7 +33,8 @@ describe('toml-loader', () => {
|
|
|
33
33
|
system_prompt = "You are a test agent."
|
|
34
34
|
`);
|
|
35
35
|
const result = await parseAgentToml(filePath);
|
|
36
|
-
expect(result).
|
|
36
|
+
expect(result).toHaveLength(1);
|
|
37
|
+
expect(result[0]).toMatchObject({
|
|
37
38
|
name: 'test-agent',
|
|
38
39
|
description: 'A test agent',
|
|
39
40
|
prompts: {
|
|
@@ -41,6 +42,99 @@ describe('toml-loader', () => {
|
|
|
41
42
|
},
|
|
42
43
|
});
|
|
43
44
|
});
|
|
45
|
+
it('should parse a valid remote agent TOML file', async () => {
|
|
46
|
+
const filePath = await writeAgentToml(`
|
|
47
|
+
kind = "remote"
|
|
48
|
+
name = "remote-agent"
|
|
49
|
+
description = "A remote agent"
|
|
50
|
+
agent_card_url = "https://example.com/card"
|
|
51
|
+
`);
|
|
52
|
+
const result = await parseAgentToml(filePath);
|
|
53
|
+
expect(result).toHaveLength(1);
|
|
54
|
+
expect(result[0]).toEqual({
|
|
55
|
+
kind: 'remote',
|
|
56
|
+
name: 'remote-agent',
|
|
57
|
+
description: 'A remote agent',
|
|
58
|
+
agent_card_url: 'https://example.com/card',
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
it('should infer remote agent kind from agent_card_url', async () => {
|
|
62
|
+
const filePath = await writeAgentToml(`
|
|
63
|
+
name = "inferred-remote"
|
|
64
|
+
description = "Inferred"
|
|
65
|
+
agent_card_url = "https://example.com/inferred"
|
|
66
|
+
`);
|
|
67
|
+
const result = await parseAgentToml(filePath);
|
|
68
|
+
expect(result).toHaveLength(1);
|
|
69
|
+
expect(result[0]).toEqual({
|
|
70
|
+
kind: 'remote',
|
|
71
|
+
name: 'inferred-remote',
|
|
72
|
+
description: 'Inferred',
|
|
73
|
+
agent_card_url: 'https://example.com/inferred',
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
it('should parse a remote agent without description', async () => {
|
|
77
|
+
const filePath = await writeAgentToml(`
|
|
78
|
+
kind = "remote"
|
|
79
|
+
name = "no-description-remote"
|
|
80
|
+
agent_card_url = "https://example.com/card"
|
|
81
|
+
`);
|
|
82
|
+
const result = await parseAgentToml(filePath);
|
|
83
|
+
expect(result).toHaveLength(1);
|
|
84
|
+
expect(result[0]).toEqual({
|
|
85
|
+
kind: 'remote',
|
|
86
|
+
name: 'no-description-remote',
|
|
87
|
+
agent_card_url: 'https://example.com/card',
|
|
88
|
+
});
|
|
89
|
+
expect(result[0].description).toBeUndefined();
|
|
90
|
+
// defined after conversion to AgentDefinition
|
|
91
|
+
const agentDef = tomlToAgentDefinition(result[0]);
|
|
92
|
+
expect(agentDef.description).toBe('(Loading description...)');
|
|
93
|
+
});
|
|
94
|
+
it('should parse multiple agents in one file', async () => {
|
|
95
|
+
const filePath = await writeAgentToml(`
|
|
96
|
+
[[remote_agents]]
|
|
97
|
+
kind = "remote"
|
|
98
|
+
name = "agent-1"
|
|
99
|
+
description = "Remote 1"
|
|
100
|
+
agent_card_url = "https://example.com/1"
|
|
101
|
+
|
|
102
|
+
[[remote_agents]]
|
|
103
|
+
kind = "remote"
|
|
104
|
+
name = "agent-2"
|
|
105
|
+
description = "Remote 2"
|
|
106
|
+
agent_card_url = "https://example.com/2"
|
|
107
|
+
`);
|
|
108
|
+
const result = await parseAgentToml(filePath);
|
|
109
|
+
expect(result).toHaveLength(2);
|
|
110
|
+
expect(result[0].name).toBe('agent-1');
|
|
111
|
+
expect(result[0].kind).toBe('remote');
|
|
112
|
+
expect(result[1].name).toBe('agent-2');
|
|
113
|
+
expect(result[1].kind).toBe('remote');
|
|
114
|
+
});
|
|
115
|
+
it('should allow omitting kind in remote_agents block', async () => {
|
|
116
|
+
const filePath = await writeAgentToml(`
|
|
117
|
+
[[remote_agents]]
|
|
118
|
+
name = "implicit-remote-1"
|
|
119
|
+
agent_card_url = "https://example.com/1"
|
|
120
|
+
|
|
121
|
+
[[remote_agents]]
|
|
122
|
+
name = "implicit-remote-2"
|
|
123
|
+
agent_card_url = "https://example.com/2"
|
|
124
|
+
`);
|
|
125
|
+
const result = await parseAgentToml(filePath);
|
|
126
|
+
expect(result).toHaveLength(2);
|
|
127
|
+
expect(result[0]).toMatchObject({
|
|
128
|
+
kind: 'remote',
|
|
129
|
+
name: 'implicit-remote-1',
|
|
130
|
+
agent_card_url: 'https://example.com/1',
|
|
131
|
+
});
|
|
132
|
+
expect(result[1]).toMatchObject({
|
|
133
|
+
kind: 'remote',
|
|
134
|
+
name: 'implicit-remote-2',
|
|
135
|
+
agent_card_url: 'https://example.com/2',
|
|
136
|
+
});
|
|
137
|
+
});
|
|
44
138
|
it('should throw AgentLoadError if file reading fails', async () => {
|
|
45
139
|
const filePath = path.join(tempDir, 'non-existent.toml');
|
|
46
140
|
await expect(parseAgentToml(filePath)).rejects.toThrow(AgentLoadError);
|
|
@@ -85,12 +179,35 @@ describe('toml-loader', () => {
|
|
|
85
179
|
[prompts]
|
|
86
180
|
system_prompt = "You are a test agent."
|
|
87
181
|
`);
|
|
88
|
-
await expect(parseAgentToml(filePath)).rejects.toThrow(/Validation failed:
|
|
182
|
+
await expect(parseAgentToml(filePath)).rejects.toThrow(/Validation failed:[\s\S]*tools.0: Invalid tool name/);
|
|
183
|
+
});
|
|
184
|
+
it('should throw AgentLoadError if file contains both single and multiple agents', async () => {
|
|
185
|
+
const filePath = await writeAgentToml(`
|
|
186
|
+
name = "top-level-agent"
|
|
187
|
+
description = "I should not be here"
|
|
188
|
+
[prompts]
|
|
189
|
+
system_prompt = "..."
|
|
190
|
+
|
|
191
|
+
[[remote_agents]]
|
|
192
|
+
kind = "remote"
|
|
193
|
+
name = "array-agent"
|
|
194
|
+
description = "I am in an array"
|
|
195
|
+
agent_card_url = "https://example.com/card"
|
|
196
|
+
`);
|
|
197
|
+
await expect(parseAgentToml(filePath)).rejects.toThrow(/Validation failed/);
|
|
198
|
+
});
|
|
199
|
+
it('should show both options in error message when validation fails ambiguously', async () => {
|
|
200
|
+
const filePath = await writeAgentToml(`
|
|
201
|
+
name = "ambiguous-agent"
|
|
202
|
+
description = "I have neither prompts nor card"
|
|
203
|
+
`);
|
|
204
|
+
await expect(parseAgentToml(filePath)).rejects.toThrow(/Validation failed: Agent Definition:\n\(Local Agent\) prompts: Required\n\(Remote Agent\) agent_card_url: Required/);
|
|
89
205
|
});
|
|
90
206
|
});
|
|
91
207
|
describe('tomlToAgentDefinition', () => {
|
|
92
208
|
it('should convert valid TOML to AgentDefinition with defaults', () => {
|
|
93
209
|
const toml = {
|
|
210
|
+
kind: 'local',
|
|
94
211
|
name: 'test-agent',
|
|
95
212
|
description: 'A test agent',
|
|
96
213
|
prompts: {
|
|
@@ -123,6 +240,7 @@ describe('toml-loader', () => {
|
|
|
123
240
|
});
|
|
124
241
|
it('should pass through model aliases', () => {
|
|
125
242
|
const toml = {
|
|
243
|
+
kind: 'local',
|
|
126
244
|
name: 'test-agent',
|
|
127
245
|
description: 'A test agent',
|
|
128
246
|
model: {
|
|
@@ -137,6 +255,7 @@ describe('toml-loader', () => {
|
|
|
137
255
|
});
|
|
138
256
|
it('should pass through unknown model names (e.g. auto)', () => {
|
|
139
257
|
const toml = {
|
|
258
|
+
kind: 'local',
|
|
140
259
|
name: 'test-agent',
|
|
141
260
|
description: 'A test agent',
|
|
142
261
|
model: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toml-loader.test.js","sourceRoot":"","sources":["../../../src/agents/toml-loader.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,Q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
|
import type { RetrieveUserQuotaResponse } from '../code_assist/types.js';
|
|
40
40
|
import type { Experiments } from '../code_assist/experiments/experiments.js';
|
|
41
41
|
import { AgentRegistry } from '../agents/registry.js';
|
|
42
|
+
import { SkillManager } from '../services/skillManager.js';
|
|
42
43
|
import { ApprovalMode } from '../policy/types.js';
|
|
43
44
|
export interface AccessibilitySettings {
|
|
44
45
|
disableLoadingPhrases?: boolean;
|
|
@@ -70,6 +71,18 @@ export interface CodebaseInvestigatorSettings {
|
|
|
70
71
|
thinkingBudget?: number;
|
|
71
72
|
model?: string;
|
|
72
73
|
}
|
|
74
|
+
export interface ExtensionSetting {
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
envVar: string;
|
|
78
|
+
sensitive?: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface ResolvedExtensionSetting {
|
|
81
|
+
name: string;
|
|
82
|
+
envVar: string;
|
|
83
|
+
value: string;
|
|
84
|
+
sensitive: boolean;
|
|
85
|
+
}
|
|
73
86
|
export interface IntrospectionAgentSettings {
|
|
74
87
|
enabled?: boolean;
|
|
75
88
|
}
|
|
@@ -92,6 +105,8 @@ export interface GeminiCLIExtension {
|
|
|
92
105
|
hooks?: {
|
|
93
106
|
[K in HookEventName]?: HookDefinition[];
|
|
94
107
|
};
|
|
108
|
+
settings?: ExtensionSetting[];
|
|
109
|
+
resolvedSettings?: ResolvedExtensionSetting[];
|
|
95
110
|
}
|
|
96
111
|
export interface ExtensionInstallMetadata {
|
|
97
112
|
source: string;
|
|
@@ -210,11 +225,9 @@ export interface ConfigParameters {
|
|
|
210
225
|
truncateToolOutputLines?: number;
|
|
211
226
|
enableToolOutputTruncation?: boolean;
|
|
212
227
|
eventEmitter?: EventEmitter;
|
|
213
|
-
useSmartEdit?: boolean;
|
|
214
228
|
useWriteTodos?: boolean;
|
|
215
229
|
policyEngineConfig?: PolicyEngineConfig;
|
|
216
230
|
output?: OutputSettings;
|
|
217
|
-
enableMessageBusIntegration?: boolean;
|
|
218
231
|
disableModelRouterForAuth?: AuthType[];
|
|
219
232
|
codebaseInvestigatorSettings?: CodebaseInvestigatorSettings;
|
|
220
233
|
introspectionAgentSettings?: IntrospectionAgentSettings;
|
|
@@ -241,6 +254,8 @@ export interface ConfigParameters {
|
|
|
241
254
|
};
|
|
242
255
|
previewFeatures?: boolean;
|
|
243
256
|
enableAgents?: boolean;
|
|
257
|
+
skillsSupport?: boolean;
|
|
258
|
+
disabledSkills?: string[];
|
|
244
259
|
experimentalJitContext?: boolean;
|
|
245
260
|
onModelChange?: (model: string) => void;
|
|
246
261
|
}
|
|
@@ -255,6 +270,7 @@ export declare class Config {
|
|
|
255
270
|
private promptRegistry;
|
|
256
271
|
private resourceRegistry;
|
|
257
272
|
private agentRegistry;
|
|
273
|
+
private skillManager;
|
|
258
274
|
private sessionId;
|
|
259
275
|
private fileSystemService;
|
|
260
276
|
private contentGeneratorConfig;
|
|
@@ -329,12 +345,10 @@ export declare class Config {
|
|
|
329
345
|
readonly storage: Storage;
|
|
330
346
|
private readonly fileExclusions;
|
|
331
347
|
private readonly eventEmitter?;
|
|
332
|
-
private readonly useSmartEdit;
|
|
333
348
|
private readonly useWriteTodos;
|
|
334
349
|
private readonly messageBus;
|
|
335
350
|
private readonly policyEngine;
|
|
336
351
|
private readonly outputSettings;
|
|
337
|
-
private readonly enableMessageBusIntegration;
|
|
338
352
|
private readonly codebaseInvestigatorSettings;
|
|
339
353
|
private readonly introspectionAgentSettings;
|
|
340
354
|
private readonly continueOnFailedApiCall;
|
|
@@ -354,6 +368,8 @@ export declare class Config {
|
|
|
354
368
|
private hookSystem?;
|
|
355
369
|
private readonly onModelChange;
|
|
356
370
|
private readonly enableAgents;
|
|
371
|
+
private readonly skillsSupport;
|
|
372
|
+
private readonly disabledSkills;
|
|
357
373
|
private readonly experimentalJitContext;
|
|
358
374
|
private contextManager?;
|
|
359
375
|
private terminalBackground;
|
|
@@ -380,6 +396,7 @@ export declare class Config {
|
|
|
380
396
|
getContentGeneratorConfig(): ContentGeneratorConfig;
|
|
381
397
|
getModel(): string;
|
|
382
398
|
setModel(newModel: string, isFallbackModel?: boolean): void;
|
|
399
|
+
activateFallbackMode(model: string): void;
|
|
383
400
|
getActiveModel(): string;
|
|
384
401
|
setActiveModel(model: string): void;
|
|
385
402
|
setFallbackModelHandler(handler: FallbackModelHandler): void;
|
|
@@ -397,6 +414,7 @@ export declare class Config {
|
|
|
397
414
|
getAgentRegistry(): AgentRegistry;
|
|
398
415
|
getToolRegistry(): ToolRegistry;
|
|
399
416
|
getPromptRegistry(): PromptRegistry;
|
|
417
|
+
getSkillManager(): SkillManager;
|
|
400
418
|
getResourceRegistry(): ResourceRegistry;
|
|
401
419
|
getDebugMode(): boolean;
|
|
402
420
|
getQuestion(): string | undefined;
|
|
@@ -516,6 +534,7 @@ export declare class Config {
|
|
|
516
534
|
getBannerTextCapacityIssues(): Promise<string>;
|
|
517
535
|
private ensureExperimentsLoaded;
|
|
518
536
|
isInteractiveShellEnabled(): boolean;
|
|
537
|
+
isSkillsSupportEnabled(): boolean;
|
|
519
538
|
isInteractive(): boolean;
|
|
520
539
|
getUseRipgrep(): boolean;
|
|
521
540
|
getEnableInteractiveShell(): boolean;
|
|
@@ -531,14 +550,12 @@ export declare class Config {
|
|
|
531
550
|
getEnableToolOutputTruncation(): boolean;
|
|
532
551
|
getTruncateToolOutputThreshold(): number;
|
|
533
552
|
getTruncateToolOutputLines(): number;
|
|
534
|
-
getUseSmartEdit(): boolean;
|
|
535
553
|
getUseWriteTodos(): boolean;
|
|
536
554
|
getOutputFormat(): OutputFormat;
|
|
537
555
|
getGitService(): Promise<GitService>;
|
|
538
556
|
getFileExclusions(): FileExclusions;
|
|
539
557
|
getMessageBus(): MessageBus;
|
|
540
558
|
getPolicyEngine(): PolicyEngine;
|
|
541
|
-
getEnableMessageBusIntegration(): boolean;
|
|
542
559
|
getEnableHooks(): boolean;
|
|
543
560
|
getCodebaseInvestigatorSettings(): CodebaseInvestigatorSettings;
|
|
544
561
|
getIntrospectionAgentSettings(): IntrospectionAgentSettings;
|
|
@@ -15,7 +15,7 @@ import { ReadFileTool } from '../tools/read-file.js';
|
|
|
15
15
|
import { GrepTool } from '../tools/grep.js';
|
|
16
16
|
import { canUseRipgrep, RipGrepTool } from '../tools/ripGrep.js';
|
|
17
17
|
import { GlobTool } from '../tools/glob.js';
|
|
18
|
-
import {
|
|
18
|
+
import { ActivateSkillTool } from '../tools/activate-skill.js';
|
|
19
19
|
import { SmartEditTool } from '../tools/smart-edit.js';
|
|
20
20
|
import { ShellTool } from '../tools/shell.js';
|
|
21
21
|
import { WriteFileTool } from '../tools/write-file.js';
|
|
@@ -34,8 +34,8 @@ import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
|
|
34
34
|
import { ideContextStore } from '../ide/ideContext.js';
|
|
35
35
|
import { WriteTodosTool } from '../tools/write-todos.js';
|
|
36
36
|
import { StandardFileSystemService } from '../services/fileSystemService.js';
|
|
37
|
-
import { logRipgrepFallback } from '../telemetry/loggers.js';
|
|
38
|
-
import { RipgrepFallbackEvent } from '../telemetry/types.js';
|
|
37
|
+
import { logRipgrepFallback, logFlashFallback } from '../telemetry/loggers.js';
|
|
38
|
+
import { RipgrepFallbackEvent, FlashFallbackEvent, } from '../telemetry/types.js';
|
|
39
39
|
import { ModelAvailabilityService } from '../availability/modelAvailabilityService.js';
|
|
40
40
|
import { ModelRouterService } from '../routing/modelRouterService.js';
|
|
41
41
|
import { OutputFormat } from '../output/types.js';
|
|
@@ -56,6 +56,7 @@ import { DELEGATE_TO_AGENT_TOOL_NAME } from '../tools/tool-names.js';
|
|
|
56
56
|
import { getExperiments } from '../code_assist/experiments/experiments.js';
|
|
57
57
|
import { ExperimentFlags } from '../code_assist/experiments/flagNames.js';
|
|
58
58
|
import { debugLogger } from '../utils/debugLogger.js';
|
|
59
|
+
import { SkillManager } from '../services/skillManager.js';
|
|
59
60
|
import { startupProfiler } from '../telemetry/startupProfiler.js';
|
|
60
61
|
import { ApprovalMode } from '../policy/types.js';
|
|
61
62
|
import { DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, } from './constants.js';
|
|
@@ -148,6 +149,7 @@ export class Config {
|
|
|
148
149
|
promptRegistry;
|
|
149
150
|
resourceRegistry;
|
|
150
151
|
agentRegistry;
|
|
152
|
+
skillManager;
|
|
151
153
|
sessionId;
|
|
152
154
|
fileSystemService;
|
|
153
155
|
contentGeneratorConfig;
|
|
@@ -222,12 +224,10 @@ export class Config {
|
|
|
222
224
|
storage;
|
|
223
225
|
fileExclusions;
|
|
224
226
|
eventEmitter;
|
|
225
|
-
useSmartEdit;
|
|
226
227
|
useWriteTodos;
|
|
227
228
|
messageBus;
|
|
228
229
|
policyEngine;
|
|
229
230
|
outputSettings;
|
|
230
|
-
enableMessageBusIntegration;
|
|
231
231
|
codebaseInvestigatorSettings;
|
|
232
232
|
introspectionAgentSettings;
|
|
233
233
|
continueOnFailedApiCall;
|
|
@@ -247,6 +247,8 @@ export class Config {
|
|
|
247
247
|
hookSystem;
|
|
248
248
|
onModelChange;
|
|
249
249
|
enableAgents;
|
|
250
|
+
skillsSupport;
|
|
251
|
+
disabledSkills;
|
|
250
252
|
experimentalJitContext;
|
|
251
253
|
contextManager;
|
|
252
254
|
terminalBackground = undefined;
|
|
@@ -307,9 +309,11 @@ export class Config {
|
|
|
307
309
|
this.model = params.model;
|
|
308
310
|
this._activeModel = params.model;
|
|
309
311
|
this.enableAgents = params.enableAgents ?? false;
|
|
310
|
-
this.
|
|
312
|
+
this.skillsSupport = params.skillsSupport ?? false;
|
|
313
|
+
this.disabledSkills = params.disabledSkills ?? [];
|
|
311
314
|
this.modelAvailabilityService = new ModelAvailabilityService();
|
|
312
315
|
this.previewFeatures = params.previewFeatures ?? undefined;
|
|
316
|
+
this.experimentalJitContext = params.experimentalJitContext ?? false;
|
|
313
317
|
this.maxSessionTurns = params.maxSessionTurns ?? -1;
|
|
314
318
|
this.experimentalZedIntegration =
|
|
315
319
|
params.experimentalZedIntegration ?? false;
|
|
@@ -347,7 +351,6 @@ export class Config {
|
|
|
347
351
|
this.truncateToolOutputLines =
|
|
348
352
|
params.truncateToolOutputLines ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES;
|
|
349
353
|
this.enableToolOutputTruncation = params.enableToolOutputTruncation ?? true;
|
|
350
|
-
this.useSmartEdit = params.useSmartEdit ?? true;
|
|
351
354
|
// // TODO(joshualitt): Re-evaluate the todo tool for 3 family.
|
|
352
355
|
this.useWriteTodos = isPreviewModel(this.model)
|
|
353
356
|
? false
|
|
@@ -357,14 +360,6 @@ export class Config {
|
|
|
357
360
|
(params.hooks && 'disabled' in params.hooks
|
|
358
361
|
? params.hooks.disabled
|
|
359
362
|
: undefined) ?? [];
|
|
360
|
-
// Enable MessageBus integration if:
|
|
361
|
-
// 1. Explicitly enabled via setting, OR
|
|
362
|
-
// 2. Hooks are enabled and hooks are configured
|
|
363
|
-
const hasHooks = params.hooks && Object.keys(params.hooks).length > 0;
|
|
364
|
-
const hooksNeedMessageBus = this.enableHooks && hasHooks;
|
|
365
|
-
this.enableMessageBusIntegration =
|
|
366
|
-
params.enableMessageBusIntegration ??
|
|
367
|
-
(hooksNeedMessageBus ? true : false);
|
|
368
363
|
this.codebaseInvestigatorSettings = {
|
|
369
364
|
enabled: params.codebaseInvestigatorSettings?.enabled ?? true,
|
|
370
365
|
maxNumTurns: params.codebaseInvestigatorSettings?.maxNumTurns ?? 10,
|
|
@@ -394,6 +389,7 @@ export class Config {
|
|
|
394
389
|
approvalMode: params.approvalMode ?? params.policyEngineConfig?.approvalMode,
|
|
395
390
|
});
|
|
396
391
|
this.messageBus = new MessageBus(this.policyEngine, this.debugMode);
|
|
392
|
+
this.skillManager = new SkillManager();
|
|
397
393
|
this.outputSettings = {
|
|
398
394
|
format: params.output?.format ?? OutputFormat.TEXT,
|
|
399
395
|
};
|
|
@@ -472,6 +468,15 @@ export class Config {
|
|
|
472
468
|
await this.getExtensionLoader().start(this),
|
|
473
469
|
]);
|
|
474
470
|
initMcpHandle?.end();
|
|
471
|
+
// Discover skills if enabled
|
|
472
|
+
if (this.skillsSupport) {
|
|
473
|
+
await this.getSkillManager().discoverSkills(this.storage);
|
|
474
|
+
this.getSkillManager().setDisabledSkills(this.disabledSkills);
|
|
475
|
+
// Re-register ActivateSkillTool to update its schema with the discovered enabled skill enums
|
|
476
|
+
if (this.getSkillManager().getSkills().length > 0) {
|
|
477
|
+
this.getToolRegistry().registerTool(new ActivateSkillTool(this, this.messageBus));
|
|
478
|
+
}
|
|
479
|
+
}
|
|
475
480
|
// Initialize hook system if enabled
|
|
476
481
|
if (this.enableHooks) {
|
|
477
482
|
this.hookSystem = new HookSystem(this);
|
|
@@ -605,6 +610,13 @@ export class Config {
|
|
|
605
610
|
}
|
|
606
611
|
this.modelAvailabilityService.reset();
|
|
607
612
|
}
|
|
613
|
+
activateFallbackMode(model) {
|
|
614
|
+
this.setModel(model, true);
|
|
615
|
+
const authType = this.getContentGeneratorConfig()?.authType;
|
|
616
|
+
if (authType) {
|
|
617
|
+
logFlashFallback(this, new FlashFallbackEvent(authType));
|
|
618
|
+
}
|
|
619
|
+
}
|
|
608
620
|
getActiveModel() {
|
|
609
621
|
return this._activeModel ?? this.model;
|
|
610
622
|
}
|
|
@@ -663,6 +675,9 @@ export class Config {
|
|
|
663
675
|
getPromptRegistry() {
|
|
664
676
|
return this.promptRegistry;
|
|
665
677
|
}
|
|
678
|
+
getSkillManager() {
|
|
679
|
+
return this.skillManager;
|
|
680
|
+
}
|
|
666
681
|
getResourceRegistry() {
|
|
667
682
|
return this.resourceRegistry;
|
|
668
683
|
}
|
|
@@ -1067,6 +1082,9 @@ export class Config {
|
|
|
1067
1082
|
this.ptyInfo !== 'child_process' &&
|
|
1068
1083
|
this.enableInteractiveShell);
|
|
1069
1084
|
}
|
|
1085
|
+
isSkillsSupportEnabled() {
|
|
1086
|
+
return this.skillsSupport;
|
|
1087
|
+
}
|
|
1070
1088
|
isInteractive() {
|
|
1071
1089
|
return this.interactive;
|
|
1072
1090
|
}
|
|
@@ -1122,9 +1140,6 @@ export class Config {
|
|
|
1122
1140
|
getTruncateToolOutputLines() {
|
|
1123
1141
|
return this.truncateToolOutputLines;
|
|
1124
1142
|
}
|
|
1125
|
-
getUseSmartEdit() {
|
|
1126
|
-
return this.useSmartEdit;
|
|
1127
|
-
}
|
|
1128
1143
|
getUseWriteTodos() {
|
|
1129
1144
|
return this.useWriteTodos;
|
|
1130
1145
|
}
|
|
@@ -1149,9 +1164,6 @@ export class Config {
|
|
|
1149
1164
|
getPolicyEngine() {
|
|
1150
1165
|
return this.policyEngine;
|
|
1151
1166
|
}
|
|
1152
|
-
getEnableMessageBusIntegration() {
|
|
1153
|
-
return this.enableMessageBusIntegration;
|
|
1154
|
-
}
|
|
1155
1167
|
getEnableHooks() {
|
|
1156
1168
|
return this.enableHooks;
|
|
1157
1169
|
}
|
|
@@ -1164,9 +1176,7 @@ export class Config {
|
|
|
1164
1176
|
async createToolRegistry() {
|
|
1165
1177
|
const registry = new ToolRegistry(this);
|
|
1166
1178
|
// Set message bus on tool registry before discovery so MCP tools can access it
|
|
1167
|
-
|
|
1168
|
-
registry.setMessageBus(this.messageBus);
|
|
1169
|
-
}
|
|
1179
|
+
registry.setMessageBus(this.messageBus);
|
|
1170
1180
|
// helper to create & register core tools that are enabled
|
|
1171
1181
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1172
1182
|
const registerCoreTool = (ToolClass, ...args) => {
|
|
@@ -1186,10 +1196,7 @@ export class Config {
|
|
|
1186
1196
|
// Pass message bus to tools when feature flag is enabled
|
|
1187
1197
|
// This first implementation is only focused on the general case of
|
|
1188
1198
|
// the tool registry.
|
|
1189
|
-
const
|
|
1190
|
-
const toolArgs = messageBusEnabled
|
|
1191
|
-
? [...args, this.getMessageBus()]
|
|
1192
|
-
: args;
|
|
1199
|
+
const toolArgs = [...args, this.getMessageBus()];
|
|
1193
1200
|
registry.registerTool(new ToolClass(...toolArgs));
|
|
1194
1201
|
}
|
|
1195
1202
|
};
|
|
@@ -1216,12 +1223,8 @@ export class Config {
|
|
|
1216
1223
|
registerCoreTool(GrepTool, this);
|
|
1217
1224
|
}
|
|
1218
1225
|
registerCoreTool(GlobTool, this);
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
}
|
|
1222
|
-
else {
|
|
1223
|
-
registerCoreTool(EditTool, this);
|
|
1224
|
-
}
|
|
1226
|
+
registerCoreTool(ActivateSkillTool, this);
|
|
1227
|
+
registerCoreTool(SmartEditTool, this);
|
|
1225
1228
|
registerCoreTool(WriteFileTool, this);
|
|
1226
1229
|
registerCoreTool(WebFetchTool, this);
|
|
1227
1230
|
registerCoreTool(ShellTool, this);
|
|
@@ -1238,8 +1241,7 @@ export class Config {
|
|
|
1238
1241
|
const allowedTools = this.getAllowedTools();
|
|
1239
1242
|
const isAllowed = !allowedTools || allowedTools.includes(DELEGATE_TO_AGENT_TOOL_NAME);
|
|
1240
1243
|
if (isAllowed) {
|
|
1241
|
-
const
|
|
1242
|
-
const delegateTool = new DelegateToAgentTool(this.agentRegistry, this, messageBusEnabled ? this.getMessageBus() : undefined);
|
|
1244
|
+
const delegateTool = new DelegateToAgentTool(this.agentRegistry, this, this.getMessageBus());
|
|
1243
1245
|
registry.registerTool(delegateTool);
|
|
1244
1246
|
}
|
|
1245
1247
|
}
|