Skip to main content

Crate aidaemon_work

Crate aidaemon_work 

Source
Expand description

Goals, mandates, tasks, work coordination and notifications: the domain types, the store traits and their SQLite implementation.

Modules§

admissibility
Which ACT/WAIT/ASK/STOP outcomes the current mandate state admits.
authority
Pure, deterministic authority evaluator for one tool action proposed under an owner mandate.
automations
Automations: what the owner sees of the two engines that run work on its own. A scheduled automation runs a fixed instruction at set times (a scheduled goal, or a reminder that only messages the owner). A watching automation works toward an objective within limits the owner approved (a mandate). One vocabulary, one list and one card for both; the engines and their data are unchanged.
chat_command
/work in chat: the owner’s view of durable work (lanes, tasks, journal comments, retries, workspaces, worker profiles and projects), over the WorkCoordinationStore. A host adds it to the shared chat commands.
goal_tokens
GoalTokenRegistry — cancellation token hierarchy for goal orchestration.
goals
health
First-class health probe system with structured metrics, trend analysis, and alerting.
heartbeat
What a host’s background jobs report: the per-job table a dashboard shows (HeartbeatTelemetry), the observer that logs each outcome and fills it (JobObserver), and the gate that skips a tick while the database cannot answer (DbHealthGate). The host schedules its jobs on an aidaemon_core::ServiceHost and plugs these in.
mandates
plans
Persistent Task Plans for reliable multi-step task execution.
reminders
Typed reminders.
schedule
Cron schedule parsing and next-run computation utilities.
scheduled_runs
A scheduled goal’s runs: whether work came from a schedule (its provenance), and the persisted budget state of the scheduled run in progress.
scheduler
The scheduler’s goal cycle: due mandate reviews, scheduled goals and reminders, stuck and orphaned tasks, recovery runs and goal notifications. One pass is GoalCycle::tick; GoalCycleService runs it on an aidaemon_core::ServiceHost.
schema
The goals, mandates, tasks, work and notification tables.
sqlite
The SQLite implementation of the work stores, over a host’s pool.
stores
The store traits for goals, mandates, tasks, work and notifications.
task_workspaces
Task workspaces: where a task attempt works (the shared workspace, an isolated folder of its own, or a git worktree on its own branch), and what is kept of it when the attempt ends.
token_alerts
Token spike alerts: bursts of model tokens or calls on an active goal or session become critical owner notifications, with a cooldown per scope. Staged: no host runs the scan yet.
tools
The work domain’s tools: what the model calls to manage mandates, goals and their tasks.
traits
Every domain type and store trait, under one path.
triggers
Events that wake work: what triggers and channels hand the scheduler, the bus that carries them, and the trigger sources (the email trigger behind the email-trigger feature).

Constants§

MANDATE_PROTOCOL_TOOLS
The mandate protocol’s own control tools. Their receipts record bookkeeping, never an observation of the world, so they are never cited as decision or measurement evidence.