feat(config): add experimental.adk.agentSessionNoninteractiveEnabled setting (#24439)

This commit is contained in:
Adam Weidman
2026-04-01 16:41:38 -04:00
committed by GitHub
parent d00b43733c
commit b5f568fefe
7 changed files with 107 additions and 0 deletions
+26
View File
@@ -3445,3 +3445,29 @@ describe('ConfigSchema validation', () => {
}
});
});
describe('ADKSettings', () => {
const baseParams: ConfigParameters = {
sessionId: 'test',
targetDir: '.',
debugMode: false,
model: 'test-model',
cwd: '.',
};
it('should default agentSessionNoninteractiveEnabled to false', () => {
const config = new Config(baseParams);
expect(config.getAgentSessionNoninteractiveEnabled()).toBe(false);
});
it('should return provided agentSessionNoninteractiveEnabled', () => {
const params: ConfigParameters = {
...baseParams,
adk: {
agentSessionNoninteractiveEnabled: true,
},
};
const config = new Config(params);
expect(config.getAgentSessionNoninteractiveEnabled()).toBe(true);
});
});
+13
View File
@@ -240,6 +240,10 @@ export interface GemmaModelRouterSettings {
};
}
export interface ADKSettings {
agentSessionNoninteractiveEnabled?: boolean;
}
export interface ExtensionSetting {
name: string;
description: string;
@@ -677,6 +681,7 @@ export interface ConfigParameters {
policyUpdateConfirmationRequest?: PolicyUpdateConfirmationRequest;
output?: OutputSettings;
gemmaModelRouter?: GemmaModelRouterSettings;
adk?: ADKSettings;
disableModelRouterForAuth?: AuthType[];
continueOnFailedApiCall?: boolean;
retryFetchErrors?: boolean;
@@ -899,6 +904,7 @@ export class Config implements McpContext, AgentLoopContext {
private readonly outputSettings: OutputSettings;
private readonly gemmaModelRouter: GemmaModelRouterSettings;
private readonly agentSessionNoninteractiveEnabled: boolean;
private readonly continueOnFailedApiCall: boolean;
private readonly retryFetchErrors: boolean;
@@ -1316,6 +1322,9 @@ export class Config implements McpContext, AgentLoopContext {
params.gemmaModelRouter?.classifier?.model ?? 'gemma3-1b-gpu-custom',
},
};
this.agentSessionNoninteractiveEnabled =
params.adk?.agentSessionNoninteractiveEnabled ?? false;
this.retryFetchErrors = params.retryFetchErrors ?? true;
this.maxAttempts = Math.min(
params.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
@@ -3367,6 +3376,10 @@ export class Config implements McpContext, AgentLoopContext {
return this.gemmaModelRouter;
}
getAgentSessionNoninteractiveEnabled(): boolean {
return this.agentSessionNoninteractiveEnabled;
}
/**
* Get override settings for a specific agent.
* Reads from agents.overrides.<agentName>.