@aitne-sh/aitne 0.1.0

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 (249) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +464 -0
  3. package/agent-assets/agent-profiles/_safety.md +26 -0
  4. package/agent-assets/agent-profiles/conversational.md +33 -0
  5. package/agent-assets/agent-profiles/docs-qa.md +24 -0
  6. package/agent-assets/agent-profiles/observer.md +28 -0
  7. package/agent-assets/agent-profiles/profile-importer.md +63 -0
  8. package/agent-assets/agent-profiles/proxy.md +28 -0
  9. package/agent-assets/agent-profiles/routine.md +16 -0
  10. package/agent-assets/agent-profiles/task.md +18 -0
  11. package/agent-assets/docs/concepts/agent-day.md +88 -0
  12. package/agent-assets/docs/concepts/auth-health.md +75 -0
  13. package/agent-assets/docs/concepts/backends-and-tiers.md +126 -0
  14. package/agent-assets/docs/concepts/costs-and-quotas.md +103 -0
  15. package/agent-assets/docs/concepts/delegated-mode.md +223 -0
  16. package/agent-assets/docs/concepts/memory-model.md +118 -0
  17. package/agent-assets/docs/concepts/observations.md +80 -0
  18. package/agent-assets/docs/concepts/process-keys.md +89 -0
  19. package/agent-assets/docs/concepts/routines.md +108 -0
  20. package/agent-assets/docs/concepts/safety-and-execution.md +109 -0
  21. package/agent-assets/docs/concepts/safety-model.md +279 -0
  22. package/agent-assets/docs/concepts/skills.md +100 -0
  23. package/agent-assets/docs/features/integrations/calendar.md +92 -0
  24. package/agent-assets/docs/features/integrations/git.md +95 -0
  25. package/agent-assets/docs/features/integrations/github.md +170 -0
  26. package/agent-assets/docs/features/integrations/mail.md +106 -0
  27. package/agent-assets/docs/features/integrations/notion.md +69 -0
  28. package/agent-assets/docs/features/integrations/obsidian.md +71 -0
  29. package/agent-assets/docs/features/lifestyle/git.md +178 -0
  30. package/agent-assets/docs/features/lifestyle/reading.md +93 -0
  31. package/agent-assets/docs/features/lifestyle/receipts.md +71 -0
  32. package/agent-assets/docs/features/lifestyle/travel-bookings.md +44 -0
  33. package/agent-assets/docs/features/lifestyle/travel-time.md +52 -0
  34. package/agent-assets/docs/features/memory-files/agent-journal.md +105 -0
  35. package/agent-assets/docs/features/memory-files/projects.md +56 -0
  36. package/agent-assets/docs/features/memory-files/roadmap.md +61 -0
  37. package/agent-assets/docs/features/memory-files/schedule.md +112 -0
  38. package/agent-assets/docs/features/memory-files/today.md +73 -0
  39. package/agent-assets/docs/features/memory-files/user-profile.md +81 -0
  40. package/agent-assets/docs/features/messaging/dashboard-chat.md +93 -0
  41. package/agent-assets/docs/features/messaging/discord.md +50 -0
  42. package/agent-assets/docs/features/messaging/overview.md +111 -0
  43. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +69 -0
  44. package/agent-assets/docs/features/messaging/slack.md +51 -0
  45. package/agent-assets/docs/features/messaging/telegram.md +63 -0
  46. package/agent-assets/docs/features/messaging/whatsapp.md +48 -0
  47. package/agent-assets/docs/features/operations/activity-and-conversations.md +105 -0
  48. package/agent-assets/docs/features/operations/approvals.md +58 -0
  49. package/agent-assets/docs/features/operations/backend-routing.md +62 -0
  50. package/agent-assets/docs/features/operations/cost-tracking.md +59 -0
  51. package/agent-assets/docs/features/operations/notifications.md +69 -0
  52. package/agent-assets/docs/features/operations/quiet-hours.md +106 -0
  53. package/agent-assets/docs/features/operations/schedule-approaching.md +60 -0
  54. package/agent-assets/docs/features/routines/custom-routines.md +101 -0
  55. package/agent-assets/docs/features/routines/evening-review.md +81 -0
  56. package/agent-assets/docs/features/routines/hourly-check.md +85 -0
  57. package/agent-assets/docs/features/routines/monthly-review.md +65 -0
  58. package/agent-assets/docs/features/routines/morning-routine.md +123 -0
  59. package/agent-assets/docs/features/routines/weekly-review.md +70 -0
  60. package/agent-assets/docs/getting-started/01-what-is-this.md +192 -0
  61. package/agent-assets/docs/getting-started/02-first-steps.md +80 -0
  62. package/agent-assets/docs/getting-started/03-what-can-this-do.md +110 -0
  63. package/agent-assets/docs/getting-started/04-first-day.md +287 -0
  64. package/agent-assets/docs/glossary.md +116 -0
  65. package/agent-assets/docs/guides/add-a-custom-routine.md +71 -0
  66. package/agent-assets/docs/guides/backup-and-restore.md +54 -0
  67. package/agent-assets/docs/guides/change-which-model-handles-x.md +47 -0
  68. package/agent-assets/docs/guides/connect-a-new-mail-account.md +59 -0
  69. package/agent-assets/docs/guides/import-knowledge-file.md +275 -0
  70. package/agent-assets/docs/guides/install-and-run.md +72 -0
  71. package/agent-assets/docs/guides/migrate-machines.md +52 -0
  72. package/agent-assets/docs/guides/pause-the-agent.md +65 -0
  73. package/agent-assets/docs/guides/reinstall-cleanly.md +52 -0
  74. package/agent-assets/docs/guides/setup-wizard.md +107 -0
  75. package/agent-assets/docs/guides/switch-default-backend.md +60 -0
  76. package/agent-assets/docs/reference/api.md +51 -0
  77. package/agent-assets/docs/reference/cli-commands.md +121 -0
  78. package/agent-assets/docs/reference/config.md +74 -0
  79. package/agent-assets/docs/reference/disallowed-tools.md +76 -0
  80. package/agent-assets/docs/reference/keyboard-shortcuts.md +39 -0
  81. package/agent-assets/docs/reference/process-keys.md +59 -0
  82. package/agent-assets/docs/reference/skills.md +50 -0
  83. package/agent-assets/docs/troubleshooting/auth-failed.md +57 -0
  84. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +55 -0
  85. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +54 -0
  86. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +53 -0
  87. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +75 -0
  88. package/agent-assets/docs/troubleshooting/observation-not-detected.md +57 -0
  89. package/agent-assets/docs/troubleshooting/quota-exhausted.md +57 -0
  90. package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +75 -0
  91. package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +71 -0
  92. package/agent-assets/optimizer-skills/skill-curation/SKILL.md +108 -0
  93. package/agent-assets/project-doc-templates/git-repo.md +21 -0
  94. package/agent-assets/project-doc-templates/project.md +38 -0
  95. package/agent-assets/skills/attach/SKILL.md +104 -0
  96. package/agent-assets/skills/context/SKILL.md +257 -0
  97. package/agent-assets/skills/context/curation.json +37 -0
  98. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +13 -0
  99. package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +40 -0
  100. package/agent-assets/skills/docs-search/SKILL.md +176 -0
  101. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +369 -0
  102. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +349 -0
  103. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +347 -0
  104. package/agent-assets/skills/external-services/SKILL.md +371 -0
  105. package/agent-assets/skills/mail/SKILL.delegated.claude.md +284 -0
  106. package/agent-assets/skills/mail/SKILL.delegated.codex.md +261 -0
  107. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +255 -0
  108. package/agent-assets/skills/mail/SKILL.md +313 -0
  109. package/agent-assets/skills/mail/references/errors.md +17 -0
  110. package/agent-assets/skills/mail/references/providers.md +40 -0
  111. package/agent-assets/skills/mail/references/query-grammar.md +24 -0
  112. package/agent-assets/skills/management-policy/SKILL.md +307 -0
  113. package/agent-assets/skills/management-policy/curation.json +13 -0
  114. package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +16 -0
  115. package/agent-assets/skills/management-task-modify/SKILL.md +202 -0
  116. package/agent-assets/skills/management-task-register/SKILL.md +330 -0
  117. package/agent-assets/skills/management-task-stop/SKILL.md +166 -0
  118. package/agent-assets/skills/notify/SKILL.md +196 -0
  119. package/agent-assets/skills/notion/SKILL.delegated.claude.md +254 -0
  120. package/agent-assets/skills/notion/SKILL.delegated.codex.md +195 -0
  121. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +194 -0
  122. package/agent-assets/skills/notion/SKILL.md +86 -0
  123. package/agent-assets/skills/observations/SKILL.md +234 -0
  124. package/agent-assets/skills/observations/curation.json +13 -0
  125. package/agent-assets/skills/observations/seeds/source-namespacing.seed.json +20 -0
  126. package/agent-assets/skills/project-doc/SKILL.md +86 -0
  127. package/agent-assets/skills/project-doc/curation.json +21 -0
  128. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +25 -0
  129. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +20 -0
  130. package/agent-assets/skills/reading/SKILL.md +198 -0
  131. package/agent-assets/skills/reading/references/reading-taste.md +197 -0
  132. package/agent-assets/skills/receipts/SKILL.md +134 -0
  133. package/agent-assets/skills/roadmap/SKILL.md +276 -0
  134. package/agent-assets/skills/roadmap/curation.json +13 -0
  135. package/agent-assets/skills/roadmap/references/horizon-tags.md +40 -0
  136. package/agent-assets/skills/roadmap/references/preparation-timeline.md +47 -0
  137. package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +16 -0
  138. package/agent-assets/skills/schedule/SKILL.md +228 -0
  139. package/agent-assets/skills/scheduled-managed-task/SKILL.md +392 -0
  140. package/agent-assets/skills/today/SKILL.md +198 -0
  141. package/agent-assets/skills/today/curation.json +21 -0
  142. package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +17 -0
  143. package/agent-assets/skills/today/seeds/section-shape.seed.json +17 -0
  144. package/agent-assets/skills/travel/SKILL.md +132 -0
  145. package/agent-assets/skills/travel-time/SKILL.md +149 -0
  146. package/agent-assets/skills/user-interview/SKILL.md +323 -0
  147. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +94 -0
  148. package/agent-assets/skills/user-profile/SKILL.md +210 -0
  149. package/agent-assets/skills/user-profile/curation.json +29 -0
  150. package/agent-assets/skills/user-profile/seeds/learned-context-format.seed.json +14 -0
  151. package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +53 -0
  152. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +27 -0
  153. package/agent-assets/task-flows/dashboard.docs_qa.md +43 -0
  154. package/agent-assets/task-flows/default.md +11 -0
  155. package/agent-assets/task-flows/git.branch.created.md +25 -0
  156. package/agent-assets/task-flows/git.lifecycle.poll.md +52 -0
  157. package/agent-assets/task-flows/git.local_ahead.stale.md +34 -0
  158. package/agent-assets/task-flows/git.merge_to_default.md +30 -0
  159. package/agent-assets/task-flows/git.project.refresh_architecture.md +100 -0
  160. package/agent-assets/task-flows/git.project.retemplate.md +73 -0
  161. package/agent-assets/task-flows/git.push.detected.md +32 -0
  162. package/agent-assets/task-flows/git.push.force_pushed.md +36 -0
  163. package/agent-assets/task-flows/git.tag.created.md +24 -0
  164. package/agent-assets/task-flows/github.assigned.md +43 -0
  165. package/agent-assets/task-flows/github.pull_request.review_requested.md +57 -0
  166. package/agent-assets/task-flows/github.security_alert.md +45 -0
  167. package/agent-assets/task-flows/github.workflow_run.failed.md +57 -0
  168. package/agent-assets/task-flows/knowledge.import.md +161 -0
  169. package/agent-assets/task-flows/message.received.dm.md +142 -0
  170. package/agent-assets/task-flows/message.received.dm_first.md +117 -0
  171. package/agent-assets/task-flows/message.received.md +14 -0
  172. package/agent-assets/task-flows/routine.custom.md +38 -0
  173. package/agent-assets/task-flows/routine.evening_review.md +323 -0
  174. package/agent-assets/task-flows/routine.hourly_check.delegated.claude.md +405 -0
  175. package/agent-assets/task-flows/routine.hourly_check.delegated.codex.md +400 -0
  176. package/agent-assets/task-flows/routine.hourly_check.delegated.gemini.md +404 -0
  177. package/agent-assets/task-flows/routine.hourly_check.md +184 -0
  178. package/agent-assets/task-flows/routine.hourly_check.triage.md +93 -0
  179. package/agent-assets/task-flows/routine.monthly_review.md +250 -0
  180. package/agent-assets/task-flows/routine.morning_routine.md +300 -0
  181. package/agent-assets/task-flows/routine.morning_routine_initial.md +184 -0
  182. package/agent-assets/task-flows/routine.roadmap_refresh.md +275 -0
  183. package/agent-assets/task-flows/routine.today_refresh.md +172 -0
  184. package/agent-assets/task-flows/routine.user_profile_sweep.md +242 -0
  185. package/agent-assets/task-flows/routine.weekly_review.md +247 -0
  186. package/agent-assets/task-flows/schedule.approaching.md +124 -0
  187. package/agent-assets/task-flows/scheduled.dm.md +391 -0
  188. package/agent-assets/task-flows/scheduled.task.md +141 -0
  189. package/agent-assets/task-flows/setup.initial.md +277 -0
  190. package/agent-assets/task-flows/setup.update.md +53 -0
  191. package/agent-assets/templates/README.md +85 -0
  192. package/agent-assets/templates/_index.md +39 -0
  193. package/agent-assets/templates/_manifest.json +103 -0
  194. package/agent-assets/templates/agent/journal.md +10 -0
  195. package/agent-assets/templates/agent/profile-questions.md +74 -0
  196. package/agent-assets/templates/context-index.md +42 -0
  197. package/agent-assets/templates/dossiers/_index.md +22 -0
  198. package/agent-assets/templates/dossiers/evening.md +23 -0
  199. package/agent-assets/templates/dossiers/hourly.md +23 -0
  200. package/agent-assets/templates/dossiers/monthly.md +23 -0
  201. package/agent-assets/templates/dossiers/morning.md +23 -0
  202. package/agent-assets/templates/dossiers/roadmap.md +23 -0
  203. package/agent-assets/templates/dossiers/weekly.md +23 -0
  204. package/agent-assets/templates/projects/_active.base +14 -0
  205. package/agent-assets/templates/projects/_index.md +29 -0
  206. package/agent-assets/templates/roadmap.md +15 -0
  207. package/agent-assets/templates/routines/_index.md +20 -0
  208. package/agent-assets/templates/routines/evening.md +22 -0
  209. package/agent-assets/templates/routines/hourly.md +30 -0
  210. package/agent-assets/templates/routines/monthly.md +25 -0
  211. package/agent-assets/templates/routines/morning.md +26 -0
  212. package/agent-assets/templates/routines/weekly.md +23 -0
  213. package/agent-assets/templates/rules/_index.md +19 -0
  214. package/agent-assets/templates/rules/journal-export.md +41 -0
  215. package/agent-assets/templates/rules/journal-format.md +61 -0
  216. package/agent-assets/templates/rules/management.md +48 -0
  217. package/agent-assets/templates/rules/mcp.md +40 -0
  218. package/agent-assets/templates/rules/policies/_index.md +22 -0
  219. package/agent-assets/templates/rules/redaction.md +30 -0
  220. package/agent-assets/templates/today.md +13 -0
  221. package/agent-assets/templates/user/_index.md +16 -0
  222. package/agent-assets/templates/user/expertise.md +7 -0
  223. package/agent-assets/templates/user/goals.md +7 -0
  224. package/agent-assets/templates/user/people.md +7 -0
  225. package/agent-assets/templates/user/personal.md +7 -0
  226. package/agent-assets/templates/user/profile.md +28 -0
  227. package/agent-assets/templates/user/work.md +7 -0
  228. package/bin/aitne.mjs +1096 -0
  229. package/package.json +78 -0
  230. package/personal-agent.mjs +39 -0
  231. package/scripts/browser.mjs +99 -0
  232. package/scripts/check-redaction-coverage.mjs +109 -0
  233. package/scripts/commands/audit.mjs +309 -0
  234. package/scripts/commands/doctor.mjs +437 -0
  235. package/scripts/commands/open.mjs +40 -0
  236. package/scripts/commands/setup.mjs +21 -0
  237. package/scripts/commands/uninstall.mjs +114 -0
  238. package/scripts/commands/update.mjs +96 -0
  239. package/scripts/commands/version.mjs +62 -0
  240. package/scripts/commands.md +0 -0
  241. package/scripts/lib/sqlite-loader.mjs +49 -0
  242. package/scripts/message-discipline-digest.mjs +535 -0
  243. package/scripts/poc/google-connector-inheritance/REPORT.md +197 -0
  244. package/scripts/poc/google-connector-inheritance/claude-sdk-probe.mjs +79 -0
  245. package/scripts/remint-roadmap-ids.mjs +257 -0
  246. package/scripts/rm-paths.mjs +22 -0
  247. package/scripts/run-node.mjs +223 -0
  248. package/scripts/smoke-obsidian-api.mjs +166 -0
  249. package/scripts/start.mjs +160 -0
