@aitne-sh/aitne 0.1.11 → 0.1.13

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 (151) hide show
  1. package/README.md +4 -0
  2. package/agent-assets/agent-profiles/background-task.md +8 -1
  3. package/agent-assets/agent-profiles/routine-fetch-window.md +11 -0
  4. package/agent-assets/agents/evening-review/agent.md +6 -2
  5. package/agent-assets/agents/lesson-maintenance/agent.md +56 -0
  6. package/agent-assets/agents/morning-routine/agent.md +10 -6
  7. package/agent-assets/agents/source-librarian/agent.md +51 -0
  8. package/agent-assets/docs/concepts/agent-day.md +15 -15
  9. package/agent-assets/docs/concepts/auth-health.md +10 -7
  10. package/agent-assets/docs/concepts/backends-and-tiers.md +34 -23
  11. package/agent-assets/docs/concepts/costs-and-quotas.md +10 -10
  12. package/agent-assets/docs/concepts/delegated-mode.md +18 -18
  13. package/agent-assets/docs/concepts/memory-model.md +25 -24
  14. package/agent-assets/docs/concepts/observations.md +27 -19
  15. package/agent-assets/docs/concepts/process-keys.md +25 -26
  16. package/agent-assets/docs/concepts/routines.md +18 -17
  17. package/agent-assets/docs/concepts/safety-and-execution.md +20 -17
  18. package/agent-assets/docs/concepts/safety-model.md +16 -15
  19. package/agent-assets/docs/concepts/skills.md +7 -4
  20. package/agent-assets/docs/features/integrations/browser-history.md +52 -47
  21. package/agent-assets/docs/features/integrations/calendar.md +7 -7
  22. package/agent-assets/docs/features/integrations/git.md +15 -13
  23. package/agent-assets/docs/features/integrations/github.md +12 -10
  24. package/agent-assets/docs/features/integrations/mail.md +47 -45
  25. package/agent-assets/docs/features/integrations/notion.md +15 -11
  26. package/agent-assets/docs/features/integrations/obsidian.md +27 -23
  27. package/agent-assets/docs/features/lifestyle/git.md +7 -8
  28. package/agent-assets/docs/features/lifestyle/reading.md +11 -8
  29. package/agent-assets/docs/features/lifestyle/receipts.md +21 -22
  30. package/agent-assets/docs/features/lifestyle/travel-bookings.md +9 -9
  31. package/agent-assets/docs/features/memory-files/agent-journal.md +12 -10
  32. package/agent-assets/docs/features/memory-files/agent-lessons.md +46 -21
  33. package/agent-assets/docs/features/memory-files/projects.md +13 -14
  34. package/agent-assets/docs/features/memory-files/roadmap.md +16 -15
  35. package/agent-assets/docs/features/memory-files/schedule.md +10 -10
  36. package/agent-assets/docs/features/memory-files/today.md +18 -18
  37. package/agent-assets/docs/features/memory-files/user-profile.md +17 -17
  38. package/agent-assets/docs/features/messaging/bang-commands.md +15 -15
  39. package/agent-assets/docs/features/messaging/dashboard-chat.md +8 -7
  40. package/agent-assets/docs/features/messaging/discord.md +7 -5
  41. package/agent-assets/docs/features/messaging/overview.md +14 -14
  42. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +12 -12
  43. package/agent-assets/docs/features/messaging/slack.md +9 -8
  44. package/agent-assets/docs/features/messaging/telegram.md +7 -7
  45. package/agent-assets/docs/features/messaging/whatsapp.md +6 -6
  46. package/agent-assets/docs/features/operations/activity-and-conversations.md +9 -9
  47. package/agent-assets/docs/features/operations/approvals.md +13 -12
  48. package/agent-assets/docs/features/operations/backend-routing.md +38 -37
  49. package/agent-assets/docs/features/operations/browser-tasks.md +63 -57
  50. package/agent-assets/docs/features/operations/cost-tracking.md +5 -5
  51. package/agent-assets/docs/features/operations/managed-chromium.md +23 -22
  52. package/agent-assets/docs/features/operations/notifications.md +15 -15
  53. package/agent-assets/docs/features/operations/quiet-hours.md +14 -15
  54. package/agent-assets/docs/features/operations/schedule-approaching.md +16 -14
  55. package/agent-assets/docs/features/routines/activity-scan.md +14 -11
  56. package/agent-assets/docs/features/routines/custom-routines.md +9 -7
  57. package/agent-assets/docs/features/routines/evening-review.md +6 -7
  58. package/agent-assets/docs/features/routines/morning-routine.md +23 -22
  59. package/agent-assets/docs/features/routines/weekly-review.md +57 -51
  60. package/agent-assets/docs/features/wiki/commands.md +28 -22
  61. package/agent-assets/docs/features/wiki/cost-and-approval.md +28 -23
  62. package/agent-assets/docs/features/wiki/dashboard.md +22 -24
  63. package/agent-assets/docs/features/wiki/overview.md +17 -25
  64. package/agent-assets/docs/features/wiki/search.md +15 -17
  65. package/agent-assets/docs/features/wiki/workspaces.md +55 -56
  66. package/agent-assets/docs/getting-started/01-what-is-this.md +4 -5
  67. package/agent-assets/docs/getting-started/02-first-steps.md +12 -13
  68. package/agent-assets/docs/getting-started/03-what-can-this-do.md +7 -7
  69. package/agent-assets/docs/getting-started/04-first-day.md +4 -5
  70. package/agent-assets/docs/glossary.md +21 -19
  71. package/agent-assets/docs/guides/add-a-custom-routine.md +17 -12
  72. package/agent-assets/docs/guides/backup-and-restore.md +19 -16
  73. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +57 -62
  74. package/agent-assets/docs/guides/build-your-wiki.md +11 -12
  75. package/agent-assets/docs/guides/change-which-model-handles-x.md +30 -28
  76. package/agent-assets/docs/guides/connect-a-new-mail-account.md +30 -29
  77. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +30 -32
  78. package/agent-assets/docs/guides/import-knowledge-file.md +9 -10
  79. package/agent-assets/docs/guides/install-and-run.md +9 -10
  80. package/agent-assets/docs/guides/maintain-wiki-health.md +10 -10
  81. package/agent-assets/docs/guides/migrate-machines.md +16 -14
  82. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +12 -13
  83. package/agent-assets/docs/guides/pause-the-agent.md +25 -25
  84. package/agent-assets/docs/guides/reinstall-cleanly.md +13 -12
  85. package/agent-assets/docs/guides/setup-wizard.md +10 -12
  86. package/agent-assets/docs/guides/switch-default-backend.md +9 -9
  87. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +9 -11
  88. package/agent-assets/docs/pages/activity.md +76 -0
  89. package/agent-assets/docs/pages/agents.md +78 -0
  90. package/agent-assets/docs/pages/analytics.md +70 -0
  91. package/agent-assets/docs/pages/browser.md +73 -0
  92. package/agent-assets/docs/pages/chat.md +67 -0
  93. package/agent-assets/docs/pages/connections.md +78 -0
  94. package/agent-assets/docs/pages/git.md +73 -0
  95. package/agent-assets/docs/pages/knowledge.md +75 -0
  96. package/agent-assets/docs/pages/overview.md +90 -0
  97. package/agent-assets/docs/pages/reading.md +65 -0
  98. package/agent-assets/docs/pages/settings.md +77 -0
  99. package/agent-assets/docs/pages/tasks.md +74 -0
  100. package/agent-assets/docs/pages/wiki.md +73 -0
  101. package/agent-assets/docs/reference/api.md +18 -17
  102. package/agent-assets/docs/reference/cli-commands.md +13 -10
  103. package/agent-assets/docs/reference/config.md +40 -35
  104. package/agent-assets/docs/reference/disallowed-tools.md +18 -17
  105. package/agent-assets/docs/reference/keyboard-shortcuts.md +6 -8
  106. package/agent-assets/docs/reference/knowledge-layout.md +10 -10
  107. package/agent-assets/docs/reference/process-keys.md +20 -22
  108. package/agent-assets/docs/reference/skills.md +18 -16
  109. package/agent-assets/docs/troubleshooting/auth-failed.md +13 -11
  110. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +10 -10
  111. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +26 -24
  112. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +8 -9
  113. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +19 -18
  114. package/agent-assets/docs/troubleshooting/observation-not-detected.md +14 -15
  115. package/agent-assets/docs/troubleshooting/quota-exhausted.md +28 -26
  116. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +35 -34
  117. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +21 -24
  118. package/agent-assets/playbooks/markdown-note.md +43 -0
  119. package/agent-assets/playbooks/monitoring.md +29 -0
  120. package/agent-assets/playbooks/research.md +47 -0
  121. package/agent-assets/skills/agent-create/SKILL.md +71 -32
  122. package/agent-assets/skills/agent-create/references/prompt-frame-extended.md +132 -0
  123. package/agent-assets/skills/agent-create/references/prompt-frame.md +125 -0
  124. package/agent-assets/skills/background-task/SKILL.md +13 -8
  125. package/agent-assets/skills/background-task-reply/SKILL.md +2 -2
  126. package/agent-assets/skills/board/SKILL.md +92 -0
  127. package/agent-assets/skills/browser-history/SKILL.md +3 -3
  128. package/agent-assets/skills/browser-history-respond/SKILL.md +3 -3
  129. package/agent-assets/skills/browser-task/SKILL.md +4 -2
  130. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +2 -1
  131. package/agent-assets/skills/schedule/SKILL.md +21 -18
  132. package/agent-assets/skills/schedule/references/batch.md +1 -1
  133. package/agent-assets/skills/schedule/references/model-selection.md +1 -1
  134. package/agent-assets/skills/schedule/references/prompt-frame.md +125 -0
  135. package/agent-assets/skills/sources/SKILL.md +68 -0
  136. package/agent-assets/skills/sources/curation.json +21 -0
  137. package/agent-assets/skills/sources/seeds/filing-rules.seed.json +25 -0
  138. package/agent-assets/skills/sources/seeds/source-collections.seed.json +20 -0
  139. package/agent-assets/skills/task/SKILL.md +82 -0
  140. package/agent-assets/task-flows/background_task.md +29 -3
  141. package/agent-assets/task-flows/message.received.dm.md +1 -1
  142. package/agent-assets/task-flows/routine.activity_scan.md +17 -2
  143. package/agent-assets/task-flows/routine.evening_review.md +72 -11
  144. package/agent-assets/task-flows/routine.fetch_window.md +21 -0
  145. package/agent-assets/task-flows/routine.monthly_review.md +3 -1
  146. package/agent-assets/task-flows/routine.morning_routine_today.md +26 -7
  147. package/agent-assets/task-flows/routine.source_maintenance.md +50 -0
  148. package/agent-assets/task-flows/scheduled.dm.md +29 -16
  149. package/agent-assets/templates/_manifest.json +1 -0
  150. package/agent-assets/templates/knowledge/sources/_index.md +19 -0
  151. package/package.json +4 -4
