@aitne-sh/aitne 0.1.9 → 0.1.11

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 (218) hide show
  1. package/README.md +41 -11
  2. package/agent-assets/agent-profiles/background-task.md +53 -0
  3. package/agent-assets/agent-profiles/conversational.md +1 -0
  4. package/agent-assets/agent-profiles/routine-fetch-window.md +14 -75
  5. package/agent-assets/agent-profiles/routine.md +1 -1
  6. package/agent-assets/agents/{hourly-check → activity-scan}/agent.md +22 -17
  7. package/agent-assets/agents/monthly-review/agent.md +6 -5
  8. package/agent-assets/docs/concepts/agent-day.md +6 -7
  9. package/agent-assets/docs/concepts/auth-health.md +23 -20
  10. package/agent-assets/docs/concepts/backends-and-tiers.md +13 -9
  11. package/agent-assets/docs/concepts/costs-and-quotas.md +14 -12
  12. package/agent-assets/docs/concepts/delegated-mode.md +18 -17
  13. package/agent-assets/docs/concepts/memory-model.md +16 -9
  14. package/agent-assets/docs/concepts/observations.md +24 -20
  15. package/agent-assets/docs/concepts/process-keys.md +10 -9
  16. package/agent-assets/docs/concepts/routines.md +34 -31
  17. package/agent-assets/docs/concepts/safety-and-execution.md +11 -7
  18. package/agent-assets/docs/concepts/safety-model.md +39 -25
  19. package/agent-assets/docs/concepts/skills.md +12 -10
  20. package/agent-assets/docs/features/integrations/browser-history.md +23 -18
  21. package/agent-assets/docs/features/integrations/calendar.md +28 -17
  22. package/agent-assets/docs/features/integrations/git.md +13 -11
  23. package/agent-assets/docs/features/integrations/github.md +22 -14
  24. package/agent-assets/docs/features/integrations/mail.md +25 -22
  25. package/agent-assets/docs/features/integrations/notion.md +35 -11
  26. package/agent-assets/docs/features/integrations/obsidian.md +8 -8
  27. package/agent-assets/docs/features/lifestyle/git.md +27 -23
  28. package/agent-assets/docs/features/lifestyle/reading.md +20 -11
  29. package/agent-assets/docs/features/lifestyle/receipts.md +11 -10
  30. package/agent-assets/docs/features/lifestyle/travel-bookings.md +4 -3
  31. package/agent-assets/docs/features/memory-files/agent-journal.md +53 -26
  32. package/agent-assets/docs/features/memory-files/agent-lessons.md +178 -0
  33. package/agent-assets/docs/features/memory-files/projects.md +11 -8
  34. package/agent-assets/docs/features/memory-files/roadmap.md +17 -14
  35. package/agent-assets/docs/features/memory-files/schedule.md +6 -3
  36. package/agent-assets/docs/features/memory-files/today.md +10 -7
  37. package/agent-assets/docs/features/memory-files/user-profile.md +14 -9
  38. package/agent-assets/docs/features/messaging/bang-commands.md +21 -6
  39. package/agent-assets/docs/features/messaging/overview.md +17 -14
  40. package/agent-assets/docs/features/messaging/telegram.md +10 -9
  41. package/agent-assets/docs/features/operations/activity-and-conversations.md +6 -5
  42. package/agent-assets/docs/features/operations/approvals.md +6 -5
  43. package/agent-assets/docs/features/operations/browser-tasks.md +184 -0
  44. package/agent-assets/docs/features/operations/cost-tracking.md +11 -1
  45. package/agent-assets/docs/features/operations/managed-chromium.md +4 -2
  46. package/agent-assets/docs/features/operations/notifications.md +11 -1
  47. package/agent-assets/docs/features/operations/quiet-hours.md +41 -11
  48. package/agent-assets/docs/features/operations/schedule-approaching.md +2 -2
  49. package/agent-assets/docs/features/routines/activity-scan.md +220 -0
  50. package/agent-assets/docs/features/routines/custom-routines.md +82 -134
  51. package/agent-assets/docs/features/routines/evening-review.md +23 -13
  52. package/agent-assets/docs/features/routines/morning-routine.md +7 -5
  53. package/agent-assets/docs/features/routines/weekly-review.md +24 -3
  54. package/agent-assets/docs/features/wiki/commands.md +4 -4
  55. package/agent-assets/docs/features/wiki/cost-and-approval.md +4 -3
  56. package/agent-assets/docs/features/wiki/dashboard.md +7 -6
  57. package/agent-assets/docs/features/wiki/overview.md +3 -3
  58. package/agent-assets/docs/features/wiki/search.md +5 -5
  59. package/agent-assets/docs/features/wiki/workspaces.md +2 -2
  60. package/agent-assets/docs/getting-started/01-what-is-this.md +3 -3
  61. package/agent-assets/docs/getting-started/02-first-steps.md +5 -3
  62. package/agent-assets/docs/getting-started/04-first-day.md +27 -30
  63. package/agent-assets/docs/glossary.md +8 -8
  64. package/agent-assets/docs/guides/add-a-custom-routine.md +122 -68
  65. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +2 -2
  66. package/agent-assets/docs/guides/connect-a-new-mail-account.md +4 -2
  67. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +5 -4
  68. package/agent-assets/docs/guides/install-and-run.md +2 -2
  69. package/agent-assets/docs/guides/maintain-wiki-health.md +2 -2
  70. package/agent-assets/docs/guides/pause-the-agent.md +27 -21
  71. package/agent-assets/docs/guides/reinstall-cleanly.md +2 -0
  72. package/agent-assets/docs/guides/setup-wizard.md +12 -6
  73. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +6 -6
  74. package/agent-assets/docs/reference/api.md +26 -5
  75. package/agent-assets/docs/reference/cli-commands.md +3 -3
  76. package/agent-assets/docs/reference/config.md +51 -24
  77. package/agent-assets/docs/reference/disallowed-tools.md +6 -4
  78. package/agent-assets/docs/reference/keyboard-shortcuts.md +2 -2
  79. package/agent-assets/docs/reference/knowledge-layout.md +25 -12
  80. package/agent-assets/docs/reference/process-keys.md +9 -9
  81. package/agent-assets/docs/reference/skills.md +10 -6
  82. package/agent-assets/docs/troubleshooting/auth-failed.md +9 -8
  83. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +16 -9
  84. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +2 -2
  85. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +32 -16
  86. package/agent-assets/docs/troubleshooting/observation-not-detected.md +26 -24
  87. package/agent-assets/docs/troubleshooting/quota-exhausted.md +7 -6
  88. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +3 -3
  89. package/agent-assets/skills/agent-actions/SKILL.md +23 -39
  90. package/agent-assets/skills/agent-create/SKILL.md +26 -6
  91. package/agent-assets/skills/attach/SKILL.md +8 -27
  92. package/agent-assets/skills/background-task/SKILL.md +184 -0
  93. package/agent-assets/skills/background-task-reply/SKILL.md +100 -0
  94. package/agent-assets/skills/browser-history/SKILL.md +60 -29
  95. package/agent-assets/skills/browser-history-respond/SKILL.md +6 -1
  96. package/agent-assets/skills/browser-task/SKILL.md +33 -31
  97. package/agent-assets/skills/context/SKILL.md +26 -34
  98. package/agent-assets/skills/context/curation.json +12 -12
  99. package/agent-assets/skills/context/references/api.md +22 -20
  100. package/agent-assets/skills/context/references/required-frontmatter.md +10 -9
  101. package/agent-assets/skills/context/references/snapshot-files.md +16 -15
  102. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +5 -5
  103. package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
  104. package/agent-assets/skills/docs-search/SKILL.md +19 -31
  105. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +8 -95
  106. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +8 -94
  107. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +8 -94
  108. package/agent-assets/skills/external-services/SKILL.native.claude.md +15 -9
  109. package/agent-assets/skills/external-services/SKILL.native.codex.md +11 -5
  110. package/agent-assets/skills/external-services/SKILL.native.gemini.md +11 -5
  111. package/agent-assets/skills/external-services/references/exec-errors.md +32 -0
  112. package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
  113. package/agent-assets/skills/gmail-lifestyle/SKILL.md +3 -2
  114. package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
  115. package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
  116. package/agent-assets/skills/mail/SKILL.delegated.claude.md +13 -25
  117. package/agent-assets/skills/mail/SKILL.delegated.codex.md +3 -2
  118. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +3 -2
  119. package/agent-assets/skills/mail/SKILL.md +12 -20
  120. package/agent-assets/skills/mail/SKILL.native.claude.md +24 -16
  121. package/agent-assets/skills/mail/SKILL.native.codex.md +16 -9
  122. package/agent-assets/skills/mail/SKILL.native.gemini.md +12 -6
  123. package/agent-assets/skills/mail/references/api.md +6 -1
  124. package/agent-assets/skills/mail/references/examples.md +2 -1
  125. package/agent-assets/skills/managed-tasks/SKILL.md +44 -77
  126. package/agent-assets/skills/managed-tasks/references/errors.md +25 -14
  127. package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
  128. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +26 -16
  129. package/agent-assets/skills/management-policy/SKILL.md +36 -28
  130. package/agent-assets/skills/management-policy/curation.json +1 -1
  131. package/agent-assets/skills/management-policy/references/policy-workflow.md +30 -18
  132. package/agent-assets/skills/notify/SKILL.md +16 -13
  133. package/agent-assets/skills/notify/references/priority.md +42 -26
  134. package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
  135. package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
  136. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
  137. package/agent-assets/skills/notion/SKILL.md +18 -18
  138. package/agent-assets/skills/notion/SKILL.native.claude.md +4 -4
  139. package/agent-assets/skills/notion/SKILL.native.codex.md +3 -3
  140. package/agent-assets/skills/notion/SKILL.native.gemini.md +3 -3
  141. package/agent-assets/skills/observations/SKILL.md +9 -24
  142. package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
  143. package/agent-assets/skills/project-doc/SKILL.md +9 -6
  144. package/agent-assets/skills/project-doc/curation.json +3 -3
  145. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +2 -2
  146. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
  147. package/agent-assets/skills/reading/SKILL.md +8 -42
  148. package/agent-assets/skills/reading/references/reading-taste.md +5 -5
  149. package/agent-assets/skills/roadmap/SKILL.md +3 -19
  150. package/agent-assets/skills/roadmap/references/api.md +23 -8
  151. package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
  152. package/agent-assets/skills/roadmap/references/migration.md +8 -6
  153. package/agent-assets/skills/roadmap/references/retention.md +18 -0
  154. package/agent-assets/skills/schedule/SKILL.md +20 -28
  155. package/agent-assets/skills/schedule/references/importance.md +23 -0
  156. package/agent-assets/skills/schedule/references/recurrence-rule.md +26 -16
  157. package/agent-assets/skills/scheduled-managed-task/SKILL.md +46 -46
  158. package/agent-assets/skills/today/SKILL.md +38 -81
  159. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +9 -4
  160. package/agent-assets/skills/today/references/agent-plan-revision.md +28 -0
  161. package/agent-assets/skills/today/references/today-skeleton.md +66 -0
  162. package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
  163. package/agent-assets/skills/today/seeds/section-shape.seed.json +6 -6
  164. package/agent-assets/skills/user-interview/SKILL.md +15 -90
  165. package/agent-assets/skills/user-interview/references/op-briefing.md +1 -1
  166. package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
  167. package/agent-assets/skills/user-interview/references/op-morning.md +2 -2
  168. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +1 -1
  169. package/agent-assets/skills/user-profile/SKILL.md +16 -26
  170. package/agent-assets/skills/user-profile/curation.json +3 -3
  171. package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
  172. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +1 -1
  173. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +5 -4
  174. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
  175. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
  176. package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
  177. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
  178. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
  179. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
  180. package/agent-assets/system-prompts/routine-research-cluster-update.md +71 -0
  181. package/agent-assets/task-flows/_partials/feedback-capture.md +30 -0
  182. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +47 -21
  183. package/agent-assets/task-flows/background_task.md +81 -0
  184. package/agent-assets/task-flows/git.local_ahead.stale.md +1 -1
  185. package/agent-assets/task-flows/git.push.detected.md +1 -1
  186. package/agent-assets/task-flows/git.tag.created.md +1 -1
  187. package/agent-assets/task-flows/github.assigned.md +1 -1
  188. package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
  189. package/agent-assets/task-flows/github.security_alert.md +1 -1
  190. package/agent-assets/task-flows/message.received.dm.md +11 -3
  191. package/agent-assets/task-flows/message.received.dm_first.md +8 -2
  192. package/agent-assets/task-flows/{routine.hourly_check.md → routine.activity_scan.md} +31 -23
  193. package/agent-assets/task-flows/{routine.hourly_check.triage.md → routine.activity_scan.triage.md} +3 -3
  194. package/agent-assets/task-flows/routine.evening_review.md +80 -0
  195. package/agent-assets/task-flows/routine.monthly_review.md +81 -8
  196. package/agent-assets/task-flows/routine.research_cluster_update.md +33 -19
  197. package/agent-assets/task-flows/routine.roadmap_refresh.md +2 -2
  198. package/agent-assets/task-flows/routine.today_refresh.md +1 -1
  199. package/agent-assets/task-flows/routine.weekly_review.md +124 -4
  200. package/agent-assets/task-flows/schedule.approaching.md +2 -2
  201. package/agent-assets/task-flows/scheduled.dm.md +77 -1
  202. package/agent-assets/task-flows/scheduled.task.md +7 -1
  203. package/agent-assets/task-flows/wiki.trace.md +1 -1
  204. package/agent-assets/templates/_manifest.json +2 -2
  205. package/agent-assets/templates/knowledge/dossiers/_index.md +1 -1
  206. package/agent-assets/templates/knowledge/dossiers/{hourly.md → activity-scan.md} +1 -1
  207. package/agent-assets/templates/policies/journal-format.md +1 -1
  208. package/agent-assets/templates/policies/mcp.md +1 -1
  209. package/agent-assets/templates/policies/routines/_index.md +1 -1
  210. package/agent-assets/templates/policies/routines/{hourly.md → activity-scan.md} +5 -5
  211. package/bin/aitne.mjs +45 -11
  212. package/package.json +6 -5
  213. package/scripts/commands/doctor.mjs +11 -2
  214. package/scripts/lib/process-identity.d.mts +46 -0
  215. package/scripts/lib/process-identity.mjs +193 -0
  216. package/scripts/lib/read-api-token.mjs +1 -1
  217. package/scripts/start.mjs +14 -4
  218. package/agent-assets/docs/features/routines/hourly-check.md +0 -205
