Overview
Core TypeScript types and enums used across all three workers:write-agent-digest, check-upstream-status, and create-handoff-marker.
Enums
StatusType
sync- Synchronization operation (e.g., syncing emails, GitHub issues)snapshot- Point-in-time snapshot (e.g., audit results)report- Generated report (e.g., weekly activity)heartbeat- No-op status indicating the agent ran but found no work
StatusValue
complete- Operation completed successfullypartial- Operation completed with some items skipped or incompletefailed- Operation failedfull_report- Full detailed report generated (report-type agents)stub- Minimal stub report (report-type agents)
TargetDatabase
docs- Professional/work-related digests (DOCS_DATABASE_ID)home_docs- Personal/home-related digests (HOME_DOCS_DATABASE_ID)
TaskPriority
UpstreamStatus
check-upstream-status worker.
complete,partial,failed,full_report,stub- Same as StatusValuenot_found- No digest page found for the agentstale- Digest found but older than max_age_hoursunknown- Could not determine status from page content
Shared Interfaces
FlaggedItem
Human-readable description of the flagged item
URL to a Notion task page if one was created for this item
Explanation for why no task was created (e.g., “Already has open task”)
TaskRef
Task title/name
Full Notion URL to the task page
ActionsTaken
Array of newly created tasks
Array of existing tasks that were updated
NeedsReview
Description of what needs review
Escalation
Name of agent or person receiving the escalation
Why this item was escalated
Who owns the escalation (typically the source agent name)
Whether the handoff has been completed