package/README.md CHANGED
@@ -18,6 +18,10 @@ npm install -g @aitne-sh/aitne@latest
18
18
  aitne start
19
19
  ```
20
20
 
21
+ <video src="https://github.com/user-attachments/assets/d5297828-011d-4d57-80a0-60a5e46063bf" controls playsinline></video>
22
+
23
+ <sub>▶︎ 40-second tour. If the player doesn't load, <a href="https://github.com/user-attachments/assets/d5297828-011d-4d57-80a0-60a5e46063bf">watch it here</a>.</sub>
24
+
21
25
  ![Aitne setup and dashboard walkthrough](./docs/assets/aitne-demo.gif)
22
26
 
23
27
  </div>
@@ -11,7 +11,7 @@ hand back a faithful artifact; the main DM agent delivers it.
11
11
 
12
12
  - **You produce raw material, not a message.** You have no messaging
13
13
  tool. Your only owner-facing output is `finish(result, draft, notify,
14
- significance?)`. The verbatim `result` is the fidelity anchor; the
14
+ verification, significance?)`. The verbatim `result` is the fidelity anchor; the
15
15
  `draft` is a plain summary the DM agent weaves into the conversation in
16
16
  its own voice. Never try to phrase a "✅ done!" message yourself.
17
17
 
@@ -41,6 +41,13 @@ hand back a faithful artifact; the main DM agent delivers it.
41
41
  reasonable, explicitly-stated assumption. If you must, `ask_user` ONCE
