@aitne-sh/aitne 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/README.md +218 -161
  2. package/agent-assets/agent-profiles/_safety.md +3 -3
  3. package/agent-assets/agent-profiles/browser-task.md +108 -0
  4. package/agent-assets/agent-profiles/conversational.md +3 -3
  5. package/agent-assets/agent-profiles/profile-importer.md +2 -2
  6. package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
  7. package/agent-assets/agents/context-index-reconcile/agent.md +52 -0
  8. package/agent-assets/agents/evening-review/agent.md +53 -0
  9. package/agent-assets/agents/hourly-check/agent.md +62 -0
  10. package/agent-assets/agents/monthly-review/agent.md +55 -0
  11. package/agent-assets/agents/morning-routine/agent.md +78 -0
  12. package/agent-assets/agents/roadmap-maintenance/agent.md +52 -0
  13. package/agent-assets/agents/skill-curation/agent.md +52 -0
  14. package/agent-assets/agents/user-profile-sweep-evening/agent.md +48 -0
  15. package/agent-assets/agents/user-profile-sweep-morning/agent.md +53 -0
  16. package/agent-assets/agents/weekly-review/agent.md +51 -0
  17. package/agent-assets/docs/concepts/agent-day.md +13 -11
  18. package/agent-assets/docs/concepts/auth-health.md +47 -10
  19. package/agent-assets/docs/concepts/backends-and-tiers.md +66 -31
  20. package/agent-assets/docs/concepts/costs-and-quotas.md +50 -15
  21. package/agent-assets/docs/concepts/delegated-mode.md +52 -13
  22. package/agent-assets/docs/concepts/memory-model.md +72 -32
  23. package/agent-assets/docs/concepts/observations.md +49 -11
  24. package/agent-assets/docs/concepts/process-keys.md +56 -22
  25. package/agent-assets/docs/concepts/routines.md +60 -33
  26. package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
  27. package/agent-assets/docs/concepts/safety-model.md +42 -34
  28. package/agent-assets/docs/concepts/skills.md +33 -17
  29. package/agent-assets/docs/features/integrations/browser-history.md +195 -0
  30. package/agent-assets/docs/features/integrations/calendar.md +39 -29
  31. package/agent-assets/docs/features/integrations/git.md +18 -7
  32. package/agent-assets/docs/features/integrations/github.md +84 -33
  33. package/agent-assets/docs/features/integrations/mail.md +59 -16
  34. package/agent-assets/docs/features/integrations/notion.md +18 -6
  35. package/agent-assets/docs/features/integrations/obsidian.md +28 -5
  36. package/agent-assets/docs/features/lifestyle/git.md +42 -38
  37. package/agent-assets/docs/features/lifestyle/reading.md +50 -22
  38. package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
  39. package/agent-assets/docs/features/lifestyle/travel-bookings.md +76 -14
  40. package/agent-assets/docs/features/memory-files/agent-journal.md +111 -50
  41. package/agent-assets/docs/features/memory-files/projects.md +71 -17
  42. package/agent-assets/docs/features/memory-files/roadmap.md +50 -10
  43. package/agent-assets/docs/features/memory-files/schedule.md +113 -70
  44. package/agent-assets/docs/features/memory-files/today.md +46 -21
  45. package/agent-assets/docs/features/memory-files/user-profile.md +63 -33
  46. package/agent-assets/docs/features/messaging/bang-commands.md +113 -36
  47. package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
  48. package/agent-assets/docs/features/messaging/discord.md +35 -4
  49. package/agent-assets/docs/features/messaging/overview.md +37 -19
  50. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
  51. package/agent-assets/docs/features/messaging/slack.md +67 -14
  52. package/agent-assets/docs/features/messaging/telegram.md +18 -5
  53. package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
  54. package/agent-assets/docs/features/operations/activity-and-conversations.md +44 -15
  55. package/agent-assets/docs/features/operations/approvals.md +48 -16
  56. package/agent-assets/docs/features/operations/backend-routing.md +68 -16
  57. package/agent-assets/docs/features/operations/cost-tracking.md +84 -17
  58. package/agent-assets/docs/features/operations/managed-chromium.md +221 -0
  59. package/agent-assets/docs/features/operations/notifications.md +52 -11
  60. package/agent-assets/docs/features/operations/quiet-hours.md +63 -40
  61. package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
  62. package/agent-assets/docs/features/routines/custom-routines.md +88 -20
  63. package/agent-assets/docs/features/routines/evening-review.md +74 -21
  64. package/agent-assets/docs/features/routines/hourly-check.md +149 -29
  65. package/agent-assets/docs/features/routines/morning-routine.md +53 -35
  66. package/agent-assets/docs/features/routines/weekly-review.md +40 -21
  67. package/agent-assets/docs/features/wiki/commands.md +26 -16
  68. package/agent-assets/docs/features/wiki/cost-and-approval.md +240 -0
  69. package/agent-assets/docs/features/wiki/dashboard.md +255 -0
  70. package/agent-assets/docs/features/wiki/overview.md +68 -10
  71. package/agent-assets/docs/features/wiki/search.md +248 -0
  72. package/agent-assets/docs/features/wiki/workspaces.md +254 -0
  73. package/agent-assets/docs/getting-started/01-what-is-this.md +34 -23
  74. package/agent-assets/docs/getting-started/02-first-steps.md +13 -8
  75. package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
  76. package/agent-assets/docs/getting-started/04-first-day.md +38 -20
  77. package/agent-assets/docs/glossary.md +235 -24
  78. package/agent-assets/docs/guides/add-a-custom-routine.md +63 -23
  79. package/agent-assets/docs/guides/backup-and-restore.md +80 -16
  80. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +56 -25
  81. package/agent-assets/docs/guides/build-your-wiki.md +22 -9
  82. package/agent-assets/docs/guides/change-which-model-handles-x.md +64 -10
  83. package/agent-assets/docs/guides/connect-a-new-mail-account.md +64 -15
  84. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +28 -11
  85. package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
  86. package/agent-assets/docs/guides/install-and-run.md +48 -19
  87. package/agent-assets/docs/guides/maintain-wiki-health.md +35 -10
  88. package/agent-assets/docs/guides/migrate-machines.md +74 -18
  89. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +111 -60
  90. package/agent-assets/docs/guides/pause-the-agent.md +65 -24
  91. package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
  92. package/agent-assets/docs/guides/setup-wizard.md +113 -54
  93. package/agent-assets/docs/guides/switch-default-backend.md +62 -16
  94. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +26 -10
  95. package/agent-assets/docs/reference/api.md +143 -32
  96. package/agent-assets/docs/reference/cli-commands.md +38 -17
  97. package/agent-assets/docs/reference/config.md +224 -49
  98. package/agent-assets/docs/reference/disallowed-tools.md +29 -10
  99. package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
  100. package/agent-assets/docs/reference/knowledge-layout.md +620 -0
  101. package/agent-assets/docs/reference/process-keys.md +61 -5
  102. package/agent-assets/docs/reference/skills.md +38 -12
  103. package/agent-assets/docs/troubleshooting/auth-failed.md +48 -19
  104. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +90 -28
  105. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +86 -22
  106. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +68 -24
  107. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +80 -20
  108. package/agent-assets/docs/troubleshooting/observation-not-detected.md +73 -21
  109. package/agent-assets/docs/troubleshooting/quota-exhausted.md +29 -5
  110. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +126 -54
  111. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +29 -12
  112. package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
  113. package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +1 -1
  114. package/agent-assets/optimizer-skills/skill-curation/SKILL.md +1 -1
  115. package/agent-assets/sandbox/linux/aitne-chromium.apparmor +91 -0
  116. package/agent-assets/sandbox/macos/aitne-chromium.sb +156 -0
  117. package/agent-assets/skills/agent-actions/SKILL.md +2 -2
  118. package/agent-assets/skills/agent-create/SKILL.md +149 -0
  119. package/agent-assets/skills/attach/SKILL.md +2 -2
  120. package/agent-assets/skills/browser-history/SKILL.md +198 -0
  121. package/agent-assets/skills/browser-history-respond/SKILL.md +106 -0
  122. package/agent-assets/skills/browser-task/SKILL.md +169 -0
  123. package/agent-assets/skills/context/SKILL.md +12 -12
  124. package/agent-assets/skills/context/curation.json +2 -2
  125. package/agent-assets/skills/context/references/api.md +43 -31
  126. package/agent-assets/skills/context/references/required-frontmatter.md +3 -3
  127. package/agent-assets/skills/context/references/snapshot-files.md +6 -6
  128. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +3 -3
  129. package/agent-assets/skills/docs-search/SKILL.md +4 -3
  130. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +11 -21
  131. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +11 -21
  132. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +11 -21
  133. package/agent-assets/skills/external-services/SKILL.md +3 -3
  134. package/agent-assets/skills/external-services/SKILL.native.claude.md +5 -5
  135. package/agent-assets/skills/external-services/SKILL.native.codex.md +7 -7
  136. package/agent-assets/skills/external-services/SKILL.native.gemini.md +4 -4
  137. package/agent-assets/skills/external-services/references/calendar-apple.md +2 -2
  138. package/agent-assets/skills/external-services/references/calendar-outlook.md +1 -1
  139. package/agent-assets/skills/external-services/references/obsidian.md +2 -2
  140. package/agent-assets/skills/gmail-lifestyle/SKILL.md +9 -82
  141. package/agent-assets/skills/mail/SKILL.delegated.claude.md +14 -5
  142. package/agent-assets/skills/mail/SKILL.delegated.codex.md +8 -4
  143. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +8 -4
  144. package/agent-assets/skills/mail/references/api.md +4 -2
  145. package/agent-assets/skills/mail/references/providers.md +1 -1
  146. package/agent-assets/skills/managed-tasks/SKILL.md +9 -9
  147. package/agent-assets/skills/managed-tasks/references/errors.md +9 -6
  148. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +1 -1
  149. package/agent-assets/skills/management-policy/SKILL.md +32 -31
  150. package/agent-assets/skills/management-policy/curation.json +1 -1
  151. package/agent-assets/skills/management-policy/references/policy-workflow.md +9 -9
  152. package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
  153. package/agent-assets/skills/notify/SKILL.md +4 -4
  154. package/agent-assets/skills/notify/references/priority.md +9 -4
  155. package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
  156. package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
  157. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
  158. package/agent-assets/skills/notion/SKILL.native.claude.md +10 -6
  159. package/agent-assets/skills/notion/SKILL.native.codex.md +9 -4
  160. package/agent-assets/skills/notion/SKILL.native.gemini.md +9 -4
  161. package/agent-assets/skills/observations/SKILL.md +24 -8
  162. package/agent-assets/skills/project-doc/SKILL.md +1 -1
  163. package/agent-assets/skills/project-doc/curation.json +3 -3
  164. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +7 -4
  165. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
  166. package/agent-assets/skills/reading/SKILL.md +10 -0
  167. package/agent-assets/skills/reading/references/reading-taste.md +2 -2
  168. package/agent-assets/skills/roadmap/SKILL.md +5 -5
  169. package/agent-assets/skills/roadmap/curation.json +1 -1
  170. package/agent-assets/skills/roadmap/references/api.md +7 -7
  171. package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
  172. package/agent-assets/skills/roadmap/references/migration.md +4 -4
  173. package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
  174. package/agent-assets/skills/schedule/SKILL.md +42 -34
  175. package/agent-assets/skills/schedule/references/batch.md +2 -2
  176. package/agent-assets/skills/schedule/references/errors.md +7 -4
  177. package/agent-assets/skills/schedule/references/model-selection.md +3 -3
  178. package/agent-assets/skills/schedule/references/recurrence-rule.md +1 -1
  179. package/agent-assets/skills/scheduled-managed-task/SKILL.md +46 -36
  180. package/agent-assets/skills/today/SKILL.md +9 -9
  181. package/agent-assets/skills/today/curation.json +3 -3
  182. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +6 -5
  183. package/agent-assets/skills/today/seeds/section-shape.seed.json +1 -1
  184. package/agent-assets/skills/user-interview/SKILL.md +12 -9
  185. package/agent-assets/skills/user-interview/references/op-briefing.md +2 -2
  186. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +8 -0
  187. package/agent-assets/skills/user-profile/SKILL.md +17 -17
  188. package/agent-assets/skills/user-profile/curation.json +2 -2
  189. package/agent-assets/skills/user-profile/references/character-preferences.md +2 -2
  190. package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
  191. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +6 -6
  192. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +4 -4
  193. package/agent-assets/system-prompts/routine-fetch-window.md +22 -12
  194. package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +4 -2
  195. package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +4 -2
  196. package/agent-assets/task-flows/_partials/capture-user-info.md +2 -2
  197. package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +1 -1
  198. package/agent-assets/task-flows/_partials/dm-intent.project.md +9 -9
  199. package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +3 -2
  200. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +10 -5
  201. package/agent-assets/task-flows/browser_task.md +84 -0
  202. package/agent-assets/task-flows/github.assigned.md +1 -1
  203. package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
  204. package/agent-assets/task-flows/github.workflow_run.failed.md +2 -2
  205. package/agent-assets/task-flows/knowledge.import.md +14 -14
  206. package/agent-assets/task-flows/message.received.dm.md +9 -4
  207. package/agent-assets/task-flows/message.received.dm_first.md +3 -3
  208. package/agent-assets/task-flows/routine.custom.md +3 -3
  209. package/agent-assets/task-flows/routine.evening_review.md +8 -8
  210. package/agent-assets/task-flows/routine.fetch_window.md +2 -2
  211. package/agent-assets/task-flows/routine.hourly_check.md +16 -12
  212. package/agent-assets/task-flows/routine.monthly_review.md +21 -21
  213. package/agent-assets/task-flows/routine.morning_routine_journal.md +119 -97
  214. package/agent-assets/task-flows/routine.morning_routine_today.md +43 -43
  215. package/agent-assets/task-flows/routine.research_cluster_update.md +35 -0
  216. package/agent-assets/task-flows/routine.research_dispatch.md +38 -0
  217. package/agent-assets/task-flows/routine.research_offer_dm.md +125 -0
  218. package/agent-assets/task-flows/routine.research_wiki_summary.md +53 -0
  219. package/agent-assets/task-flows/routine.roadmap_refresh.md +10 -10
  220. package/agent-assets/task-flows/routine.today_refresh.md +4 -4
  221. package/agent-assets/task-flows/routine.user_profile_sweep.md +10 -10
  222. package/agent-assets/task-flows/routine.weekly_review.md +93 -24
  223. package/agent-assets/task-flows/schedule.approaching.md +0 -1
  224. package/agent-assets/task-flows/scheduled.dm.md +5 -5
  225. package/agent-assets/task-flows/scheduled.task.md +4 -4
  226. package/agent-assets/task-flows/setup.initial.md +21 -21
  227. package/agent-assets/task-flows/setup.update.md +2 -2
  228. package/agent-assets/templates/README.md +27 -20
  229. package/agent-assets/templates/_index.md +42 -26
  230. package/agent-assets/templates/_manifest.json +34 -99
  231. package/agent-assets/templates/{user → identity}/_index.md +1 -1
  232. package/agent-assets/templates/{user → identity}/profile.md +2 -2
  233. package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +1 -1
  234. package/agent-assets/templates/{projects → plans/projects}/_active.base +1 -1
  235. package/agent-assets/templates/policies/_index.md +21 -0
  236. package/agent-assets/templates/{rules → policies}/journal-export.md +1 -1
  237. package/agent-assets/templates/{rules → policies}/journal-format.md +5 -5
  238. package/agent-assets/templates/{rules/policies → policies/management-captures}/_index.md +2 -2
  239. package/agent-assets/templates/{rules → policies}/management.md +3 -3
  240. package/agent-assets/templates/{rules → policies}/mcp.md +1 -1
  241. package/agent-assets/templates/{rules → policies}/redaction.md +1 -1
  242. package/agent-assets/templates/{routines → policies/routines}/_index.md +1 -1
  243. package/agent-assets/templates/{routines → policies/routines}/evening.md +2 -2
  244. package/agent-assets/templates/{routines → policies/routines}/hourly.md +1 -1
  245. package/agent-assets/templates/{routines → policies/routines}/monthly.md +2 -2
  246. package/bin/aitne.mjs +13 -4
  247. package/package.json +5 -4
  248. package/scripts/commands/doctor.mjs +14 -8
  249. package/scripts/commands/run-now.mjs +6 -21
  250. package/scripts/lib/ports.d.mts +27 -0
  251. package/scripts/lib/ports.mjs +36 -0
  252. package/scripts/lib/read-api-token.mjs +176 -0
  253. package/scripts/start.mjs +2 -1
  254. package/agent-assets/docs/features/lifestyle/travel-time.md +0 -58
  255. package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +0 -59
  256. package/agent-assets/skills/schedule/references/recurring.md +0 -185
  257. package/agent-assets/templates/context-index.md +0 -42
  258. package/agent-assets/templates/rules/_index.md +0 -19
  259. /package/agent-assets/templates/{user → identity}/expertise.md +0 -0
  260. /package/agent-assets/templates/{user → identity}/goals.md +0 -0
  261. /package/agent-assets/templates/{user → identity}/people.md +0 -0
  262. /package/agent-assets/templates/{user → identity}/personal.md +0 -0
  263. /package/agent-assets/templates/{user → identity}/work.md +0 -0
  264. /package/agent-assets/templates/{agent/journal.md → journal/agent.md} +0 -0
  265. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/evening.md +0 -0
  266. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/hourly.md +0 -0
  267. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/monthly.md +0 -0
  268. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/morning.md +0 -0
  269. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/roadmap.md +0 -0
  270. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/weekly.md +0 -0
  271. /package/agent-assets/templates/{projects → plans/projects}/_index.md +0 -0
  272. /package/agent-assets/templates/{roadmap.md → plans/roadmap.md} +0 -0
  273. /package/agent-assets/templates/{routines → policies/routines}/morning.md +0 -0
  274. /package/agent-assets/templates/{routines → policies/routines}/weekly.md +0 -0
  275. /package/agent-assets/templates/{agent → state}/profile-questions.md +0 -0
  276. /package/agent-assets/templates/{today.md → state/today.md} +0 -0
