pynydus.api.schemas

Pydantic models for the Egg data model.

Includes manifest, skills, memory, secrets modules, and the top-level Egg container types used in spawn/hatch/save.

Module Contents

Classes

McpModule

Raw MCP server configs. Nydus does not model MCP fields.

SkillsModule

Container for all skills in an Egg (agentskills.io format).

MemoryRecord

A single memory record.

MemoryModule

Container for all memory records in an Egg.

SecretRecord

A single redaction placeholder record (credential or PII). Spec §6.2.

SecretsModule

Container for all redaction placeholder records in an Egg.

RedactionPolicy

Records what redaction was applied during spawning.

SourceEntry

The single SOURCE tree that contributed to this egg, if any.

Manifest

Top-level Egg metadata.

Egg

The canonical portable artifact.

ValidationIssue

A single validation finding (error or warning).

ValidationReport

Result of validating an Egg or source input.

EggPartial

Intermediate result from a spawner before full packaging.

HatchResult

Output from a hatcher.

ManifestChange

A single manifest-level field difference between two Eggs.

DiffEntry

A single record-level difference within a module type.

DiffReport

Result of comparing two Eggs.

API

class pynydus.api.schemas.McpModule(/, **data: typing.Any)

Bases: pydantic.BaseModel

Raw MCP server configs. Nydus does not model MCP fields.

Stored as mcp.json in 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.

self is explicitly positional-only to allow self as a field name.

configs: dict[str, dict[str, Any]]

‘Field(…)’

class pynydus.api.schemas.SkillsModule(/, **data: typing.Any)

Bases: pydantic.BaseModel

Container 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.

self is explicitly positional-only to allow self as a field name.

skills: list[pynydus.api.skill_format.AgentSkill]

‘Field(…)’

class pynydus.api.schemas.MemoryRecord(/, **data: typing.Any)

Bases: pydantic.BaseModel

A 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.

self is explicitly positional-only to allow self as a field name.

id: str

None

text: str

None

label: pynydus.common.enums.MemoryLabel

None

agent_type: str

None

source_store: str

None

skill_ref: str | None

None

timestamp: datetime.datetime | None

None

shareable: bool

True

class pynydus.api.schemas.MemoryModule(/, **data: typing.Any)

Bases: pydantic.BaseModel

Container 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.

self is explicitly positional-only to allow self as a field name.

memory: list[pynydus.api.schemas.MemoryRecord]

‘Field(…)’

class pynydus.api.schemas.SecretRecord(/, **data: typing.Any)

Bases: pydantic.BaseModel

A 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.

self is explicitly positional-only to allow self as a field name.

id: str

None

placeholder: str

None

kind: pynydus.common.enums.SecretKind

None

pii_type: str | None

None

name: str

None

required_at_hatch: bool

False

injection_mode: pynydus.common.enums.InjectionMode

None

description: str = <Multiline-String>
value_present: bool

False

occurrences: list[str]

‘Field(…)’

class pynydus.api.schemas.SecretsModule(/, **data: typing.Any)

Bases: pydantic.BaseModel

Container 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.

self is explicitly positional-only to allow self as a field name.

secrets: list[pynydus.api.schemas.SecretRecord]

‘Field(…)’

class pynydus.api.schemas.RedactionPolicy(/, **data: typing.Any)

Bases: pydantic.BaseModel

Records 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.

self is explicitly positional-only to allow self as a field name.

pii_redacted: bool

True

secrets_placeholder_only: bool

True

class pynydus.api.schemas.SourceEntry(/, **data: typing.Any)

Bases: pydantic.BaseModel

The 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.

self is explicitly positional-only to allow self as a field name.

agent_type: str

None

source_path: str = <Multiline-String>
class pynydus.api.schemas.Manifest(/, **data: typing.Any)

Bases: pydantic.BaseModel

Top-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.

self is explicitly positional-only to allow self as a field name.

nydus_version: str

None

min_nydus_version: str

‘0.0.7’

