"""Builtin registry definitions."""

from dataclasses import dataclass


@dataclass
class BuiltinInfo:
    name: str
    arity: int | tuple[int, ...]
    fn: object


BUILTIN_NAMES = {
    "clock",
    "type",
    "runtime_typeof",
    "runtime_fn_name",
    "runtime_fn_arity",
    "runtime_fn_module",
    "runtime_fields",
    "runtime_has",
    "runtime_module_fields",
    "runtime_stack_depth",
    "runtime_stack_frame",
    "runtime_tasks",
    "runtime_task",
    "runtime_scheduler_stats",
    "runtime_time",
    "runtime_events",
    "runtime_clear_events",
    "runtime_event_count",
    "coroutine",
    "resume",
    "coroutine_status",
    "spawn",
    "run_loop",
    "sleep",
    "__sleep",
    "channel",
    "send",
    "recv",
    "close",
    "task",
    "graph",
    "run_graph",
    "plan_graph",
    "resume_graph",
    "run_workflow",
    "plan_workflow",
    "resume_workflow",
    "run_goal",
    "plan_goal",
    "resume_goal",
    "workflow_state",
    "workflow_checkpoints",
    "current_workflow_id",
    "emit",
    "tool_call",
    "tool_available",
    "tool_describe",
    "memory_get",
    "memory_put",
    "memory_delete",
    "memory_keys",
    "recall",
    "remember",
    "suggest",
    "record_outcome",
    "__memory_recall",
    "__memory_remember",
    "__memory_suggest",
    "__memory_record_outcome",
    "__memory_recall_from",
    "__memory_recall_all",
    "__memory_share",
    "agent_call",
    "agent_available",
    "agent_describe",
    "__action_tool",
    "__action_agent",
    "__action_memory_put",
    "__action_memory_get",
    "__action_emit",
    "str",
    "len",
    "collection_len",
    "str_upper",
    "str_lower",
    "str_trim",
    "str_split",
    "str_contains",
    "print",
    "input",
    "keys",
    "values",
    "list_push",
    "list_pop",
    "json_parse",
    "json_stringify",
    "math_abs",
    "math_min",
    "math_max",
    "math_floor",
    "math_ceil",
    "math_sqrt",
    "math_random",
    "read_file",
    "write_file",
    "exists",
    "path_exists",
    "append_file",
    "mkdir",
    "list_dir",
    "path_join",
    "path_dirname",
    "path_basename",
    "path_ext",
    "path_stem",
}