@@ -34,7 +34,7 @@ ask_examples:
34
34
  - Where do I see what the agent has been doing?
35
35
  locale: en-US
36
36
  created: 2026-04-26
37
- updated: 2026-05-28
37
+ updated: 2026-06-07
38
38
  keywords:
39
39
  - deniedTools
40
40
  - safety floor
@@ -74,8 +74,8 @@ The risk classifier has two write tiers, not three:
74
74
  delete event, …) and for normal context writes.
75
75
  - **Approve** — agent must present a Bearer token issued through the
76
76
  dashboard. Reserved for posture-changing daemon configuration:
77
- flipping integration modes, swapping the main backend, deleting
78
- backends, wiping config.
77
+ flipping integration modes, swapping the main backend, enabling/
78
+ disabling backends, wiping config.
79
79
  - (`ReadSensitive` is the third tier, but it gates *reads* of personal
80
80
  data — orthogonal to write notifications. It is unchanged.)
81
81
 
@@ -134,27 +134,30 @@ of "report to me" events. Information about what the agent did is
134
134
  `deniedTools` server-side — see the *Where the Defenses Apply* table
135
135
  below for the exact mechanism.
136
136
  - **`agent_actions`** — SQLite table of every agent action. Direct +
137
- cross-backend rows are full-fidelity (current cross-backend writes
137
+ cross-backend rows are full-fidelity (cross-backend task-mode writes
138
138
  emit `delegated_task.run` / `delegated_task.exec` /
139
- `delegated_task.tool_step`; legacy rows from before 2026-05-01 carry
140
- `delegated_proxy.invoke`). Same-backend native MCP rolls up to
139
+ `delegated_task.tool_step`; the `delegated_proxy.invoke` row type
140
+ carries both legacy rows from the retired RPC `/invoke` route and
141
+ the hourly drift-detection probes still written by the
142
+ delegated-sync worker). Same-backend native MCP rolls up to
141
143
  `mcp_tool_calls` + the parent session row.
