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

Copy Markdown View Source

Shared session coordinator state transitions, conversation entry/visibility queries, workspace lease coordination, worker termination, and H.Catalog runtime reporting.

Summary

Functions

build_entry(id, cid, kind, data, now)

build_tool_specs(tools_map)

conversation_busy?(state, cid)

cwd_available?(state)

derive_catalog_runtime(state)

@spec derive_catalog_runtime(map()) :: map()

Computes the catalog runtime summary (title, active, attention, activity_kind, activity_label, queued_count) from coordinator state.

draining?(state)

find_worker_by_monitor(workers, ref)

load_visible_entries(state, cid)

maybe_report_catalog_runtime(prev_state, next_state)

normalize_content(text)

put_doc(state, cid, kind, value)

put_task(state, task)

put_tool_status(live, call_id, status)

record_entry(state, cid, entry_id)

release_all_leases(state)

release_lease(cid, state)

report_catalog_active(state)

resolve_tools(list)

session_active?(state)

stringify_json(val)

stringify_tool_calls(list)

terminate_all_workers(state)

terminate_worker_pid(task_sup, pid)

tool_replay_string(tools_map, name)

verify_visible_entry(state, cid, entry_id)

wire_entry(entry, fallback_seq)

worker_kill_effects(state, tid)

workspace_cwd(env, state)