123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196{"id":"com.lattice.habits","name":"Habits","icon":"✓","color":"#087f5b","description":"Track scheduled habits, completions and streaks.","requested_permissions":{"storage":["sql"],"network":{"allowlist":[]},"events":{"habit-checked":{"description":"An eligible habit date was completed for the first time.","schema":{"type":"object","properties":{"habit_id":{"type":"string","description":"Habit UUID.","minLength":1},"title":{"type":"string","description":"Habit title."},"date":{"type":"string","description":"Local check date, YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"streak":{"type":"integer","description":"Consecutive completed scheduled days or Monday–Sunday weeks through date, in streak_unit.","minimum":0},"streak_unit":{"type":"string","description":"Unit for streak and milestone counts.","enum":["scheduled-days","weeks"]},"checked_at":{"type":"string","description":"Completion time, UTC ISO 8601 timestamp.","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"}},"required":["habit_id","title","date","streak","streak_unit","checked_at"],"additionalProperties":false}},"habit-missed":{"description":"A closed scheduled period missed its completion target.","schema":{"type":"object","properties":{"habit_id":{"type":"string","description":"Habit UUID.","minLength":1},"title":{"type":"string","description":"Habit title."},"date":{"type":"string","description":"Inclusive period end, local YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"period_start":{"type":"string","description":"First eligible local date in assessed period, YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"target":{"type":"integer","description":"Required checked dates; partial weeks cap the target at eligible days.","minimum":1,"maximum":7},"completed":{"type":"integer","description":"Distinct checked dates in the closed period.","minimum":0,"maximum":7}},"required":["habit_id","title","date","period_start","target","completed"],"additionalProperties":false}},"streak-milestone":{"description":"A check reached a new streak milestone.","schema":{"type":"object","properties":{"habit_id":{"type":"string","description":"Habit UUID.","minLength":1},"title":{"type":"string","description":"Habit title."},"date":{"type":"string","description":"Local check date, YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"streak":{"type":"integer","description":"Consecutive completed scheduled days or Monday–Sunday weeks through date, in streak_unit.","minimum":0},"streak_unit":{"type":"string","description":"Unit for streak and milestone counts.","enum":["scheduled-days","weeks"]},"checked_at":{"type":"string","description":"Completion time, UTC ISO 8601 timestamp.","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"milestone":{"type":"integer","description":"Reached streak length, in streak_unit.","enum":[7,14,30,60,100,365]}},"required":["habit_id","title","date","streak","streak_unit","checked_at","milestone"],"additionalProperties":false}}},"listeners":{"check-habit":{"description":"Complete a habit on an eligible past or current date; duplicate checks are ignored.","schema":{"type":"object","properties":{"habit_id":{"type":"string","description":"Exact habit UUID; takes precedence over title; supply either.","minLength":1},"title":{"type":"string","description":"Unique case-insensitive habit title; used when habit_id is omitted.","minLength":1},"date":{"type":"string","description":"Local YYYY-MM-DD; omitted defaults to local today; must be eligible, nonfuture date.","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":[],"additionalProperties":false,"anyOf":[{"required":["habit_id"]},{"required":["title"]}]}}}}}