142
144
 
143
145
  ## Where the Defenses Apply
144
146
 
145
147
  | Path | Enforcement |
146
148
  |---|---|
147
- | Direct mode (`/api/mail/*`, `/api/calendar/*`) | Route handler middleware checks `deniedTools` against the materialized skill body's `allowed-tools` list (frontmatter). |
149
+ | Direct mode (`/api/mail/*`, `/api/calendar/*`) | `deniedTools` is **inert** the daemon runs the poller and the agent calls the daemon API through its direct-mode skill, so there is no per-tool deny surface. The list only persists for a future flip to delegated mode. Direct-mode safety comes from the route-level risk tiers (Approve gates posture-changing writes) and the always-disallowed layer, not `deniedTools`. |
148
150
  | Cross-backend (`/api/integrations/:key/exec`) | Invoker filters the integration's `capabilityTools` through `deniedTools` before spawning the delegated backend so the task-mode planner can only pick from the allowed surface. A fully-denied surface short-circuits with `errorClass: "denied_tool"`; individual tool denials surface as the same error from the invoker's `resolveAllowedToolPatterns`. |
149
151
  | Same-backend / native MCP — Claude | `collectSessionDeniedTools` merges the deny patterns into the SDK's `disallowedTools` array at `query()` time. Same code path covers both delegated same-backend and native — they share the in-session MCP surface. |
