"""Skill framework for CleverAgents v3.

This package provides the ``SkillConfigSchema`` Pydantic model for
loading, validating, and normalizing skill YAML configuration files,
as well as the skill protocol types used for discovery, composition,
execution, and error reporting within the skill framework, the
runtime context, skill registry, and inline tool executor.

It also provides the Agent Skills Standard loader (``AgentSkillLoader``)
for the three-tier progressive disclosure model (discover / activate /
deactivate) described in ``docs/specification.md`` § AgentSkillAdapter.

Usage::

    from cleveragents.skills.schema import SkillConfigSchema
    from cleveragents.skills.protocol import SkillDefinition
    from cleveragents.skills.agent_skills_loader import AgentSkillLoader

    config = SkillConfigSchema.from_yaml_file("examples/skills/single-tool.yaml")
    loader = AgentSkillLoader.from_folder(Path("./skills/deploy-to-staging"))
"""

from cleveragents.skills.agent_skills_loader import (
    AgentSkillLoader,
    AgentSkillResourceSlot,
    AgentSkillSpec,
    AgentSkillToolDescriptor,
    SkillStep,
)
from cleveragents.skills.context import (
    SkillContext,
    SkillExecutionError,
    ToolInvocationRecord,
)
from cleveragents.skills.discovery import (
    DiscoveredAgentSkill,
    DiscoveryConflict,
    DiscoveryResult,
    build_tool_spec,
    discover_agent_skills,
    parse_agent_skills_paths,
    register_discovered_skills,
    scan_directory,
)
from cleveragents.skills.inline_executor import (
    InlineToolExecutor,
    InlineToolResult,
)
from cleveragents.skills.protocol import (
    SkillDefinition,
    SkillError,
    SkillErrorType,
    SkillMetadata,
    SkillResult,
    map_tool_error,
)
from cleveragents.skills.refresh import SkillRefreshResult
from cleveragents.skills.registry import SkillRegistry
from cleveragents.skills.schema import SkillConfigSchema

__all__ = [
    "AgentSkillLoader",
    "AgentSkillResourceSlot",
    "AgentSkillSpec",
    "AgentSkillToolDescriptor",
    "DiscoveredAgentSkill",
    "DiscoveryConflict",
    "DiscoveryResult",
    "InlineToolExecutor",
    "InlineToolResult",
    "SkillConfigSchema",
    "SkillContext",
    "SkillDefinition",
    "SkillError",
    "SkillErrorType",
    "SkillExecutionError",
    "SkillMetadata",
    "SkillRefreshResult",
    "SkillRegistry",
    "SkillResult",
    "SkillStep",
    "ToolInvocationRecord",
    "build_tool_spec",
    "discover_agent_skills",
    "map_tool_error",
    "parse_agent_skills_paths",
    "register_discovered_skills",
    "scan_directory",
]