@@ -23,22 +23,31 @@ ask_examples:
23
23
  - How do I limit how often it notifies me?
24
24
  locale: en-US
25
25
  created: 2026-04-25
26
- updated: 2026-04-25
26
+ updated: 2026-05-28
27
27
  keywords:
28
28
  - notification
29
29
  - notify
30
30
  - quiet hours
31
31
  - rate limit
32
32
  - notification batch
33
+ - safety category
33
34
  related:
34
35
  - features/operations/quiet-hours
35
36
  - features/operations/approvals
36
37
  - features/messaging/overview
38
+ ui_anchors:
39
+ - /activity?tab=notifications
40
+ - /connections/messaging
37
41
  config_keys:
38
42
  - maxNotificationsPerHour
39
43
  - maxNotificationsPerDay
40
44
  - batchIntervalMinutes
41
45
  - primaryPlatform
46
+ - defaultNotificationPlatforms
47
+ - quietHoursStart
48
+ - quietHoursEnd
49
+ api_endpoints:
50
+ - POST /api/notify
42
51
  ---
43
52
 
44
53
  # Notifications
@@ -50,26 +59,58 @@ by quiet hours and rate limits.
50
59
 
51
60
  ## What It Does
52
61
 
53
- - Routines and observations enqueue notifications.
62
+ - Routines, observations, and approvals enqueue notifications.
54
63
  - Quiet hours hold notifications until the window ends.
