pynydus.engine.differ¶
Structural diff between two Eggs.
Module Contents¶
Functions¶
Diff skills matched by |
|
Compare two Eggs and return a structured diff report. |
|
Compare manifest fields, skipping created_at which always differs. |
|
Match records by ID and report additions, removals, and field changes. |
API¶
- pynydus.engine.differ._skill_id(skill: pynydus.api.skill_format.AgentSkill) str¶
- pynydus.engine.differ._diff_skill_records(a_list: list[pynydus.api.skill_format.AgentSkill], b_list: list[pynydus.api.skill_format.AgentSkill]) list[pynydus.api.schemas.DiffEntry]¶
Diff skills matched by
metadata["id"](fallback: name), comparing name and body.
- pynydus.engine.differ.diff_eggs(egg_a: pynydus.api.schemas.Egg, egg_b: pynydus.api.schemas.Egg) pynydus.api.schemas.DiffReport¶
Compare two Eggs and return a structured diff report.
Compares manifest fields, skills, memory, and secrets. Records are matched by
id. For matched records, individual fields are compared. Unmatched records are reported as added/removed.Args: egg_a: First Egg (typically the older or baseline side). egg_b: Second Egg (typically the newer side).
Returns: Report listing manifest changes and per-record diffs.
- pynydus.engine.differ._diff_manifest(egg_a: pynydus.api.schemas.Egg, egg_b: pynydus.api.schemas.Egg) list[pynydus.api.schemas.ManifestChange]¶
Compare manifest fields, skipping created_at which always differs.
Args: egg_a: First Egg (old/left side). egg_b: Second Egg (new/right side).
Returns: List of changed manifest fields.
- pynydus.engine.differ._diff_records(a_list: list[pydantic.BaseModel], b_list: list[pydantic.BaseModel], bucket: pynydus.common.enums.ModuleType, compare_fields: list[str]) list[pynydus.api.schemas.DiffEntry]¶
Match records by ID and report additions, removals, and field changes.
Args: a_list: Records from the first (old) Egg. b_list: Records from the second (new) Egg. bucket: Which module the records belong to (skill, memory, secret). compare_fields: Attribute names to compare on matched records.
Returns: Diff entries for every structural difference found.