@builder.io/dev-tools
Version:
Builder.io Visual CMS Devtools
17 lines (16 loc) • 916 B
TypeScript
/**
* Defaults and resolution for sub-agent max completion (turn) budgets.
* Used by Agent tool dispatch and browser prompt ${FUSION_BROWSER_*_MAX_TURNS} substitution.
*/
/** Default when an agent has no `maxCompletions` on its definition (built-in or repo). */
export declare const DEFAULT_AGENT_MAX_COMPLETIONS = 80;
export type AgentWithOptionalMaxCompletions = {
name: string;
maxCompletions?: number;
};
/**
* Resolves max completions for a spawn of `subagentType` from merged agent definitions
* (built-in + repo), or {@link DEFAULT_AGENT_MAX_COMPLETIONS} when unset.
*/
export declare function resolveSubagentMaxCompletions(agents: readonly AgentWithOptionalMaxCompletions[], subagentType: string): number;
export declare function browserTurnBudgetEnv(agents: readonly AgentWithOptionalMaxCompletions[]): Record<"FUSION_BROWSER_PLANNER_MAX_TURNS" | "FUSION_BROWSER_EXECUTOR_MAX_TURNS", string>;