55
64
  - Per-hour and per-day rate limits cap the volume.
56
- - Batching folds multiple small alerts into a single message.
65
+ - Batching folds multiple small alerts of the same event type into a
66
+ single message.
67
+
68
+ ## How a Notification Flows
69
+
70
+ 1. A routine, observation, or approval enqueues a notification.
71
+ 2. Quiet hours and rate limits decide whether it is suppressed.
72
+ 3. If it survives, batching may hold it briefly to merge with siblings
73
+ of the same event type; otherwise it is delivered immediately.
74
+ 4. It is sent to the operator over `primaryPlatform` (or, when set, the
75
+ exact channels in `defaultNotificationPlatforms`).
76
+
77
+ ### Safety categories always get through
78
+
79
+ Notifications tagged `security`, `deadline`, `error`, or `critical`
80
+ **bypass quiet hours, rate limits, and batching** — they are delivered
81
+ immediately on at least one paired channel. So even during a quiet-hours
82
+ window or after the hourly cap is spent, a genuine alert still reaches
83
+ you. Replies to a direct message you sent also bypass these gates.
57
84
 
58
85
  ## Configuration
59
86
 
60
- | Setting | Default |
61
- |---|---|
62
- | `maxNotificationsPerHour` | 3 |
63
- | `maxNotificationsPerDay` | 12 |
64
- | `batchIntervalMinutes` | 15 |
65
- | `primaryPlatform` | first paired |
87
+ `PATCH /api/config` keys (defaults shown):
88
+
89
+ | Setting | Default | What it controls |
90
+ |---|---|---|
91
+ | `maxNotificationsPerHour` | 3 | Per-hour cap on non-safety notifications. |
92
+ | `maxNotificationsPerDay` | 12 | Per-day cap on non-safety notifications. |
93
+ | `batchIntervalMinutes` | 15 | Window for folding same-type alerts into one message. |
94
+ | `quietHoursStart` | `"22:00"` | Start of the hold window (local time). |
95
+ | `quietHoursEnd` | `"08:00"` | End of the hold window (local time). |
96
+ | `primaryPlatform` | `"slack"` | Default channel notifications are delivered to. |
97
+ | `defaultNotificationPlatforms` | `[]` (empty) | When non-empty, deliver only to these exact channels instead of the default fan-out. |
98
+
99
+ The agent can also emit a one-off notification via `POST /api/notify`
100
+ (a module capability, not directly agent-forgeable).
66
101
 
