mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 05:24:34 -07:00
fix(core): propagate subagent context to policy engine (#22086)
This commit is contained in:
@@ -19,6 +19,8 @@ import type { EditorType } from '../utils/editor.js';
|
||||
export interface AgentSchedulingOptions {
|
||||
/** The unique ID for this agent's scheduler. */
|
||||
schedulerId: string;
|
||||
/** The name of the subagent. */
|
||||
subagent?: string;
|
||||
/** The ID of the tool call that invoked this agent. */
|
||||
parentCallId?: string;
|
||||
/** The tool registry specific to this agent. */
|
||||
@@ -46,6 +48,7 @@ export async function scheduleAgentTools(
|
||||
): Promise<CompletedToolCall[]> {
|
||||
const {
|
||||
schedulerId,
|
||||
subagent,
|
||||
parentCallId,
|
||||
toolRegistry,
|
||||
signal,
|
||||
@@ -69,6 +72,7 @@ export async function scheduleAgentTools(
|
||||
messageBus: toolRegistry.getMessageBus(),
|
||||
getPreferredEditor: getPreferredEditor ?? (() => undefined),
|
||||
schedulerId,
|
||||
subagent,
|
||||
parentCallId,
|
||||
onWaitingForConfirmation,
|
||||
});
|
||||
|
||||
@@ -1099,6 +1099,7 @@ export class LocalAgentExecutor<TOutput extends z.ZodTypeAny> {
|
||||
toolRequests,
|
||||
{
|
||||
schedulerId: this.agentId,
|
||||
subagent: this.definition.name,
|
||||
parentCallId: this.parentCallId,
|
||||
toolRegistry: this.toolRegistry,
|
||||
signal,
|
||||
|
||||
Reference in New Issue
Block a user