150
- | Same-backend / native MCP — Gemini | Patterns are folded into `generateAdminPolicy`'s TOML deny rules (priority 1000). |
152
+ | Same-backend / native MCP — Gemini | Patterns are folded into `generateAdminPolicy`'s TOML deny rules (priority 936 — above the registry-driven native allows, below the absolute-block layer). |
151
153
  | Same-backend / native MCP — Codex | **Prose-only.** Codex bundles its connector apps into the binary; there is no per-tool deny config and the workspace-write sandbox does not match MCP tool calls. Skill prose lists the denied tools explicitly. Operators who require strict deny on Gmail / Calendar should pick a non-Codex DM backend or route those integrations through `delegated` cross-backend mode (which IS deny-enforced at `/exec`). |
152
154
 
153
155
  ## Recommended Starter Denylists
154
156
 
155
157
  The setup wizard pre-populates these on first delegated setup. The
156
- operator can keep them, edit, or explicitly opt for an empty list (a
157
- confirmation modal explains the trade-off).
158
+ operator can keep them, edit, or explicitly opt for an empty list by
159
+ saving `deniedTools: []` (the safety-floor guidance rendered above the
160
+ deny-list editor explains the trade-off).
158
161
 
159
162
  **Gmail × Codex** (Codex's `mcp__codex_apps__gmail._*`):
160
163
 
@@ -170,10 +173,19 @@ delete / archive surface):
170
173
 
171
174
  | Tool | Why deny by default |
172
175
  |---|---|
173
- | `label_message` | The only mutating tool the connector exposes |
176
+ | `label_message` | Label mutations are the connector's only state-changing surface; the starter denies 2 of the 5 `label` tools, keeping the capability satisfiable |
174
177
  | `label_thread` | Same |
175
178
 
176
- **Google Calendar** (Codex + Claude):
179
+ **Gmail × Gemini** (the google-workspace connector; `sendDraft` and the
180
+ `modify` / `modifyThread` label tools stay available):
181
+
182
+ | Tool | Why deny by default |
183
+ |---|---|
184
+ | `send` | Compose-and-send in one call — strictly destructive |
185
+ | `batchModify` | The mass-mutation path; same rationale as Codex's `apply_labels_to_emails` |
186
+
187
+ **Google Calendar** (Codex + Claude; Gemini denies the same two
188
+ operations under its camelCase names `deleteEvent` / `updateEvent`):
177
189
 
178
190
  | Tool | Why deny by default |
179
191
  |---|---|
@@ -212,7 +224,7 @@ against the connector's `capabilityTools` set so typos fail fast.
212
224
  The starter floor re-fires not just on first-delegated setup but also
213
225
  on `delegatedBackend` swap (e.g. claude → codex) when the previous
214
226
  deny list is namespace-stale on the new backend and the operator
215
- hadn't already chosen an empty list. The audit row carries
227
+ hadn't already chosen an empty list. The daemon log entry carries
216
228
  `trigger="backend_swap_stale"` to distinguish from
217
229
  `trigger="first_delegated"`. Operators who explicitly set
218
230
  `deniedTools: []` before the swap are honored — the swap clause does
@@ -224,7 +236,7 @@ When the operator asks "what did you do yesterday?" / "have you sent
224
236
  anything from Gmail this week?" the agent calls:
225
237
 
226
238
  ```bash
227
- curl 'http://localhost:8321/api/agent/actions?since=2026-04-25T00:00:00Z&kind=delegated_task.run&kind=delegated_task.tool_step&limit=50'
239
+ curl 'http://localhost:8321/api/agent/actions?since=2026-04-25T00:00:00Z&kind=delegated_task.exec&kind=delegated_task.tool_step&limit=50'
228
240
  ```
229
241
 
230
242
  and answers in conversation. The endpoint:
@@ -237,16 +249,17 @@ and answers in conversation. The endpoint:
237
249
  - Redacts the free-text `error` / `detail` fields via the standard
238
250
  secret-redaction utility before serializing.
239
251
  - Returns rows from `agent_actions` only. Same-backend / native MCP
240
- calls surface as their own `action_type` rows (e.g. `kind=mcp`);
241
- the per-call detail lives in `mcp_tool_calls`, which this endpoint
242
- does not join — query it separately if you need step-level fidelity.
243
-
244
- Common `kind` values for the cross-backend proxy: `delegated_task.run`
245
- (one row per `/exec` call), `delegated_task.exec` (the planner's
246
- chosen tool), `delegated_task.tool_step` (each individual tool call
247
- inside the task). The legacy `delegated_proxy.invoke` rows persist
248
- from before 2026-05-01 include them if the `since` window crosses
249
- that date.
252
+ calls do not get their own rows they roll up under the parent
253
+ session row, and the per-call detail lives in `mcp_tool_calls`,
254
+ which this endpoint does not join — query it separately if you need
255
+ step-level fidelity.
256
+
257
+ Common `kind` values for the cross-backend proxy: `delegated_task.exec`
258
+ (one header row per `/exec` call), `delegated_task.run` (one header row
259
+ per generic `/run` call), `delegated_task.tool_step` (each individual
260
+ tool call inside the task). The `delegated_proxy.invoke` rows cover the
261
+ retired RPC `/invoke` route plus the delegated-sync worker's hourly
262
+ drift-detection probes — include them when you want that surface too.
250
263
 
