@google/gemini-cli-core 0.13.0-nightly.20251102.d7243fb8 → 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-core-0.13.0-nightly.20251031.c89bc30d.tgz +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/src/agents/executor.d.ts +19 -0
- package/dist/src/agents/executor.js +226 -32
- package/dist/src/agents/executor.js.map +1 -1
- package/dist/src/agents/executor.test.js +335 -9
- package/dist/src/agents/executor.test.js.map +1 -1
- package/dist/src/agents/types.d.ts +2 -1
- package/dist/src/agents/types.js +1 -0
- package/dist/src/agents/types.js.map +1 -1
- package/dist/src/code_assist/experiments/client_metadata.d.ts +12 -0
- package/dist/src/code_assist/experiments/client_metadata.js +49 -0
- package/dist/src/code_assist/experiments/client_metadata.js.map +1 -0
- package/dist/src/code_assist/experiments/experiments.d.ts +17 -0
- package/dist/src/code_assist/experiments/experiments.js +36 -0
- package/dist/src/code_assist/experiments/experiments.js.map +1 -0
- package/dist/src/code_assist/experiments/types.d.ts +35 -0
- package/dist/src/code_assist/experiments/types.js +7 -0
- package/dist/src/code_assist/experiments/types.js.map +1 -0
- package/dist/src/code_assist/server.d.ts +3 -1
- package/dist/src/code_assist/server.js +11 -0
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/server.test.js +17 -0
- package/dist/src/code_assist/server.test.js.map +1 -1
- package/dist/src/code_assist/types.d.ts +1 -1
- package/dist/src/code_assist/types.js.map +1 -1
- package/dist/src/config/config.d.ts +51 -15
- package/dist/src/config/config.js +130 -30
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +231 -1
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/models.d.ts +1 -1
- package/dist/src/config/models.js +2 -2
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/storage.d.ts +2 -0
- package/dist/src/config/storage.js +17 -0
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/core/apiKeyCredentialStorage.js +7 -7
- package/dist/src/core/apiKeyCredentialStorage.js.map +1 -1
- package/dist/src/core/apiKeyCredentialStorage.test.js +5 -0
- package/dist/src/core/apiKeyCredentialStorage.test.js.map +1 -1
- package/dist/src/core/logger.js +10 -9
- package/dist/src/core/logger.js.map +1 -1
- package/dist/src/core/prompts.js +104 -55
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/hooks/hookPlanner.d.ts +46 -0
- package/dist/src/hooks/hookPlanner.js +108 -0
- package/dist/src/hooks/hookPlanner.js.map +1 -0
- package/dist/src/hooks/hookPlanner.test.d.ts +6 -0
- package/dist/src/hooks/hookPlanner.test.js +255 -0
- package/dist/src/hooks/hookPlanner.test.js.map +1 -0
- package/dist/src/hooks/hookRegistry.d.ts +87 -0
- package/dist/src/hooks/hookRegistry.js +198 -0
- package/dist/src/hooks/hookRegistry.js.map +1 -0
- package/dist/src/hooks/hookRegistry.test.d.ts +6 -0
- package/dist/src/hooks/hookRegistry.test.js +341 -0
- package/dist/src/hooks/hookRegistry.test.js.map +1 -0
- package/dist/src/hooks/hookTranslator.d.ts +113 -0
- package/dist/src/hooks/hookTranslator.js +232 -0
- package/dist/src/hooks/hookTranslator.js.map +1 -0
- package/dist/src/hooks/hookTranslator.test.d.ts +6 -0
- package/dist/src/hooks/hookTranslator.test.js +192 -0
- package/dist/src/hooks/hookTranslator.test.js.map +1 -0
- package/dist/src/hooks/types.d.ts +384 -0
- package/dist/src/hooks/types.js +284 -0
- package/dist/src/hooks/types.js.map +1 -0
- package/dist/src/hooks/types.test.d.ts +6 -0
- package/dist/src/hooks/types.test.js +35 -0
- package/dist/src/hooks/types.test.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/oauth-provider.d.ts +8 -5
- package/dist/src/mcp/oauth-provider.js +114 -31
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-provider.test.js +54 -1
- package/dist/src/mcp/oauth-provider.test.js.map +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.js +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.js.map +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.test.js +7 -5
- package/dist/src/mcp/token-storage/file-token-storage.test.js.map +1 -1
- package/dist/src/mcp/token-storage/keychain-token-storage.js +2 -2
- package/dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -1
- package/dist/src/policy/config.d.ts +31 -0
- package/dist/src/policy/config.js +197 -0
- package/dist/src/policy/config.js.map +1 -0
- package/dist/src/policy/config.test.d.ts +6 -0
- package/dist/src/policy/config.test.js +404 -0
- package/dist/src/policy/config.test.js.map +1 -0
- package/dist/src/policy/index.d.ts +2 -0
- package/dist/src/policy/index.js +2 -0
- package/dist/src/policy/index.js.map +1 -1
- package/dist/src/policy/policies/read-only.toml +56 -0
- package/dist/src/policy/policies/write.toml +63 -0
- package/dist/src/policy/policies/yolo.toml +31 -0
- package/dist/src/policy/toml-loader.d.ts +46 -0
- package/dist/src/policy/toml-loader.js +314 -0
- package/dist/src/policy/toml-loader.js.map +1 -0
- package/dist/src/policy/toml-loader.test.d.ts +6 -0
- package/dist/src/policy/toml-loader.test.js +522 -0
- package/dist/src/policy/toml-loader.test.js.map +1 -0
- package/dist/src/policy/types.d.ts +18 -0
- package/dist/src/policy/types.js +6 -0
- package/dist/src/policy/types.js.map +1 -1
- package/dist/src/services/chatCompressionService.js +2 -1
- package/dist/src/services/chatCompressionService.js.map +1 -1
- package/dist/src/services/chatRecordingService.js +9 -8
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/loopDetectionService.d.ts +1 -1
- package/dist/src/services/loopDetectionService.js +3 -3
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/loopDetectionService.test.js +69 -0
- package/dist/src/services/loopDetectionService.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.js +18 -4
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +16 -4
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +3 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +31 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +4 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +6 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +2 -1
- package/dist/src/telemetry/loggers.js +13 -1
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +10 -5
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/metrics.d.ts +21 -1
- package/dist/src/telemetry/metrics.js +34 -0
- package/dist/src/telemetry/metrics.js.map +1 -1
- package/dist/src/telemetry/metrics.test.js +43 -126
- package/dist/src/telemetry/metrics.test.js.map +1 -1
- package/dist/src/telemetry/types.d.ts +24 -10
- package/dist/src/telemetry/types.js +47 -19
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/tools/edit.js +1 -1
- package/dist/src/tools/edit.js.map +1 -1
- 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.d.ts +31 -6
- package/dist/src/tools/mcp-client-manager.js +111 -41
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +130 -38
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/tools/mcp-client.d.ts +1 -0
- package/dist/src/tools/mcp-client.js +4 -4
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +49 -0
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/shell.js +1 -1
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/smart-edit.d.ts +1 -1
- package/dist/src/tools/smart-edit.js +12 -1
- package/dist/src/tools/smart-edit.js.map +1 -1
- package/dist/src/tools/smart-edit.test.js +2 -1
- package/dist/src/tools/smart-edit.test.js.map +1 -1
- package/dist/src/tools/tool-registry.d.ts +1 -18
- package/dist/src/tools/tool-registry.js +1 -44
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tool-registry.test.js +2 -24
- package/dist/src/tools/tool-registry.test.js.map +1 -1
- package/dist/src/tools/web-fetch.js +3 -6
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-fetch.test.js +1 -1
- package/dist/src/tools/web-fetch.test.js.map +1 -1
- package/dist/src/tools/write-file.js +1 -1
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/tools/write-file.test.js +1 -1
- package/dist/src/tools/write-file.test.js.map +1 -1
- package/dist/src/utils/channel.d.ts +1 -0
- package/dist/src/utils/channel.js +4 -4
- package/dist/src/utils/channel.js.map +1 -1
- package/dist/src/utils/channel.test.js +35 -1
- package/dist/src/utils/channel.test.js.map +1 -1
- package/dist/src/utils/events.d.ts +18 -1
- package/dist/src/utils/events.js +8 -0
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/events.test.js +10 -0
- package/dist/src/utils/events.test.js.map +1 -1
- package/dist/src/utils/extensionLoader.d.ts +67 -27
- package/dist/src/utils/extensionLoader.js +149 -7
- package/dist/src/utils/extensionLoader.js.map +1 -1
- package/dist/src/utils/extensionLoader.test.d.ts +6 -0
- package/dist/src/utils/extensionLoader.test.js +90 -0
- package/dist/src/utils/extensionLoader.test.js.map +1 -0
- package/dist/src/utils/fetch.js +1 -6
- package/dist/src/utils/fetch.js.map +1 -1
- package/dist/src/utils/llm-edit-fixer.d.ts +1 -1
- package/dist/src/utils/llm-edit-fixer.js +27 -3
- package/dist/src/utils/llm-edit-fixer.js.map +1 -1
- package/dist/src/utils/llm-edit-fixer.test.js +21 -0
- package/dist/src/utils/llm-edit-fixer.test.js.map +1 -1
- package/dist/src/utils/shell-utils.js +29 -1
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/shell-utils.test.js +18 -0
- package/dist/src/utils/shell-utils.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
package/dist/src/core/logger.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import { promises as fs } from 'node:fs';
|
|
8
8
|
import { debugLogger } from '../utils/debugLogger.js';
|
|
9
|
+
import { coreEvents } from '../utils/events.js';
|
|
9
10
|
const LOG_FILE_NAME = 'logs.json';
|
|
10
11
|
export var MessageSenderType;
|
|
11
12
|
(function (MessageSenderType) {
|
|
@@ -126,7 +127,7 @@ export class Logger {
|
|
|
126
127
|
this.initialized = true;
|
|
127
128
|
}
|
|
128
129
|
catch (err) {
|
|
129
|
-
|
|
130
|
+
coreEvents.emitFeedback('error', 'Failed to initialize logger:', err);
|
|
130
131
|
this.initialized = false;
|
|
131
132
|
}
|
|
132
133
|
}
|
|
@@ -253,7 +254,7 @@ export class Logger {
|
|
|
253
254
|
}
|
|
254
255
|
async saveCheckpoint(conversation, tag) {
|
|
255
256
|
if (!this.initialized) {
|
|
256
|
-
|
|
257
|
+
debugLogger.error('Logger not initialized or checkpoint file path not set. Cannot save a checkpoint.');
|
|
257
258
|
return;
|
|
258
259
|
}
|
|
259
260
|
// Always save with the new encoded path.
|
|
@@ -262,12 +263,12 @@ export class Logger {
|
|
|
262
263
|
await fs.writeFile(path, JSON.stringify(conversation, null, 2), 'utf-8');
|
|
263
264
|
}
|
|
264
265
|
catch (error) {
|
|
265
|
-
|
|
266
|
+
debugLogger.error('Error writing to checkpoint file:', error);
|
|
266
267
|
}
|
|
267
268
|
}
|
|
268
269
|
async loadCheckpoint(tag) {
|
|
269
270
|
if (!this.initialized) {
|
|
270
|
-
|
|
271
|
+
debugLogger.error('Logger not initialized or checkpoint file path not set. Cannot load checkpoint.');
|
|
271
272
|
return [];
|
|
272
273
|
}
|
|
273
274
|
const path = await this._getCheckpointPath(tag);
|
|
@@ -286,13 +287,13 @@ export class Logger {
|
|
|
286
287
|
// This is okay, it just means the checkpoint doesn't exist in either format.
|
|
287
288
|
return [];
|
|
288
289
|
}
|
|
289
|
-
|
|
290
|
+
debugLogger.error(`Failed to read or parse checkpoint file ${path}:`, error);
|
|
290
291
|
return [];
|
|
291
292
|
}
|
|
292
293
|
}
|
|
293
294
|
async deleteCheckpoint(tag) {
|
|
294
295
|
if (!this.initialized || !this.geminiDir) {
|
|
295
|
-
|
|
296
|
+
debugLogger.error('Logger not initialized or checkpoint file path not set. Cannot delete checkpoint.');
|
|
296
297
|
return false;
|
|
297
298
|
}
|
|
298
299
|
let deletedSomething = false;
|
|
@@ -305,7 +306,7 @@ export class Logger {
|
|
|
305
306
|
catch (error) {
|
|
306
307
|
const nodeError = error;
|
|
307
308
|
if (nodeError.code !== 'ENOENT') {
|
|
308
|
-
|
|
309
|
+
debugLogger.error(`Failed to delete checkpoint file ${newPath}:`, error);
|
|
309
310
|
throw error; // Rethrow unexpected errors
|
|
310
311
|
}
|
|
311
312
|
// It's okay if it doesn't exist.
|
|
@@ -320,7 +321,7 @@ export class Logger {
|
|
|
320
321
|
catch (error) {
|
|
321
322
|
const nodeError = error;
|
|
322
323
|
if (nodeError.code !== 'ENOENT') {
|
|
323
|
-
|
|
324
|
+
debugLogger.error(`Failed to delete checkpoint file ${oldPath}:`, error);
|
|
324
325
|
throw error; // Rethrow unexpected errors
|
|
325
326
|
}
|
|
326
327
|
// It's okay if it doesn't exist.
|
|
@@ -346,7 +347,7 @@ export class Logger {
|
|
|
346
347
|
return false; // It truly doesn't exist in either format.
|
|
347
348
|
}
|
|
348
349
|
// A different error occurred.
|
|
349
|
-
|
|
350
|
+
debugLogger.error(`Failed to check checkpoint existence for ${filePath ?? `path for tag "${tag}"`}:`, error);
|
|
350
351
|
throw error;
|
|
351
352
|
}
|
|
352
353
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/core/logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC,MAAM,CAAN,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;AACf,CAAC,EAFW,iBAAiB,KAAjB,iBAAiB,QAE5B;AAUD,oEAAoE;AACpE,iEAAiE;AAEjE;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,mDAAmD;QACnD,OAAO,GAAG,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAC/C,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CACvC,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,OAAO,MAAM;IAUE;IATX,SAAS,CAAqB;IAC9B,WAAW,CAAqB;IAChC,SAAS,CAAqB;IAC9B,SAAS,GAAG,CAAC,CAAC,CAAC,m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AK,CACN,CAAC;oBACF,MAAM,KAAK,CAAC,CAAC,4BAA4B;gBAC3C,CAAC;gBACD,iCAAiC;YACnC,CAAC;QACH,CAAC;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,GAAW;QAChC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;QACJ,CAAC;QACD,IAAI,QAA4B,CAAC;QACjC,IAAI,CAAC;YACH,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;YAC9C,mEAAmE;YACnE,yDAAyD;YACzD,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1B,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,SAAS,GAAG,KAA8B,CAAC;YACjD,IAAI,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAChC,OAAO,KAAK,CAAC,CAAC,2CAA2C;YAC3D,CAAC;YACD,8BAA8B;YAC9B,WAAW,CAAC,KAAK,CACf,4CACE,QAAQ,IAAI,iBAAiB,GAAG,GAClC,GAAG,EACH,KAAK,CACN,CAAC;YACF,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACrB,CAAC;CACF"}
|
package/dist/src/core/prompts.js
CHANGED
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import os from 'node:os';
|
|
9
|
-
import { EDIT_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME, MEMORY_TOOL_NAME, READ_FILE_TOOL_NAME, READ_MANY_FILES_TOOL_NAME, SHELL_TOOL_NAME, WRITE_FILE_TOOL_NAME, } from '../tools/tool-names.js';
|
|
9
|
+
import { EDIT_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME, MEMORY_TOOL_NAME, READ_FILE_TOOL_NAME, READ_MANY_FILES_TOOL_NAME, SHELL_TOOL_NAME, WRITE_FILE_TOOL_NAME, WRITE_TODOS_TOOL_NAME, } from '../tools/tool-names.js';
|
|
10
10
|
import process from 'node:process';
|
|
11
11
|
import { isGitRepository } from '../utils/gitUtils.js';
|
|
12
12
|
import { CodebaseInvestigatorAgent } from '../agents/codebase-investigator.js';
|
|
13
13
|
import { GEMINI_DIR } from '../utils/paths.js';
|
|
14
14
|
import { debugLogger } from '../utils/debugLogger.js';
|
|
15
|
+
import { WriteTodosTool } from '../tools/write-todos.js';
|
|
15
16
|
export function resolvePathFromEnv(envVar) {
|
|
16
17
|
// Handle the case where the environment variable is not set, empty, or just whitespace.
|
|
17
18
|
const trimmedEnvVar = envVar?.trim();
|
|
@@ -75,10 +76,18 @@ export function getCoreSystemPrompt(config, userMemory) {
|
|
|
75
76
|
.getToolRegistry()
|
|
76
77
|
.getAllToolNames()
|
|
77
78
|
.includes(CodebaseInvestigatorAgent.name);
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
const enableWriteTodosTool = config
|
|
80
|
+
.getToolRegistry()
|
|
81
|
+
.getAllToolNames()
|
|
82
|
+
.includes(WriteTodosTool.Name);
|
|
83
|
+
let basePrompt;
|
|
84
|
+
if (systemMdEnabled) {
|
|
85
|
+
basePrompt = fs.readFileSync(systemMdPath, 'utf8');
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
const promptConfig = {
|
|
89
|
+
preamble: `You are an interactive CLI agent specializing in software engineering tasks. Your primary goal is to help users safely and efficiently, adhering strictly to the following instructions and utilizing your available tools.`,
|
|
90
|
+
coreMandates: `
|
|
82
91
|
# Core Mandates
|
|
83
92
|
|
|
84
93
|
- **Conventions:** Rigorously adhere to existing project conventions when reading or modifying code. Analyze surrounding code, tests, and configuration first.
|
|
@@ -89,25 +98,39 @@ export function getCoreSystemPrompt(config, userMemory) {
|
|
|
89
98
|
- **Proactiveness:** Fulfill the user's request thoroughly. When adding features or fixing bugs, this includes adding tests to ensure quality. Consider all created files, especially tests, to be permanent artifacts unless the user says otherwise.
|
|
90
99
|
- **Confirm Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request without confirming with the user. If asked *how* to do something, explain first, don't just do it.
|
|
91
100
|
- **Explaining Changes:** After completing a code modification or file operation *do not* provide summaries unless asked.
|
|
92
|
-
- **Path Construction:** Before using any file system tool (e.g., ${READ_FILE_TOOL_NAME}
|
|
93
|
-
- **Do Not revert changes:** Do not revert changes to the codebase unless asked to do so by the user. Only revert changes made by you if they have resulted in an error or if the user has explicitly asked you to revert the changes
|
|
101
|
+
- **Path Construction:** Before using any file system tool (e.g., ${READ_FILE_TOOL_NAME} or '${WRITE_FILE_TOOL_NAME}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
|
|
102
|
+
- **Do Not revert changes:** Do not revert changes to the codebase unless asked to do so by the user. Only revert changes made by you if they have resulted in an error or if the user has explicitly asked you to revert the changes.`,
|
|
103
|
+
primaryWorkflows_prefix: `
|
|
104
|
+
# Primary Workflows
|
|
94
105
|
|
|
106
|
+
## Software Engineering Tasks
|
|
107
|
+
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
108
|
+
1. **Understand:** Think about the user's request and the relevant codebase context. Use '${GREP_TOOL_NAME}' and '${GLOB_TOOL_NAME}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
|
|
109
|
+
Use '${READ_FILE_TOOL_NAME}' and '${READ_MANY_FILES_TOOL_NAME}' to understand context and validate any assumptions you may have.
|
|
110
|
+
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
|
|
111
|
+
primaryWorkflows_prefix_ci: `
|
|
112
|
+
# Primary Workflows
|
|
95
113
|
|
|
114
|
+
## Software Engineering Tasks
|
|
115
|
+
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
116
|
+
1. **Understand & Strategize:** Think about the user's request and the relevant codebase context. When the task involves **complex refactoring, codebase exploration or system-wide analysis**, your **first and primary tool** must be '${CodebaseInvestigatorAgent.name}'. Use it to build a comprehensive understanding of the code, its structure, and dependencies. For **simple, targeted searches** (like finding a specific function name, file path, or variable declaration), you should use '${GREP_TOOL_NAME}' or '${GLOB_TOOL_NAME}' directly.
|
|
117
|
+
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. If '${CodebaseInvestigatorAgent.name}' was used, do not ignore the output of '${CodebaseInvestigatorAgent.name}', you must use it as the foundation of your plan. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
|
|
118
|
+
primaryWorkflows_prefix_ci_todo: `
|
|
96
119
|
# Primary Workflows
|
|
97
120
|
|
|
98
121
|
## Software Engineering Tasks
|
|
99
122
|
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
100
|
-
${(function () {
|
|
101
|
-
if (enableCodebaseInvestigator) {
|
|
102
|
-
return `
|
|
103
123
|
1. **Understand & Strategize:** Think about the user's request and the relevant codebase context. When the task involves **complex refactoring, codebase exploration or system-wide analysis**, your **first and primary tool** must be '${CodebaseInvestigatorAgent.name}'. Use it to build a comprehensive understanding of the code, its structure, and dependencies. For **simple, targeted searches** (like finding a specific function name, file path, or variable declaration), you should use '${GREP_TOOL_NAME}' or '${GLOB_TOOL_NAME}' directly.
|
|
104
|
-
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. If '${CodebaseInvestigatorAgent.name}' was used, do not ignore the output of '${CodebaseInvestigatorAgent.name}', you must use it as the foundation of your plan. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution
|
|
105
|
-
|
|
106
|
-
|
|
124
|
+
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. If '${CodebaseInvestigatorAgent.name}' was used, do not ignore the output of '${CodebaseInvestigatorAgent.name}', you must use it as the foundation of your plan. For complex tasks, break them down into smaller, manageable subtasks and use the \`${WRITE_TODOS_TOOL_NAME}\` tool to track your progress. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
|
|
125
|
+
primaryWorkflows_todo: `
|
|
126
|
+
# Primary Workflows
|
|
127
|
+
|
|
128
|
+
## Software Engineering Tasks
|
|
129
|
+
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
107
130
|
1. **Understand:** Think about the user's request and the relevant codebase context. Use '${GREP_TOOL_NAME}' and '${GLOB_TOOL_NAME}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions. Use '${READ_FILE_TOOL_NAME}' and '${READ_MANY_FILES_TOOL_NAME}' to understand context and validate any assumptions you may have.
|
|
108
|
-
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution
|
|
109
|
-
|
|
110
|
-
|
|
131
|
+
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. For complex tasks, break them down into smaller, manageable subtasks and use the \`${WRITE_TODOS_TOOL_NAME}\` tool to track your progress. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
|
|
132
|
+
primaryWorkflows_suffix: `3. **Implement:** Use the available tools (e.g., '${EDIT_TOOL_NAME}', '${WRITE_FILE_TOOL_NAME}' '${SHELL_TOOL_NAME}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core
|
|
133
|
+
Mandates').
|
|
111
134
|
4. **Verify (Tests):** If applicable and feasible, verify the changes using the project's testing procedures. Identify the correct test commands and frameworks by examining 'README' files, build/package configuration (e.g., 'package.json'), or existing test execution patterns. NEVER assume standard test commands.
|
|
112
135
|
5. **Verify (Standards):** VERY IMPORTANT: After making code changes, execute the project-specific build, linting and type-checking commands (e.g., 'tsc', 'npm run lint', 'ruff check .') that you have identified for this project (or obtained from the user). This ensures code quality and adherence to standards. If unsure about these commands, you can ask the user if they'd like you to run them and if so how to.
|
|
113
136
|
6. **Finalize:** After all verification passes, consider the task complete. Do not remove or revert any changes or created files (like tests). Await the user's next instruction.
|
|
@@ -129,13 +152,13 @@ ${(function () {
|
|
|
129
152
|
3. **User Approval:** Obtain user approval for the proposed plan.
|
|
130
153
|
4. **Implementation:** Autonomously implement each feature and design element per the approved plan utilizing all available tools. When starting ensure you scaffold the application using '${SHELL_TOOL_NAME}' for commands like 'npm init', 'npx create-react-app'. Aim for full scope completion. Proactively create or source necessary placeholder assets (e.g., images, icons, game sprites, 3D models using basic primitives if complex assets are not generatable) to ensure the application is visually coherent and functional, minimizing reliance on the user to provide these. If the model can generate simple assets (e.g., a uniformly colored square sprite, a simple 3D cube), it should do so. Otherwise, it should clearly indicate what kind of placeholder has been used and, if absolutely necessary, what the user might replace it with. Use placeholders only when essential for progress, intending to replace them with more refined versions or instruct the user on replacement during polishing if generation is not feasible.
|
|
131
154
|
5. **Verify:** Review work against the original request, the approved plan. Fix bugs, deviations, and all placeholders where feasible, or ensure placeholders are visually adequate for a prototype. Ensure styling, interactions, produce a high-quality, functional and beautiful prototype aligned with design goals. Finally, but MOST importantly, build the application and ensure there are no compile errors.
|
|
132
|
-
6. **Solicit Feedback:** If still applicable, provide instructions on how to start the application and request user feedback on the prototype
|
|
133
|
-
|
|
155
|
+
6. **Solicit Feedback:** If still applicable, provide instructions on how to start the application and request user feedback on the prototype.`,
|
|
156
|
+
operationalGuidelines: `
|
|
134
157
|
# Operational Guidelines
|
|
135
158
|
${(function () {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
159
|
+
if (config.getEnableShellOutputEfficiency()) {
|
|
160
|
+
const tempDir = config.storage.getProjectTempDir();
|
|
161
|
+
return `
|
|
139
162
|
## Shell tool output token efficiency:
|
|
140
163
|
|
|
141
164
|
IT IS CRITICAL TO FOLLOW THESE GUIDELINES TO AVOID EXCESSIVE TOKEN CONSUMPTION.
|
|
@@ -147,9 +170,9 @@ IT IS CRITICAL TO FOLLOW THESE GUIDELINES TO AVOID EXCESSIVE TOKEN CONSUMPTION.
|
|
|
147
170
|
- If a command does not have quiet/silent flags or for commands with potentially long output that may not be useful, redirect stdout and stderr to temp files in the project's temporary directory: ${tempDir}. For example: 'command > ${path.posix.join(tempDir, 'out.log')} 2> ${path.posix.join(tempDir, 'err.log')}'.
|
|
148
171
|
- After the command runs, inspect the temp files (e.g. '${path.posix.join(tempDir, 'out.log')}' and '${path.posix.join(tempDir, 'err.log')}') using commands like 'grep', 'tail', 'head', ... (or platform equivalents). Remove the temp files when done.
|
|
149
172
|
`;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
173
|
+
}
|
|
174
|
+
return '';
|
|
175
|
+
})()}
|
|
153
176
|
|
|
154
177
|
## Tone and Style (CLI Interaction)
|
|
155
178
|
- **Concise & Direct:** Adopt a professional, direct, and concise tone suitable for a CLI environment.
|
|
@@ -170,47 +193,47 @@ IT IS CRITICAL TO FOLLOW THESE GUIDELINES TO AVOID EXCESSIVE TOKEN CONSUMPTION.
|
|
|
170
193
|
- **Command Execution:** Use the '${SHELL_TOOL_NAME}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
|
|
171
194
|
- **Background Processes:** Use background processes (via \`&\`) for commands that are unlikely to stop on their own, e.g. \`node server.js &\`. If unsure, ask the user.
|
|
172
195
|
${(function () {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
196
|
+
if (!config.isInteractiveShellEnabled()) {
|
|
197
|
+
return `- **Interactive Commands:** Some commands are interactive, meaning they can accept user input during their execution (e.g. ssh, vim). Only execute non-interactive commands. Use non-interactive versions of commands (e.g. \`npm init -y\` instead of \`npm init\`) when available. Interactive shell commands are not supported and may cause hangs until canceled by the user.`;
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
return `- **Interactive Commands:** Prefer non-interactive commands when it makes sense; however, some commands are only interactive and expect user input during their execution (e.g. ssh, vim). If you choose to execute an interactive command consider letting the user know they can press \`ctrl + f\` to focus into the shell to provide input.`;
|
|
201
|
+
}
|
|
202
|
+
})()}
|
|
180
203
|
- **Remembering Facts:** Use the '${MEMORY_TOOL_NAME}' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information. If unsure whether to save something, you can ask the user, "Should I remember that for you?"
|
|
181
204
|
- **Respect User Confirmations:** Most tool calls (also denoted as 'function calls') will first require confirmation from the user, where they will either approve or cancel the function call. If a user cancels a function call, respect their choice and do _not_ try to make the function call again. It is okay to request the tool call again _only_ if the user requests that same tool call on a subsequent prompt. When a user cancels a function call, assume best intentions from the user and consider inquiring if they prefer any alternative paths forward.
|
|
182
205
|
|
|
183
206
|
## Interaction Details
|
|
184
207
|
- **Help Command:** The user can use '/help' to display help information.
|
|
185
|
-
- **Feedback:** To report a bug or provide feedback, please use the /bug command
|
|
186
|
-
|
|
208
|
+
- **Feedback:** To report a bug or provide feedback, please use the /bug command.`,
|
|
209
|
+
sandbox: `
|
|
187
210
|
${(function () {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
211
|
+
// Determine sandbox status based on environment variables
|
|
212
|
+
const isSandboxExec = process.env['SANDBOX'] === 'sandbox-exec';
|
|
213
|
+
const isGenericSandbox = !!process.env['SANDBOX']; // Check if SANDBOX is set to any non-empty value
|
|
214
|
+
if (isSandboxExec) {
|
|
215
|
+
return `
|
|
193
216
|
# macOS Seatbelt
|
|
194
217
|
You are running under macos seatbelt with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to macOS Seatbelt (e.g. if a command fails with 'Operation not permitted' or similar error), as you report the error to the user, also explain why you think it could be due to macOS Seatbelt, and how the user may need to adjust their Seatbelt profile.
|
|
195
218
|
`;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
219
|
+
}
|
|
220
|
+
else if (isGenericSandbox) {
|
|
221
|
+
return `
|
|
199
222
|
# Sandbox
|
|
200
223
|
You are running in a sandbox container with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to sandboxing (e.g. if a command fails with 'Operation not permitted' or similar error), when you report the error to the user, also explain why you think it could be due to sandboxing, and how the user may need to adjust their sandbox configuration.
|
|
201
224
|
`;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
return `
|
|
205
228
|
# Outside of Sandbox
|
|
206
229
|
You are running outside of a sandbox container, directly on the user's system. For critical commands that are particularly likely to modify the user's system outside of the project directory or system temp directory, as you explain the command to the user (per the Explain Critical Commands rule above), also remind the user to consider enabling sandboxing.
|
|
207
230
|
`;
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
231
|
+
}
|
|
232
|
+
})()}`,
|
|
233
|
+
git: `
|
|
211
234
|
${(function () {
|
|
212
|
-
|
|
213
|
-
|
|
235
|
+
if (isGitRepository(process.cwd())) {
|
|
236
|
+
return `
|
|
214
237
|
# Git Repository
|
|
215
238
|
- The current working (project) directory is being managed by a git repository.
|
|
216
239
|
- When asked to commit changes or prepare a commit, always start by gathering information using shell commands:
|
|
@@ -226,13 +249,39 @@ ${(function () {
|
|
|
226
249
|
- If a commit fails, never attempt to work around the issues without being asked to do so.
|
|
227
250
|
- Never push changes to a remote repository without being asked explicitly by the user.
|
|
228
251
|
`;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
252
|
+
}
|
|
253
|
+
return '';
|
|
254
|
+
})()}`,
|
|
255
|
+
finalReminder: `
|
|
233
256
|
# Final Reminder
|
|
234
|
-
Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions about the contents of files; instead use '${READ_FILE_TOOL_NAME}' or '${READ_MANY_FILES_TOOL_NAME}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved
|
|
235
|
-
|
|
257
|
+
Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions about the contents of files; instead use '${READ_FILE_TOOL_NAME}' or '${READ_MANY_FILES_TOOL_NAME}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved.`,
|
|
258
|
+
};
|
|
259
|
+
const orderedPrompts = [
|
|
260
|
+
'preamble',
|
|
261
|
+
'coreMandates',
|
|
262
|
+
];
|
|
263
|
+
if (enableCodebaseInvestigator && enableWriteTodosTool) {
|
|
264
|
+
orderedPrompts.push('primaryWorkflows_prefix_ci_todo');
|
|
265
|
+
}
|
|
266
|
+
else if (enableCodebaseInvestigator) {
|
|
267
|
+
orderedPrompts.push('primaryWorkflows_prefix_ci');
|
|
268
|
+
}
|
|
269
|
+
else if (enableWriteTodosTool) {
|
|
270
|
+
orderedPrompts.push('primaryWorkflows_todo');
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
orderedPrompts.push('primaryWorkflows_prefix');
|
|
274
|
+
}
|
|
275
|
+
orderedPrompts.push('primaryWorkflows_suffix', 'operationalGuidelines', 'sandbox', 'git', 'finalReminder');
|
|
276
|
+
// By default, all prompts are enabled. A prompt is disabled if its corresponding
|
|
277
|
+
// GEMINI_PROMPT_<NAME> environment variable is set to "0" or "false".
|
|
278
|
+
const enabledPrompts = orderedPrompts.filter((key) => {
|
|
279
|
+
const envVar = process.env[`GEMINI_PROMPT_${key.toUpperCase()}`];
|
|
280
|
+
const lowerEnvVar = envVar?.trim().toLowerCase();
|
|
281
|
+
return lowerEnvVar !== '0' && lowerEnvVar !== 'false';
|
|
282
|
+
});
|
|
283
|
+
basePrompt = enabledPrompts.map((key) => promptConfig[key]).join('\n');
|
|
284
|
+
}
|
|
236
285
|
// if GEMINI_WRITE_SYSTEM_MD is set (and not 0|false), write base system prompt to file
|
|
237
286
|
const writeSystemMdResolution = resolvePathFromEnv(process.env['GEMINI_WRITE_SYSTEM_MD']);
|
|
238
287
|
// Check if the feature is enabled. This proceeds only if the environment
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/core/prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EACL,cAAc,EACd,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E,EAAE;QACnC,CAAC,CAAC,EAAE,CAAC;IAET,OAAO,GAAG,UAAU,GAAG,YAAY,EAAE,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDR,CAAC,IAAI,EAAE,CAAC;AACT,CAAC"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export declare const GIT_COMMIT_INFO = "
|
|
7
|
-
export declare const CLI_VERSION = "0.13.0-
|
|
6
|
+
export declare const GIT_COMMIT_INFO = "da3da198";
|
|
7
|
+
export declare const CLI_VERSION = "0.13.0-preview.0";
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
// This file is auto-generated by the build script (scripts/generate-git-commit-info.js)
|
|
7
7
|
// Do not edit this file manually.
|
|
8
|
-
export const GIT_COMMIT_INFO = '
|
|
9
|
-
export const CLI_VERSION = '0.13.0-
|
|
8
|
+
export const GIT_COMMIT_INFO = 'da3da198';
|
|
9
|
+
export const CLI_VERSION = '0.13.0-preview.0';
|
|
10
10
|
//# sourceMappingURL=git-commit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-commit.js","sourceRoot":"","sources":["../../../src/generated/git-commit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wFAAwF;AACxF,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAC1C,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"git-commit.js","sourceRoot":"","sources":["../../../src/generated/git-commit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wFAAwF;AACxF,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAC1C,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { HookRegistry } from './hookRegistry.js';
|
|
7
|
+
import type { HookExecutionPlan } from './types.js';
|
|
8
|
+
import type { HookEventName } from './types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Hook planner that selects matching hooks and creates execution plans
|
|
11
|
+
*/
|
|
12
|
+
export declare class HookPlanner {
|
|
13
|
+
private readonly hookRegistry;
|
|
14
|
+
constructor(hookRegistry: HookRegistry);
|
|
15
|
+
/**
|
|
16
|
+
* Create execution plan for a hook event
|
|
17
|
+
*/
|
|
18
|
+
createExecutionPlan(eventName: HookEventName, context?: HookEventContext): HookExecutionPlan | null;
|
|
19
|
+
/**
|
|
20
|
+
* Check if a hook entry matches the given context
|
|
21
|
+
*/
|
|
22
|
+
private matchesContext;
|
|
23
|
+
/**
|
|
24
|
+
* Match tool name against matcher pattern
|
|
25
|
+
*/
|
|
26
|
+
private matchesToolName;
|
|
27
|
+
/**
|
|
28
|
+
* Match trigger/source against matcher pattern
|
|
29
|
+
*/
|
|
30
|
+
private matchesTrigger;
|
|
31
|
+
/**
|
|
32
|
+
* Deduplicate identical hook configurations
|
|
33
|
+
*/
|
|
34
|
+
private deduplicateHooks;
|
|
35
|
+
/**
|
|
36
|
+
* Generate a unique key for a hook entry
|
|
37
|
+
*/
|
|
38
|
+
private getHookKey;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Context information for hook event matching
|
|
42
|
+
*/
|
|
43
|
+
export interface HookEventContext {
|
|
44
|
+
toolName?: string;
|
|
45
|
+
trigger?: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { debugLogger } from '../utils/debugLogger.js';
|
|
7
|
+
/**
|
|
8
|
+
* Hook planner that selects matching hooks and creates execution plans
|
|
9
|
+
*/
|
|
10
|
+
export class HookPlanner {
|
|
11
|
+
hookRegistry;
|
|
12
|
+
constructor(hookRegistry) {
|
|
13
|
+
this.hookRegistry = hookRegistry;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create execution plan for a hook event
|
|
17
|
+
*/
|
|
18
|
+
createExecutionPlan(eventName, context) {
|
|
19
|
+
const hookEntries = this.hookRegistry.getHooksForEvent(eventName);
|
|
20
|
+
if (hookEntries.length === 0) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
// Filter hooks by matcher
|
|
24
|
+
const matchingEntries = hookEntries.filter((entry) => this.matchesContext(entry, context));
|
|
25
|
+
if (matchingEntries.length === 0) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
// Deduplicate identical hooks
|
|
29
|
+
const deduplicatedEntries = this.deduplicateHooks(matchingEntries);
|
|
30
|
+
// Extract hook configs
|
|
31
|
+
const hookConfigs = deduplicatedEntries.map((entry) => entry.config);
|
|
32
|
+
// Determine execution strategy - if ANY hook definition has sequential=true, run all sequentially
|
|
33
|
+
const sequential = deduplicatedEntries.some((entry) => entry.sequential === true);
|
|
34
|
+
const plan = {
|
|
35
|
+
eventName,
|
|
36
|
+
hookConfigs,
|
|
37
|
+
sequential,
|
|
38
|
+
};
|
|
39
|
+
debugLogger.debug(`Created execution plan for ${eventName}: ${hookConfigs.length} hook(s) to execute ${sequential ? 'sequentially' : 'in parallel'}`);
|
|
40
|
+
return plan;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Check if a hook entry matches the given context
|
|
44
|
+
*/
|
|
45
|
+
matchesContext(entry, context) {
|
|
46
|
+
if (!entry.matcher || !context) {
|
|
47
|
+
return true; // No matcher means match all
|
|
48
|
+
}
|
|
49
|
+
const matcher = entry.matcher.trim();
|
|
50
|
+
if (matcher === '' || matcher === '*') {
|
|
51
|
+
return true; // Empty string or wildcard matches all
|
|
52
|
+
}
|
|
53
|
+
// For tool events, match against tool name
|
|
54
|
+
if (context.toolName) {
|
|
55
|
+
return this.matchesToolName(matcher, context.toolName);
|
|
56
|
+
}
|
|
57
|
+
// For other events, match against trigger/source
|
|
58
|
+
if (context.trigger) {
|
|
59
|
+
return this.matchesTrigger(matcher, context.trigger);
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Match tool name against matcher pattern
|
|
65
|
+
*/
|
|
66
|
+
matchesToolName(matcher, toolName) {
|
|
67
|
+
try {
|
|
68
|
+
// Attempt to treat the matcher as a regular expression.
|
|
69
|
+
const regex = new RegExp(matcher);
|
|
70
|
+
return regex.test(toolName);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// If it's not a valid regex, treat it as a literal string for an exact match.
|
|
74
|
+
return matcher === toolName;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Match trigger/source against matcher pattern
|
|
79
|
+
*/
|
|
80
|
+
matchesTrigger(matcher, trigger) {
|
|
81
|
+
return matcher === trigger;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Deduplicate identical hook configurations
|
|
85
|
+
*/
|
|
86
|
+
deduplicateHooks(entries) {
|
|
87
|
+
const seen = new Set();
|
|
88
|
+
const deduplicated = [];
|
|
89
|
+
for (const entry of entries) {
|
|
90
|
+
const key = this.getHookKey(entry);
|
|
91
|
+
if (!seen.has(key)) {
|
|
92
|
+
seen.add(key);
|
|
93
|
+
deduplicated.push(entry);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
debugLogger.debug(`Deduplicated hook: ${key}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return deduplicated;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Generate a unique key for a hook entry
|
|
103
|
+
*/
|
|
104
|
+
getHookKey(entry) {
|
|
105
|
+
return `command:${entry.config.command}`;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=hookPlanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hookPlanner.js","sourceRoot":"","sources":["../../../src/hooks/hookPlanner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;GAEG;AACH,MAAM,OAAO,WAAW;IACL,YAAY,CAAe;IAE5C,YAAY,YAA0B;QACpC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,mBAAmB,CACjB,SAAwB,EACxB,OAA0B;QAE1B,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAElE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,0BAA0B;QAC1B,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CACnD,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CACpC,CAAC;QAEF,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,8BAA8B;QAC9B,MAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAEnE,uBAAuB;QACvB,MAAM,WAAW,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAErE,kGAAkG;QAClG,MAAM,UAAU,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