Skip to content

types

types

Skill type definitions.

Classes

SkillStep dataclass

SkillStep(
    tool_name: str = "",
    skill_name: str = "",
    arguments_template: str = "{}",
    output_key: str = "",
)

A single step in a skill pipeline.

SkillManifest dataclass

SkillManifest(
    name: str,
    version: str = "0.1.0",
    description: str = "",
    author: str = "",
    steps: List[SkillStep] = list(),
    required_capabilities: List[str] = list(),
    signature: str = "",
    metadata: Dict[str, Any] = dict(),
    tags: List[str] = list(),
    depends: List[str] = list(),
    user_invocable: bool = True,
    disable_model_invocation: bool = False,
    markdown_content: str = "",
)

Manifest describing a reusable skill.

Methods:
manifest_bytes
manifest_bytes() -> bytes

Serialize the manifest (excluding signature) for signing/verification.

Source code in src/diapason/skills/types.py
def manifest_bytes(self) -> bytes:
    """Serialize the manifest (excluding signature) for signing/verification."""
    import json

    data = {
        "name": self.name,
        "version": self.version,
        "description": self.description,
        "author": self.author,
        "steps": [
            {
                "tool_name": s.tool_name,
                "skill_name": s.skill_name,
                "arguments_template": s.arguments_template,
                "output_key": s.output_key,
            }
            for s in self.steps
        ],
        "required_capabilities": self.required_capabilities,
        "tags": self.tags,
        "depends": self.depends,
    }
    return json.dumps(data, sort_keys=True).encode()