@aitne-sh/aitne 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +218 -161
- package/agent-assets/agent-profiles/_safety.md +3 -3
- package/agent-assets/agent-profiles/browser-task.md +108 -0
- package/agent-assets/agent-profiles/conversational.md +3 -3
- package/agent-assets/agent-profiles/profile-importer.md +2 -2
- package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
- package/agent-assets/agents/context-index-reconcile/agent.md +52 -0
- package/agent-assets/agents/evening-review/agent.md +53 -0
- package/agent-assets/agents/hourly-check/agent.md +62 -0
- package/agent-assets/agents/monthly-review/agent.md +55 -0
- package/agent-assets/agents/morning-routine/agent.md +78 -0
- package/agent-assets/agents/roadmap-maintenance/agent.md +52 -0
- package/agent-assets/agents/skill-curation/agent.md +52 -0
- package/agent-assets/agents/user-profile-sweep-evening/agent.md +48 -0
- package/agent-assets/agents/user-profile-sweep-morning/agent.md +53 -0
- package/agent-assets/agents/weekly-review/agent.md +51 -0
- package/agent-assets/docs/concepts/agent-day.md +13 -11
- package/agent-assets/docs/concepts/auth-health.md +47 -10
- package/agent-assets/docs/concepts/backends-and-tiers.md +66 -31
- package/agent-assets/docs/concepts/costs-and-quotas.md +50 -15
- package/agent-assets/docs/concepts/delegated-mode.md +52 -13
- package/agent-assets/docs/concepts/memory-model.md +72 -32
- package/agent-assets/docs/concepts/observations.md +49 -11
- package/agent-assets/docs/concepts/process-keys.md +56 -22
- package/agent-assets/docs/concepts/routines.md +60 -33
- package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
- package/agent-assets/docs/concepts/safety-model.md +42 -34
- package/agent-assets/docs/concepts/skills.md +33 -17
- package/agent-assets/docs/features/integrations/browser-history.md +195 -0
- package/agent-assets/docs/features/integrations/calendar.md +39 -29
- package/agent-assets/docs/features/integrations/git.md +18 -7
- package/agent-assets/docs/features/integrations/github.md +84 -33
- package/agent-assets/docs/features/integrations/mail.md +59 -16
- package/agent-assets/docs/features/integrations/notion.md +18 -6
- package/agent-assets/docs/features/integrations/obsidian.md +28 -5
- package/agent-assets/docs/features/lifestyle/git.md +42 -38
- package/agent-assets/docs/features/lifestyle/reading.md +50 -22
- package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +76 -14
- package/agent-assets/docs/features/memory-files/agent-journal.md +111 -50
- package/agent-assets/docs/features/memory-files/projects.md +71 -17
- package/agent-assets/docs/features/memory-files/roadmap.md +50 -10
- package/agent-assets/docs/features/memory-files/schedule.md +113 -70
- package/agent-assets/docs/features/memory-files/today.md +46 -21
- package/agent-assets/docs/features/memory-files/user-profile.md +63 -33
- package/agent-assets/docs/features/messaging/bang-commands.md +113 -36
- package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
- package/agent-assets/docs/features/messaging/discord.md +35 -4
- package/agent-assets/docs/features/messaging/overview.md +37 -19
- package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
- package/agent-assets/docs/features/messaging/slack.md +67 -14
- package/agent-assets/docs/features/messaging/telegram.md +18 -5
- package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
- package/agent-assets/docs/features/operations/activity-and-conversations.md +44 -15
- package/agent-assets/docs/features/operations/approvals.md +48 -16
- package/agent-assets/docs/features/operations/backend-routing.md +68 -16
- package/agent-assets/docs/features/operations/cost-tracking.md +84 -17
- package/agent-assets/docs/features/operations/managed-chromium.md +221 -0
- package/agent-assets/docs/features/operations/notifications.md +52 -11
- package/agent-assets/docs/features/operations/quiet-hours.md +63 -40
- package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
- package/agent-assets/docs/features/routines/custom-routines.md +88 -20
- package/agent-assets/docs/features/routines/evening-review.md +74 -21
- package/agent-assets/docs/features/routines/hourly-check.md +149 -29
- package/agent-assets/docs/features/routines/morning-routine.md +53 -35
- package/agent-assets/docs/features/routines/weekly-review.md +40 -21
- package/agent-assets/docs/features/wiki/commands.md +26 -16
- package/agent-assets/docs/features/wiki/cost-and-approval.md +240 -0
- package/agent-assets/docs/features/wiki/dashboard.md +255 -0
- package/agent-assets/docs/features/wiki/overview.md +68 -10
- package/agent-assets/docs/features/wiki/search.md +248 -0
- package/agent-assets/docs/features/wiki/workspaces.md +254 -0
- package/agent-assets/docs/getting-started/01-what-is-this.md +34 -23
- package/agent-assets/docs/getting-started/02-first-steps.md +13 -8
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
- package/agent-assets/docs/getting-started/04-first-day.md +38 -20
- package/agent-assets/docs/glossary.md +235 -24
- package/agent-assets/docs/guides/add-a-custom-routine.md +63 -23
- package/agent-assets/docs/guides/backup-and-restore.md +80 -16
- package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +56 -25
- package/agent-assets/docs/guides/build-your-wiki.md +22 -9
- package/agent-assets/docs/guides/change-which-model-handles-x.md +64 -10
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +64 -15
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +28 -11
- package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
- package/agent-assets/docs/guides/install-and-run.md +48 -19
- package/agent-assets/docs/guides/maintain-wiki-health.md +35 -10
- package/agent-assets/docs/guides/migrate-machines.md +74 -18
- package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +111 -60
- package/agent-assets/docs/guides/pause-the-agent.md +65 -24
- package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
- package/agent-assets/docs/guides/setup-wizard.md +113 -54
- package/agent-assets/docs/guides/switch-default-backend.md +62 -16
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +26 -10
- package/agent-assets/docs/reference/api.md +143 -32
- package/agent-assets/docs/reference/cli-commands.md +38 -17
- package/agent-assets/docs/reference/config.md +224 -49
- package/agent-assets/docs/reference/disallowed-tools.md +29 -10
- package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
- package/agent-assets/docs/reference/knowledge-layout.md +620 -0
- package/agent-assets/docs/reference/process-keys.md +61 -5
- package/agent-assets/docs/reference/skills.md +38 -12
- package/agent-assets/docs/troubleshooting/auth-failed.md +48 -19
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +90 -28
- package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +86 -22
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +68 -24
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +80 -20
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +73 -21
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +29 -5
- package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +126 -54
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +29 -12
- package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/skill-curation/SKILL.md +1 -1
- package/agent-assets/sandbox/linux/aitne-chromium.apparmor +91 -0
- package/agent-assets/sandbox/macos/aitne-chromium.sb +156 -0
- package/agent-assets/skills/agent-actions/SKILL.md +2 -2
- package/agent-assets/skills/agent-create/SKILL.md +149 -0
- package/agent-assets/skills/attach/SKILL.md +2 -2
- package/agent-assets/skills/browser-history/SKILL.md +198 -0
- package/agent-assets/skills/browser-history-respond/SKILL.md +106 -0
- package/agent-assets/skills/browser-task/SKILL.md +169 -0
- package/agent-assets/skills/context/SKILL.md +12 -12
- package/agent-assets/skills/context/curation.json +2 -2
- package/agent-assets/skills/context/references/api.md +43 -31
- package/agent-assets/skills/context/references/required-frontmatter.md +3 -3
- package/agent-assets/skills/context/references/snapshot-files.md +6 -6
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +3 -3
- package/agent-assets/skills/docs-search/SKILL.md +4 -3
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +11 -21
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +11 -21
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +11 -21
- package/agent-assets/skills/external-services/SKILL.md +3 -3
- package/agent-assets/skills/external-services/SKILL.native.claude.md +5 -5
- package/agent-assets/skills/external-services/SKILL.native.codex.md +7 -7
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +4 -4
- package/agent-assets/skills/external-services/references/calendar-apple.md +2 -2
- package/agent-assets/skills/external-services/references/calendar-outlook.md +1 -1
- package/agent-assets/skills/external-services/references/obsidian.md +2 -2
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +9 -82
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +14 -5
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +8 -4
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +8 -4
- package/agent-assets/skills/mail/references/api.md +4 -2
- package/agent-assets/skills/mail/references/providers.md +1 -1
- package/agent-assets/skills/managed-tasks/SKILL.md +9 -9
- package/agent-assets/skills/managed-tasks/references/errors.md +9 -6
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +1 -1
- package/agent-assets/skills/management-policy/SKILL.md +32 -31
- package/agent-assets/skills/management-policy/curation.json +1 -1
- package/agent-assets/skills/management-policy/references/policy-workflow.md +9 -9
- package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
- package/agent-assets/skills/notify/SKILL.md +4 -4
- package/agent-assets/skills/notify/references/priority.md +9 -4
- package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
- package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
- package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
- package/agent-assets/skills/notion/SKILL.native.claude.md +10 -6
- package/agent-assets/skills/notion/SKILL.native.codex.md +9 -4
- package/agent-assets/skills/notion/SKILL.native.gemini.md +9 -4
- package/agent-assets/skills/observations/SKILL.md +24 -8
- package/agent-assets/skills/project-doc/SKILL.md +1 -1
- package/agent-assets/skills/project-doc/curation.json +3 -3
- package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +7 -4
- package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
- package/agent-assets/skills/reading/SKILL.md +10 -0
- package/agent-assets/skills/reading/references/reading-taste.md +2 -2
- package/agent-assets/skills/roadmap/SKILL.md +5 -5
- package/agent-assets/skills/roadmap/curation.json +1 -1
- package/agent-assets/skills/roadmap/references/api.md +7 -7
- package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
- package/agent-assets/skills/roadmap/references/migration.md +4 -4
- package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
- package/agent-assets/skills/schedule/SKILL.md +42 -34
- package/agent-assets/skills/schedule/references/batch.md +2 -2
- package/agent-assets/skills/schedule/references/errors.md +7 -4
- package/agent-assets/skills/schedule/references/model-selection.md +3 -3
- package/agent-assets/skills/schedule/references/recurrence-rule.md +1 -1
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +46 -36
- package/agent-assets/skills/today/SKILL.md +9 -9
- package/agent-assets/skills/today/curation.json +3 -3
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +6 -5
- package/agent-assets/skills/today/seeds/section-shape.seed.json +1 -1
- package/agent-assets/skills/user-interview/SKILL.md +12 -9
- package/agent-assets/skills/user-interview/references/op-briefing.md +2 -2
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +8 -0
- package/agent-assets/skills/user-profile/SKILL.md +17 -17
- package/agent-assets/skills/user-profile/curation.json +2 -2
- package/agent-assets/skills/user-profile/references/character-preferences.md +2 -2
- package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
- package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +6 -6
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +4 -4
- package/agent-assets/system-prompts/routine-fetch-window.md +22 -12
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +4 -2
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +4 -2
- package/agent-assets/task-flows/_partials/capture-user-info.md +2 -2
- package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +1 -1
- package/agent-assets/task-flows/_partials/dm-intent.project.md +9 -9
- package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +3 -2
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +10 -5
- package/agent-assets/task-flows/browser_task.md +84 -0
- package/agent-assets/task-flows/github.assigned.md +1 -1
- package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
- package/agent-assets/task-flows/github.workflow_run.failed.md +2 -2
- package/agent-assets/task-flows/knowledge.import.md +14 -14
- package/agent-assets/task-flows/message.received.dm.md +9 -4
- package/agent-assets/task-flows/message.received.dm_first.md +3 -3
- package/agent-assets/task-flows/routine.custom.md +3 -3
- package/agent-assets/task-flows/routine.evening_review.md +8 -8
- package/agent-assets/task-flows/routine.fetch_window.md +2 -2
- package/agent-assets/task-flows/routine.hourly_check.md +16 -12
- package/agent-assets/task-flows/routine.monthly_review.md +21 -21
- package/agent-assets/task-flows/routine.morning_routine_journal.md +119 -97
- package/agent-assets/task-flows/routine.morning_routine_today.md +43 -43
- package/agent-assets/task-flows/routine.research_cluster_update.md +35 -0
- package/agent-assets/task-flows/routine.research_dispatch.md +38 -0
- package/agent-assets/task-flows/routine.research_offer_dm.md +125 -0
- package/agent-assets/task-flows/routine.research_wiki_summary.md +53 -0
- package/agent-assets/task-flows/routine.roadmap_refresh.md +10 -10
- package/agent-assets/task-flows/routine.today_refresh.md +4 -4
- package/agent-assets/task-flows/routine.user_profile_sweep.md +10 -10
- package/agent-assets/task-flows/routine.weekly_review.md +93 -24
- package/agent-assets/task-flows/schedule.approaching.md +0 -1
- package/agent-assets/task-flows/scheduled.dm.md +5 -5
- package/agent-assets/task-flows/scheduled.task.md +4 -4
- package/agent-assets/task-flows/setup.initial.md +21 -21
- package/agent-assets/task-flows/setup.update.md +2 -2
- package/agent-assets/templates/README.md +27 -20
- package/agent-assets/templates/_index.md +42 -26
- package/agent-assets/templates/_manifest.json +34 -99
- package/agent-assets/templates/{user → identity}/_index.md +1 -1
- package/agent-assets/templates/{user → identity}/profile.md +2 -2
- package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +1 -1
- package/agent-assets/templates/{projects → plans/projects}/_active.base +1 -1
- package/agent-assets/templates/policies/_index.md +21 -0
- package/agent-assets/templates/{rules → policies}/journal-export.md +1 -1
- package/agent-assets/templates/{rules → policies}/journal-format.md +5 -5
- package/agent-assets/templates/{rules/policies → policies/management-captures}/_index.md +2 -2
- package/agent-assets/templates/{rules → policies}/management.md +3 -3
- package/agent-assets/templates/{rules → policies}/mcp.md +1 -1
- package/agent-assets/templates/{rules → policies}/redaction.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/_index.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/evening.md +2 -2
- package/agent-assets/templates/{routines → policies/routines}/hourly.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/monthly.md +2 -2
- package/bin/aitne.mjs +13 -4
- package/package.json +5 -4
- package/scripts/commands/doctor.mjs +14 -8
- package/scripts/commands/run-now.mjs +6 -21
- package/scripts/lib/ports.d.mts +27 -0
- package/scripts/lib/ports.mjs +36 -0
- package/scripts/lib/read-api-token.mjs +176 -0
- package/scripts/start.mjs +2 -1
- package/agent-assets/docs/features/lifestyle/travel-time.md +0 -58
- package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +0 -59
- package/agent-assets/skills/schedule/references/recurring.md +0 -185
- package/agent-assets/templates/context-index.md +0 -42
- package/agent-assets/templates/rules/_index.md +0 -19
- /package/agent-assets/templates/{user → identity}/expertise.md +0 -0
- /package/agent-assets/templates/{user → identity}/goals.md +0 -0
- /package/agent-assets/templates/{user → identity}/people.md +0 -0
- /package/agent-assets/templates/{user → identity}/personal.md +0 -0
- /package/agent-assets/templates/{user → identity}/work.md +0 -0
- /package/agent-assets/templates/{agent/journal.md → journal/agent.md} +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/evening.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/hourly.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/monthly.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/morning.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/roadmap.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/weekly.md +0 -0
- /package/agent-assets/templates/{projects → plans/projects}/_index.md +0 -0
- /package/agent-assets/templates/{roadmap.md → plans/roadmap.md} +0 -0
- /package/agent-assets/templates/{routines → policies/routines}/morning.md +0 -0
- /package/agent-assets/templates/{routines → policies/routines}/weekly.md +0 -0
- /package/agent-assets/templates/{agent → state}/profile-questions.md +0 -0
- /package/agent-assets/templates/{today.md → state/today.md} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
# ── Identity ─────────────────────────────────────────────────────────────────
|
|
3
|
+
slug: weekly-review
|
|
4
|
+
name: Weekly Review
|
|
5
|
+
description: "Writes the weekly synthesis note and reviews the roadmap every Friday evening."
|
|
6
|
+
kind: builtin
|
|
7
|
+
version: 1
|
|
8
|
+
enabled: true
|
|
9
|
+
tags: [routine, weekly, journal]
|
|
10
|
+
|
|
11
|
+
# ── Schedule (Friday 19:00) ──────────────────────────────────────────────────
|
|
12
|
+
schedule:
|
|
13
|
+
kind: cron
|
|
14
|
+
expression: "0 19 * * 5"
|
|
15
|
+
|
|
16
|
+
# ── Backend / routing (tier/model deferred to process_backend_config) ───────
|
|
17
|
+
backend:
|
|
18
|
+
process_key: routine.weekly_review
|
|
19
|
+
tier: null
|
|
20
|
+
model: null
|
|
21
|
+
|
|
22
|
+
# ── Limits (per execution) ───────────────────────────────────────────────────
|
|
23
|
+
limits:
|
|
24
|
+
max_turns: 30
|
|
25
|
+
max_budget_usd: 0.50
|
|
26
|
+
timeout_minutes: 15
|
|
27
|
+
|
|
28
|
+
# ── Expected outputs ─────────────────────────────────────────────────────────
|
|
29
|
+
# The synthesis note is keyed on the ISO week (`journal/weekly/YYYY-Www.md`),
|
|
30
|
+
# which the `{date}`-only success-criteria evaluator cannot target in v1, so it
|
|
31
|
+
# is documented here rather than asserted as a criterion.
|
|
32
|
+
outputs:
|
|
33
|
+
- "journal/weekly/{week}.md"
|
|
34
|
+
- plans/roadmap.md
|
|
35
|
+
|
|
36
|
+
success_criteria: []
|
|
37
|
+
|
|
38
|
+
# ── Stop warning (byte-identical to BUILTIN_AGENT_REGISTRY, §12.1) ──────────
|
|
39
|
+
stop_warning:
|
|
40
|
+
level: high
|
|
41
|
+
services_lost:
|
|
42
|
+
- "Weekly synthesis note (journal/weekly/{week}.md)"
|
|
43
|
+
- "Weekly roadmap review"
|
|
44
|
+
dependent_agents: []
|
|
45
|
+
reactivation_hint: "Re-enable from /agents/weekly-review. Resumes on the next Friday 19:00 firing."
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
# Weekly Review
|
|
49
|
+
|
|
50
|
+
Built-in routine — the execution prompt lives in the task-flow, not here.
|
|
51
|
+
See `agent-assets/task-flows/routine.weekly_review.md`.
|
|
@@ -15,9 +15,9 @@ summary: |
|
|
|
15
15
|
section: agent-day
|
|
16
16
|
tags:
|
|
17
17
|
- core
|
|
18
|
-
- timing
|
|
19
18
|
- memory
|
|
20
19
|
- routines
|
|
20
|
+
- scheduler
|
|
21
21
|
status: stable
|
|
22
22
|
ask_examples:
|
|
23
23
|
- When does the agent day actually roll over?
|
|
@@ -26,7 +26,7 @@ ask_examples:
|
|
|
26
26
|
- What is dayBoundaryHour?
|
|
27
27
|
locale: en-US
|
|
28
28
|
created: 2026-04-25
|
|
29
|
-
updated: 2026-05-
|
|
29
|
+
updated: 2026-05-28
|
|
30
30
|
keywords:
|
|
31
31
|
- day boundary
|
|
32
32
|
- 04:00
|
|
@@ -40,6 +40,7 @@ related:
|
|
|
40
40
|
- features/memory-files/today
|
|
41
41
|
ui_anchors:
|
|
42
42
|
- /settings
|
|
43
|
+
- /settings/schedule
|
|
43
44
|
config_keys:
|
|
44
45
|
- dayBoundaryHour
|
|
45
46
|
---
|
|
@@ -50,7 +51,7 @@ config_keys:
|
|
|
50
51
|
|
|
51
52
|
Aitne treats the "day" as starting at **04:00 local time**, not
|
|
52
53
|
00:00. Anything you log between midnight and 4am is filed under the day
|
|
53
|
-
that just ended, so a late commit at 02:30 lands in the same `today.md`
|
|
54
|
+
that just ended, so a late commit at 02:30 lands in the same `state/today.md`
|
|
54
55
|
that opened the previous morning.
|
|
55
56
|
|
|
56
57
|
## Why This Concept Exists
|
|
@@ -58,7 +59,7 @@ that opened the previous morning.
|
|
|
58
59
|
Owner-as-user installations almost always have late-night work sessions
|
|
59
60
|
that, mentally, belong to "today" even though the wall-clock has already
|
|
60
61
|
ticked over. A day boundary at midnight would split a single coherent
|
|
61
|
-
working session across two `today.md` files, and the morning routine
|
|
62
|
+
working session across two `state/today.md` files, and the morning routine
|
|
62
63
|
would open against an empty schedule because no agent activity had been
|
|
63
64
|
logged for the new calendar day yet.
|
|
64
65
|
|
|
@@ -69,25 +70,26 @@ clean boundary before they start.
|
|
|
69
70
|
## Definitions
|
|
70
71
|
|
|
71
72
|
- **Agent day**: the 24-hour window starting at the configured day-boundary hour and ending at the same hour the next calendar day.
|
|
72
|
-
- **Day boundary**: the hour-of-day that starts the agent day. Configured via the `dayBoundaryHour` setting (default `4`).
|
|
73
|
-
- **Day-stamped file**: any file whose name includes `YYYY-MM-DD` (e.g. `daily/2026-04-25.md`, `weekly/2026-04-20.md`). The date stamp uses the agent-day boundary, not the calendar day.
|
|
73
|
+
- **Day boundary**: the hour-of-day that starts the agent day. Configured via the `dayBoundaryHour` setting (default `4`, valid range `0`–`9`). Values above 9 are rejected — the boundary is intended for the small hours, not mid-day.
|
|
74
|
+
- **Day-stamped file**: any file whose name includes `YYYY-MM-DD` (e.g. `journal/daily/2026-04-25.md`, `journal/weekly/2026-04-20.md`). The date stamp uses the agent-day boundary, not the calendar day.
|
|
74
75
|
|
|
75
76
|
## Concrete Examples
|
|
76
77
|
|
|
77
78
|
| Wall-clock time | Calendar date | Agent day |
|
|
78
79
|
|---|---|---|
|
|
79
|
-
| 2026-04-25 02:30 | April 25 | April 24 (
|
|
80
|
-
| 2026-04-25 04:30 | April 25 | April 25 |
|
|
81
|
-
| 2026-04-25 23:50 | April 25 | April 25 |
|
|
82
|
-
| 2026-04-26 03:55 | April 26 | April 25 (
|
|
80
|
+
| 2026-04-25 02:30 | April 25 | April 24 (before boundary) |
|
|
81
|
+
| 2026-04-25 04:30 | April 25 | April 25 (after boundary) |
|
|
82
|
+
| 2026-04-25 23:50 | April 25 | April 25 (normal) |
|
|
83
|
+
| 2026-04-26 03:55 | April 26 | April 25 (before boundary) |
|
|
83
84
|
|
|
84
85
|
## Where You See It in the Dashboard
|
|
85
86
|
|
|
86
87
|
- The Schedule view labels each day's column by **agent day**, so a 02:30 calendar entry appears under the previous day's header.
|
|
87
88
|
- Activity → Conversations groups sessions by agent day for the same reason.
|
|
88
89
|
- Cost analytics roll up by agent day so a late-night research binge does not split into two separate "days" of spend.
|
|
90
|
+
- To change the boundary, open **Settings → Schedule** (`/settings/schedule`) and edit the day-boundary hour.
|
|
89
91
|
|
|
90
92
|
## Related
|
|
91
93
|
|
|
92
|
-
- [Morning Routine](../features/routines/morning-routine.md) opens
|
|
94
|
+
- [Morning Routine](../features/routines/morning-routine.md) opens shortly after the day boundary as part of the morning routine, not at midnight.
|
|
93
95
|
- [today.md](../features/memory-files/today.md) is rebuilt once per agent day, anchored on the boundary.
|
|
@@ -20,6 +20,7 @@ tags:
|
|
|
20
20
|
- safety
|
|
21
21
|
- backends
|
|
22
22
|
- operations
|
|
23
|
+
- health
|
|
23
24
|
status: stable
|
|
24
25
|
ask_examples:
|
|
25
26
|
- Why is the dashboard showing a degraded backend?
|
|
@@ -28,7 +29,7 @@ ask_examples:
|
|
|
28
29
|
- What is the SubscriptionAuthWarning banner?
|
|
29
30
|
locale: en-US
|
|
30
31
|
created: 2026-04-25
|
|
31
|
-
updated: 2026-05-
|
|
32
|
+
updated: 2026-05-28
|
|
32
33
|
keywords:
|
|
33
34
|
- auth
|
|
34
35
|
- authentication
|
|
@@ -43,9 +44,18 @@ related:
|
|
|
43
44
|
- concepts/backends-and-tiers
|
|
44
45
|
- concepts/costs-and-quotas
|
|
45
46
|
- troubleshooting/auth-failed
|
|
47
|
+
ui_anchors:
|
|
48
|
+
- /settings/models
|
|
49
|
+
- /
|
|
46
50
|
config_keys:
|
|
47
51
|
- authProbeDisabled
|
|
48
52
|
- authPreflightFreshnessMs
|
|
53
|
+
api_endpoints:
|
|
54
|
+
- POST /api/backends/:backendId/check-auth
|
|
55
|
+
- POST /api/backends/:backendId/recovery/start
|
|
56
|
+
- GET /api/backends/:backendId/recovery/status
|
|
57
|
+
- POST /api/backends/:backendId/recovery/code
|
|
58
|
+
- POST /api/backends/:backendId/recovery/cancel
|
|
49
59
|
---
|
|
50
60
|
|
|
51
61
|
# Auth Health
|
|
@@ -71,12 +81,21 @@ routine fails.
|
|
|
71
81
|
is live. Without an API key, the probe checks whatever local CLI
|
|
72
82
|
login Aitne fell back to (Claude credentials store, Codex token,
|
|
73
83
|
Gemini ADC).
|
|
74
|
-
- **Preflight freshness**: how long the daemon trusts a
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
- **Preflight freshness**: how long the daemon trusts a cached probe
|
|
85
|
+
result before the router consults the backend again. Controlled by
|
|
86
|
+
`authPreflightFreshnessMs` (default 600000 = 10 min). A cached
|
|
87
|
+
`expired`/`missing` status younger than this window makes the router
|
|
88
|
+
skip the main backend and route straight to fallback. Set to `0` to
|
|
89
|
+
disable the pre-flight check entirely.
|
|
90
|
+
- **Recovery**: backend-specific repair. The recommended path is always
|
|
91
|
+
re-pasting a paid API key on `/settings/models`. If you run on CLI
|
|
92
|
+
subscription auth instead, you can recover the login from the same
|
|
93
|
+
page: `/settings/models` exposes a recovery dialog that drives the
|
|
94
|
+
backend's own interactive login subprocess —
|
|
95
|
+
`claude auth login --claudeai` (browser OAuth), `codex login
|
|
96
|
+
--device-auth` (device code), or Gemini's direct OAuth flow. As a
|
|
97
|
+
manual fallback you can always re-run the backend's CLI login in a
|
|
98
|
+
terminal yourself.
|
|
80
99
|
|
|
81
100
|
## Concrete Examples
|
|
82
101
|
|
|
@@ -86,7 +105,9 @@ routine fails.
|
|
|
86
105
|
- Operator never registered an API key, ran on the subscription
|
|
87
106
|
fallback, and the underlying `claude` CLI session expired → probe
|
|
88
107
|
fails → card flips amber → recommended fix is to register an API
|
|
89
|
-
key on `/settings/models
|
|
108
|
+
key on `/settings/models`. To keep using subscription auth instead,
|
|
109
|
+
open the recovery dialog on the same page and complete the browser
|
|
110
|
+
OAuth login it launches.
|
|
90
111
|
|
|
91
112
|
Cloud-provider credentials (Bedrock / Vertex / Foundry / Azure
|
|
92
113
|
OpenAI / Gemini-Vertex) are not probed against a `models` endpoint —
|
|
@@ -94,7 +115,23 @@ those providers trust the SDK's runtime auth chain, so the auth-
|
|
|
94
115
|
health card stays neutral until the first execution either succeeds
|
|
95
116
|
or surfaces a runtime auth error.
|
|
96
117
|
|
|
118
|
+
## The "API key recommended" warning
|
|
119
|
+
|
|
120
|
+
Separate from probe failures, `/settings/models` (and the setup
|
|
121
|
+
wizard's AI Backends step) shows a standing **API-key-recommended**
|
|
122
|
+
warning whenever a backend has no registered key. Skipping the key
|
|
123
|
+
falls the daemon back to that backend's local CLI subscription login,
|
|
124
|
+
which most providers do not officially support for automated agents —
|
|
125
|
+
Anthropic in particular currently prohibits running the Claude Agent
|
|
126
|
+
SDK on a Claude Pro / Max subscription. The warning is advisory, not a
|
|
127
|
+
probe result: it stays visible while you are on the fallback so you can
|
|
128
|
+
register a paid key and leave the gray area.
|
|
129
|
+
|
|
97
130
|
## Related
|
|
98
131
|
|
|
99
|
-
- [Backends and Tiers](backends-and-tiers.md)
|
|
100
|
-
|
|
132
|
+
- [Backends and Tiers](backends-and-tiers.md) — tiers, models, and
|
|
133
|
+
fallback routing.
|
|
134
|
+
- [Costs and Quotas](costs-and-quotas.md) — how API-key billing and
|
|
135
|
+
quota signals interact.
|
|
136
|
+
- [Troubleshooting: Auth Failed](../troubleshooting/auth-failed.md) —
|
|
137
|
+
step-by-step recovery when a card goes red.
|
|
@@ -31,7 +31,7 @@ ask_examples:
|
|
|
31
31
|
- How does Aitne fail over when a backend hits its quota?
|
|
32
32
|
locale: en-US
|
|
33
33
|
created: 2026-04-25
|
|
34
|
-
updated: 2026-05-
|
|
34
|
+
updated: 2026-05-28
|
|
35
35
|
keywords:
|
|
36
36
|
- claude
|
|
37
37
|
- codex
|
|
@@ -55,6 +55,24 @@ related:
|
|
|
55
55
|
- features/operations/backend-routing
|
|
56
56
|
ui_anchors:
|
|
57
57
|
- /settings/models
|
|
58
|
+
- /analytics
|
|
59
|
+
process_keys:
|
|
60
|
+
- message.dm
|
|
61
|
+
- dashboard.chat
|
|
62
|
+
- dashboard.docs_qa
|
|
63
|
+
- routine.morning_routine
|
|
64
|
+
- gmail_classify
|
|
65
|
+
- calendar.change
|
|
66
|
+
- delegated_task
|
|
67
|
+
- delegated_task_heavy
|
|
68
|
+
config_keys:
|
|
69
|
+
- claudeExecutionPermissionMode
|
|
70
|
+
- codexExecutionPermissionMode
|
|
71
|
+
- geminiExecutionPermissionMode
|
|
72
|
+
- opencodeExecutionPermissionMode
|
|
73
|
+
- opencodeBaseUrl
|
|
74
|
+
- opencodeServerUsername
|
|
75
|
+
- delegatedTaskHeavyEnabled
|
|
58
76
|
---
|
|
59
77
|
|
|
60
78
|
# Backends and Tiers
|
|
@@ -62,27 +80,39 @@ ui_anchors:
|
|
|
62
80
|
## TL;DR
|
|
63
81
|
|
|
64
82
|
Four backends are supported: **Claude Code** (default), **Codex**,
|
|
65
|
-
**Gemini CLI**, and **OpenCode**. Each backend exposes three
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
**Gemini CLI**, and **OpenCode**. Each backend exposes three model
|
|
84
|
+
tiers. The per-backend defaults seeded at install time are:
|
|
85
|
+
|
|
86
|
+
| Tier | Claude | Codex | Gemini | OpenCode |
|
|
87
|
+
|---|---|---|---|---|
|
|
88
|
+
| **medium** (main) | Sonnet 4.6 | GPT-5.4 | Gemini 3.1 Pro (preview) | Sonnet 4.6 |
|
|
89
|
+
| **lite** (delegated) | Haiku 4.5 | GPT-5.4 Mini | Gemini 3.1 Flash Lite (preview) | Haiku 4.5 |
|
|
90
|
+
| **high** (heavy) | Opus 4.8 | GPT-5.4¹ | Gemini 3.1 Pro (preview)¹ | Opus 4.8 |
|
|
91
|
+
|
|
92
|
+
¹ Codex and Gemini have no separately-seeded high model — their high
|
|
93
|
+
tier collapses to the medium model via `SEED_HIGH_TIER_OVERRIDE`.
|
|
94
|
+
Codex's flagship GPT-5.5 is Opus-priced and stays an opt-in; Gemini
|
|
95
|
+
has no Opus-priced Google flagship worth defaulting to. Pin a higher
|
|
96
|
+
model per row from `/settings/models` if you want it.
|
|
97
|
+
|
|
98
|
+
What each tier is for:
|
|
99
|
+
|
|
100
|
+
- **Medium / Main** — the default for owner-facing work: DMs and
|
|
101
|
+
mentions, dashboard chat, morning / evening / weekly / monthly
|
|
102
|
+
review, the hourly check, scheduled tasks.
|
|
103
|
+
- **Lite / Delegated** — the cheaper model for "simple" backend
|
|
104
|
+
surfaces with no owner in the loop: Gmail classification, GitHub
|
|
105
|
+
event triage, git-poll observers, calendar-change handlers, the
|
|
106
|
+
routine pre-pass fetcher, the `delegated_task` invoker.
|
|
107
|
+
- **High / Heavy** — registered but *not* auto-selected. After the
|
|
108
|
+
"no Opus by default" pass (2026-05-16), **no install-time-seeded
|
|
109
|
+
surface defaults to high.** The only `high`-tagged ProcessKey is
|
|
110
|
+
`delegated_task_heavy`, and it is opt-in (gated by the
|
|
111
|
+
`delegatedTaskHeavyEnabled` config flag). Operators can pin any
|
|
112
|
+
other ProcessKey to high per row from `/settings/models`. The
|
|
113
|
+
first morning routine after setup runs on **medium** tier with a
|
|
114
|
+
daemon-prepared `<roadmap_skeleton>` block instead of the retired
|
|
115
|
+
heavy `routine.morning_routine_initial`.
|
|
86
116
|
|
|
87
117
|
Every ProcessKey resolves to a backend + model binding via
|
|
88
118
|
`BackendRouter`. Aitne **does not store or read subscription-plan
|
|
@@ -126,11 +156,13 @@ top of the `@opencode-ai/sdk` HTTP server and supports the same
|
|
|
126
156
|
`ProcessKey` set as the other backends. Two operating modes:
|
|
127
157
|
|
|
128
158
|
- **Managed** — the daemon spawns and supervises a local
|
|
129
|
-
`opencode` HTTP server on loopback.
|
|
130
|
-
permissions, agent dir) is
|
|
131
|
-
|
|
159
|
+
`opencode` HTTP server on loopback (`127.0.0.1`, OS-picked port).
|
|
160
|
+
Per-session config (model, permissions, agent dir) is passed
|
|
161
|
+
inline to the server via the `OPENCODE_CONFIG_CONTENT` env var —
|
|
162
|
+
no config file is written to disk.
|
|
132
163
|
- **Remote** — you point Aitne at an existing OpenCode server
|
|
133
|
-
baseUrl (your own cluster or a managed deployment)
|
|
164
|
+
baseUrl (your own cluster or a managed deployment), set via the
|
|
165
|
+
`opencodeBaseUrl` / `opencodeServerUsername` config keys.
|
|
134
166
|
|
|
135
167
|
OpenCode is a runtime peer of Claude / Codex / Gemini for
|
|
136
168
|
dispatching ProcessKeys, but it intentionally does **not** host
|
|
@@ -156,10 +188,12 @@ Claude's quota is exhausted, or use Gemini for cheap polling tasks.
|
|
|
156
188
|
- **Backend**: the agent runtime. One of `claude`, `codex`, `gemini`,
|
|
157
189
|
`opencode`.
|
|
158
190
|
- **Tier**: `lite`, `medium`, or `high`. `high` maps to the strongest
|
|
159
|
-
model (Opus
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
191
|
+
model class (Opus-class — Opus 4.8 on Claude and OpenCode; on Codex
|
|
192
|
+
and Gemini the seeded high binding collapses to the medium model).
|
|
193
|
+
`medium` (Sonnet-class — Sonnet 4.6 and equivalents) is the
|
|
194
|
+
operator's day-to-day tier for owner-facing work; `lite`
|
|
195
|
+
(Haiku-class — Haiku 4.5 and equivalents) is reserved for
|
|
196
|
+
mechanical / delegated surfaces.
|
|
163
197
|
- **Main / Fallback**: each ProcessKey has a `main` backend and a
|
|
164
198
|
`fallback`. The router fails over on `BackendQuotaError` /
|
|
165
199
|
`BackendDecisiveFailure`.
|
|
@@ -174,12 +208,13 @@ Claude's quota is exhausted, or use Gemini for cheap polling tasks.
|
|
|
174
208
|
| `routine.hourly_check` | claude | Sonnet 4.6 |
|
|
175
209
|
| `message.dm` | claude | Sonnet 4.6 |
|
|
176
210
|
| `dashboard.chat` | claude | Sonnet 4.6 |
|
|
177
|
-
| `dashboard.docs_qa` | inherits from `message.dm` | Sonnet 4.6 (
|
|
211
|
+
| `dashboard.docs_qa` | inherits from `message.dm` | Sonnet 4.6 (locked to medium) |
|
|
178
212
|
| `gmail_classify` | claude | Haiku 4.5 |
|
|
179
213
|
| `github.*` | claude | Haiku 4.5 |
|
|
180
214
|
| `git.push.detected` (and other git-poll keys) | claude | Haiku 4.5 |
|
|
181
215
|
| `calendar.change` | claude | Haiku 4.5 |
|
|
182
216
|
| `delegated_task` | claude | Haiku 4.5 |
|
|
217
|
+
| `delegated_task_heavy` | claude | Opus 4.8 (high; opt-in, off by default) |
|
|
183
218
|
|
|
184
219
|
## Where You See It in the Dashboard
|
|
185
220
|
|
|
@@ -31,7 +31,7 @@ ask_examples:
|
|
|
31
31
|
- How does Gemini's per-day quota work?
|
|
32
32
|
locale: en-US
|
|
33
33
|
created: 2026-04-25
|
|
34
|
-
updated: 2026-05-
|
|
34
|
+
updated: 2026-05-28
|
|
35
35
|
keywords:
|
|
36
36
|
- cost
|
|
37
37
|
- budget
|
|
@@ -43,6 +43,7 @@ keywords:
|
|
|
43
43
|
- opencode
|
|
44
44
|
- openrouter
|
|
45
45
|
- daily cap
|
|
46
|
+
- monthly cap
|
|
46
47
|
- autonomous cap
|
|
47
48
|
related:
|
|
48
49
|
- concepts/backends-and-tiers
|
|
@@ -53,6 +54,11 @@ ui_anchors:
|
|
|
53
54
|
- /settings/models
|
|
54
55
|
config_keys:
|
|
55
56
|
- autonomousDailyCostCapUsd
|
|
57
|
+
- autonomousMonthlyCostCapUsd
|
|
58
|
+
process_keys:
|
|
59
|
+
- routine.morning_routine
|
|
60
|
+
- routine.fetch_window
|
|
61
|
+
- routine.hourly_check
|
|
56
62
|
---
|
|
57
63
|
|
|
58
64
|
# Costs and Quotas
|
|
@@ -92,8 +98,13 @@ agent's problem to *avoid*: the dashboard shows you what each routine
|
|
|
92
98
|
costs so you can re-pin tiers if a routine has gotten too expensive.
|
|
93
99
|
|
|
94
100
|
The autonomous daily-cost cap (`autonomousDailyCostCapUsd`) is a
|
|
95
|
-
bumper, not a budget —
|
|
96
|
-
|
|
101
|
+
bumper, not a budget — once the day's autonomous spend crosses it the
|
|
102
|
+
dispatcher starts shedding the *lowest-priority* routines first
|
|
103
|
+
(hourly check), and only escalates to higher-priority ones as spend
|
|
104
|
+
climbs further; the morning routine is the last to be cut. Reactive
|
|
105
|
+
(in-the-loop) DMs and dashboard chat always pass through. A separate
|
|
106
|
+
`autonomousMonthlyCostCapUsd` is a notifications-only soft cap — it
|
|
107
|
+
fires an alert when crossed but never skips a session.
|
|
97
108
|
|
|
98
109
|
## Authentication policy
|
|
99
110
|
|
|
@@ -137,13 +148,23 @@ register an API key on `/settings/models`.
|
|
|
137
148
|
`codex login`, `gemini auth`). Used only when no API key is
|
|
138
149
|
configured. Cost behaviour then matches whatever the subscription
|
|
139
150
|
enforces (e.g. Claude's rolling 5-hour Opus window on a Max plan).
|
|
140
|
-
- **Daily cost cap**: `autonomousDailyCostCapUsd`
|
|
141
|
-
|
|
142
|
-
|
|
151
|
+
- **Daily cost cap**: `autonomousDailyCostCapUsd` (default unset) —
|
|
152
|
+
once the day's autonomous spend crosses it, lower-priority routines
|
|
153
|
+
are skipped first (hourly check at 100% of the cap, the morning
|
|
154
|
+
routine only at 200%). Reactive DMs / dashboard chat keep running;
|
|
155
|
+
you can always reach the agent. Distinct from the removed
|
|
156
|
+
`maxDailyCostUsd`, which used to blanket-block reactive traffic too.
|
|
157
|
+
- **Monthly cost cap**: `autonomousMonthlyCostCapUsd` (default unset) —
|
|
158
|
+
a notifications-only soft threshold across the rolling agent month;
|
|
159
|
+
it raises an alert in the Notifications Center but never skips a
|
|
160
|
+
session.
|
|
143
161
|
- **Per-process tier**: each ProcessKey has its own tier, max-turns,
|
|
144
162
|
and max-budget USD. Configurable on `/settings/models`.
|
|
145
163
|
- **Quota error**: `BackendQuotaError` thrown by an SDK / CLI tells
|
|
146
|
-
the router to fail over to the fallback backend.
|
|
164
|
+
the router to fail over to the fallback backend. Its sibling
|
|
165
|
+
`BackendDecisiveFailure` (e.g. an auth failure) triggers the same
|
|
166
|
+
failover — these two signals are why a routine that started on
|
|
167
|
+
Claude can finish on Codex.
|
|
147
168
|
|
|
148
169
|
## Concrete Examples
|
|
149
170
|
|
|
@@ -162,21 +183,35 @@ register an API key on `/settings/models`.
|
|
|
162
183
|
`routine.morning_routine` envelope (medium tier) with a
|
|
163
184
|
daemon-prepared `<roadmap_skeleton>` block.
|
|
164
185
|
- Gemini hourly check on Flash via `GEMINI_API_KEY` = ~$0.0005 per
|
|
165
|
-
fire on the paid tier; free tier instead consumes
|
|
166
|
-
|
|
186
|
+
fire on the paid tier; the free tier instead consumes one of a
|
|
187
|
+
fixed per-day request budget (Aitne caps Gemini at 450 requests/day
|
|
188
|
+
to match Google's free-tier daily limit — this ceiling is
|
|
189
|
+
Gemini-only by design; Claude and Codex meter per-window and surface
|
|
190
|
+
exhaustion as a quota error).
|
|
167
191
|
- Claude Code without an API key (subscription fallback on a Max20
|
|
168
192
|
login) = covered by the subscription, but the daemon flags the
|
|
169
193
|
fallback because it falls outside Anthropic's published policy.
|
|
170
194
|
|
|
171
|
-
## Where You See It
|
|
195
|
+
## Where You See It
|
|
172
196
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
197
|
+
In the dashboard:
|
|
198
|
+
|
|
199
|
+
- **Analytics** (`/analytics`) rolls today's cost by backend, by
|
|
200
|
+
ProcessKey, and by hour. When a backend is running on the
|
|
201
|
+
subscription fallback, remaining-window math is shown there too.
|
|
176
202
|
- **Sidebar footer** shows the day's running total.
|
|
177
203
|
- **Activity** event details include the per-execute cost.
|
|
178
|
-
- **Settings → Models** exposes the per-backend
|
|
179
|
-
warning banner whenever a backend is running on
|
|
204
|
+
- **Settings → Models** (`/settings/models`) exposes the per-backend
|
|
205
|
+
API-key panel and a warning banner whenever a backend is running on
|
|
206
|
+
subscription auth.
|
|
207
|
+
|
|
208
|
+
From a DM or the terminal:
|
|
209
|
+
|
|
210
|
+
- **`!cost`** (and `!cost claude` / `!cost codex` / `!cost gemini`)
|
|
211
|
+
DM the agent for trailing-7-day spend, broken down or per-backend.
|
|
212
|
+
- **`aitne status`** prints today's action count and spend;
|
|
213
|
+
**`aitne audit`** lists the action log (filter with `--since`,
|
|
214
|
+
`--backend`, `--result`).
|
|
180
215
|
|
|
181
216
|
## Related
|
|
182
217
|
|
|
@@ -36,7 +36,7 @@ ask_examples:
|
|
|
36
36
|
- Why don't I see a SKILL.md for Gmail in my Codex session?
|
|
37
37
|
locale: en-US
|
|
38
38
|
created: 2026-04-26
|
|
39
|
-
updated: 2026-05-
|
|
39
|
+
updated: 2026-05-28
|
|
40
40
|
keywords:
|
|
41
41
|
- delegated mode
|
|
42
42
|
- direct mode
|
|
@@ -55,9 +55,16 @@ related:
|
|
|
55
55
|
- features/integrations/mail
|
|
56
56
|
ui_anchors:
|
|
57
57
|
- /connections
|
|
58
|
+
- /connections/mail
|
|
59
|
+
- /connections/calendar
|
|
58
60
|
- /settings/models
|
|
59
|
-
|
|
60
|
-
- integrations
|
|
61
|
+
api_endpoints:
|
|
62
|
+
- PATCH /api/integrations/:key
|
|
63
|
+
- POST /api/integrations/:key/exec
|
|
64
|
+
- POST /api/integrations/:key/probe
|
|
65
|
+
- POST /api/observations/batch
|
|
66
|
+
context_files:
|
|
67
|
+
- policies/integrations.md
|
|
61
68
|
---
|
|
62
69
|
|
|
63
70
|
# Delegated Mode (Integration Modes)
|
|
@@ -98,6 +105,12 @@ the main DM backend — `BackendRouter.setMainBackend` cascades unmatched
|
|
|
98
105
|
is indistinguishable from `delegated` same-backend (both are in-session
|
|
99
106
|
MCP); the difference is who polls (no one, for `native`).
|
|
100
107
|
|
|
108
|
+
> The four modes are `direct | delegated | native | disabled`
|
|
109
|
+
> (`INTEGRATION_MODES` in `packages/shared/src/integrations.ts`).
|
|
110
|
+
> `git` and `github` support only `direct | delegated | disabled` — no
|
|
111
|
+
> native mode (they use read-only CLI connectors), and `browser_history`
|
|
112
|
+
> is `direct | disabled` only.
|
|
113
|
+
|
|
101
114
|
## Why This Concept Exists
|
|
102
115
|
|
|
103
116
|
The setup tax for direct mode (OAuth client setup in a vendor console, then
|
|
@@ -154,7 +167,10 @@ that case the daemon spawns the other backend per call.
|
|
|
154
167
|
subprocess for each call. A `SKILL.delegated.<sessionBackend>.md`
|
|
155
168
|
file is materialized into the session workdir.
|
|
156
169
|
- **`integrations.md`** — daemon-rendered snapshot of every
|
|
157
|
-
integration's mode
|
|
170
|
+
integration's mode. After the context-vault restructure it lives
|
|
171
|
+
inside the vault under the `policies` class at
|
|
172
|
+
`<contextDir>/policies/integrations.md` (the legacy
|
|
173
|
+
`~/.personal-agent/integrations.md` location was retired). The agent
|
|
158
174
|
reads it to know which path to take.
|
|
159
175
|
|
|
160
176
|
## How to Choose
|
|
@@ -184,12 +200,35 @@ connector) cascade to `disabled` and the operator gets a DM.
|
|
|
184
200
|
|
|
185
201
|
## Concrete Examples
|
|
186
202
|
|
|
187
|
-
|
|
203
|
+
What happens on a Gmail search, by setup:
|
|
204
|
+
|
|
205
|
+
| Setup | Path |
|
|
188
206
|
|---|---|
|
|
189
|
-
| Gmail direct |
|
|
190
|
-
| Gmail delegated to Codex
|
|
191
|
-
| Gmail delegated to Codex
|
|
192
|
-
| Gmail native on Codex DM |
|
|
207
|
+
| Gmail **direct** | `curl /api/mail/<acct>/messages?q=...` → daemon hits Gmail API with stored OAuth |
|
|
208
|
+
| Gmail **delegated** to Codex, Codex DM (same-backend) | Agent calls `mcp__codex_apps__gmail._search_emails(...)` → Codex's connector hits Gmail. No daemon involvement. No skill file. |
|
|
209
|
+
| Gmail **delegated** to Codex, Claude DM (cross-backend) | Agent POSTs to `/api/integrations/gmail/exec` in task mode (see below) → daemon spawns a Codex subprocess → returns a structured result. |
|
|
210
|
+
| Gmail **native** on Codex DM | Identical call to delegated same-backend (`mcp__codex_apps__gmail._search_emails(...)`). No daemon involvement. The daemon poller is OFF; the routine pre-pass POSTs results to `/api/observations/batch`. |
|
|
211
|
+
|
|
212
|
+
The cross-backend row above issues a task-mode `/exec` call:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
curl -X POST http://localhost:8321/api/integrations/gmail/exec \
|
|
216
|
+
-d '{
|
|
217
|
+
"task": "Search Gmail for newer_than:1d, return id/subject/from/snippet/date for each message",
|
|
218
|
+
"outputSchema": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"required": ["messages"],
|
|
221
|
+
"properties": { "messages": { "type": "array", "items": { } } }
|
|
222
|
+
},
|
|
223
|
+
"maxToolCalls": 3,
|
|
224
|
+
"cacheable": true
|
|
225
|
+
}'
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
The daemon spawns a Codex subprocess with the `proxy.md` profile, the
|
|
229
|
+
task-mode planner picks `_search_emails` from the registered
|
|
230
|
+
`capabilityTools`, runs it, and returns a structured `{messages:[…]}`
|
|
231
|
+
conforming to `outputSchema`.
|
|
193
232
|
|
|
194
233
|
## How the Skill File Resolves
|
|
195
234
|
|
|
@@ -222,14 +261,14 @@ returns one of four values, picked by tie-break order
|
|
|
222
261
|
`delegated` and `native` are gated on a **live probe** (§4.12.2)
|
|
223
262
|
that confirms three things before the mode is written to
|
|
224
263
|
`integrations.md`: the backend binary is resolvable, backend auth
|
|
225
|
-
is valid, and the connector reports every `
|
|
226
|
-
descriptor demands. Cached probe rows are invalidated on mode
|
|
264
|
+
is valid, and the connector reports every `requiredCapabilities`
|
|
265
|
+
entry the descriptor demands. Cached probe rows are invalidated on mode
|
|
227
266
|
change. `POST /api/integrations/:key/probe` is the chokepoint.
|
|
228
267
|
|
|
229
268
|
## How `integrations.md` Reflects This
|
|
230
269
|
|
|
231
|
-
|
|
232
|
-
agent consults at session-init. It is rendered as a Markdown table:
|
|
270
|
+
`<contextDir>/policies/integrations.md` is the operator-readable snapshot
|
|
271
|
+
the agent consults at session-init. It is rendered as a Markdown table:
|
|
233
272
|
|
|
234
273
|
```markdown
|
|
235
274
|
## Current state
|