@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,51 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: reference/api
4
+ title: API Reference
5
+ id: api-ref
6
+ category: reference
7
+ summary: |
8
+ Aitne's daemon serves a Hono HTTP API on PA_API_PORT
9
+ (default 8321). This is a high-level map; the source of truth is
10
+ the route registrations in packages/daemon/src/api/server.ts.
11
+ section: api
12
+ tags:
13
+ - reference
14
+ - api
15
+ status: stable
16
+ ask_examples:
17
+ - What endpoints does the daemon expose?
18
+ - How do I read context files via API?
19
+ locale: en-US
20
+ created: 2026-04-25
21
+ updated: 2026-04-25
22
+ related:
23
+ - reference/config
24
+ ---
25
+
26
+ # API Reference
27
+
28
+ | Group | Path | Purpose |
29
+ |---|---|---|
30
+ | Context | `/api/context/*` | Read / write context Markdown files. |
31
+ | Agent | `/api/agent/*` | run-now, regenerate, schedule, notify. |
32
+ | Backends | `/api/backends/*` | Backend / process-config CRUD. |
33
+ | Calendar | `/api/calendar` | Calendar proxy. |
34
+ | Mail | `/api/mail` | Multi-provider mail proxy. |
35
+ | Obsidian | `/api/obsidian` | Obsidian vault proxy. |
36
+ | Notion | `/api/notion` | Notion proxy. |
37
+ | Git / GitHub | `/api/git`, `/api/github` | Git / GitHub proxies. |
38
+ | Skills | `/api/skills` | Skill metadata. |
39
+ | Reading | `/api/books` | Reading list CRUD. |
40
+ | Lifestyle | `/api/receipts`, `/api/travel-bookings`, `/api/travel-time` | Lifestyle data. |
41
+ | Docs | `/api/docs/*` | Docs corpus + QA pipeline. |
42
+ | Dashboard | `/api/dashboard/*` | Dashboard config + state. |
43
+ | SSE | `/api/chat/stream`, `/api/events/stream` | SSE streams. |
44
+ | Health | `/api/health`, `/api/metrics` | Daemon liveness / metrics. |
45
+ | Setup | `/api/setup/*` | Setup wizard endpoints. |
46
+
47
+ Auth: bearer token written to the OS keychain at first launch.
48
+
49
+ ## Related
50
+
51
+ - [Config](config.md)
@@ -0,0 +1,121 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: reference/cli-commands
4
+ title: CLI Commands
5
+ id: cli-commands
6
+ category: reference
7
+ summary: |
8
+ Lookup table for the aitne / pnpm commands that drive the daemon and
9
+ dashboard, plus the environment variables that override defaults.
10
+ tags:
11
+ - cli
12
+ - reference
13
+ status: stable
14
+ ask_examples:
15
+ - What command starts the daemon?
16
+ - How do I stop Aitne?
17
+ - How do I tail the daemon log?
18
+ - Where does Aitne put its data?
19
+ - How do I see what the agent has been doing?
20
+ locale: en-US
21
+ created: 2026-04-27
22
+ updated: 2026-04-27
23
+ keywords:
24
+ - aitne start
25
+ - aitne stop
26
+ - aitne logs
27
+ - aitne doctor
28
+ - aitne audit
29
+ - pnpm start
30
+ - PA_DATA_DIR
31
+ related:
32
+ - guides/install-and-run
33
+ - guides/reinstall-cleanly
34
+ ---
35
+
36
+ # CLI Commands
37
+
38
+ ## `aitne` and `pnpm` are equivalent
39
+
40
+ `aitne` is the project's CLI (`bin/aitne.mjs`). The `pnpm <cmd>` forms are
41
+ workspace scripts that delegate to the same entry point. Use whichever you
42
+ prefer — `aitne start` and `pnpm start` do the same thing. After installing
43
+ the npm package globally (`npm i -g aitne`) the `aitne` binary is on
44
+ your `$PATH` and you no longer need to be inside the repo to use it. The
45
+ tables below show both forms.
46
+
47
+ ## Lifecycle
48
+
49
+ | Command | What it does |
50
+ |---|---|
51
+ | `aitne start` / `pnpm start` | Build (if stale), then launch daemon + dashboard in the background. |
52
+ | `aitne stop` / `pnpm stop` | Graceful shutdown (SIGTERM → SIGKILL after 10s) of both processes. |
53
+ | `aitne restart` / `pnpm restart` | `stop` then `start`. `--clean-context` wipes `context/` after a tarball backup. |
54
+ | `aitne status` / `pnpm status` | PIDs, uptime, integrations, today's spend, last action timestamp, next scheduled item. |
55
+ | `aitne dev` / `pnpm dev` | Foreground mode — runs the daemon + dashboard with full stdio. |
56
+
57
+ ## Operations
58
+
59
+ | Command | What it does |
60
+ |---|---|
61
+ | `aitne setup` | (Re-)open the dashboard `/setup` wizard; auto-starts the daemon if needed. |
62
+ | `aitne open` | Open the dashboard root in the default browser. |
63
+ | `aitne doctor` | Eight install-health checks (Node, ports, OS keychain, backend CLIs, native bindings, …). |
64
+ | `aitne audit [--since 24h] [--type X] [--result failed]` | Show the agent action log; flags filter by time, action type, result, or backend. `--json` for machine-readable. |
65
+ | `aitne version [--json]` | Print version, Node version, install path, last build time. |
66
+ | `aitne update [--check]` | Print the npm command to upgrade. `--check` makes one network call to compare against the latest published version. |
67
+ | `aitne uninstall [--keep-data\|--wipe-data]` | Stop the services, then offer to wipe `~/.personal-agent`. |
68
+
69
+ ## Logs
70
+
71
+ | Command | What it does |
72
+ |---|---|
73
+ | `aitne logs` / `pnpm logs` | Print the daemon log (most recent lines). |
74
+ | `aitne logs -f` | Tail the daemon log. |
75
+ | `aitne logs -d` | Print the dashboard log instead. |
76
+ | `aitne logs -n N` | Last N lines. |
77
+
78
+ ## Build and test
79
+
80
+ | Command | What it does |
81
+ |---|---|
82
+ | `pnpm install` | Install workspace dependencies (pnpm 10.x, Node ≥ 22). |
83
+ | `pnpm build` | Turbo build — shared → daemon → dashboard. |
84
+ | `pnpm test` | Run the vitest suite (compiles first if stale). |
85
+ | `pnpm test:watch` | Vitest in watch mode. |
86
+ | `pnpm lint` | Run eslint per package. |
87
+ | `pnpm clean` | Remove `node_modules`, `dist`, `.buildstamp`. |
88
+
89
+ ## Environment overrides
90
+
91
+ | Variable | Default | What it controls |
92
+ |---|---|---|
93
+ | `PA_DATA_DIR` | `~/.personal-agent` | Where logs, the SQLite DB, context Markdown, and prompts live. |
94
+ | `PA_API_PORT` | `8321` | Daemon HTTP port. |
95
+ | `PA_DASHBOARD_PORT` | `3000` | Dashboard port. |
96
+
97
+ All runtime state — PIDs, logs, SQLite DB, context Markdown, prompts —
98
+ lives under `PA_DATA_DIR`, **not** inside the repo.
99
+
100
+ ## Where data lives
101
+
102
+ ```
103
+ ~/.personal-agent/
104
+ ├── data/personal_agent.db # SQLite (sessions, actions, observations, FTS)
105
+ ├── context/ # Markdown memory the agent reads and writes
106
+ │ ├── user.md
107
+ │ ├── today.md
108
+ │ ├── roadmap.md
109
+ │ ├── projects/
110
+ │ ├── schedule/
111
+ │ └── …
112
+ ├── logs/ # Daemon and dashboard logs
113
+ └── pids/ # Process IDs for aitne start/stop
114
+ ```
115
+
116
+ ## Related
117
+
118
+ - [Install and Run](../guides/install-and-run.md) — the procedural
119
+ guide that uses these commands end-to-end.
120
+ - [Reinstall Cleanly](../guides/reinstall-cleanly.md) — when you need
121
+ to wipe state and start over.
@@ -0,0 +1,74 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: reference/config
4
+ title: Config Reference
5
+ id: config-ref
6
+ category: reference
7
+ summary: |
8
+ All AgentConfig fields, their types, and where each is set
9
+ (environment, database settings table, or in-process default).
10
+ section: config
11
+ tags:
12
+ - reference
13
+ - config
14
+ status: stable
15
+ ask_examples:
16
+ - What configuration keys does the agent expose?
17
+ - Where does config get loaded from?
18
+ locale: en-US
19
+ created: 2026-04-25
20
+ updated: 2026-04-25
21
+ related:
22
+ - reference/api
23
+ ---
24
+
25
+ # Config Reference
26
+
27
+ The full schema is `AgentConfig` in `packages/daemon/src/config.ts`.
28
+ A subset listed in `applyConfigUpdates` is mutable at runtime via
29
+ `PATCH /api/config`. The rest must be set via env or restart.
30
+
31
+ ## Selected Keys
32
+
33
+ | Key | Type | Default |
34
+ |---|---|---|
35
+ | `timezone` | IANA tz | `""` (falls back to system tz, e.g. `America/New_York`) |
36
+ | `dayBoundaryHour` | 0–23 | `4` |
37
+ | `hourlyCheckEnabled` | boolean | `true` |
38
+ | `hourlyCheckIntervalMinutes` | number | `60` |
39
+ | `hourlyCheckActiveStartHour` | 0–23 | `4` |
40
+ | `hourlyCheckActiveEndHour` | 1–24 | `24` (end-exclusive; `24` ≡ midnight) |
41
+ | `hourlyCheckMinObservations` | number | `1` |
42
+ | `quietHoursStart` | `HH:MM` string | `"22:00"` |
43
+ | `quietHoursEnd` | `HH:MM` string | `"08:00"` |
44
+ | `maxNotificationsPerHour` | number | `3` |
45
+ | `maxNotificationsPerDay` | number | `12` |
46
+ | `batchIntervalMinutes` | number | `15` |
47
+ | `executeTimeoutMinutes` | number | `60` |
48
+ | `maxConcurrentSessions` | number | `3` |
49
+ | `disallowedTools` | string[] | absolute-block defaults |
50
+ | `allowedToolsOverride` | string[] | empty |
51
+ | `autonomousDailyCostCapUsd` | number | `0` (off) |
52
+
53
+ The runtime-mutable subset can be edited from `/settings/*`. Restart-only
54
+ fields (e.g. `apiPort`) require `pa restart`.
55
+
56
+ ### Routine schedule keys do not exist
57
+
58
+ Morning, evening, weekly, and monthly routines fire at fixed times in
59
+ `packages/daemon/src/core/scheduler.ts`. There is no `morningRoutineHour`,
60
+ `eveningReviewHour`, `weeklyReviewDay`, or `monthlyReviewHour` config key.
61
+
62
+ | Routine | Trigger |
63
+ |---|---|
64
+ | `routine.morning_routine` | daily at `dayBoundaryHour` |
65
+ | `routine.evening_review` | daily at `18:00` local |
66
+ | `routine.weekly_review` | Friday `18:00` local |
67
+ | `routine.monthly_review` | last day of month at `18:00` local |
68
+
69
+ Only the hourly check has a configurable cadence (`hourlyCheckIntervalMinutes`)
70
+ and an active window (`hourlyCheckActiveStartHour` / `…ActiveEndHour`).
71
+
72
+ ## Related
73
+
74
+ - [API](api.md)
@@ -0,0 +1,76 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: reference/disallowed-tools
4
+ title: Disallowed Tools (Reference)
5
+ id: disallowed-tools-ref
6
+ category: reference
7
+ summary: |
8
+ The absolute-block tool patterns. Cannot be widened by config or
9
+ by skill-level allow-lists. Mirrors src/safety/always-disallowed.ts.
10
+ section: disallowed-tools
11
+ tags:
12
+ - reference
13
+ - safety
14
+ status: stable
15
+ ask_examples:
16
+ - What can the agent never run?
17
+ - Can I unblock a tool in the absolute-block list?
18
+ locale: en-US
19
+ created: 2026-04-25
20
+ updated: 2026-04-26
21
+ related:
22
+ - concepts/safety-and-execution
23
+ ---
24
+
25
+ # Disallowed Tools
26
+
27
+ There are two distinct deny layers — the **absolute-block layer**
28
+ (non-overridable) and the **default strict-mode list** (in `config.ts`,
29
+ relaxable in Allow mode or via `allowedToolsOverride`).
30
+
31
+ ## Absolute-block layer (cannot be widened past)
32
+
33
+ These patterns are denied unconditionally regardless of execution mode
34
+ or `allowedToolsOverride`. Source of truth:
35
+ `packages/daemon/src/safety/always-disallowed.ts`.
36
+
37
+ | Category | Examples |
38
+ |---|---|
39
+ | Recursive delete | `Bash(rm -rf *)`, `Bash(rm -r *)`, `Bash(rm -R*)`, `Bash(rm -fr*)`, `Bash(rm --recursive*)`, plus the bypass-coverage family of every short-flag bundle containing `r`/`R` (see source) |
40
+ | Privilege escalation | `Bash(sudo *)`, `Bash(doas *)`, `Bash(su *)` |
41
+ | Pipe-to-shell RCE | `Bash(curl * | sh*)`, `Bash(curl * | bash*)`, `Bash(wget * | sh*)`, `Bash(wget * | bash*)`, `Bash(bash <(*)*)`, `Bash(sh <(*)*)`, `Bash(bash<*)`, `Bash(sh<*)`, `Bash(eval *)`, `Bash(source *)` |
42
+ | Platform secret-management CLIs | `Bash(security *)` (macOS Keychain), `Bash(secret-tool *)` (libsecret), `Bash(cmdkey *)` (Windows Credential Manager) |
43
+ | Secret-file reads | `Read(.env)`, `Read(.env.*)`, `Read(**/.env)`, `Read(id_rsa*)`, `Read(id_ed25519*)`, `Read(~/.ssh/**)`, `Read(~/.gnupg/**)`, `Read(~/.aws/**)`, `Read(~/.config/gcloud/**)`, `Read(~/.config/gh/hosts.yml)`, `Read(~/.netrc)`, `Read(~/Library/Keychains/**)`, `Read(~/.local/share/keyrings/**)` |
44
+ | Daemon-managed secret surfaces | `Read(~/.personal-agent/backups/**)`, `Read(~/.personal-agent/whatsapp/auth/**)`, `Read(~/.personal-agent/secrets/**)` |
45
+ | Secret-file writes | `Write(...)` and `Edit(...)` mirrors of every secret-file Read pattern above |
46
+
47
+ Plain `curl` / `wget` are intentionally **not** in this list — skills
48
+ rely on `curl http://localhost:<port>/api/...` as the daemon-API
49
+ chokepoint for memory writes.
50
+
51
+ > **Codex allow-mode gap.** Codex CLI has no hook or admin-policy
52
+ > surface for shell commands, so allow mode runs under
53
+ > `--dangerously-bypass-approvals-and-sandbox` and the absolute-block
54
+ > layer can't enforce on Codex there. See
55
+ > `docs/design/09-safety-cost.md` §6.4 for the accepted gap.
56
+
57
+ ## Default strict-mode list (relaxable)
58
+
59
+ `config.ts > disallowedTools` ships with additional defaults that the
60
+ operator can widen out of via `allowedToolsOverride` or by switching
61
+ to Allow mode. These include `Bash(chmod *)`, `Bash(chown *)`,
62
+ `Bash(git push --force *)`, `Bash(git reset --hard *)` and a handful
63
+ of other footgun patterns. They are **not** in the absolute-block
64
+ layer — Allow mode permits them.
65
+
66
+ ## Audit log
67
+
68
+ Every absolute-block match is logged as
69
+ `agent_actions(action_type='blocked_absolute')` with a redacted form
70
+ of the offending argument and the matched category. The classifier
71
+ that produces the category is `classifyAbsoluteBlock` in
72
+ `src/safety/always-disallowed.ts`.
73
+
74
+ ## Related
75
+
76
+ - [Safety and Execution](../concepts/safety-and-execution.md)
@@ -0,0 +1,39 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: reference/keyboard-shortcuts
4
+ title: Keyboard Shortcuts
5
+ id: keyboard-shortcuts
6
+ category: reference
7
+ summary: |
8
+ Keyboard shortcuts available in the dashboard. The set is small by
9
+ design — the dashboard is a low-cognition surface.
10
+ section: keyboard-shortcuts
11
+ tags:
12
+ - reference
13
+ - dashboard
14
+ status: stable
15
+ ask_examples:
16
+ - What keyboard shortcuts work in the dashboard?
17
+ locale: en-US
18
+ created: 2026-04-25
19
+ updated: 2026-04-25
20
+ related:
21
+ - features/messaging/dashboard-chat
22
+ ---
23
+
24
+ # Keyboard Shortcuts
25
+
26
+ | Keys | Action |
27
+ |---|---|
28
+ | `?` | Open the contextual help slide-over. On `/docs`, focuses the inline QA composer. |
29
+ | `Cmd+K` / `Ctrl+K` | Open the search palette (settings + Actions). |
30
+ | `Esc` | Close the slide-over / palette. |
31
+ | `Cmd+Enter` | Send the current QA composer / chat message. |
32
+
33
+ Shortcuts are skipped when an input or textarea is focused (so typing
34
+ `?` in chat does not open the slide-over). The exception is `Cmd+K`,
35
+ which still opens regardless.
36
+
37
+ ## Related
38
+
39
+ - [Dashboard Chat](../features/messaging/dashboard-chat.md)
@@ -0,0 +1,59 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: reference/process-keys
4
+ title: ProcessKeys (Reference)
5
+ id: process-keys-ref
6
+ aliases:
7
+ - process key list
8
+ - dispatch keys
9
+ category: reference
10
+ summary: |
11
+ The full list of ProcessKeys, what triggers each, and the default
12
+ tier. Mirrors packages/shared/src/process-key.ts.
13
+ section: process-keys
14
+ tags:
15
+ - reference
16
+ - dispatch
17
+ status: stable
18
+ ask_examples:
19
+ - List all the ProcessKeys
20
+ - What is the default tier for hourly check?
21
+ locale: en-US
22
+ created: 2026-04-25
23
+ updated: 2026-04-25
24
+ related:
25
+ - concepts/process-keys
26
+ ---
27
+
28
+ # ProcessKeys
29
+
30
+ | ProcessKey | Trigger | Default tier | Configurable |
31
+ |---|---|---|---|
32
+ | `routine.morning_routine` | Daily at `dayBoundaryHour` (default 04:00) | heavy | yes |
33
+ | `routine.morning_routine_initial` | One-shot, fired once during the setup wizard's first day | heavy | no |
34
+ | `routine.evening_review` | Daily at 18:00 local (fixed) | light | yes |
35
+ | `routine.weekly_review` | Friday 18:00 local (fixed) | light | yes |
36
+ | `routine.monthly_review` | Last day of month, 18:00 local (fixed) | light | yes |
37
+ | `routine.hourly_check` | Every `hourlyCheckIntervalMinutes` (default 60) inside the active window | light | yes |
38
+ | `routine.user_profile_sweep` | Periodic agent-day summarization pass | light | no |
39
+ | `routine.today_refresh` | Mid-day re-check of `today.md` | light | no |
40
+ | `routine.roadmap_refresh` | Periodic roadmap re-derivation | light | no |
41
+ | `routine.custom.<slug>` | Operator-defined recurrence (see [Custom Routines](../features/routines/custom-routines.md)) | configurable | yes |
42
+ | `message.dm` | Owner DM | light | yes |
43
+ | `message.mention` | @-mention in shared channel | light | yes |
44
+ | `dashboard.chat` | `/chat` send | light | yes |
45
+ | `dashboard.docs_qa` | Docs QA panel | light (forced) | yes (within forced light) |
46
+ | `agent.task` | Future-dated agent action (recurring schedules) | light | yes |
47
+ | `agent.dm_task` | DM-tone scheduled session (e.g. morning briefing) | light | yes |
48
+ | `schedule.approaching` | Pre-event reminder | light | no |
49
+ | `calendar.change` | Calendar event added / moved / cancelled | light | yes |
50
+ | `gmail_classify` | Mail classifier inference | light | yes |
51
+ | `setup` | Setup wizard one-shot | heavy | no |
52
+
53
+ "Configurable" = the operator can override the backend / tier on
54
+ `/settings/models` (i.e. the key appears in `CONFIGURABLE_PROCESS_KEYS`).
55
+ "no" means the binding is fixed and uses the corresponding tier's
56
+ global default.
57
+
58
+ This list mirrors `packages/shared/src/process-key.ts`. The codebase
59
+ is the source of truth.
@@ -0,0 +1,50 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: reference/skills
4
+ title: Skills (Reference)
5
+ id: skills-ref
6
+ category: reference
7
+ summary: |
8
+ Index of built-in skills bundled with Aitne. Each maps to
9
+ a SKILL.md under agent-assets/skills/<slug>/.
10
+ section: skills
11
+ tags:
12
+ - reference
13
+ - skills
14
+ status: stable
15
+ ask_examples:
16
+ - List all the built-in skills
17
+ - What does the docs-search skill do?
18
+ locale: en-US
19
+ created: 2026-04-25
20
+ updated: 2026-04-25
21
+ related:
22
+ - concepts/skills
23
+ ---
24
+
25
+ # Built-in Skills
26
+
27
+ | Slug | Purpose |
28
+ |---|---|
29
+ | `attach` | Attach a generated or downloaded file to the agent's reply when the user expects a file artifact. |
30
+ | `context` | Read / write context Markdown — projects, weekly/monthly summaries, agent journal, generic context files. |
31
+ | `docs-search` | Read-only search and fetch over the operator-facing docs corpus. Used for `dashboard.docs_qa`. |
32
+ | `external-services` | Call Google Calendar, the user's Obsidian vault, GitHub, or the agent Skills-management routes through the daemon proxy. |
33
+ | `mail` | Unified multi-provider mail interface (Gmail, Outlook, Yahoo, iCloud) — search, label, classify. |
34
+ | `management-policy` | Capture a durable management rule from a DM ("every morning X", "from now on when Y, do Z"). Persists to the management policy store. |
35
+ | `notify` | Send a notification through the paired messaging app and decide whether notifying is warranted. |
36
+ | `notion` | Read, query, search, create, update, and archive Notion pages and databases. |
37
+ | `observations` | Drain the pending-observations queue and inspect raw external-source change records. |
38
+ | `reading` | Query reading history and highlights; owns the reading-taste profile via the `books` and `reading_highlights` tables. |
39
+ | `receipts` | Query and manage receipt / invoice attachments detected from Gmail; download and save to the external Obsidian vault. |
40
+ | `roadmap` | Read / write `roadmap.md` (cross-request write lock). |
41
+ | `schedule` | Schedule future agent wake-ups and DMs via the daemon (writes `agent_schedule` and `recurring_schedules` rows). |
42
+ | `today` | Read or write `today.md` — morning routines, hourly checks, DMs that need a today snapshot. |
43
+ | `travel` | Query the travel-bookings store (flights, hotels, restaurants, trains). |
44
+ | `travel-time` | Estimate door-to-door travel time via Google Maps; calculate departure times. |
45
+ | `user-interview` | Manage the profile-interview queue at `agent/profile-questions.md`; ask one question at a time. |
46
+ | `user-profile` | Record user facts — identity, people, work, expertise, habits, goals — into the `user/*` slices. |
47
+
48
+ The source of truth is each skill's `SKILL.md` under
49
+ `agent-assets/skills/<slug>/`. The `description` field in that file's
50
+ frontmatter is what the dispatcher uses for runtime skill selection.
@@ -0,0 +1,57 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: troubleshooting/auth-failed
4
+ title: Auth Failed
5
+ id: auth-failed
6
+ aliases:
7
+ - credentials expired
8
+ - login required
9
+ category: troubleshooting
10
+ summary: |
11
+ A backend's auth-health card flipped amber or red. Re-authenticate
12
+ via the backend's CLI or paste a fresh API key.
13
+ section: auth-failed
14
+ tags:
15
+ - troubleshooting
16
+ - safety
17
+ - backends
18
+ status: stable
19
+ ask_examples:
20
+ - Why is the auth-health card amber?
21
+ - How do I re-login to Claude?
22
+ locale: en-US
23
+ created: 2026-04-25
24
+ updated: 2026-04-25
25
+ related:
26
+ - concepts/auth-health
27
+ - features/operations/backend-routing
28
+ ---
29
+
30
+ # Auth Failed
31
+
32
+ ## What You See
33
+
34
+ - A red or amber pill on `/connections` or the dashboard health card.
35
+ - Routines failing with `BackendDecisiveFailure`.
36
+
37
+ ## Most Likely Causes
38
+
39
+ 1. **Token expired** (Codex, Gemini API).
40
+ 2. **Claude credentials rotated** out of the keychain.
41
+ 3. **Scope changed** (e.g. Claude Max plan was downgraded).
42
+
43
+ ## Diagnostic Steps
44
+
45
+ 1. Click the pill to see the recovery hint.
46
+ 2. For Claude: `claude` CLI login, the daemon picks up the new
47
+ credentials on probe refresh.
48
+ 3. For Codex / Gemini: paste a fresh token / API key on
49
+ `/settings/models`.
50
+
51
+ ## Confirming the Fix
52
+
53
+ - The pill flips green within `authPreflightFreshnessMs`.
54
+
55
+ ## Related
56
+
57
+ - [Auth Health](../concepts/auth-health.md)
@@ -0,0 +1,55 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: troubleshooting/dashboard-shows-degraded
4
+ title: Dashboard Shows Degraded
5
+ id: dashboard-shows-degraded
6
+ category: troubleshooting
7
+ summary: |
8
+ The DegradedBanner appears at the top of every page when the daemon
9
+ reports a critical-write block. Usually an integration auth failure
10
+ or a context-file lock issue.
11
+ section: dashboard-shows-degraded
12
+ tags:
13
+ - troubleshooting
14
+ - operations
15
+ status: stable
16
+ ask_examples:
17
+ - Why is the dashboard showing a degraded banner?
18
+ - What does "writes are blocked" mean?
19
+ locale: en-US
20
+ created: 2026-04-25
21
+ updated: 2026-04-25
22
+ related:
23
+ - troubleshooting/auth-failed
24
+ - features/memory-files/today
25
+ ---
26
+
27
+ # Dashboard Shows Degraded
28
+
29
+ ## What You See
30
+
31
+ - A red banner at the top of every page reading
32
+ "Writes are blocked".
33
+ - Routines that write context files fail.
34
+
35
+ ## Most Likely Causes
36
+
37
+ 1. The today-write-lock did not release (rare; daemon was killed
38
+ mid-write).
39
+ 2. An integration auth failure that propagated.
40
+ 3. The data directory ran out of disk.
41
+
42
+ ## Diagnostic Steps
43
+
44
+ 1. `pa logs` — search for the most recent error.
45
+ 2. Confirm `df -h` shows free space on the data directory.
46
+ 3. Check for a stale lock file in `~/.personal-agent/`.
47
+
48
+ ## Confirming the Fix
49
+
50
+ - The banner clears within 30 seconds of the underlying issue
51
+ resolving.
52
+
53
+ ## Related
54
+
55
+ - [Auth Failed](auth-failed.md)
@@ -0,0 +1,54 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: troubleshooting/fallback-keeps-firing
4
+ title: Fallback Keeps Firing
5
+ id: fallback-keeps-firing
6
+ category: troubleshooting
7
+ summary: |
8
+ The router transitioned main → fallback for several runs in a row.
9
+ Almost always main backend is unhealthy or quota-exhausted.
10
+ section: fallback-keeps-firing
11
+ tags:
12
+ - troubleshooting
13
+ - backends
14
+ status: stable
15
+ ask_examples:
16
+ - Why does the fallback keep running?
17
+ - How do I stop the fallover loop?
18
+ locale: en-US
19
+ created: 2026-04-25
20
+ updated: 2026-04-25
21
+ related:
22
+ - troubleshooting/auth-failed
23
+ - troubleshooting/quota-exhausted
24
+ - features/operations/backend-routing
25
+ ---
26
+
27
+ # Fallback Keeps Firing
28
+
29
+ ## What You See
30
+
31
+ - Multiple recent Activity rows with backend != main.
32
+ - Notifications mentioning "fallback".
33
+
34
+ ## Most Likely Causes
35
+
36
+ 1. Main backend's auth has expired.
37
+ 2. Main backend's heavy-tier window is depleted.
38
+ 3. A `BackendDecisiveFailure` is repeating — usually a config issue.
39
+
40
+ ## Diagnostic Steps
41
+
42
+ 1. Open `/connections` — auth-health card.
43
+ 2. Open `/analytics` — main-backend cost / quota.
44
+ 3. Look at the failure detail in Activity for the offending row.
45
+
46
+ ## Confirming the Fix
47
+
48
+ - The next run uses the main backend.
49
+
50
+ ## Related
51
+
52
+ - [Auth Failed](auth-failed.md)
53
+ - [Quota Exhausted](quota-exhausted.md)
54
+ - [Backend Routing](../features/operations/backend-routing.md)