Skip to main content

One-shot relative timers for Huxley — 'remind me in 5 minutes'. Persistent, supervised, stale-restore-guarded.

Project description

huxley-skill-timers

One-shot relative timers for Huxley. "Remind me in 5 minutes." Persistent, supervised, stale-restore-guarded.

Status: bundled with the Huxley repo as a workspace member.

What it does

  • set_timer — "set a timer for 5 minutes" / "remind me in 30 seconds to take it out of the oven" — schedules a one-shot proactive announcement after the given relative duration. The skill's wait task fires inject_turn(message) when the timer expires.

For calendar-time reminders ("at 9am tomorrow") use huxley-skill-reminders instead — the two skills cleanly split absolute vs. relative time.

Persistence + supervision

  • Timer rows live in ctx.storage under timer:<id> keys.
  • The wait task for each timer is wrapped in ctx.background_task so the framework can see crashes (logged via aexception), restart within a budget, and cancel cleanly at shutdown.
  • On boot, setup() enumerates timer:* and reschedules the survivors against wall-clock time.
  • Stale-restore guard: if a restored timer's fire_at is more than stale_restore_threshold_s in the past, it's dropped silently — no spammy "your 7am wake-up timer is now firing at 6pm" surprises.

Configure

skills:
  timers:
    stale_restore_threshold_s: 300 # default 5 min; raise if you want catch-up
    fire_prompt: "El temporizador terminó:" # prefix the persona narrates
    i18n:
      es:
        seconds_word: "segundos"
        minutes_word: "minutos"
      en:
        seconds_word: "seconds"
        minutes_word: "minutes"

config_schema = None — locale i18n maps don't fit a JSON-Schema-rendered form; v2's PWA falls back to "edit YAML directly."

Development

uv run --package huxley-skill-timers pytest server/skills/timers/tests
uv run ruff check server/skills/timers
uv run mypy server/skills/timers/src

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

huxley_skill_timers-0.1.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

huxley_skill_timers-0.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file huxley_skill_timers-0.1.0.tar.gz.

File metadata

  • Download URL: huxley_skill_timers-0.1.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.5

File hashes

Hashes for huxley_skill_timers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 689cf5983bc316cf38b83aae2b8462f0114a228f4b2216c59c6055716021dba7
MD5 70ebef00cf3ee822845e9c35d74391c8
BLAKE2b-256 828813a2ec17ddaac46fdef37bbb469ffbb5f59971ec561a7d148f594a293544

See more details on using hashes here.

File details

Details for the file huxley_skill_timers-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for huxley_skill_timers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 709682af61dc02852183d8bac681a6f7b50ece6f4670d12d5a5564ce95e33093
MD5 15a6e3136c4f37c40e89cf5dcec43929
BLAKE2b-256 7dae8a54b92adf65ecdf67f317bd33e9c192ce5768614ff7cf91a154558345ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page