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

This commit is contained in:
Adam Weidman
2026-04-01 10:23:56 -07:00
parent 9f76f34049
commit e02072abf8
7 changed files with 107 additions and 0 deletions
+26
View File
@@ -3416,3 +3416,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
@@ -238,6 +238,10 @@ export interface GemmaModelRouterSettings {
};
}
export interface ADKSettings {
agentSessionNoninteractiveEnabled?: boolean;
}
export interface ExtensionSetting {
name: string;
description: string;
@@ -675,6 +679,7 @@ export interface ConfigParameters {
policyUpdateConfirmationRequest?: PolicyUpdateConfirmationRequest;
output?: OutputSettings;
gemmaModelRouter?: GemmaModelRouterSettings;
adk?: ADKSettings;
disableModelRouterForAuth?: AuthType[];
continueOnFailedApiCall?: boolean;
retryFetchErrors?: boolean;
@@ -896,6 +901,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;
@@ -1309,6 +1315,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,
@@ -3343,6 +3352,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>.