Skip to content

Focus and Wellbeing

Sessions: session.list_by_issue, session.get, session.detail, session.get_active, session.start, session.pause, session.resume, session.end, session.log_manual, session.amend_note, and session.history.

Timers: timer.get_state, timer.start, timer.activity.touch, timer.pause, timer.resume, timer.advance, timer.extend, timer.defer_break, and timer.end.

Ad hoc timers require protocol 1.6 or newer. Check kernel.info.get before sending adhoc: true to timer.start; older daemons may ignore that field and use the active issue context. Ad hoc starts preserve the active context. Timer state exposes adhoc, and timer.end accepts adhocResolution (attach, create, or keep) with the destination fields in EndSessionRequest.

Timer mutations may emit session and timer events. Treat the daemon response as the immediate source of truth, then apply later events in order.

Method Purpose
context.get Read active repository, stream, and issue context.
context.set Set a complete context.
context.switch_repo / context.switch_stream / context.switch_issue Change one context dimension.
context.clear_issue / context.clear Clear issue context or all context.

Check-ins use checkin.get, checkin.upsert, checkin.delete, and checkin.range. Momentum uses momentum.list, momentum.create, momentum.update, momentum.delete, momentum.range, and momentum.detail.

Use metrics.range, metrics.rollup, metrics.streaks, and metrics.streaks_lifetime for metric data. Dashboard views are provided by dashboard.window, dashboard.focus_score, dashboard.focus_score_range, dashboard.distribution, and dashboard.goal_progress.

Date ranges should use the logical date defined by Crona’s configured start-of-day boundary. Do not independently roll a view over at local calendar midnight.