67
102
  ## When Something Goes Wrong
68
103
 
69
- - A notification you expected: check the rate-limit counters and the
70
- quiet-hours window.
104
+ - **A notification you expected never arrived:** check the rate-limit
105
+ counters (`maxNotificationsPerHour` / `maxNotificationsPerDay`) and the
106
+ quiet-hours window — a non-safety alert can be suppressed by either.
107
+ Safety-category alerts (`error`/`critical`/`security`/`deadline`) are
108
+ never suppressed, so a missing one points at delivery/pairing instead.
109
+ - **Too many notifications:** lower the per-hour / per-day caps or widen
110
+ the batch window so more small alerts collapse into one message.
71
111
 
72
112
  ## Related
73
113
 
74
114
  - [Quiet Hours](quiet-hours.md)
75
115
  - [Approvals](approvals.md)
116
+ - [Messaging Overview](../messaging/overview.md)
@@ -10,9 +10,9 @@ aliases:
10
10
  - silent hours
11
11
  category: features
12
12
  summary: |
13
- A nightly silent window during which the agent suppresses
14
- notifications. Routines still run, but their output queues until
15
- morning instead of waking you.
13
+ A nightly silent window during which the agent holds back its own
14
+ proactive notifications. Routines still run, reactive DMs still
15
+ reply, and safety-category alerts still wake you.
16
16
  section: operations
