Data Models¶
Core Pydantic models for the Egg data structure. These types are all importable
from the top-level PyNydus package (pynydus).
Egg¶
- class Egg(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelThe canonical portable artifact.
Redacted sources and spawn pipeline log align with
raw/andspawn_log.jsonin the.eggarchive. Use :func:~pynydus.engine.packager.loadto populate these from disk, and :func:~pynydus.engine.packager.saveto write them.Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- manifest: pynydus.api.schemas.Manifest¶
None
- skills: pynydus.api.schemas.SkillsModule¶
‘Field(…)’
- mcp: pynydus.api.schemas.McpModule¶
‘Field(…)’
- memory: pynydus.api.schemas.MemoryModule¶
‘Field(…)’
- secrets: pynydus.api.schemas.SecretsModule¶
‘Field(…)’
Manifest¶
- class Manifest(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelTop-level Egg metadata.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- created_at: datetime.datetime¶
None
- agent_type: pynydus.common.enums.AgentType¶
None
- base_egg: str | None¶
None
Base egg reference this egg inherited from (e.g. ‘nydus/openclaw:0.3.0’).
- redaction_policy: pynydus.api.schemas.RedactionPolicy | None¶
None
- sources: Annotated[list[pynydus.api.schemas.SourceEntry], Field(max_length=1)]¶
‘Field(…)’
At most one source entry (FROM-only spawns may omit this list).
- class RedactionPolicy(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelRecords what redaction was applied during spawning.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
- class SourceEntry(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelThe single SOURCE tree that contributed to this egg, if any.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
Module containers¶
- class SkillsModule(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelContainer for all skills in an Egg (agentskills.io format).
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- skills: list[pynydus.api.skill_format.AgentSkill]¶
‘Field(…)’
- class McpModule(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelRaw MCP server configs. Nydus does not model MCP fields.
Stored as
mcp.jsonin the egg archive using Claude Desktop format ({ "mcpServers": { "<name>": { ... } } }).Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
- class MemoryModule(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelContainer for all memory records in an Egg.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- memory: list[pynydus.api.schemas.MemoryRecord]¶
‘Field(…)’
- class SecretsModule(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelContainer for all redaction placeholder records in an Egg.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- secrets: list[pynydus.api.schemas.SecretRecord]¶
‘Field(…)’
Records¶
- class AgentSkill(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelSpec-compliant representation of a single Agent Skill (agentskills.io).
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
- class MemoryRecord(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelA single memory record.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- label: pynydus.common.enums.MemoryLabel¶
None
- timestamp: datetime.datetime | None¶
None
True
- class SecretRecord(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelA single redaction placeholder record (credential or PII). Spec §6.2.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- kind: pynydus.common.enums.SecretKind¶
None
- injection_mode: pynydus.common.enums.InjectionMode¶
None
Pipeline results¶
- class HatchResult(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelOutput from a hatcher.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- target: pynydus.common.enums.AgentType¶
None
- output_dir: pathlib.Path¶
None
- class ValidationReport(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelResult of validating an Egg or source input.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- issues: list[pynydus.api.schemas.ValidationIssue]¶
‘Field(…)’
- class ValidationIssue(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelA single validation finding (error or warning).
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
- class DiffReport(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelResult of comparing two Eggs.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- manifest_changes: list[pynydus.api.schemas.ManifestChange]¶
‘Field(…)’
- entries: list[pynydus.api.schemas.DiffEntry]¶
‘Field(…)’
- class DiffEntry(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelA single record-level difference within a module type.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- bucket: pynydus.common.enums.ModuleType¶
None
Which module the record belongs to (skill, memory, secret).
- change: pynydus.common.enums.DiffChange¶
None
Type of change: ADDED, REMOVED, or MODIFIED.
- class ManifestChange(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelA single manifest-level field difference between two Eggs.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
- class EggPartial(/, **data: typing.Any)¶
Bases:
pydantic.BaseModelIntermediate result from a spawner before full packaging.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- skills: pynydus.api.schemas.SkillsModule¶
‘Field(…)’
- mcp: pynydus.api.schemas.McpModule¶
‘Field(…)’
- memory: pynydus.api.schemas.MemoryModule¶
‘Field(…)’
- secrets: pynydus.api.schemas.SecretsModule¶
‘Field(…)’
Enums¶
These types are defined in pynydus.common.enums and re-exported from
pynydus.api.schemas for convenience.
- class AgentType¶
Bases:
enum.StrEnumSupported agent platforms.
- OPENCLAW¶
‘openclaw’
- ZEROCLAW¶
‘zeroclaw’
- LETTA¶
‘letta’
- class ModuleType¶
Bases:
enum.StrEnumTop-level module types in an Egg (skill, memory, secret).
- SKILL¶
‘skill’
- MEMORY¶
‘memory’
- SECRET¶
‘secret’
- class SecretKind¶
Bases:
enum.StrEnumKind of redacted value: credential (gitleaks) or PII (Presidio).
- CREDENTIAL¶
‘credential’
- PII¶
‘pii’
- class InjectionMode¶
Bases:
enum.StrEnumHow a secret value is provided at hatch time.
- ENV¶
‘env’
- SUBSTITUTION¶
‘substitution’
- class MemoryLabel¶
Bases:
enum.StrEnumCanonical labels for memory records, assigned by spawners.
- PERSONA¶
‘persona’
- FLOW¶
‘flow’
- CONTEXT¶
‘context’
- STATE¶
‘state’
- class HatchMode¶
Bases:
enum.StrEnumHatching mode: rebuild from structured modules or passthrough raw snapshot.
- REBUILD¶
‘rebuild’
- PASSTHROUGH¶
‘passthrough’
- class DiffChange¶
Bases:
enum.StrEnumType of change reported in a diff entry.
- ADDED¶
‘added’
- REMOVED¶
‘removed’
- MODIFIED¶
‘modified’