@@ -0,0 +1,279 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: concepts/safety-model
4
+ title: Safety Model (deniedTools + Approve Tier)
5
+ id: safety-model
6
+ aliases:
7
+ - safety model
8
+ - 2-tier safety
9
+ - notify abolished
10
+ - deny list
11
+ - deniedTools
12
+ - on-demand retrospective
13
+ category: concepts
14
+ summary: |
15
+ Aitne's safety model collapsed from four tiers to two: most
16
+ actions run autonomously, a small set of posture-changing operations
17
+ require explicit Approve. The previous Notify tier (DM the operator
18
+ before / during a write) was abolished — the operator's `deniedTools`
19
+ list is now the primary defense, and "what did the agent do?" is
20
+ answered on demand via `GET /api/agent/actions` instead of pushed as
21
+ a daily digest.
22
+ section: safety
23
+ tags:
24
+ - core
25
+ - safety
26
+ - integrations
27
+ - skills
28
+ status: stable
29
+ ask_examples:
30
+ - Why doesn't the agent ask before sending an email anymore?
31
+ - How do I stop the agent from deleting things on its own?
32
+ - What does the agent ask me to approve, vs do without asking?
33
+ - Where do I see what the agent has been doing?
34
+ locale: en-US
35
+ created: 2026-04-26
36
+ updated: 2026-04-26
37
+ keywords:
38
+ - deniedTools
39
+ - safety floor
40
+ - Approve tier
41
+ - Autonomous tier
42
+ - ReadSensitive
43
+ - agent_actions
44
+ - retrospective
45
+ - starter denylist
46
+ related:
47
+ - concepts/delegated-mode
48
+ - concepts/safety-and-execution
49
+ - features/operations/approvals
50
+ - reference/disallowed-tools
51
+ ui_anchors:
52
+ - /connections
53
+ - /settings/cost
54
+ config_keys:
55
+ - integrations
56
+ - deniedTools
57
+ ---
58
+
59
+ # Safety Model (deniedTools + Approve Tier)
60
+
61
+ ## TL;DR
62
+
63
+ The risk classifier has two write tiers, not three:
64
+
65
+ - **Autonomous** — agent runs the action without asking. Default for
66
+ every connector tool call (send mail, archive, label, create event,
67
+ delete event, …) and for normal context writes.
68
+ - **Approve** — agent must present a Bearer token issued through the
69
+ dashboard. Reserved for posture-changing daemon configuration:
70
+ flipping integration modes, swapping the main backend, deleting
71
+ backends, wiping config.
72
+ - (`ReadSensitive` is the third tier, but it gates *reads* of personal
73
+ data — orthogonal to write notifications. It is unchanged.)
74
+
75
+ The middleware that used to DM the operator before a write
76
+ ("Notify-tier") is gone. The defenses against unwanted destructive
77
+ actions are:
78
+
79
+ 1. **`deniedTools` list** (primary) — per-integration deny list. The
80
+ setup wizard pre-populates a recommended starter list on first
81
+ delegated setup so the floor is non-empty out of the box.
82
+ 2. **Approve tier** — only for daemon-config changes that affect the
83
+ safety posture itself.
84
+ 3. **On-demand retrospective** — `GET /api/agent/actions` returns the
85
+ agent's own audit trail. When the operator asks "what did you do
86
+ yesterday?", the agent queries this and answers in conversation.
87
+
88
+ ## Why This Concept Exists
89
+
90
+ The previous Notify tier (3-tier model: Autonomous / Notify / Approve)
91
+ gave a *false sense* of safety: the action completed regardless, the
92
+ operator could miss the DM, and the middleware was structurally unable
93
+ to intercept native MCP calls (the agent could reach Gmail through the
94
+ backend's connector without ever touching the daemon). Curating a
95
+ per-tool Notify policy across direct + cross-backend + same-backend +
96
+ operator-installed MCPs was an ever-growing maintenance trap.
97
+
98
+ The new model is honest: dangerous actions either (a) are denied at the
99
+ chokepoint by the operator's `deniedTools`, (b) require explicit
100
+ Approve (sparse, intentional, daemon-config only), or (c) happen
101
+ autonomously and are auditable on demand.
102
+
103
+ The *value proposition* — the agent manages the operator's life — is
104
+ preserved. The operator should not have to manage the agent's calendar
105
+ of "report to me" events. Information about what the agent did is
106
+ **available on demand**, not pushed.
107
+
108
+ ## Definitions
109
+
110
+ - **Risk tier** — `Autonomous`, `ReadSensitive`, or `Approve`. The
111
+ former `Notify` tier was removed. `ReadSensitive` is unchanged and
112
+ gates personal-data *reads* via X-Read-Token / Bearer.
113
+ - **`deniedTools`** — per-integration list of tool names (or
114
+ prefix-globs) the agent must not call. Lives in
115
+ `integrationStateSchema.deniedTools`. Editable in
116
+ **Connections → \<integration\> → Tool Permissions**.
117
+ - **Starter denylist** — non-empty default `deniedTools` the setup
118
+ wizard pre-populates when the operator first picks `delegated` for an
119
+ integration. Closes the "fresh-install with empty deny list lets the
120
+ agent send freely" gap.
121
+ - **`matchToolPattern`** — pattern matcher used everywhere `deniedTools`
122
+ is enforced. Exact match (`send_email`), prefix glob (`send_*`), or
123
+ bare `*`.
124
+ - **`/api/integrations/:key/exec`** — the cross-backend chokepoint
125
+ (task mode). Enforces `deniedTools` and the per-task allowed-tools
126
+ envelope server-side before spawning a subprocess. The legacy RPC
127
+ `/api/integrations/:key/invoke` route is retired (preserved as
128
+ commented code for future reactivation; the internal
129
+ `DelegatedBackendInvoker.invoke()` API remains wired for
130
+ daemon-internal pollers).
131
+ - **`agent_actions`** — SQLite table of every agent action. Direct +
132
+ cross-backend rows are full-fidelity. Same-backend native MCP rolls
133
+ up to `mcp_tool_calls` + the parent session row.
134
+
135
+ ## Where the Defenses Apply
136
+
137
+ | Path | Enforcement |
138
+ |---|---|
139
+ | Direct mode (`/api/mail/*`, `/api/calendar/*`) | Route handler middleware checks `deniedTools` against the materialized skill body's `allowed-tools` list (frontmatter). |
140
+ | Cross-backend (`/api/integrations/:key/exec`) | The task-mode subprocess is launched with the integration's allowed tools minus the user's `deniedTools`; daemon-side stream pre-emption aborts on out-of-allowlist `tool_use` events as `policy_violation`. |
141
+ | Same-backend native MCP — Claude | `collectSessionDeniedTools` merges the deny patterns into the SDK's `disallowedTools` array at `query()` time. |
142
+ | Same-backend native MCP — Gemini | Patterns are folded into `generateAdminPolicy`'s TOML deny rules (priority 1000). |
143
+ | 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 run those integrations through the proxy. |
144
+
145
+ ## Recommended Starter Denylists
146
+
147
+ The setup wizard pre-populates these on first delegated setup. The
148
+ operator can keep them, edit, or explicitly opt for an empty list (a
149
+ confirmation modal explains the trade-off).
150
+
151
+ **Gmail × Codex** (Codex's `mcp__codex_apps__gmail._*`):
152
+
153
+ | Tool | Why deny by default |
154
+ |---|---|
155
+ | `send_email` | Strictly destructive — irreversible from the agent's POV |
156
+ | `delete_emails` | Strictly destructive — moves to Trash; the connector exposes no separate "trash" tool |
157
+ | `archive_emails` | Recoverable from "All Mail" but easy to lose track of |
158
+ | `apply_labels_to_emails` | Mutating; can hide threads from default views |
159
+
160
+ **Gmail × Claude** (the hosted connector is draft-only — no send /
161
+ delete / archive surface):
162
+
163
+ | Tool | Why deny by default |
164
+ |---|---|
165
+ | `label_message` | The only mutating tool the connector exposes |
166
+ | `label_thread` | Same |
167
+
168
+ **Google Calendar** (Codex + Claude):
169
+
170
+ | Tool | Why deny by default |
171
+ |---|---|
172
+ | `delete_event` | Strictly destructive |
173
+ | `update_event` | Mutating; not strictly destructive but hard to undo cleanly |
174
+
175
+ The floor is intentionally wider than the strict
176
+ "irreversible-only" minimum. `archive_emails`,
177
+ `apply_labels_to_emails`, and `update_event` are technically reversible
178
+ but practically destructive in a manage-my-life context: an agent that
179
+ silently archives 30 threads or rewrites calendar invites creates
180
+ cleanup work that may take longer than the agent saved. If you want
181
+ the agent to archive freely, remove `archive_emails`. If you trust it
182
+ on calendar edits, remove `update_event`. The strictly-destructive
183
+ entries (`send_email`, `delete_emails`, `delete_event`) are the ones
184
+ to keep.
185
+
186
+ Tool names are **bare**: no `mcp__*` prefix, no leading underscore. The
187
+ daemon prepends the connector's namespace before forwarding.
188
+
189
+ ## Pattern Language
190
+
191
+ `deniedTools` accepts both exact names and prefix globs:
192
+
193
+ - `send_email` — exact match.
194
+ - `send_*` — anything starting with `send_` (matches `send_email`,
195
+ `send_message`, `send_draft` …).
196
+ - `*` — matches anything (deny everything in the integration; rare).
197
+
198
+ Anchors are implicit. `*` is only honored as a suffix to keep the
199
+ pattern language single-purpose. Patterns are validated at PATCH time
200
+ against the connector's `capabilityTools` set so typos fail fast.
201
+
202
+ ## When the Wizard Re-Fires the Starter Floor
203
+
204
+ The starter floor re-fires not just on first-delegated setup but also
205
+ on `delegatedBackend` swap (e.g. claude → codex) when the previous
206
+ deny list is namespace-stale on the new backend and the operator
207
+ hadn't already chosen an empty list. The audit row carries
208
+ `trigger="backend_swap_stale"` to distinguish from
209
+ `trigger="first_delegated"`. Operators who explicitly set
210
+ `deniedTools: []` before the swap are honored — the swap clause does
211
+ not silently re-establish a floor they had already rejected.
212
+
213
+ ## On-Demand Retrospective
214
+
215
+ When the operator asks "what did you do yesterday?" / "have you sent
216
+ anything from Gmail this week?" the agent calls:
217
+
218
+ ```bash
219
+ curl 'http://localhost:8321/api/agent/actions?since=2026-04-25T00:00:00Z&kind=delegated_proxy.invoke&limit=50'
220
+ ```
221
+
222
+ and answers in conversation. The endpoint:
223
+
224
+ - Lives at `Autonomous` tier — the agent reads only its own audit
225
+ trail, no operator data.
226
+ - Accepts `since`, `kind`, `limit` (default 50, max 200).
227
+ - Redacts values via the standard secret-redaction utility before
228
+ serializing.
229
+ - Returns rows from `agent_actions`, optionally joined with
230
+ `mcp_tool_calls` when `kind=mcp` (same-backend native MCP).
231
+
232
+ This **replaces** the rejected daily-digest pattern. Reasons:
233
+
234
+ - Token cost is paid only when the operator actually wants to know.
235
+ - Information arrives as conversation, not a wall-of-text DM.
236
+ - The operator does not have to manage the agent's reporting calendar.
237
+
238
+ The optional fallback — extending the existing morning routine to
239
+ summarize yesterday's `agent_actions` into `agent/journal.md` — is
240
+ deferred until the on-demand path proves insufficient.
241
+
242
+ ## What Stayed Approve-Tier
243
+
244
+ Approve is reserved for operations that change the safety posture or
245
+ infrastructure itself, not for connector tool calls. Every connector
246
+ tool call (send, delete, archive, …) is `Autonomous`, gated only by
247
+ `deniedTools`.
248
+
249
+ Approve still gates:
250
+
251
+ - `PATCH /api/integrations/:key` — mode / `delegatedBackend` /
252
+ `deniedTools` changes.
253
+ - `PUT /api/backends/main`, `DELETE /api/backends/:id`.
254
+ - `PATCH /api/config` for fields that wipe protections.
255
+ - `/api/system/*` — config reset, history purge, factory reset.
256
+
257
+ ## Where You See It in the Dashboard
258
+
259
+ - **Connections → \<integration\> → Tool Permissions** — the
260
+ `deniedTools` editor with the starter list pre-populated. Above the
261
+ editor, the safety guidance prose explains each entry and which the
262
+ team recommends keeping.
263
+ - **Settings → Cost → Delegated proxy facet** — only cross-backend
264
+ invocations show here; same-backend rolls up under the parent
265
+ session.
266
+ - **Activity / Audit** — every action with full attribution, queried
267
+ the same way the agent queries `GET /api/agent/actions`.
268
+
269
+ ## Related
270
+
271
+ - [Delegated Mode](delegated-mode.md) — the three modes and two
272
+ delegated sub-cases that this safety floor applies to.
273
+ - [Safety and Execution](safety-and-execution.md) — the lower-level
274
+ always-disallowed layer; absolute-block holds in both Safe and
275
+ Allow modes.
276
+ - Integration Delegation Framework (design) — `docs/design/14-integration-delegation.md`
277
+ §14.12, the deniedTools spec.
278
+ - Delegated Mode v2 (design) — `DELEGATED-MODE-V2-DESIGN.md` §4.5,
279
+ the rationale for Notify-tier abolition + the starter denylist.
@@ -0,0 +1,100 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: concepts/skills
4
+ title: Skills
5
+ id: skills
6
+ aliases:
7
+ - SKILL.md
8
+ - skill manifest
9
+ - allowed-tools
10
+ category: concepts
11
+ summary: |
12
+ Skills are the per-task playbooks the agent follows. Each skill is a
13
+ Markdown file with frontmatter that names the skill, describes when
14
+ to load it, and pins the exact tools the session may use.
15
+ section: skills
16
+ tags:
17
+ - core
18
+ - skills
19
+ - safety
20
+ status: stable
21
+ ask_examples:
22
+ - What skills does the agent have?
23
+ - How do I add a new skill?
24
+ - Why does the agent refuse to run a tool?
25
+ locale: en-US
26
+ created: 2026-04-25
27
+ updated: 2026-04-25
28
+ keywords:
29
+ - SKILL.md
30
+ - allowed-tools
31
+ - skills-compiler
32
+ - manifest
33
+ related:
34
+ - concepts/safety-and-execution
35
+ - concepts/process-keys
36
+ - reference/skills
37
+ ui_anchors:
38
+ - /knowledge
39
+ - /connections/mcp
40
+ ---
41
+
42
+ # Skills
43
+
44
+ ## TL;DR
45
+
46
+ A skill is a Markdown file the daemon copies into the agent's working
47
+ directory before each session. Its frontmatter declares the skill's
48
+ `name`, `description`, and the `allowed-tools` the session may use.
49
+ The agent reads `SKILL.md` at the start of every session that loads
50
+ that skill and follows it as a contract.
51
+
52
+ ## Why This Concept Exists
53
+
54
+ The agent runs against a real machine. Without scoped permissions, a
55
+ "please summarize my mail" turn could in principle invoke `Bash(rm)`,
56
+ post to your social accounts, or rewrite arbitrary files. Skills fix
57
+ that by making the available toolset task-shaped: the morning routine
58
+ loads the routines/observations/today/schedule skills; a docs question
59
+ loads only `docs-search`. Tools outside the allow-list aren't even
60
+ visible to the model.
61
+
62
+ ## Definitions
63
+
64
+ - **SKILL.md**: the Markdown file that defines a single skill. Lives
65
+ under `agent-assets/skills/<slug>/SKILL.md` in the repo and is
66
+ materialized into each session workdir as `.claude/skills/<slug>/SKILL.md`
67
+ (or the per-backend equivalent).
68
+ - **`allowed-tools`**: a YAML list in the skill's frontmatter naming
69
+ tools and patterns the session may use. Patterns like
70
+ `Bash(curl http://localhost:8321/api/context/*)` are the daemon's
71
+ primary chokepoint.
72
+ - **Manifest**: the per-event-type set of skill slugs to load, defined
73
+ in `packages/daemon/src/core/skills-manifest.ts`. Different
74
+ ProcessKeys load different manifests.
75
+ - **Profile**: the persona document (e.g. `conversational.md`) prepended
76
+ to every session. Profiles live under `agent-assets/agent-profiles/`.
77
+
78
+ ## Concrete Examples
79
+
80
+ - `today` — read and rewrite `today.md`.
81
+ - `schedule` — produce per-date schedule files from the calendar.
82
+ - `mail` — search and label messages via the daemon's mail proxy.
83
+ - `docs-search` — read-only fetch over the docs corpus, used only by
84
+ `dashboard.docs_qa`.
85
+ - `notify` — emit notifications through the configured messaging app.
86
+
87
+ ## Where You See It in the Dashboard
88
+
89
+ - **Knowledge → Skills** lists every skill, its description, and the
90
+ events it loads for.
91
+ - **Connections → MCP** is where MCP servers (which surface as tools
92
+ inside skills) attach.
93
+
94
+ ## Related
95
+
96
+ - [Safety and Execution](safety-and-execution.md) — how the
97
+ always-disallowed layer enforces guardrails even when a skill's
98
+ `allowed-tools` is too permissive.
99
+ - [Process Keys](process-keys.md) — the dispatch identity that picks
100
+ which skill manifest to load.
@@ -0,0 +1,92 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/integrations/calendar
4
+ title: Calendar
5
+ id: calendar
6
+ aliases:
7
+ - google calendar
8
+ - calendar integration
9
+ - events
10
+ category: features
11
+ summary: |
12
+ The calendar integration pulls your events into Aitne so the
13
+ morning routine, schedule files, and travel-time skill can reason
14
+ about your day.
15
+ section: integrations
16
+ tags:
17
+ - integration
18
+ - calendar
19
+ - core
20
+ status: stable
21
+ ask_examples:
22
+ - How do I connect my Google Calendar?
23
+ - Why doesn't my calendar event show up in today's schedule?
24
+ - Can the agent create calendar events?
25
+ locale: en-US
26
+ created: 2026-04-25
27
+ updated: 2026-04-25
28
+ keywords:
29
+ - calendar
30
+ - google calendar
31
+ - events
32
+ related:
33
+ - features/routines/morning-routine
34
+ - features/memory-files/schedule
35
+ ui_anchors:
36
+ - /connections/calendar
37
+ api_endpoints:
38
+ - /api/calendar
39
+ config_keys:
40
+ - calendarPollIntervalSeconds
41
+ ---
42
+
43
+ # Calendar
44
+
45
+ ## In One Sentence
46
+
47
+ Pull events from one or more calendars (Google Calendar today, more
48
+ backends planned) so Aitne can plan your day around them.
49
+
50
+ ## What It Does
51
+
52
+ - **Polls** the connected calendar(s) on `calendarPollIntervalSeconds`.
53
+ - **Records observations** when events change (add / move / remove),
54
+ consumed by the hourly check.
55
+ - **Surfaces today's events** to the morning routine so they land in
56
+ `today.md` and the day's schedule file.
57
+ - **Reads** events on demand for reactive turns ("am I free at 3?").
58
+
59
+ The agent can create events when the operator asks (a `notify`-tier
60
+ action). It does not auto-schedule on its own.
61
+
62
+ ## When It Runs / How It Is Triggered
63
+
64
+ - The poller is continuous in the background.
65
+ - The morning routine reads today's events as part of its plan.
66
+ - Reactive DMs trigger on-demand reads.
67
+
68
+ ## What It Outputs
69
+
70
+ - Events written into the schedule files.
71
+ - Observations recorded for any change between polls.
72
+
73
+ ## Where in the Dashboard
74
+
75
+ - **Connections → Calendar** holds OAuth, scope, and polling.
76
+
77
+ ## Configuration
78
+
79
+ | Setting | Default | Notes |
80
+ |---|---|---|
81
+ | `calendarPollIntervalSeconds` | 300 | How often to poll for changes. |
82
+
83
+ ## When Something Goes Wrong
84
+
85
+ - A **stale calendar** in `/schedule` after a real-world add usually
86
+ means the poll has not yet run. Check the next-fire timestamp.
87
+ - An **OAuth-expired** state reports on the auth-health card.
88
+
89
+ ## Related
90
+
91
+ - [Morning Routine](../routines/morning-routine.md)
92
+ - [daily/ files](../memory-files/schedule.md)
@@ -0,0 +1,95 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/integrations/git
4
+ title: Git
5
+ id: git
6
+ aliases:
7
+ - git repos
8
+ - git observer
9
+ - git integration
10
+ category: features
11
+ summary: |
12
+ Watch one or more git repositories for new commits. Changes record
13
+ observations the hourly check coalesces — there is no per-commit
14
+ notification spam.
15
+ section: integrations
16
+ tags:
17
+ - integration
18
+ - git
19
+ - observation
20
+ status: stable
21
+ ask_examples:
22
+ - How do I add a git repo to watch?
23
+ - Will the agent message me on every commit?
24
+ - Can the agent push to my repos?
25
+ locale: en-US
26
+ created: 2026-04-25
27
+ updated: 2026-04-25
28
+ keywords:
29
+ - git
30
+ - commit
31
+ - repository
32
+ - observer
33
+ related:
34
+ - features/integrations/github
35
+ - features/routines/hourly-check
36
+ - concepts/observations
37
+ ui_anchors:
38
+ - /connections/repositories
39
+ config_keys:
40
+ - gitPollIntervalSeconds
41
+ ---
42
+
43
+ # Git
44
+
45
+ ## In One Sentence
46
+
47
+ Add local git repositories to a watched set; the daemon polls them
48
+ and the hourly check decides whether the recent activity is worth
49
+ flagging.
50
+
51
+ ## What It Does
52
+
53
+ - **Polls** each watched repo every `gitPollIntervalSeconds`.
54
+ - **Records observations** when new commits land between polls. The
55
+ commit range, changed files, and summary stats are included so the
56
+ hourly check can decide whether the activity matters.
57
+ - **Surfaces patterns**, not individual commits — three small commits
58
+ in an hour will not page you.
59
+
60
+ The agent never pushes, never amends, never force-resets. Read-only
61
+ by design.
62
+
63
+ ## When It Runs / How It Is Triggered
64
+
65
+ - The poller is continuous.
66
+ - The hourly check consumes the accumulated observations.
67
+
68
+ ## What It Outputs
69
+
70
+ - An `observation` row per detected change set.
71
+ - A summary in the hourly check's output when observations qualified.
72
+
73
+ ## Where in the Dashboard
74
+
75
+ - **Connections → Git** lists the watched paths and last-poll times.
76
+
77
+ ## Configuration
78
+
79
+ | Setting | Default | Notes |
80
+ |---|---|---|
81
+ | `gitPollIntervalSeconds` | 300 | How often to scan watched repos. |
82
+
83
+ ## When Something Goes Wrong
84
+
85
+ - A **missing observation** for a commit you just made: check that the
86
+ repo path is actually watched on `/connections/repositories` and that
87
+ the poll has fired since.
88
+ - A repo that **never appears** in observations: the agent's own
89
+ writes are filtered out (see `AgentWriteTracker`); make sure the
90
+ commit was authored by you, not by an agent session.
91
+
92
+ ## Related
93
+
94
+ - [GitHub](github.md) — separate integration for remote-side data.
95
+ - [Hourly Check](../routines/hourly-check.md) — the consumer.