/** * Context Injector — 统一注入框架 * * v6.89.0+: 将 RULES / AGENTS / COMMANDS / SKILLS / HOOKS 的注入逻辑 * 统一到一个入口,避免各命令文件重复实现。 * * 使用方式: * ```ts * const injected = await injectAll(basePrompt, { * projectRoot, * command: 'execute', * phase: 'code-gen', * techStack: { language: 'typescript', framework: 'react' }, * agentContext: { iteration: 'Iteration-001' }, * }); * ``` */ import type { AgentContext } from './agents'; import { type HookContext } from './hook-runner'; export interface InjectOptions { projectRoot: string; command?: string; phase?: string; agentContext?: AgentContext; techStack?: { language?: string; framework?: string; database?: string; cache?: string; frontend?: string; }; platform?: string; taskKeywords?: string[]; commandTemplate?: { name: string; vars: Record; }; hooks?: { trigger: 'pre' | 'post'; hookContext: HookContext; }; } /** * 统一注入入口:按需注入 RULES / AGENTS / COMMANDS / SKILLS / HOOKS */ export declare function injectAll(prompt: string, options: InjectOptions): Promise; /** * 简化版:只注入 AGENTS */ export declare function injectAgents(prompt: string, command: string, phase: string, agentContext: AgentContext, projectRoot: string): Promise; /** * 简化版:只注入 RULES */ export declare function injectRules(prompt: string, techStack: NonNullable, projectRoot: string, platform?: string): Promise; export { runHooks, type HookContext, type HookResult } from './hook-runner'; //# sourceMappingURL=context-injector.d.ts.map