/** * evolveTrigger - Task 4, G2 (the learning Kagemusha deferred forever). * * An intervention outcome (succeeded / failed / corrected) is fed to the trigger's stats, * then the AGENT decides whether to keep, refine, or retire the trigger. The decision is * INJECTED (`decide`) - the real one is an LLM call. There is deliberately NO numeric * threshold in this module: a fixed `if (failed >= N) disable()` would be exactly the * automation trap that re-freezes G2. The same stats can be kept or retired by judgment. */ import type { TriggerRegistry } from './trigger-registry.js'; import type { TriggerRecord } from './trigger-types.js'; import type { TriggerSpec } from './trigger-author.js'; export type EvolutionOutcome = 'succeeded' | 'failed' | 'corrected'; export type EvolutionAction = 'kept' | 'refined' | 'retired'; export type EvolutionDecision = { action: 'kept'; } | { action: 'retired'; reason: string; } | { action: 'refined'; reason: string; newSpec: TriggerSpec; }; export type DecideEvolution = (ctx: { trigger: TriggerRecord; outcome: EvolutionOutcome; detail: string; }) => Promise; export declare function evolveTrigger(triggerId: string, outcome: EvolutionOutcome, detail: string, registry: TriggerRegistry, decide: DecideEvolution): Promise; //# sourceMappingURL=trigger-evolve.d.ts.map