Skip to content

InjectionConfig

Defined in: src/injection/types.ts:35

Configuration common to every injection consumer: when to inject. What text to inject is a consumer concern, added by the interfaces that extend this one (e.g. MemoryInjectionConfig).

optional trigger?:
| InjectionTrigger
| ((context) => boolean);

Defined in: src/injection/types.ts:43

When injection runs. An InjectionTrigger name selects a built-in policy; a predicate is the escape hatch — it receives the InjectionContext and returns whether to inject this call. A predicate that throws fails open (injection is skipped, the model call proceeds).

'userTurn'