H.Session.Server.Tools (H v0.3.0)

Copy Markdown View Source

Tool worker spawning, argument validation, mutating workspace lease handling, sequential tool-round advancement, and interrupted/aborted tool settlement for H.Session.Server.

Summary

Functions

abort_child_tools(child_ids, cid, live, reason, state, now)

finish_tool_round_stage(gen_task, state, now)

next_tool_spawn_effects(cid, child_ids, state)

Computes the next {:spawn_tool, cid, tid} effects for a generation's tool round.

Regular worker tools execute sequentially one at a time, whereas pending "subagent" tool calls dispatch and park concurrently without holding Task.Supervisor workers. While parked "subagent" calls remain "waiting", any subsequent non-subagent tool calls in the same assistant turn can still advance.

recover_unclean_tool_call(tool_task, state, now)

spawn_worker(cid, tool_task_id, state, apply_effects_fn)

stage_after_tool_settled(cid, done_tool_task, entry, live, state, now, base_effects)

stage_done(tid, attempt_id, arg, state)

unsafe_running_tool?(task)