OptionaldefaultBuilds the driver for a given scope id (e.g. one file per guild).
OptionalforceOverrides the per-instance forceExit, which the pool forces to false
by default. Only set it if a broken scope really should exit the process.
OptionalloadLoad options forwarded to every instance the pool creates.
OptionalmaxMaximum number of instances kept in memory. Beyond it, the least-recently-used ones are evicted. Each instance holds a full config cache, so an unbounded pool grows with the number of scopes ever touched.
OptionalonCalled every time an operation falls back to defaultScope. Lets the host
capture its own stack trace on demand; the pool never captures one itself
(too expensive per access). Without a hook, the pool warns once and keeps
an aggregate count in missingScopeCount.
OptionalresolveExternal scope resolver, consulted when no run() is active. Use it when
the host already owns the ambient context (its own AsyncLocalStorage, a
request store, ...) and should stay the single source of truth. An
enclosing run() still wins, since it is explicit at the call site.
OptionalttlMilliseconds of idleness after which an instance is evicted.
Scope used when no scope is active. Off by default: without it, a scope-less operation throws
KfgScopeError. Meant as a migration aid — turn it on while call sites are still being moved into scopes.