17
17
  tags:
18
18
  - operations
@@ -25,21 +25,25 @@ ask_examples:
25
25
  - Will routines still run during quiet hours?
26
26
  locale: en-US
27
27
  created: 2026-04-25
28
- updated: 2026-04-25
28
+ updated: 2026-05-28
29
29
  keywords:
30
30
  - quiet hours
31
31
  - dnd
32
32
  - quietHoursStart
33
33
  - quietHoursEnd
34
+ - batchIntervalMinutes
35
+ - safety category
34
36
  related:
35
37
  - features/operations/notifications
36
38
  - features/operations/approvals
39
+ - features/routines/morning-routine
37
40
  - concepts/agent-day
38
41
  ui_anchors:
39
42
  - /settings/schedule
40
43
  config_keys:
41
44
  - quietHoursStart
42
45
  - quietHoursEnd
46
+ - batchIntervalMinutes
43
47
  ---
44
48
 
45
49
  # Quiet Hours
@@ -47,60 +51,79 @@ config_keys:
47
51
  ## In One Sentence
48
52
 
49
53
  Set a nightly window (default 22:00 → 08:00) during which the agent
50
- batches notifications instead of pushing them to the messaging app
51
- in real time.
54
+ holds back its proactive notifications instead of pushing them to your
55
+ messaging app in real time — while reactive replies and safety-category
56
+ alerts still get through.
52
57
 
53
58
  ## What It Does
54
59
 
55
- During quiet hours:
56
-
57
- - **Notifications** are queued, not sent. They flush at the end of the
58
- window or get folded into the morning routine's "good morning" message.
59
- - **Routines** keep running. The morning routine fires at
60
- `dayBoundaryHour` (the same time the agent-day rolls over) even
61
- if that falls inside quiet hours, the routine runs and its output
62
- is batched until the window ends.
63
- - **Reactive DMs** still respond. Quiet hours only suppress
64
- *agent-initiated* messages.
60
+ Quiet hours only gate *agent-initiated* proactive notifications. During
61
+ the window:
62
+
63
+ - **A normal proactive notification is suppressed.** If nothing of the
64
+ same event type was sent recently, the message goes straight to the
65
+ notification path, sees that it is quiet hours, and is logged as
66
+ `suppressed` it is **dropped, not held**. You will not receive it
67
+ later.
68
+ - **A notification already in a batch queue is deferred, not dropped.**
69
+ Aitne batches repeat notifications of the same event type within
70
+ `batchIntervalMinutes`. When a batch is pending and quiet hours are
71
+ active, the flush is pushed to the wall-clock moment the window ends,
72
+ so that combined message arrives when you wake instead of being
73
+ suppressed.
74
+ - **Reactive DMs still respond.** A direct reply to your message
75
+ bypasses quiet hours, rate limits, and batching entirely.
76
+ - **Safety-category alerts still wake you.** Notifications tagged
77
+ `security`, `deadline`, `error`, or `critical` (and any `critical`-
78
+ priority event) bypass the quiet-hours gate. There is no separate
79
+ "notify anyway" toggle — the category *is* the override.
80
+ - **Routines keep running.** The morning routine fires at
81
+ `dayBoundaryHour` (the same time the agent-day rolls over). With the
82
+ defaults — boundary `04`, quiet hours `22:00`→`08:00` — that 04:00 run
83
+ lands inside quiet hours, so it runs normally but its proactive output
84
+ is held back or suppressed like any other notification.
65
85
 
66
86
  ## When It Runs / How It Is Triggered
67
87
 