251
264
  This **replaces** the rejected daily-digest pattern. Reasons:
252
265
 
@@ -269,7 +282,8 @@ Approve still gates:
269
282
 
270
283
  - `PATCH /api/integrations/:key` — mode / `delegatedBackend` /
271
284
  `deniedTools` changes.
272
- - `PUT /api/backends/main`, `DELETE /api/backends/:id`.
285
+ - `PUT /api/backends/main`, `POST /api/backends/:id/enable`,
286
+ `POST /api/backends/:id/disable`.
273
287
  - `PATCH /api/config` for fields that wipe protections.
274
288
  - `/api/system/*` — config reset, history purge, factory reset.
275
289
 
@@ -28,7 +28,7 @@ ask_examples:
28
28
  - Where do skill overlays live?
29
29
  locale: en-US
30
30
  created: 2026-04-25
31
- updated: 2026-05-28
31
+ updated: 2026-06-07
32
32
  keywords:
33
33
  - SKILL.md
34
34
  - allowed-tools
@@ -74,7 +74,7 @@ The agent runs against a real machine. Without scoped permissions, a
74
74
  "please summarize my mail" turn could in principle invoke `Bash(rm)`,
75
75
  post to your social accounts, or rewrite arbitrary files. Skills fix
76
76
  that by making the available toolset task-shaped: the morning routine
77
- loads the routines/observations/today/schedule skills; a docs question
77
+ loads the context/today/observations/schedule skills; a docs question
78
78
  loads only `docs-search`. Tools outside the allow-list aren't even
79
79
  visible to the model.
80
80
 
@@ -100,7 +100,8 @@ visible to the model.
100
100
  ## Concrete Examples
101
101
 
102
102
  - `today` — read and rewrite `state/today.md`.
103
- - `schedule` — produce per-date schedule files from the calendar.
103
+ - `schedule` — register future wake-ups, reminders, and recurring
104
+ tasks via `/api/schedule`.
104
105
  - `mail` — search and label messages via the daemon's mail proxy.
105
106
  - `docs-search` — read-only fetch over the docs corpus, used only by
106
107
  `dashboard.docs_qa`.
@@ -124,11 +125,12 @@ seed payload immediately.
124
125
  The optimizer agent runs in an isolated workdir with a tightly
125
126
  scoped toolset (`Bash(curl http://localhost:8321/api/skill-curation/*)`,
126
127
  `Read`) and an auto-revert safety net: each cadence cycle the daemon
127
- re-checks recently-applied overlays, and any section that has
128
- accumulated *more* drift signal weight after the overlay was applied
129
- than before is rolled back automatically and frozen for two cycles to
130
- stop thrashing. This is the only roll-back path — there is no
131
- per-proposal approve/reject API, just the on/off toggle.
128
+ re-checks recently-applied overlays, and any section that keeps
129
+ accumulating drift signal weight after the overlay was applied
130
+ (crossing a fixed regression threshold) is rolled back automatically
131
+ and frozen for two cycles to stop thrashing. This is the only
132
+ roll-back path — there is no per-proposal approve/reject API, just
133
+ the on/off toggle.
132
134
 
133
135
  Skill curation is **off by default**. The master toggle, curation
134
136
  cadence, manual-run trigger, and the per-skill exclusion list are all
@@ -136,8 +138,8 @@ surfaced at **Settings → Self-learning** (`/settings/self-learning`).
136
138
 
137
139
  ## Where You See It in the Dashboard
138
140
 
139
- - **Knowledge → Skills** lists every skill, its description, and the
140
- events it loads for.
141
+ - **Knowledge → Skills** lists every skill, its description, and its
142
+ `allowed-tools`.
141
143
  - **Connections → MCP** is where MCP servers (which surface as tools
142
144
  inside skills) attach.
143
145
  - **Settings → Self-learning (`/settings/self-learning`)** is where
@@ -12,9 +12,10 @@ aliases:
12
12
  category: features
13
13
  summary: |
14
14
  Local-only poller that reads the browser's own SQLite databases
15
- (Chrome / Safari / Firefox / Arc), records visits as observations,
16
- derives research clusters from sustained reading patterns, and
17
- surfaces what you keep refreshing. Nothing leaves the daemon.
15
+ (Chrome / Chromium / Edge / Brave / Comet / Atlas), records visits as
16
+ observations, derives research clusters from sustained reading
17
+ patterns, and surfaces what you keep refreshing. Nothing leaves the
18
+ daemon.
18
19
  section: integrations
19
20
  tags:
20
21
  - integrations
@@ -31,7 +32,7 @@ ask_examples:
31
32
  - How do I opt out of browser history?
32
33
  locale: en-US
33
34
  created: 2026-05-22
34
- updated: 2026-05-28
35
+ updated: 2026-06-07
35
36
  keywords:
36
37
  - browser history
37
38
  - browser history poller
@@ -74,9 +75,9 @@ api_endpoints:
74
75
 
75
76
  # Browser History
76
77
 
77
- Aitne can read the SQLite history databases that Chrome, Safari,
78
- Firefox, and Arc already maintain on disk, classify visits into
79
- categories, and use the result to notice what you've been
78
+ Aitne can read the SQLite history databases that Chrome, Chromium,
79
+ Edge, Brave, Comet, and Atlas already maintain on disk, classify visits
80
+ into categories, and use the result to notice what you've been
80
81
  researching, what you've been refreshing, and what comparison-shopping
