merge_skill(
merged: MutableMapping[str, _SkillT],
source_labels: MutableMapping[str,| Name | Type | Description |
|---|---|---|
merged* | MutableMapping[str, _SkillT] | Accumulator mapping skill name to merged metadata; mutated in place. |
source_labels* | MutableMapping[str, str | None] | Parallel accumulator mapping skill name to the label of the source that last supplied it; mutated in place so the previous label is available on the next collision. |
skill* | _SkillT | |
source_label | str | None | Default: None |
Merge one skill into merged by name, last-one-wins.
Emits one DEBUG log whenever a skill replaces an already-merged skill with
the same name, recording the skill name plus the previous and replacement
source paths and labels so the winning definition is unambiguous. Nothing is
logged when there is no collision.
Callers must iterate sources in ascending precedence order so the replacing skill is always the higher-precedence one.
Skill metadata to merge. Must expose name; path, when present,
is included in the override log to identify the colliding files.
Human-readable label for the source supplying skill,
when known. A missing or empty label renders as "unknown" in the
log.