68
- Continuously. Every notification dispatcher checks `quietHoursStart`
69
- and `quietHoursEnd` against the current local time before sending.
70
- The window is allowed to wrap midnight (22:00 → 08:00 is the default
71
- shape).
72
-
73
- ## What It Outputs
74
-
75
- - An empty notification queue during the window.
76
- - A consolidated "while you were away" summary at flush time when
77
- many notifications batched up.
88
+ Continuously. Every proactive notification checks `quietHoursStart` and
89
+ `quietHoursEnd` against the current local time (in the configured
90
+ timezone) before sending. The window may wrap midnight the default
91
+ `22:00` → `08:00` is an overnight shape. Setting start equal to end
92
+ (e.g. `00:00` / `00:00`) disables quiet hours.
78
93
 
79
94
  ## Where in the Dashboard
80
95
 
81
- - **Settings → Schedule** holds `quietHoursStart` and `quietHoursEnd`.
82
- The form refuses windows that overlap the active hours.
96
+ **Settings → Schedule** holds `quietHoursStart` and `quietHoursEnd`,
97
+ shown as a red band on the same 24-hour slider as the hourly-check
98
+ active window. There is **no overlap validation** — quiet hours and the
99
+ active window are allowed to overlap, and the morning routine fires
100
+ regardless of where the bands sit.
83
101
 
84
102
  ## Configuration
85
103
 
86
104
  | Setting | Default | Notes |
87
105
  |---|---|---|
88
- | `quietHoursStart` | `"22:00"` | `HH:MM` local time string. |
89
- | `quietHoursEnd` | `"08:00"` | `HH:MM` local time string. |
90
- | `batchIntervalMinutes` | `15` | How often the batched flush runs once awake. |
106
+ | `quietHoursStart` | `"22:00"` | `HH:MM` 24-hour local-time string. Set equal to `quietHoursEnd` to disable. |
107
+ | `quietHoursEnd` | `"08:00"` | `HH:MM` 24-hour local-time string. May be earlier than start (overnight window). |
108
+ | `batchIntervalMinutes` | `15` | How often a pending batch flushes. During quiet hours the flush is deferred to the window end. |
91
109
 
92
110
  ## When Something Goes Wrong
93
111
 
94
- - An **important** notification that you expected to wake you
95
- during quiet hours: Aitne does not have a notify-anyway
96
- override yet (Approvals are the only thing that bypass quiet hours).
97
- If you need real-time night alerts for, say, a critical mail label,
98
- the workaround is to disable quiet hours.
99
- - A notification that fired *after* the window ended but feels stale:
100
- check `batchIntervalMinutes` if you set it long, the flush can
101
- lag the window end by several minutes.
112
+ - **You expected an important alert to wake you but nothing came.**
113
+ Only the safety categories (`security`, `deadline`, `error`,
114
+ `critical`) bypass quiet hours. A regular proactive notification that
115
+ isn't already batched is dropped, not delayed. If you need real-time
116
+ night alerts for, say, a critical mail label, either ensure that path
117
+ emits a safety-category notification or disable quiet hours.
118
+ - **A notification fired after the window ended but feels stale.**
119
+ Check `batchIntervalMinutes` a long interval means a deferred batch
120
+ flush can lag the window end by several minutes. The deferral targets
121
+ the exact window-end minute, then the cooldown applies on top.
102
122
 
103
123
  ## Related
104
124
 
105
125
  - [Notifications](notifications.md) — the broader notification model.
106
- - [Approvals](approvals.md) — the only tier that bypasses quiet hours.
126
+ - [Approvals](approvals.md) — the bearer-token approval tier (distinct
127
+ from the safety-category bypass above).
128
+ - [Morning Routine](../routines/morning-routine.md) — why the 04:00 run
129
+ lands inside the default quiet window.
@@ -8,29 +8,37 @@ aliases:
8
8
  - approaching event
9
9
  category: features
10
10
  summary: |
11
- Lightweight pre-event nudges fire when a calendar event is close
12
- enough to remind the operator about. The 15-minute lead time is
13
- fixed in code today.
11
+ Lightweight pre-event nudges fire ~15 minutes before each calendar
12
+ event. The lead time is fixed in code today (no config key). Works
13
+ in direct, delegated, and native integration modes; only disabled
14
+ mode suppresses reminders.
14
15
  section: operations
15
16
  tags:
16
17
  - operations
17
18
  - calendar
18
19
  - notifications
20
+ - scheduler
21
+ - observations
19
22
  status: stable
20
23
  ask_examples:
21
24
  - How does the agent remind me about meetings?
22
25
  - What is the pre-event reminder lead time?
26
+ - Why didn't I get a reminder before my meeting?
23
27
  locale: en-US
24
28
  created: 2026-04-25
25
- updated: 2026-04-25
29
+ updated: 2026-05-28
26
30
  keywords:
27
31
  - schedule approaching
28
32
  - pre-event reminder
29
- - departure time
30
- - ETA reminder
33
+ - imminent event
34
+ - meeting reminder
35
+ - lead time
36
+ process_keys:
37
+ - schedule.approaching
31
38
  related:
32
39
  - features/integrations/calendar
33
40
  - features/operations/notifications
41
+ - concepts/observations
34
42
  ---
35
43
 
36
44
  # Schedule Approaching
@@ -41,33 +49,55 @@ Pre-event reminders fire 15 minutes before each calendar event.
41
49
 
42
50
  ## What It Does
43
51
 