81
82
  windows you're in. Everything stays local — no URLs, titles, or
82
83
  clicks leave the daemon.
@@ -105,7 +106,7 @@ clicks leave the daemon.
105
106
  containing ≥3 distinct ASINs surface as comparison sessions the
106
107
  agent can summarise.
107
108
  - **Powers the pre-morning digest** — yesterday's reading and reload
108
- patterns feed the morning routine's pre-pass digest.
109
+ patterns feed the digest the morning routine reads.
109
110
 
110
111
  ## Privacy and Consent
111
112
 
@@ -119,10 +120,10 @@ clicks leave the daemon.
119
120
  history file is opened read-only; the daemon never reaches into
120
121
  cookies, login sessions, or profile dirs other than the history DB.
121
122
  - **Per-browser opt-in.** `browserHistoryBrowserOverrides` lets you
122
- enable / disable each detected browser independently and override
123
- the DB path for atypical installs.
123
+ force each detected browser on or off independently
124
+ (`auto` / `forced-on` / `forced-off`).
124
125
  - **Per-category gate.** `browserHistoryCategories` controls which
125
- visit categories (research / shopping / docs / media / …) get
126
+ visit categories (research / shopping / news / dev / entertainment / …) get
126
127
  ingested. Categories you exclude are dropped at ingest time, not
127
128
  filtered later.
128
129
  - **Retention.** `browserHistoryRetentionDays` (visits) and
@@ -135,11 +136,13 @@ clicks leave the daemon.
135
136
 
136
137
  A research cluster qualifies when the combination of meaningful visits,
137
138
  foreground time, and distinct domains crosses the thresholds in
138
- `DEFAULT_OFFER_THRESHOLDS` (tunable via `browserHistoryLifecycle`).
139
+ `DEFAULT_OFFER_THRESHOLDS` (fixed defaults `browserHistoryLifecycle`
140
+ tunes the poller's check cadence, not these thresholds).
139
141
  On each tick the poller evaluates the offer triggers per active cluster
140
- (`evaluateOfferTriggers`); once the **per-cluster offer rate-limit gate**
141
- (`gateOfferRateLimit`) approvesthis is the 14-day, per-slug offer
142
- backoff, not the daemon-wide session gate that Phase 9 removed — a
142
+ (`evaluateOfferTriggers`) this is where the 14-day, per-slug offer
143
+ re-fire window lives and the **offer rate-limit gate**
144
+ (`gateOfferRateLimit`: daily offer cap, minimum gap between offers,
145
+ quiet hours, and a 30-day decline backoff) must also approve before a
143
146
  Two-Option Offer DM is composed by the `routine.research_offer_dm`
144
147
  process key.
145
148
 
@@ -170,7 +173,7 @@ later tick cannot re-offer the same cluster.
170
173
  | Shopping-comparison window scan | Same tick, 7-day lookback | `SHOPPING_COMPARISON_WINDOW_MS` constants |
171
174
  | Nightly journal append | Agent-day boundary | `routine.research_cluster_update` (lite tier, one row per active cluster per day) |
172
175
  | Weekly reload-memory block | Friday weekly review | `routine.weekly_review` reads `/api/browser-history/reloads/weekly` |
173
- | Pre-morning digest | Morning routine pre-pass | Yesterday's reading + reloads feed the digest block |
176
+ | Pre-morning digest | Daily, one hour before the agent-day boundary | Yesterday's reading + reloads feed the digest block |
174
177
 
175
178
  ## When Something Goes Wrong
176
179
 
@@ -179,8 +182,10 @@ later tick cannot re-offer the same cluster.
179
182
  platform detector might be failing to resolve the user's profile dir.
180
183
  The daemon log line will name the candidate paths it tried.
181
184
  - **A cluster keeps re-offering.** Check the `lastResearchOfferAt` /
182
- `lastWikiOfferAt` columns; the rate-limit gate uses those for the
183
- 14-day backoff. `!research decline <slug>` stamps both fields.
185
+ `lastWikiOfferAt` columns; the trigger evaluator uses those for the
186
+ 14-day re-fire window (the rate-limit gate also reads them for its
187
+ 30-day decline backoff). `!research decline <slug>` stamps both
188
+ fields.
184
189
  - **`!checks` is empty.** That's the common case for a quiet day —
185
190
  the reload signals are gated to the agent-day, not UTC.
186
191
 
@@ -33,7 +33,7 @@ ask_examples:
33
33
  - Which model handles detected calendar changes?
34
34
  locale: en-US
35
35
  created: 2026-04-25
36
- updated: 2026-05-28
36
+ updated: 2026-06-07
37
37
  keywords:
38
38
  - calendar
39
39
  - google calendar
@@ -68,15 +68,16 @@ process_keys:
68
68
 
69
69
  # Calendar
70
70
 
71
- Aitne pulls events from one or more calendars (Google Calendar today,
72
- more backends planned) so it can build today's plan around them and
73
- DM you ahead of meetings that matter.
71
+ Aitne pulls events from one or more calendars (Google Calendar,
72
+ Outlook Calendar, and Apple Calendar) so it can build today's plan
73
+ around them and DM you ahead of meetings that matter.
74
74
 
75
75
  ## What It Does
76
76
 
77
- - **Polls** the connected calendar(s) on `calendarPollIntervalSeconds`.
77
+ - **Polls** Google Calendar on `calendarPollIntervalSeconds`; Outlook
78
+ and Apple calendars are read on demand rather than polled.
78
79
  - **Records observations** when events change (add / move / remove),
79
- consumed by the hourly check.
80
+ consumed by the activity scan.
80
81
  - **Surfaces today's events** to the morning routine so they land in
81
82
  `state/today.md` and the day's schedule file.
82
83
  - **Reads** events on demand for reactive turns ("am I free at 3?").
@@ -99,18 +100,20 @@ an explicit request.
99
100
 
100
101
  ## Where in the Dashboard
101
102
 
102
- - **Connections → Calendar** holds OAuth, scope, and polling.
103
+ - **Connections → Calendar** holds OAuth, scope, and the integration
104
+ mode; the poll interval itself is edited on Settings → Infrastructure.
103
105
  - The same page hosts the **Calendar Event Model** card (see below)
104
- when Google Calendar is in direct mode.
106
+ unless Google Calendar runs in delegated mode.
105
107
 
106
108
  ## Calendar Event Model
107
109
 
108
110
  The Calendar Event Model picker chooses the backend and model that
109
111
  runs when the **daemon-side poller detects a calendar change**. It binds
110
- the `calendar.change` ProcessKey, which fires in two situations:
112
+ the `calendar.change` ProcessKey. The poller's change detection reacts
113
+ in two situations:
111
114
 
112
115
  - An event was added, moved, or deleted between polls (recorded as a
113
- change observation; the hourly check picks it up).
116
+ change observation; the activity scan picks it up).
114
117
  - An event was created far in advance (long-horizon events more than 14
115
118
  days out nudge the roadmap-refresh routine so `plans/roadmap.md` can
116
119
  build a preparation timeline).
