package tool // RootRunKVPartition is the sentinel skill_id partition under which all // `root_run:` KV rows are stored. // // Why a sentinel: skill KV rows are keyed (skill_id, scope, key), so // two sibling workers with different IDs (e.g. agent_spawn ephemeral // workers under one fan-out) could never share state through a scope // string alone — each would read/write its own partition. Routing every // root_run scope into one shared partition makes the scope string the // real boundary: it embeds the root run id, which the validator checks // against Invocation.RootRunID, so per-tree isolation holds even though // the partition is global. // // Declared in the root skilltools package (not tools/) because both the // tool handlers (pkg/skilltools/tools) and the storage sweeper // (pkg/logic/skills) need it without importing each other. const RootRunKVPartition = "__root_run__"