egg_version: str

‘1.0’

created_at: datetime.datetime

None

agent_type: pynydus.common.enums.AgentType

None

signature: str = <Multiline-String>
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

agent_name: str | None

None

agent_description: str | None

None

llm_model: str | None

None

llm_context_window: int | None

None

embedding_model: str | None

None

source_dir: str | 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 pynydus.api.schemas.Egg(/, **data: typing.Any)

Bases: pydantic.BaseModel

The canonical portable artifact.

Redacted sources and spawn pipeline log align with raw/ and spawn_log.json in the .egg archive. Use :func:~pynydus.engine.packager.load to populate these from disk, and :func:~pynydus.engine.packager.save to 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.

self is explicitly positional-only to allow self as 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(…)’

raw_artifacts: dict[str, str]

‘Field(…)’

Redacted source snapshots (ZIP raw/…).

spawn_log: list[dict]

‘Field(…)’

Structured spawn pipeline events (ZIP spawn_log.json).

nydusfile: str | None

None

Embedded Nydusfile text when present in the archive (ZIP Nydusfile).

a2a_card: dict[str, Any] | None

None

A2A agent card (agent-card.json).

agents_md: str | None

None

Per-egg deployment runbook (AGENTS.md).

apm_yml: str | None

None

Passthrough APM manifest from source project.

spec_snapshots: dict[str, str] | None

None

Embedded spec markdown snapshots keyed by standard name.

inspect_secrets() list[dict]

Return a summary of all secret placeholders and their occurrences.

Returns: List of dicts with placeholder, name, kind, required, and occurrences.

class pynydus.api.schemas.ValidationIssue(/, **data: typing.Any)

Bases: pydantic.BaseModel

A 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.

self is explicitly positional-only to allow self as a field name.

level: Literal[error, warning]

None

message: str

None

location: str | None

None

class pynydus.api.schemas.ValidationReport(/, **data: typing.Any)

Bases: pydantic.BaseModel

Result 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.

self is explicitly positional-only to allow self as a field name.

valid: bool

None

issues: list[pynydus.api.schemas.ValidationIssue]

‘Field(…)’

class pynydus.api.schemas.EggPartial(/, **data: typing.Any)

Bases: pydantic.BaseModel

Intermediate 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.

self is explicitly positional-only to allow self as 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(…)’

raw_artifacts: dict[str, str]

‘Field(…)’

spawn_log: list[dict]

‘Field(…)’

class pynydus.api.schemas.HatchResult(/, **data: typing.Any)

Bases: pydantic.BaseModel

Output 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.

self is explicitly positional-only to allow self as a field name.

target: pynydus.common.enums.AgentType

None

output_dir: pathlib.Path

None

files_created: list[str]

‘Field(…)’

warnings: list[str]

‘Field(…)’

hatch_log: list[dict]

‘Field(…)’

Structured log entries produced during the hatch pipeline.

class pynydus.api.schemas.ManifestChange(/, **data: typing.Any)

Bases: pydantic.BaseModel

A 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.

self is explicitly positional-only to allow self as a field name.

field: str

None

Which manifest field changed.

old: str | None

None

Old value (stringified).

new: str | None

None

New value (stringified).

class pynydus.api.schemas.DiffEntry(/, **data: typing.Any)

Bases: pydantic.BaseModel

A 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.

self is explicitly positional-only to allow self as 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.

id: str | None

None

Record ID.

field: str | None

None

Which field changed (None for add/remove of whole records).

old: str | None

None

Old value (stringified). None for additions.

new: str | None

None

New value (stringified). None for removals.

class pynydus.api.schemas.DiffReport(/, **data: typing.Any)

Bases: pydantic.BaseModel

Result 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.

self is explicitly positional-only to allow self as a field name.

identical: bool

None

manifest_changes: list[pynydus.api.schemas.ManifestChange]

‘Field(…)’

entries: list[pynydus.api.schemas.DiffEntry]

‘Field(…)’