42
42
  with a sharp question and then stop the turn.
43
43
 
44
+ - **Verify before you finish.** `finish` requires a
45
+ requirement-by-requirement `verification` checklist derived from the
46
+ brief's expected output, each item judged against your actual result
47
+ with concrete evidence. Never claim completion your evidence doesn't
48
+ support — an unmet requirement is disclosed automatically; a false
49
+ "met" is a lie the owner will act on.
50
+
44
51
  - **Finish cleanly, exactly once.** `finish` ends your session. Make the
45
52
  `result` complete (every number, URL, id) and the `draft` short and
46
53
  lead-with-the-answer.
@@ -79,6 +79,17 @@ return the same result shape:
79
79
  `routine.fetch_window`. If you hit the cap, record what's left as
80
80
  `{"type":"budget-exhausted","remaining":[…]}` in `errors`.
81
81
 
82
+ ## Turn efficiency
83
+
84
+ This run is turn-capped; a run that overruns the cap is killed mid-fetch.
85
+ Minimise round-trips — every model turn is one:
86
+ - Load every deferred connector schema in ONE `ToolSearch` call (a
87
+ comma-separated `select:` list) — never one `ToolSearch` per tool.
88
+ - Emit independent `<fetch>` rows' read calls in the SAME turn; they don't
89
+ depend on each other.
90
+ - Never call per-item detail tools (`get_thread`, `get_event`, …) — the
91
+ list response already carries the compact subset you submit.
92
+
82
93
  ## Output format
83
94
 
84
95
  Print exactly one JSON line on stdout, then terminate:
@@ -20,9 +20,13 @@ backend:
20
20
  model: null
21
21
 
22
22
  # ── Limits (per execution) ───────────────────────────────────────────────────
23
+ # Mirrors the runtime envelope (plan-presets / process_backend_config seed:
24
+ # routine.evening_review is 50 / $2.00). These values prefill the dashboard
25
+ # Definition form; a stale lower number saved there would clamp the real runs
26
+ # via override_snapshot, so keep them in step with the seed authority.
23
27
  limits:
24
- max_turns: 25
25
- max_budget_usd: 0.50
28
+ max_turns: 50
29
+ max_budget_usd: 2.00
26
30
  timeout_minutes: 12
27
31
 
28
32
  # ── Expected outputs ─────────────────────────────────────────────────────────