@@ -127,22 +130,28 @@ different mix.
127
130
 
128
131
  The picker is **only meaningful when Google Calendar runs in direct
129
132
  mode.** In delegated mode the daemon hands off all Google Calendar
130
- work to the connector inside your agent's backend, so:
133
+ work to the connector inside your agent's backend, so, by default:
131
134
 
132
135
  - No approaching-event reminders fire from the daemon.
133
136
  - No change observations are recorded between polls.
134
- - The hourly check has no calendar-side observations to react to.
137
+ - The activity scan has no calendar-side observations to react to.
135
138
  - Long-horizon roadmap-refresh nudges from calendar do not fire.
136
139
 
137
140
  The agent only learns about calendar state in delegated mode when it
138
141
  asks the connector itself inside a session (for example, while
139
142
  running the morning routine). It is a pull-only model — the daemon
140
- does not push.
143
+ does not push. The exception is **Background Sync** (Settings → Hours
144
+ & Notifications): two opt-in cadences, off by default, poll the
145
+ calendar through the backend's connector while delegated — the
146
+ imminent cadence (next 1 h) restores the 15-minute reminders, and the
147
+ day-ahead cadence (next 24 h) restores change observations and
148
+ far-future roadmap-refresh detection.
141
149
 
142
150
  To avoid presenting a setting that does nothing, the dashboard hides
143
151
  the Calendar Event Model card whenever Google Calendar is delegated.
144
152
  If you want approaching-event reminders and change observations back,
145
- switch the integration mode to direct on the same page.
153
+ switch the integration mode to direct on the same page, or enable the
154
+ calendar Background Sync cadences.
146
155
 
147
156
  ## Configuration
148
157
 
@@ -158,10 +167,12 @@ rather than an env-style setting; the underlying state lives in the
158
167
 
159
168
  - A **stale calendar** in `/schedule` after a real-world add usually
160
169
  means the poll has not yet run. Check the next-fire timestamp.
161
- - An **OAuth-expired** state reports on the auth-health card.
170
+ - An **OAuth-expired** state reports on the Google card's connection
171
+ status on Connections → Calendar.
162
172
  - **No reminders or change observations** while in delegated mode is
163
- expected behavior, not a bug — switch to direct mode to restore the
164
- daemon-side flows. See "Calendar Event Model" above.
173
+ expected behavior, not a bug — switch to direct mode or enable the
174
+ Background Sync cadences to restore the daemon-side flows. See
175
+ "Calendar Event Model" above.
165
176
 
166
177
  ## Related
167
178
 
@@ -10,7 +10,7 @@ aliases:
10
10
  category: features
11
11
  summary: |
12
12
  Watch one or more git repositories for new commits. Changes record
13
- observations the hourly check coalesces — there is no per-commit
13
+ observations the activity scan coalesces — there is no per-commit
14
14
  notification spam.
15
15
  section: integrations
16
16
  tags:
@@ -26,7 +26,7 @@ ask_examples:
26
26
  - How often does the daemon poll my repos?
27
27
  locale: en-US
28
28
  created: 2026-04-25
29
- updated: 2026-05-28
29
+ updated: 2026-06-07
30
30
  keywords:
31
31
  - git
32
32
  - commit
@@ -35,10 +35,11 @@ keywords:
35
35
  - polling
36
36
  related:
37
37
  - features/integrations/github
38
- - features/routines/hourly-check
38
+ - features/routines/activity-scan
39
39
  - concepts/observations
40
40
  ui_anchors:
41
41
  - /connections/repositories
42
+ - /git
42
43
  config_keys:
43
44
  - gitPollIntervalSeconds
44
45
  process_keys:
@@ -53,7 +54,7 @@ api_endpoints:
53
54
  # Git
54
55
 
55
56
  Add local git repositories to a watched set; the daemon polls them
56
- and the hourly check decides whether the recent activity is worth
57
+ and the activity scan decides whether the recent activity is worth
57
58
  flagging.
58
59
 
59
60
  ## What It Does
@@ -71,19 +72,20 @@ by design.
71
72
  ## When It Runs / How It Is Triggered
72
73
 
73
74
  - The poller is continuous.
74
- - The hourly check consumes the accumulated observations.
75
+ - The activity scan consumes the accumulated observations.
75
76
 
76
77
  ## What It Outputs
