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

Copy Markdown View Source

Submission lookup, bounded LRU caching, settlement, inbox draining, automatic initial title derivation, and pending generation run creation for H.Session.Server and H.Session.UserShell.

Summary

Functions

cache(state, subs, batch_seq)

drain_inbox(cid, state, now, filter_mode)

has_answerable_context?(cid, newly_placed_entries, state)

initial_generation_live(gen_task_id, turns \\ 1)

lookup(state, req_id)

lookup_with_pending(state, req_id, pending_subs)

map_storage_refusal(other)

maybe_derive_initial_title(content, state)

settle(sub_ids, mode, val, state, now)

start_pending_generation(cid, sub_ids, state, now, turns \\ 1)

Mints and stages a new pending "generation" task and initial "live" document for cid, updating state.store, state.tasks, and state.docs[cid]["live"].