Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(plugins): say per-session plugin config is deep-merged

Yudhi Armyndharis0640a62a659a
diff --git a/src/core/plugins/plugin.interfaces.ts b/src/core/plugins/plugin.interfaces.ts
index 3d98f988e..6f3c4fdb4 100644
--- a/src/core/plugins/plugin.interfaces.ts
+++ b/src/core/plugins/plugin.interfaces.ts
@@ -707,8 +707,9 @@ export interface PluginInstance {
// Ignored for a global (sessionScoped:false) plugin. Persisted on the registry entry.
activeSessions?: string[];
// Per-session config overrides, keyed by sessionId. The config a hook sees for session S is the
- // override shallow-merged over `config` (the '*' base) — see resolvePluginConfig. Absent = no
- // overrides (every session gets the base). Persisted on the registry entry.
+ // override deep-merged over `config`, the '*' base (nested objects merge key by key; arrays and
+ // scalars replace) — see resolvePluginConfig. Absent = no overrides (every session gets the base).
+ // Persisted on the registry entry.
sessionConfig?: Record<string, Record<string, unknown>>;
// First-party built-ins (engines, bundled extensions) run in-process; plugins loaded from the
// plugins directory are untrusted and run sandboxed in a worker. `false` => sandboxed.