44
- - Watches the calendar event queue.
45
- - Fires a notification ~15 minutes before each event (fixed in
46
- `imminent-event-scheduler.ts`; not currently a config key).
47
- - Optionally includes the travel-time estimate when the event has
48
- a location and the travel-time skill is enabled.
49
- - Deduplicates via the `imminent_event_notifications` table so the
50
- same event never fires twice across reschedules / poll cycles.
52
+ - Watches upcoming calendar events and fires a notification ~15
53
+ minutes before each one. The lead time is fixed in
54
+ `imminent-event-scheduler.ts` (not a config key today).
55
+ - Emits one `schedule.approaching` event per item via the EventBus
56
+ when the event is `≤ 15 minutes` away. The event is handled at the
57
+ `medium` tier.
58
+ - Deduplicates via the `imminent_event_notifications` table, keyed on
59
+ the provider's stable event id, so the same event never fires twice
60
+ across reschedules, restarts, or repeated poll cycles. Rows are
61
+ pruned after 24 hours.
51
62
 
52
- ## When It Runs / How It Is Triggered
63
+ ## How It Is Triggered
53
64
 
54
- The scheduler keeps a sorted view of upcoming events from the
55
- `integration_snapshots` table and emits one `schedule.approaching`
56
- event per item via the EventBus when the event is ≤ 15 minutes away.
65
+ The scheduler ticks every 60 seconds and reads two sources for events
66
+ in the `[now, now + 15min]` window, depending on the calendar
67
+ integration mode:
68
+
69
+ - **`direct` and `delegated` modes** — events come from the
70
+ `integration_snapshots` table (written by the calendar poller in
71
+ direct mode and the delegated-sync worker in delegated mode).
72
+ - **`native` mode** — the daemon does not poll, so it reads
73
+ `observations` rows instead. These are posted by the agent's
74
+ native-mode `routine.fetch_window` pre-pass. Because that pre-pass
75
+ refreshes on the hourly-check tick (~60-minute cadence), events
76
+ scheduled with less than ~60 minutes of lead time may miss their
77
+ reminder. Direct mode (5-minute poll) does not have this limit.
78
+
79
+ Cross-source dedup is automatic: snapshot and observation rows for the
80
+ same event share the provider's event id, so they collapse into one
81
+ `imminent_event_notifications` entry.
57
82
 
58
83
  ## Where in the Dashboard
59
84
 
60
- - Reminders surface on the connected messaging app and in the
61
- Activity feed. There is no dashboard setting for lead time today.
85
+ Reminders surface on the connected messaging app and in the Activity
86
+ feed. There is no dashboard setting for the lead time today.
62
87
 
63
88
  ## When Something Goes Wrong
64
89
 
65
- - A reminder you expected: confirm the calendar integration is
66
- reading the right calendar (some operators have multiple), and
67
- that the calendar is running in `direct` mode in `delegated` /
68
- `native` / `disabled` modes the daemon does not emit approaching
69
- reminders.
90
+ If a reminder you expected never arrived:
91
+
92
+ - Confirm the calendar integration is reading the right calendar
93
+ some operators connect several.
94
+ - Check the integration mode. Reminders fire in `direct`, `delegated`,
95
+ and `native` modes; only `disabled` mode suppresses them entirely.
96
+ - In `native` mode, short-notice events (< ~60 min lead time) can be
97
+ missed because observations refresh on the hourly-check cadence.
70
98
 
71
99
  ## Related
72
100
 
73
101
  - [Calendar](../integrations/calendar.md)
102
+ - [Notifications](notifications.md)
103
+ - [Observations](../../concepts/observations.md)
@@ -11,69 +11,104 @@ category: features
11
11
  summary: |
12
12
  Beyond the built-in morning / evening / weekly / hourly routines,
13
13
  the operator can define custom routines that fire on any cron
14
- schedule.
14
+ schedule. Each routine is a Markdown file under
15
+ policies/routines/custom/, runs under the tier the operator picks,
16
+ and is bounded by the same safety layers as the built-ins.
15
17
  section: routines
16
18
  tags:
17
19
  - routines
18
20
  - autonomous
21
+ - scheduler
22
+ - core
19
23
  - advanced
20
24
  status: stable
21
25
  ask_examples:
22
26
  - How do I add a custom routine?
23
27
  - What can a custom routine do?
24
28
  - Can I disable a custom routine?
29
+ - Which tier does a custom routine run under?
25
30
  locale: en-US
26
31
  created: 2026-04-25
27
- updated: 2026-04-25
32
+ updated: 2026-05-28
28
33
  keywords:
29
34
  - custom routine
30
35
  - routine.custom.<slug>
31
36
  - user-defined routine
32
37
  - scheduled task
33
38
  - recurring schedule
39
+ - cron routine
34
40
  related:
35
41
  - guides/add-a-custom-routine
36
42
  - concepts/routines
43
+ - features/memory-files/schedule
44
+ prerequisites:
45
+ - concepts/routines
37
46
  process_keys:
38
47
  - routine.custom.<slug>
