WithAutoInjector adds an [builtins.AutoInjector] that augments every per-agent hook configuration during executor build. The canonical use case is the snapshot controller returned by [builtins.RegisterSnapshot]: pass the same controller to the App via app.WithSnapshotController so /undo and friends
(inj builtins.AutoInjector)
| 526 | // |
| 527 | // Multiple calls accumulate; injectors run in registration order. |
| 528 | func WithAutoInjector(inj builtins.AutoInjector) Opt { |
| 529 | return func(r *LocalRuntime) { |
| 530 | if inj != nil { |
| 531 | r.autoInjectors = append(r.autoInjectors, inj) |
| 532 | } |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | // WithHooksRegistry plugs a pre-populated [hooks.Registry] into the |
| 537 | // runtime instead of letting it allocate a fresh one. Embedders use |