Parses skillReinject from Pi settings layers with defaults and project-trust
aware loading so extension code shares one merged settings view.
Co-authored-by: Cursor <cursoragent@cursor.com>
Defines SkillReinjectSettings and default values so read/merge/effective
helpers share one source of truth.
Co-authored-by: Cursor <cursoragent@cursor.com>
Upsert merges sources without reordering the skills list per SPEC §6.1
dedupe and insertion-order rules.
Co-authored-by: Cursor <cursoragent@cursor.com>
Walk branch backwards for skill-reinject:state custom entries per SPEC §6.3;
return structuredClone of valid v1 snapshot or null for full rescan.
Co-authored-by: Cursor <cursoragent@cursor.com>
STATE_ENTRY_TYPE skill-reinject:state matches SPEC §6.1 so state survives
/resume and branch reload without a full rescan.
Co-authored-by: Cursor <cursoragent@cursor.com>
createInitialState and createRuntimeFlags return SPEC §6.1 defaults
before load, detect, and settings merge on session_start.
Co-authored-by: Cursor <cursoragent@cursor.com>
TrackedSkill, ExtensionState (version 1), and RuntimeFlags with union
aliases for skill sources, compaction source, and auto-compact integration.
Co-authored-by: Cursor <cursoragent@cursor.com>