@@ -0,0 +1,56 @@
1
+ ---
2
+ # ── Identity ─────────────────────────────────────────────────────────────────
3
+ slug: lesson-maintenance
4
+ name: Lesson Maintenance
5
+ description: "Mechanical (no-LLM) lesson-store upkeep — confidence (cf) re-stamping and the graduated demote/archive/re-promote lifecycle — before the evening review."
6
+ kind: builtin
7
+ version: 1
8
+ enabled: true
9
+ tags: [routine, daily, lessons, feedback, no-llm]
10
+
11
+ # ── Schedule (17:40 — before the 17:45 roadmap pass and 18:00 Evening Review) ─
12
+ schedule:
13
+ kind: cron
14
+ expression: "40 17 * * *"
15
+
16
+ # ── Backend / routing ────────────────────────────────────────────────────────
17
+ # `process_key: null` — this is a no-LLM in-process pass with no backend-routing
18
+ # key (§5.5.1). Reserved for built-ins; the schema rejects a null key for user
19
+ # Agents.
20
+ backend:
21
+ process_key: null
22
+ tier: null
23
+ model: null
24
+
25
+ # ── Limits (no LLM turn — zero budget; `max_turns` must be ≥ 1 per schema) ──
26
+ limits:
27
+ max_turns: 1
28
+ max_budget_usd: 0
29
+ timeout_minutes: 5
30
+
31
+ # ── Expected outputs ─────────────────────────────────────────────────────────
32
+ outputs:
33
+ - policies/agent-lessons.md
34
+
35
+ success_criteria: []
36
+
37
+ # ── Stop warning (byte-identical to BUILTIN_AGENT_REGISTRY, §12.1) ──────────
38
+ stop_warning:
39
+ level: normal
40
+ services_lost:
41
+ - "Mechanical lesson-store maintenance (confidence re-stamping, graduated demote/archive/re-promote lifecycle)"
42
+ dependent_agents:
43
+ - evening-review
44
+ reactivation_hint: "Re-enable from /agents/lesson-maintenance. Runs daily at 17:40, before Evening Review."
45
+ ---
46
+
47
+ # Lesson Maintenance
48
+
49
+ No-LLM in-process pass — there is no task-flow. Implemented by the daemon
50
+ callback `onLessonMaintenance` registered in `scheduler.ts`
51
+ (SELF_IMPROVEMENT_PHASE2 §2.1/§2.3): re-stamps each lesson's numeric
52
+ confidence (`cf=`) and enacts the graduated demote → archive → re-promote
53
+ lifecycle over `policies/agent-lessons.md` and every
54
+ `policies/agents/<slug>/lessons.md`, so expiration fires even on nights with
55
+ zero feedback signals and hand-edited files re-normalize. It runs at 17:40 so
56
+ the 18:00 Evening Review consolidation reads freshly-normalized stores.
@@ -2,7 +2,7 @@
2
2
  # ── Identity ─────────────────────────────────────────────────────────────────
3
3
  slug: morning-routine
4
4
  name: Morning Routine
5
- description: "Regenerates state/today.md, creates the daily journal entry, and delivers the morning DM digest at the day boundary."
5
+ description: "Regenerates state/today.md and creates the daily journal entry at the day boundary."
6
6
  kind: builtin
7
7
  version: 1
8
8
  enabled: true
@@ -28,9 +28,14 @@ backend:
28
28
  model: null
29
29
 
30
30
  # ── Limits (per execution) ───────────────────────────────────────────────────
31
+ # Mirrors the runtime envelope (plan-presets / process_backend_config seed:
32
+ # parent routine.morning_routine and Stage A routine.morning_routine_today are
33
+ # both 50 / $2.00). These values prefill the dashboard Definition form; a
34
+ # stale lower number saved there would clamp the real runs via
35
+ # override_snapshot, so keep them in step with the seed authority.
31
36
  limits:
32
- max_turns: 30
33
- max_budget_usd: 0.50
37
+ max_turns: 50
38
+ max_budget_usd: 2.00
34
39
  timeout_minutes: 15
35
40
 
36
41
  # ── Expected outputs (informational; drive the dashboard + criteria intent) ──
@@ -43,8 +48,8 @@ outputs:
43
48
  # today.md is regenerated wholesale every morning, so a section-count floor is
44
49
  # a real check (it fails on a degenerate/empty regen). The daily journal is
45
50
  # written for the *previous* agent-day (`daily/<yesterday>.md`), which the
46
- # `{date}`-only evaluator cannot target, and the DM digest is conditional —
47
- # both are listed under `outputs` rather than asserted as criteria.
51
+ # `{date}`-only evaluator cannot target, so it is listed under `outputs`
52
+ # rather than asserted as a criterion.
48
53
  success_criteria:
49
54
  - id: today_md_populated
50
55
  kind: file_section_count
@@ -64,7 +69,6 @@ stop_warning:
64
69
  services_lost:
65
70
  - "Daily state/today.md regeneration"
66
71
  - "Daily journal entry creation"
67
- - "Morning DM digest delivery"
68
72
  dependent_agents:
69
73
  - evening-review
70
74
  - weekly-review