77
78
 
78
79
  - An `observation` row per detected change set.
79
- - A summary in the hourly check's output when observations qualified.
80
+ - A summary in the activity scan's output when observations qualified.
80
81
 
81
82
  ## Where in the Dashboard
82
83
 
83
- - **Connections → Repositories** lists the watched paths and last-poll
84
- times. Git repos are managed as part of the unified Repositories
85
- surface (the same place that links a local checkout to its GitHub
86
- remote).
84
+ - **Connections → Repositories** lists the watched paths. Git repos are
85
+ managed as part of the unified Repositories surface (the same place
86
+ that links a local checkout to its GitHub remote).
87
+ - **My Life → Git** (`/git`) configures per-repo polling cadence,
88
+ automation triggers, and daily git management.
87
89
 
88
90
  ## Configuration
89
91
 
@@ -103,4 +105,4 @@ by design.
103
105
  ## Related
104
106
 
105
107
  - [GitHub](github.md) — separate integration for remote-side data.
106
- - [Hourly Check](../routines/hourly-check.md) — the consumer.
108
+ - [Activity Scan](../routines/activity-scan.md) — the consumer.
@@ -29,7 +29,7 @@ ask_examples:
29
29
  - Where do I add a GitHub repo to watch?
30
30
  locale: en-US
31
31
  created: 2026-04-25
32
- updated: 2026-05-28
32
+ updated: 2026-06-07
33
33
  keywords:
34
34
  - github
35
35
  - issue
@@ -63,7 +63,7 @@ context_files:
63
63
 
64
64
  The daemon polls GitHub via the local `gh` CLI: review requests, CI
65
65
  failures on the default branch, security alerts, and assignments
66
- become DMs; everything else is recorded for the hourly check.
66
+ become DMs; everything else is recorded for the activity scan.
67
67
 
68
68
  ## What It Does
69
69
 
@@ -77,16 +77,21 @@ become DMs; everything else is recorded for the hourly check.
77
77
  to the workflow-runs side; the notifications poll always runs at the
78
78
  global cadence.
79
79
  - **DMs the user** on the four high-priority triggers below; quieter
80
- signals are coalesced into the hourly check summary.
80
+ signals are coalesced into the activity scan summary.
81
81
 
82
82
  The agent never auto-comments, auto-merges, or pushes.
83
83
 
84
84
  ## High-priority events
85
85
 
86
- The agent will DM the user (priority `high`, can break quiet hours
87
- depending on your notify-skill settings) on:
86
+ The agent will DM the user (priority `high`; during quiet hours the DM
87
+ is deferred until they end rather than dropped — only `critical`
88
+ safety messages break through) on:
88
89
 
89
- - A teammate or bot **requested your review** on a PR.
90
+ - A teammate or bot **requested your review** on a PR — only when it
91
+ looks time-sensitive (release-blocker keywords in the title, or the
92
+ repo is already on your `state/today.md` plan or an active roadmap
93
+ milestone); otherwise it's noted in `state/today.md` and coalesced
94
+ into the activity scan.
90
95
  - You were **assigned** to an issue or PR.
91
96
  - A **Dependabot or code-scanning security alert** fired on a watched
92
97
  repository.
@@ -144,7 +149,9 @@ Watched repos are no longer config keys. The old `gitRepos` /
144
149
  cutover — repos now live in the `repositories` table and are managed on
145
150
  **Connections → Repositories**. Per-repo polling cadence is set on
146
151
  **My Life → Git** and overrides the global interval for that repo's
147
- workflow-runs poll.
152
+ workflow-runs poll. The global interval is the floor — a per-repo
153
+ cadence longer than it slows that repo down, while a shorter one
154
+ still polls at the global tick.
148
155
 
149
156
  ## When Something Goes Wrong
150
157
 
@@ -173,24 +180,25 @@ need a daemon-spawned poller's bookkeeping.
173
180
  - **direct** — the daemon's `GitHubPoller` runs as described above.
174
181
  Use this when you want the daemon to own the poll schedule and to
175
182
  emit DMs without the main backend having to wake up.
176
- - **delegated** — the delegated-sync worker invokes the chosen
177
- backend's read-only `gh` CLI surface on opt-in cadences (see
178
- [Delegated Mode](../../concepts/delegated-mode.md) and
179
- `docs/design/appendices/delegated-sync-opt-in.md`). The daemon
183
+ - **delegated** — a dedicated Git/GitHub cron queues a lite-tier
184
+ `git.lifecycle.poll` task on the `gitPollIntervalSeconds` cadence
185
+ (default hourly); that session uses the chosen backend's read-only
186
+ `gh` CLI surface (see
187
+ [Delegated Mode](../../concepts/delegated-mode.md)). The daemon
180
188
  poller stays off; the lite-tier delegated session takes the polling
181
189
  cost.
182
- - **disabled** — neither the poller nor the delegated worker runs;
190
+ - **disabled** — neither the poller nor the delegated cron runs;
183
191
  the integration is silent.
184
192
 
185
193
  Pick the mode from the GitHub card on **Connections → Repositories**.
186
194
  Mode changes go through the standard `PATCH /api/integrations/github`
187
- flip-lock so the poller and the delegated worker never run
195
+ flip-lock so the poller and the delegated cron never run
188
196
  simultaneously.
189
197
 
190
198
  ## Related
191
199
 
192
200
  - [Git](git.md) — local repo file watcher (separate observer).
193
- - [Hourly Check](../routines/hourly-check.md) — the consumer of
201
+ - [Activity Scan](../routines/activity-scan.md) — the consumer of
194
202
  non-DM-priority observations.
195
203
  - [Delegated Mode](../../concepts/delegated-mode.md) — how the
196
204
  `delegated` mode polls without a daemon poller.