Behaviour and JSON Schema validation helper for durable tools in H.
The coordinator binds the built-in coding tools' working directory before
acquiring a lease or calling execute/2. Workers use the bound context.env.
Read Security boundaries on hiness.dev
before exposing host tools to external context.
Summary
Types
@type context() :: %{ :env => H.ExecutionEnv.t(), :session_id => String.t(), :conversation_id => pos_integer(), optional(:task_id) => pos_integer(), optional(:scan_entries) => (map() -> {:ok, map()} | {:error, term()}), optional(:on_output) => (String.t(), non_neg_integer() -> any()), optional(:timeout_ms) => pos_integer() }
Callbacks
@callback description() :: String.t()
@callback execute(args :: map(), context()) :: {:ok, tool_output()} | {:error, tool_output()}
@callback mutating?() :: boolean()
@callback name() :: String.t()
@callback parameters_schema() :: map()
@callback replay() :: :safe | :unsafe