@@ -0,0 +1,51 @@
1
+ ---
2
+ # ── Identity ─────────────────────────────────────────────────────────────────
3
+ slug: source-librarian
4
+ name: Source Librarian
5
+ description: "Weekly triage of unfiled source documents into knowledge/sources/ cards, taxonomy upkeep, and library-vault consistency checks."
6
+ kind: builtin
7
+ version: 1
8
+ enabled: true
9
+ tags: [routine, weekly, sources, maintenance]
10
+
11
+ # ── Schedule (Saturday 09:00; scheduler adds a no-LLM nothing-to-do prefilter) ─
12
+ schedule:
13
+ kind: cron
14
+ expression: "0 9 * * 6"
15
+
16
+ # ── Backend / routing (tier/model deferred to process_backend_config) ───────
17
+ backend:
18
+ process_key: routine.source_maintenance
19
+ tier: null
20
+ model: null
21
+
22
+ # ── Limits (per execution) ───────────────────────────────────────────────────
23
+ limits:
24
+ max_turns: 50
25
+ max_budget_usd: 1.00
26
+ timeout_minutes: 20
27
+
28
+ # ── Expected outputs ─────────────────────────────────────────────────────────
29
+ # Cards are keyed on agent-chosen collection/slug paths, which the
30
+ # `{date}`-only success-criteria evaluator cannot target in v1, so they are
31
+ # documented here rather than asserted as criteria.
32
+ outputs:
33
+ - "knowledge/sources/<collection>/<slug>.md"
34
+ - knowledge/sources/_index.md
35
+
36
+ success_criteria: []
37
+
38
+ # ── Stop warning (byte-identical to BUILTIN_AGENT_REGISTRY, §12.1) ──────────
39
+ stop_warning:
40
+ level: normal
41
+ services_lost:
42
+ - "Weekly filing of unfiled source documents into knowledge/sources/"
43
+ - "Source library and vault consistency checks"
44
+ dependent_agents: []
45
+ reactivation_hint: "Re-enable from /agents/source-librarian. Resumes on the next Saturday 09:00 firing."
46
+ ---
47
+
48
+ # Source Librarian
49
+
50
+ Built-in routine — the execution prompt lives in the task-flow, not here.
51
+ See `agent-assets/task-flows/routine.source_maintenance.md`.
@@ -14,7 +14,6 @@ summary: |
14
14
  drives every routine schedule and date-stamped memory file.
15
15
  section: agent-day
16
16
  tags:
17
- - core
18
17
  - memory
19
18
  - routines
20
19
  - scheduler
@@ -26,7 +25,7 @@ ask_examples:
26
25
  - What is dayBoundaryHour?
27
26
  locale: en-US
28
27
  created: 2026-04-25
29
- updated: 2026-06-07
28
+ updated: 2026-07-01
30
29
  keywords:
31
30
  - day boundary
32
31
  - 04:00
@@ -49,23 +48,24 @@ config_keys:
49
48
 
50
49
  ## TL;DR
51
50
 
52
- Aitne treats the "day" as starting at **04:00 local time**, not
53
- 00:00. Anything you log between midnight and 4am is filed under the day
54
- that just ended, so a late commit at 02:30 lands in the same `state/today.md`
55
- that opened the previous morning.
51
+ Aitne starts each "day" at **04:00 local time**, not at 00:00. In other
52
+ words, the agent-day boundary (the moment "today" rolls over) sits at 4am
53
+ by default. Anything you do between midnight and 4am counts toward the day
54
+ that is just ending, so a late commit at 02:30 lands in the same
55
+ `state/today.md` that opened the previous morning.
56
56
 
57
57
  ## Why This Concept Exists
58
58
 
59
- Owner-as-user installations almost always have late-night work sessions
60
- that, mentally, belong to "today" even though the wall-clock has already
61
- ticked over. A day boundary at midnight would split a single coherent
62
- working session across two `state/today.md` files, and the morning routine
63
- would open against an empty schedule because no agent activity had been
64
- logged for the new calendar day yet.
59
+ Most people who run Aitne for themselves work late into the night. Those
60
+ sessions still feel like "today" to you, even after the clock has ticked
61
+ past midnight. A boundary at midnight would cut one continuous work session
62
+ in half, spreading it across two `state/today.md` files. It would also leave
63
+ the morning routine with nothing to open against: no agent activity has been
64
+ logged yet for the fresh calendar day.
65
65
 
66
- Picking 04:00 is a defensive default: late enough to capture even very
67
- late nights, early enough that an early-rising operator (5–6am) sees a
68
- clean boundary before they start.
66
+ 04:00 is a safe default. It is late enough to capture even very late nights,
67
+ yet early enough that an early riser (someone up at 5–6am) still starts the
68
+ day on the far side of a clean boundary.
69
69
 
70
70
  ## Definitions
71
71
 
@@ -16,7 +16,6 @@ summary: |
16
16
  recovery flows when the right signal is available.
17
17
  section: auth-health
18
18
  tags:
19
- - core
20
19
  - safety
21
20
  - backends
22
21
  - operations
@@ -29,7 +28,7 @@ ask_examples:
29
28
  - What is the SubscriptionAuthWarning banner?
30
29
  locale: en-US
31
30
  created: 2026-04-25
32
- updated: 2026-06-07
31
+ updated: 2026-07-01
33
32
  keywords:
34
33
  - auth
35
34
  - authentication
@@ -44,6 +43,7 @@ related:
44
43
  - concepts/backends-and-tiers
45
44
  - concepts/costs-and-quotas
46
45
  - troubleshooting/auth-failed
46
+ - troubleshooting/dashboard-shows-degraded
47
47
  ui_anchors:
48
48
  - /settings/models
49
49
  - /
@@ -68,14 +68,15 @@ red and surfaces a recovery hint.
68
68
 
69
69
  ## Why This Concept Exists
70
70
 
