mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-15 12:30:32 -07:00
feat(akl): implement Agent Knowledge Layer (AKL) - clean implementation
This commit is contained in:
@@ -90,6 +90,7 @@ export interface CliArgs {
|
||||
includeDirectories: string[] | undefined;
|
||||
screenReader: boolean | undefined;
|
||||
useWriteTodos: boolean | undefined;
|
||||
akl: boolean | undefined;
|
||||
outputFormat: string | undefined;
|
||||
fakeResponses: string | undefined;
|
||||
recordResponses: string | undefined;
|
||||
@@ -272,6 +273,10 @@ export async function parseArguments(
|
||||
type: 'boolean',
|
||||
description: 'Enable screen reader mode for accessibility.',
|
||||
})
|
||||
.option('akl', {
|
||||
type: 'boolean',
|
||||
description: 'Enable the Agent Knowledge Layer (AKL).',
|
||||
})
|
||||
.option('output-format', {
|
||||
alias: 'o',
|
||||
type: 'string',
|
||||
@@ -835,6 +840,7 @@ export async function loadCliConfig(
|
||||
truncateToolOutputThreshold: settings.tools?.truncateToolOutputThreshold,
|
||||
eventEmitter: coreEvents,
|
||||
useWriteTodos: argv.useWriteTodos ?? settings.useWriteTodos,
|
||||
akl: argv.akl ?? settings.experimental?.akl,
|
||||
output: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
format: (argv.outputFormat ?? settings.output?.format) as OutputFormat,
|
||||
|
||||
@@ -93,6 +93,11 @@ describe('ExtensionManager theme loading', () => {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const mockConfig = {
|
||||
getAklEnabled: () => false,
|
||||
getImportFormat: () => 'tree' as const,
|
||||
getFileFilteringOptions: () => ({}),
|
||||
getDiscoveryMaxDirs: () => 200,
|
||||
getAklFilePaths: async () => [],
|
||||
getEnableExtensionReloading: () => false,
|
||||
getMcpClientManager: () => ({
|
||||
startExtension: vi.fn().mockResolvedValue(undefined),
|
||||
@@ -140,7 +145,6 @@ describe('ExtensionManager theme loading', () => {
|
||||
getExtensions: () => [],
|
||||
}),
|
||||
isTrustedFolder: () => true,
|
||||
getImportFormat: () => 'tree',
|
||||
reloadSkills: vi.fn(),
|
||||
} as unknown as Config;
|
||||
|
||||
@@ -192,13 +196,12 @@ describe('ExtensionManager theme loading', () => {
|
||||
getExtensionLoader: () => ({
|
||||
getExtensions: () => [],
|
||||
}),
|
||||
isTrustedFolder: () => true,
|
||||
getImportFormat: () => 'tree',
|
||||
getFileFilteringOptions: () => ({
|
||||
respectGitIgnore: true,
|
||||
respectGeminiIgnore: true,
|
||||
}),
|
||||
getAklEnabled: () => false,
|
||||
getAklFilePaths: async () => [],
|
||||
getImportFormat: () => 'tree' as const,
|
||||
getFileFilteringOptions: () => ({}),
|
||||
getDiscoveryMaxDirs: () => 200,
|
||||
isTrustedFolder: () => true,
|
||||
getMcpClientManager: () => ({
|
||||
getMcpInstructions: () => '',
|
||||
startExtension: vi.fn().mockResolvedValue(undefined),
|
||||
|
||||
@@ -1936,6 +1936,16 @@ const SETTINGS_SCHEMA = {
|
||||
description: 'Enable task tracker tools.',
|
||||
showInDialog: false,
|
||||
},
|
||||
akl: {
|
||||
type: 'boolean',
|
||||
label: 'Agent Knowledge Layer',
|
||||
category: 'Experimental',
|
||||
requiresRestart: true,
|
||||
default: false,
|
||||
description:
|
||||
'Enable the Agent Knowledge Layer for persistent situational awareness.',
|
||||
showInDialog: true,
|
||||
},
|
||||
modelSteering: {
|
||||
type: 'boolean',
|
||||
label: 'Model Steering',
|
||||
|
||||
Reference in New Issue
Block a user