Interface: MergeOptions
Options accepted by ToolRegistry.merge.
Properties
| Property | Type | Default value | Description |
|---|---|---|---|
onCollision? | "keep" | "replace" | "throw" | 'throw' | What to do when two registries contain a tool with the same name AND neither tool's own onCollision resolves the collision. Remarks - 'throw' (default): raise @nhtio/adk!E_TOOL_ALREADY_REGISTERED on the first unresolved collision. Mirrors the default behaviour of ToolRegistry.register and surfaces accidental name shadowing immediately. - 'replace': the later registry's tool wins. - 'keep': the earlier registry's tool wins; later occurrences are dropped. Per-tool @nhtio/adk!Tool.onCollision takes precedence: if the incoming tool declares 'replace' or 'keep', that policy wins regardless of this option. Only when the incoming tool's policy is 'throw' (the default) does this fallback apply. |