48
+ context_files:
49
+ - policies/routines/custom/<slug>.md
50
+ api_endpoints:
51
+ - PUT /api/context/*
52
+ - POST /api/recurring-schedules
53
+ ui_anchors:
54
+ - /settings/routines
55
+ - /connections/routines
39
56
  ---
40
57
 
41
58
  # Custom Routines
42
59
 
43
60
  ## In One Sentence
44
61
 
45
- Operator-defined routines fire at any cron schedule, run under the
46
- backend the operator picks (light / heavy tier), and are bounded by
47
- the same safety layers as the built-ins.
62
+ Operator-defined routines fire on any cron schedule, run under the
63
+ tier the operator picks (`lite` / `medium` / `high`), and are bounded
64
+ by the same safety layers as the built-ins.
48
65
 
49
66
  ## What It Does
50
67
 
51
- - Runs a vault-file-defined check list at a cron schedule.
68
+ - Runs a vault-file-defined check list on a cron schedule.
52
69
  - Resolves the backend at fire time from the chosen tier (no concrete
53
70
  model picker — tier resolution mirrors the built-in routines).
54
71
  - Logs its run to Activity exactly like a built-in routine.
55
72
 
56
- ## When It Runs / How It Is Triggered
73
+ ## When It Runs
57
74
 
58
75
  The cron expression in the routine's vault file
59
- `routines/custom/<slug>.md`. The custom-routine scheduler watches the
60
- file and re-reads the frontmatter on every change.
76
+ `policies/routines/custom/<slug>.md` drives the cadence. The scheduler
77
+ wires one `node-cron` job per enabled routine at startup and fires a
78
+ `routine.custom.<slug>` event on each tick.
79
+
80
+ It is a **standard 5-field cron expression** (`min hour day-of-month
81
+ month day-of-week`); for example `0 11 * * 2` is every Tuesday at
82
+ 11:00 local time, in your configured timezone.
83
+
84
+ ## How Changes Are Picked Up
85
+
86
+ There is **no filesystem watcher**. The scheduler reloads only when a
87
+ write goes through the context API — a `PUT` / `PATCH` / `DELETE`
88
+ under `policies/routines/custom/` triggers an automatic re-diff of the
89
+ registered jobs against what is on disk, so edits made through the
90
+ dashboard, the API, or the agent take effect without a daemon restart.
91
+
92
+ A raw file edit that bypasses the API (for example, opening the `.md`
93
+ in an external editor) is *not* picked up until the next API write to
94
+ that directory or a daemon restart. Prefer editing through **Settings
95
+ → Routines** or the context API.
61
96
 
62
97
  ## What It Outputs
63
98
 
64
99
  - Whatever the check list produces — a context-file write, a
65
- notification, a no-op.
100
+ notification, or a no-op.
66
101
 
67
102
  ## Where in the Dashboard
68
103
 
69
- - **Settings → Routines** is the operator surface for adding,
70
- editing, and disabling. (The `/connections/routines` URL is a
71
- back-compat alias that redirects here.)
104
+ - **Settings → Routines** (`/settings/routines`) is the operator
105
+ surface for adding, editing, and disabling. `/connections/routines`
106
+ is an equivalent page that opens the same surface.
72
107
 
73
108
  ## Configuration
74
109
 
75
110
  Each custom routine is a Markdown file under
76
- `~/.personal-agent/context/routines/custom/<slug>.md` whose
111
+ `~/.personal-agent/context/policies/routines/custom/<slug>.md` whose
77
112
  frontmatter carries:
78
113
 
79
114
  | Field | Type | Notes |
@@ -82,13 +117,46 @@ frontmatter carries:
82
117
  | `slug` | string | Kebab-case; matches the file stem and the ProcessKey suffix. |
83
118
  | `cron` | string | Standard 5-field cron expression (e.g. `0 11 * * 2`). |
84
119
  | `process_key` | `routine.custom.<slug>` | Must match the slug. |
85
- | `enabled` | boolean | Disable without deleting by setting `false`. |
86
- | `backend_tier` | `light` \| `heavy` | Drives BackendRouter tier resolution. |
87
- | `max_budget_usd` | number | Per-execute USD cap (e.g. `0.05`). |
120
+ | `enabled` | boolean (`true` / `false`) | Disable without deleting by setting `false`. |
121
+ | `backend_tier` | `lite` \| `medium` \| `high` | Drives BackendRouter tier resolution. Legacy `light` (→ `medium`) and `heavy` (→ `high`) are still accepted for files written before the rename. |
122
+ | `max_budget_usd` | number | Per-execute USD cap; must be a positive number (e.g. `0.05`). |
123
+
124
+ Every field above is required; the body must contain a `## Checks`
125
+ section — a routine that is missing any of them is rejected at write
126
+ time with a validation error.
127
+
128
+ The `## Checks` section is the list the agent runs through on each
129
+ fire. To change a routine, write through the context API (the
130
+ dashboard, the API, or the agent), which triggers an automatic reload
131
+ as described above — no daemon restart is needed.
132
+
133
+ ### Example
134
+
135
+ A `tuesday-standup-prep` routine at
136
+ `policies/routines/custom/tuesday-standup-prep.md`:
137
+
138
+ ```markdown
139
+ ---
140
+ type: rule
141
+ slug: tuesday-standup-prep
142
+ cron: "0 11 * * 2"
143
+ process_key: routine.custom.tuesday-standup-prep
144
+ enabled: true
145
+ backend_tier: medium
146
+ max_budget_usd: 0.10
147
+ ---
148
+
149
+ ## Checks
150
+
151
+ - Summarize commits I pushed since last Tuesday.
152
+ - List any calendar events for the rest of the week that mention
153
+ "standup" or "review".
154
+ - If there is anything noteworthy, DM me a short prep note.
155
+ ```
88
156
 
89
- The body holds the `## Checks` section the agent runs through on each
90
- fire. Hand-editing the file is fully supported the watcher picks up
91
- changes without a daemon restart.
157
+ This fires every Tuesday at 11:00 (your configured timezone), runs
158
+ under the `medium` tier (Sonnet on the Claude backend), and stops
159
+ spending once the run reaches $0.10.
92
160
 
93
161
  > **Distinct from `recurring_schedules`.** The `recurring_schedules`
94
162
  > table powers DM-style scheduled tasks (`agent.task` /