71
- Routines silently failing because of an expired token is the most
72
- common operator pain. The auth-health monitor is the proactive surface
73
- that surfaces "your credentials expired" before the next morning
74
- routine fails.
71
+ A routine that quietly fails because a token expired is the most
72
+ common operator headache. The auth-health monitor catches that early:
73
+ it tells you "your credentials expired" before the next morning
74
+ routine trips over the same problem.
75
75
 
76
76
  ## Definitions
77
77
 
78
- - **Probe**: a no-op call against each backend's auth surface. With
78
+ - **Probe**: a lightweight test call that checks each backend's login
79
+ without doing any real work. With
79
80
  a registered API key the probe hits the provider's lightweight
80
81
  `models` endpoint (Anthropic, OpenAI, Google) and verifies the key
81
82
  is live. Without an API key, the probe checks whatever local CLI
@@ -138,3 +139,5 @@ register a paid key and leave the gray area.
138
139
  quota signals interact.
139
140
  - [Troubleshooting: Auth Failed](../troubleshooting/auth-failed.md) —
140
141
  step-by-step recovery when a card goes red.
142
+ - [Dashboard Shows Degraded](../troubleshooting/dashboard-shows-degraded.md) —
143
+ what to do when the dashboard flags a backend as degraded.
@@ -13,13 +13,11 @@ aliases:
13
13
  category: concepts
14
14
  summary: |
15
15
  Aitne runs on four backends — Claude Code, Codex, Gemini CLI, OpenCode.
16
- Each backend exposes light, medium, and high model tiers; the dispatcher
16
+ Each backend exposes lite, medium, and high model tiers; the dispatcher
17
17
  picks the binding for every ProcessKey based on operator configuration.
18
18
  section: backends
19
19
  tags:
20
- - core
21
20
  - backends
22
- - models
23
21
  - cost
24
22
  - routing
25
23
  status: stable
@@ -31,7 +29,7 @@ ask_examples:
31
29
  - How does Aitne fail over when a backend hits its quota?
32
30
  locale: en-US
33
31
  created: 2026-04-25
34
- updated: 2026-06-07
32
+ updated: 2026-07-01
35
33
  keywords:
36
34
  - claude
37
35
  - codex
@@ -53,6 +51,9 @@ related:
53
51
  - concepts/process-keys
54
52
  - concepts/costs-and-quotas
55
53
  - features/operations/backend-routing
54
+ - concepts/auth-health
55
+ - troubleshooting/fallback-keeps-firing
56
+ - troubleshooting/quota-exhausted
56
57
  ui_anchors:
57
58
  - /settings/models
58
59
  - /analytics
@@ -85,7 +86,7 @@ tiers. The per-backend defaults seeded at install time are:
85
86
 
86
87
  | Tier | Claude | Codex | Gemini | OpenCode |
87
88
  |---|---|---|---|---|
88
- | **medium** (main) | Sonnet 4.6 | GPT-5.4 | Gemini 3.1 Pro (preview) | Sonnet 4.6 |
89
+ | **medium** (main) | Sonnet 5 | GPT-5.4 | Gemini 3.1 Pro (preview) | Sonnet 5 |
89
90
  | **lite** (delegated) | Haiku 4.5 | GPT-5.4 Mini | Gemini 3.1 Flash Lite (preview) | Haiku 4.5 |
90
91
  | **high** (heavy) | Opus 4.8 | GPT-5.4¹ | Gemini 3.1 Pro (preview)¹ | Opus 4.8 |
91
92
 
@@ -114,9 +115,10 @@ What each tier is for:
114
115
  daemon-prepared `<roadmap_skeleton>` block instead of the retired
115
116
  heavy `routine.morning_routine_initial`.
116
117
 
117
- Every ProcessKey resolves to a backend + model binding via
118
- `BackendRouter`. Aitne **does not store or read subscription-plan
119
- state** there is no "Claude Pro / Max / Team" or "ChatGPT Plus /
118
+ Every [ProcessKey](process-keys.md) Aitne's internal name for one
119
+ kind of work, such as a morning routine or a Gmail classification —
120
+ resolves to a backend + model binding via `BackendRouter`. Aitne
121
+ **does not store or read subscription-plan state** — there is no "Claude Pro / Max / Team" or "ChatGPT Plus /
120
122
  Pro" picker in the wizard or settings, and the DB has no plan
121
123
  column. Bindings come from `process_backend_config` rows seeded at
122
124
  install time and edited from `/settings/models`.
@@ -132,11 +134,11 @@ Each backend authenticates via a provider API key registered on
132
134
  | `opencode` | `opencode-server` (server URL + HTTP Basic-Auth username / optional password). Model-provider keys (Anthropic / OpenAI / OpenRouter / …) live on the OpenCode server itself — configure them there with `opencode auth login`; Aitne does not store or forward them | "Managed" mode runs a local `opencode` HTTP server on loopback; a "Remote" mode pointing at a baseUrl you operate is designed but not wired up yet |
133
135
 
134
136
  API keys are the recommended and provider-supported auth method for
135
- headless agent use; if you skip the key the daemon falls back to the
137
+ headless agent use. If you skip the key, the daemon falls back to the
136
138
  CLI's local subscription login, which most providers do not
137
139
  officially support — Anthropic in particular currently prohibits the
