mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-14 20:10:36 -07:00
feat(cli): add --experimental-agent-harness command line flag #18267
This commit is contained in:
@@ -78,6 +78,7 @@ export interface CliArgs {
|
||||
allowedMcpServerNames: string[] | undefined;
|
||||
allowedTools: string[] | undefined;
|
||||
experimentalAcp: boolean | undefined;
|
||||
experimentalAgentHarness: boolean | undefined;
|
||||
extensions: string[] | undefined;
|
||||
listExtensions: boolean | undefined;
|
||||
resume: string | typeof RESUME_LATEST | undefined;
|
||||
@@ -162,6 +163,10 @@ export async function parseArguments(
|
||||
type: 'boolean',
|
||||
description: 'Starts the agent in ACP mode',
|
||||
})
|
||||
.option('experimental-agent-harness', {
|
||||
type: 'boolean',
|
||||
description: 'Enable the new unified agent harness',
|
||||
})
|
||||
.option('allowed-mcp-server-names', {
|
||||
type: 'array',
|
||||
string: true,
|
||||
@@ -788,7 +793,9 @@ export async function loadCliConfig(
|
||||
extensionLoader: extensionManager,
|
||||
enableExtensionReloading: settings.experimental?.extensionReloading,
|
||||
enableAgents: settings.experimental?.enableAgents,
|
||||
enableAgentHarness: settings.experimental?.enableAgentHarness,
|
||||
enableAgentHarness:
|
||||
argv.experimentalAgentHarness ??
|
||||
settings.experimental?.enableAgentHarness,
|
||||
plan: settings.experimental?.plan,
|
||||
enableEventDrivenScheduler: true,
|
||||
skillsSupport: settings.skills?.enabled ?? true,
|
||||
|
||||
@@ -467,6 +467,7 @@ describe('gemini.tsx main function kitty protocol', () => {
|
||||
allowedMcpServerNames: undefined,
|
||||
allowedTools: undefined,
|
||||
experimentalAcp: undefined,
|
||||
experimentalAgentHarness: undefined,
|
||||
extensions: undefined,
|
||||
listExtensions: undefined,
|
||||
includeDirectories: undefined,
|
||||
|
||||
@@ -10,7 +10,11 @@ import { makeFakeConfig } from '../test-utils/config.js';
|
||||
import { GeminiChat, StreamEventType } from '../core/geminiChat.js';
|
||||
import { GeminiEventType, type ServerGeminiStreamEvent } from '../core/turn.js';
|
||||
import { z } from 'zod';
|
||||
import { type LocalAgentDefinition, AgentTerminateMode } from './types.js';
|
||||
import {
|
||||
type LocalAgentDefinition,
|
||||
AgentTerminateMode,
|
||||
type AgentDefinition,
|
||||
} from './types.js';
|
||||
import { scheduleAgentTools } from './agent-scheduler.js';
|
||||
import { logAgentFinish } from '../telemetry/loggers.js';
|
||||
import { type Config } from '../config/config.js';
|
||||
@@ -72,7 +76,7 @@ describe('AgentHarness', () => {
|
||||
|
||||
const harness = new AgentHarness({
|
||||
config: mockConfig,
|
||||
|
||||
|
||||
definition: definition as unknown as AgentDefinition,
|
||||
inputs: {},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user