pynydus.agents.openclaw.hatcher

OpenClaw hatcher connector. Spec §10.3.

Produces a valid OpenClaw workspace directory from an Egg, matching the canonical layout defined in AGENT_SPEC.md:

  • SOUL.md <- persona memory (minus IDENTITY records)

  • IDENTITY.md <- persona memory originating from IDENTITY.md

  • AGENTS.md <- flow memory

  • USER.md <- context memory (minus TOOLS records)

  • TOOLS.md <- context memory originating from TOOLS.md

  • MEMORY.md <- undated state memory

  • memory/YYYY-MM-DD.md <- dated state memory (one file per day)

  • skills/.md <- one file per skill, kebab-case names

  • config.json <- secret placeholders

  • mcp.json <- MCP servers (Claude Desktop mcpServers format)

Module Contents

Classes

OpenClawHatcher

Produce a valid OpenClaw project directory from an Egg.

Functions

_is_identity_source

True if this persona record originated from IDENTITY.md.

_is_tools_source

True if this context record originated from TOOLS.md.

_to_kebab

Convert a skill name to kebab-case filename stem.

API

pynydus.agents.openclaw.hatcher._is_identity_source(rec: pynydus.api.schemas.MemoryRecord) bool

True if this persona record originated from IDENTITY.md.

pynydus.agents.openclaw.hatcher._is_tools_source(rec: pynydus.api.schemas.MemoryRecord) bool

True if this context record originated from TOOLS.md.

pynydus.agents.openclaw.hatcher._to_kebab(name: str) str

Convert a skill name to kebab-case filename stem.

class pynydus.agents.openclaw.hatcher.OpenClawHatcher

Bases: pynydus.api.protocols.Hatcher

Produce a valid OpenClaw project directory from an Egg.

render(egg: pynydus.api.schemas.Egg, output_dir: pathlib.Path) pynydus.api.raw_types.RenderResult

Render Egg records into OpenClaw project files.

Placeholders ({{SECRET_NNN}}, {{PII_NNN}}) are preserved. the pipeline substitutes real values after this step.

Args: egg: The Egg to render. output_dir: Target directory (unused, pipeline performs disk I/O).

Returns: File dict and any warnings produced during rendering.

hatch(egg: pynydus.api.schemas.Egg, output_dir: pathlib.Path) pynydus.api.schemas.HatchResult

Generate OpenClaw project files from an Egg.

.. deprecated:: Use :meth:render instead. The pipeline now handles disk I/O.

Args: egg: The Egg to hatch. output_dir: Directory where output files are written.

Returns: Result with list of created files and any warnings.