138
140
  Claude Agent SDK on a Claude Pro / Max subscription. The dashboard
139
- surfaces a warning whenever a backend is on subscription auth.
141
+ shows a warning whenever a backend is on subscription auth.
140
142
 
141
143
  Cloud / aggregator providers (Bedrock / Vertex / Foundry / Azure
142
144
  OpenAI / Gemini-Vertex / OpenRouter via OpenCode) let teams reuse
@@ -179,9 +181,9 @@ through the daemon's polling path or another backend's MCP). See
179
181
  Different work has different cost / quality tradeoffs. Owner-facing
180
182
  surfaces (DMs, daily review) need real instruction-following.
181
183
  Background polling (mail / calendar / git events) just needs a
182
- classifier-shaped output. Splitting Sonnet vs Haiku at the seed layer
183
- keeps the cost of an autonomous loop bounded without compromising the
184
- quality of work the operator actually reads.
184
+ classifier-shaped output. Splitting Sonnet vs Haiku in the
185
+ install-time defaults keeps the cost of an autonomous loop bounded
186
+ without hurting the quality of the work the operator actually reads.
185
187
 
186
188
  Multiple backends exist so Aitne isn't single-vendor. The same
187
189
  operator can keep Claude as the primary brain, fall back to Codex when
@@ -194,10 +196,13 @@ Claude's quota is exhausted, or use Gemini for cheap polling tasks.
194
196
  - **Tier**: `lite`, `medium`, or `high`. `high` maps to the strongest
195
197
  model class (Opus-class — Opus 4.8 on Claude and OpenCode; on Codex
196
198
  and Gemini the seeded high binding collapses to the medium model).
197
- `medium` (Sonnet-class — Sonnet 4.6 and equivalents) is the
199
+ `medium` (Sonnet-class — Sonnet 5 and equivalents) is the
198
200
  operator's day-to-day tier for owner-facing work; `lite`
199
201
  (Haiku-class — Haiku 4.5 and equivalents) is reserved for
200
- mechanical / delegated surfaces.
202
+ mechanical / delegated surfaces. Sonnet 5 became the seeded medium
203
+ default on 2026-06-30; the prior **Sonnet 4.6** is retained as a
204
+ `(legacy)` model — hidden from the pickers but still resolvable for
205
+ any row already pinned to it.
201
206
  - **Main / Fallback**: each ProcessKey has a `main` backend and a
202
207
  `fallback`. The router fails over on `BackendQuotaError` /
203
208
  `BackendDecisiveFailure`.
@@ -206,13 +211,13 @@ Claude's quota is exhausted, or use Gemini for cheap polling tasks.
206
211
 
207
212
  | ProcessKey | Default main | Seeded model |
208
213
  |---|---|---|
209
- | `routine.morning_routine` | claude | Sonnet 4.6 |
210
- | `routine.evening_review` | claude | Sonnet 4.6 |
211
- | `routine.weekly_review` | claude | Sonnet 4.6 |
212
- | `routine.activity_scan` | claude | Sonnet 4.6 |
213
- | `message.dm` | claude | Sonnet 4.6 |
214
- | `dashboard.chat` | claude | Sonnet 4.6 |
215
- | `dashboard.docs_qa` | inherits from `message.dm` | Sonnet 4.6 (locked to medium) |
214
+ | `routine.morning_routine` | claude | Sonnet 5 |
215
+ | `routine.evening_review` | claude | Sonnet 5 |
216
+ | `routine.weekly_review` | claude | Sonnet 5 |
217
+ | `routine.activity_scan` | claude | Sonnet 5 |
218
+ | `message.dm` | claude | Sonnet 5 |
219
+ | `dashboard.chat` | claude | Sonnet 5 |
220
+ | `dashboard.docs_qa` | inherits from `message.dm` | Sonnet 5 (locked to medium) |
216
221
  | `gmail_classify` | claude | Haiku 4.5 |
217
222
  | `github.*` | claude | Haiku 4.5 |
218
223
  | `git.push.detected` (and other git-poll keys) | claude | Haiku 4.5 |
@@ -232,4 +237,10 @@ Claude's quota is exhausted, or use Gemini for cheap polling tasks.
232
237
 
233
238
  - [Costs and Quotas](costs-and-quotas.md) — how to read the rollup.
234
239
  - [Backend Routing](../features/operations/backend-routing.md) — the
235
- fallover machinery.
240
+ failover machinery.
241
+ - [Auth Health](auth-health.md) — check whether each backend's
242
+ credentials are still valid.
243
+ - [Fallback Keeps Firing](../troubleshooting/fallback-keeps-firing.md) —
244
+ when the router keeps switching to the fallback backend.
245
+ - [Quota Exhausted](../troubleshooting/quota-exhausted.md) — what to do
246
+ when a backend runs out of quota.
@@ -17,7 +17,6 @@ summary: |
17
17
  dashboard reports, it does not bill.
18
18
  section: cost
19
19
  tags:
20
- - core
21
20
  - cost
22
21
  - quotas
23
22
  - backends
@@ -31,7 +30,7 @@ ask_examples:
31
30
  - How does Gemini's per-day quota work?
32
31
  locale: en-US
33
32
  created: 2026-04-25
34
- updated: 2026-06-07
33
+ updated: 2026-07-01
35
34
  keywords:
36
35
  - cost
37
36
  - budget
@@ -88,7 +87,10 @@ is not provider-supported for automated agent use — see
88
87
  shape becomes whatever the underlying subscription enforces (e.g.
89
88
  Claude's rolling 5-hour Opus window when running on a Max plan login).
90
89
 
91
- The dashboard rolls cost up by ProcessKey, by backend, and by agent day.
90
+ The dashboard rolls cost up three ways: by ProcessKey (the routine or
91
+ event type that triggered the run), by backend, and by agent day (the
92
+ window Aitne treats as "today", which rolls over at 04:00 local by
93
+ default).
92
94
 
93
95
  ## Why This Concept Exists
94
96
 
@@ -194,14 +196,12 @@ register an API key on `/settings/models`.
194
196
 
195
197
  ## Where You See It
196
198
 
197
- In the dashboard:
199
+ In the dashboard, the **Analytics** page (`/analytics`) is the full
200
+ cost rollup — by backend, by ProcessKey, by model, over daily / weekly
201
+ / monthly windows, with the day's running total in the sidebar. See
202
+ [Cost Tracking](../features/operations/cost-tracking.md) for the guided
203
+ tour. One surface is specific to this page's topic:
198
204
 
199
- - **Analytics** (`/analytics`) rolls cost by backend, by ProcessKey
200
- (event type), by model, and over daily / weekly / monthly periods,
201
- plus a today total.
202
- - **Sidebar** shows the day's running total next to the Analytics
203
- entry.
204
- - **Activity** event details include the per-execute cost.
205
205
  - **Settings → Models** (`/settings/models`) exposes the per-backend
206
206
  API-key panel and a warning banner whenever a backend is running on
207
207
  subscription auth.
@@ -24,7 +24,6 @@ summary: |
24
24
  (`/api/integrations/:key/exec` task-mode proxy).
25
25
  section: integrations
26
26
  tags:
27
- - core
28
27
  - integrations
29
28
  - safety
30
29
  - skills
@@ -36,7 +35,7 @@ ask_examples:
36
35
  - Why don't I see a SKILL.md for Gmail in my Codex session?
37
36
  locale: en-US
38
37
  created: 2026-04-26
39
- updated: 2026-06-07
38
+ updated: 2026-07-01
40
39
  keywords:
41
40
  - delegated mode
42
41
  - direct mode
@@ -101,9 +100,10 @@ backend is the same as the integration's `delegatedBackend`:
101
100
 
102
101
  `native` has no sub-cases. The integration's `nativeBackend` must equal
103
102
  the main DM backend — `cascadeNativeBindingsOnMainSwitch` cascades
104
- unmatched `native` rows to `disabled`. From the agent's call-site view, `native`
105
- is indistinguishable from `delegated` same-backend (both are in-session
106
- MCP); the difference is who polls (no one, for `native`).
103
+ unmatched `native` rows to `disabled`. From where the agent actually makes
104
+ the call, `native` looks identical to `delegated` same-backend (both use
105
+ in-session MCP tools); the only difference is who polls in the background
106
+ for `native`, no one does.
107
107
 
108
108
  > The four modes are `direct | delegated | native | disabled`
109
109
  > (`INTEGRATION_MODES` in `packages/shared/src/integrations.ts`).
@@ -113,19 +113,19 @@ MCP); the difference is who polls (no one, for `native`).
113
113
 
114
114
  ## Why This Concept Exists
115
115
 
116
- The setup tax for direct mode (OAuth client setup in a vendor console, then
117
- JSON download, then keychain seeding) is the single biggest blocker for
118
- non-technical operators. Claude Code, Codex, and Gemini CLI all ship
119
- first-party connectors to Gmail, Calendar, Drive, and more (OpenCode
120
- ships none). When the operator is signed into claude.ai or ChatGPT,
121
- the agent can reach those services through the backend's own MCP tools,
122
- zero daemon credentials required.
123
-
124
- Delegated mode lets the operator skip the vendor console entirely. The
125
- two sub-cases (same- vs cross-backend) exist because the agent's DM
126
- session may run on a different backend than the one whose connector is
127
- signed in — e.g. a Claude DM session whose Gmail comes from Codex. In
128
- that case the daemon spawns the other backend per call.
116
+ Direct mode has a real setup cost: you create an OAuth client in a vendor
117
+ console, download a JSON key, then load it into the macOS Keychain. For
118
+ non-technical operators, that is the single biggest blocker. Claude Code,
119
+ Codex, and Gemini CLI all ship first-party connectors to Gmail, Calendar,
120
+ Drive, and more (OpenCode ships none). When you're signed into claude.ai
121
+ or ChatGPT, the agent can reach those services through the backend's own
122
+ MCP tools, with no daemon credentials at all.
123
+
124
+ Delegated mode lets you skip the vendor console entirely. The two
125
+ sub-cases (same- vs cross-backend) exist because your DM session may run
126
+ on a different backend than the one whose connector is signed in — for
127
+ example, a Claude DM session whose Gmail comes from Codex. In that case
128
+ the daemon spawns the other backend once per call.
129
129
 
130
130
  ## Definitions
131
131