@aitne-sh/aitne 0.1.8 → 0.1.10
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 +251 -164
- 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 +51 -15
- package/agent-assets/docs/concepts/delegated-mode.md +56 -17
- package/agent-assets/docs/concepts/memory-model.md +77 -34
- 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 +61 -50
- package/agent-assets/docs/concepts/skills.md +34 -18
- package/agent-assets/docs/features/integrations/browser-history.md +196 -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 +61 -17
- 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 +44 -40
- package/agent-assets/docs/features/lifestyle/reading.md +57 -22
- package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +77 -14
- package/agent-assets/docs/features/memory-files/agent-journal.md +132 -53
- package/agent-assets/docs/features/memory-files/agent-lessons.md +177 -0
- package/agent-assets/docs/features/memory-files/projects.md +73 -17
- package/agent-assets/docs/features/memory-files/roadmap.md +54 -11
- 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 +22 -8
- package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
- package/agent-assets/docs/features/operations/activity-and-conversations.md +45 -15
- package/agent-assets/docs/features/operations/approvals.md +49 -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 +222 -0
- package/agent-assets/docs/features/operations/notifications.md +52 -11
- package/agent-assets/docs/features/operations/quiet-hours.md +64 -40
- package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
- package/agent-assets/docs/features/routines/custom-routines.md +98 -26
- package/agent-assets/docs/features/routines/evening-review.md +82 -21
- package/agent-assets/docs/features/routines/hourly-check.md +149 -29
- package/agent-assets/docs/features/routines/morning-routine.md +54 -35
- package/agent-assets/docs/features/routines/weekly-review.md +46 -21
- package/agent-assets/docs/features/wiki/commands.md +26 -16
- package/agent-assets/docs/features/wiki/cost-and-approval.md +241 -0
- package/agent-assets/docs/features/wiki/dashboard.md +256 -0
- package/agent-assets/docs/features/wiki/overview.md +70 -12
- 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 +17 -10
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
- package/agent-assets/docs/getting-started/04-first-day.md +39 -21
- 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 +57 -26
- 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 +66 -15
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +32 -14
- package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
- package/agent-assets/docs/guides/install-and-run.md +49 -20
- 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 +69 -24
- package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
- package/agent-assets/docs/guides/setup-wizard.md +116 -54
- package/agent-assets/docs/guides/switch-default-backend.md +62 -16
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +30 -14
- package/agent-assets/docs/reference/api.md +153 -32
- package/agent-assets/docs/reference/cli-commands.md +39 -18
- package/agent-assets/docs/reference/config.md +241 -49
- package/agent-assets/docs/reference/disallowed-tools.md +34 -13
- package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
- package/agent-assets/docs/reference/knowledge-layout.md +629 -0
- package/agent-assets/docs/reference/process-keys.md +62 -6
- package/agent-assets/docs/reference/skills.md +41 -14
- package/agent-assets/docs/troubleshooting/auth-failed.md +51 -21
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +97 -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 +33 -8
- 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 +25 -41
- package/agent-assets/skills/agent-create/SKILL.md +158 -0
- package/agent-assets/skills/attach/SKILL.md +10 -29
- package/agent-assets/skills/browser-history/SKILL.md +211 -0
- package/agent-assets/skills/browser-history-respond/SKILL.md +111 -0
- package/agent-assets/skills/browser-task/SKILL.md +164 -0
- package/agent-assets/skills/context/SKILL.md +35 -44
- package/agent-assets/skills/context/curation.json +14 -14
- package/agent-assets/skills/context/references/api.md +52 -40
- package/agent-assets/skills/context/references/required-frontmatter.md +13 -12
- package/agent-assets/skills/context/references/snapshot-files.md +18 -17
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +8 -8
- package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
- package/agent-assets/skills/docs-search/SKILL.md +23 -34
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +17 -114
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +17 -113
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +17 -113
- package/agent-assets/skills/external-services/SKILL.md +3 -3
- package/agent-assets/skills/external-services/SKILL.native.claude.md +7 -7
- 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/exec-errors.md +32 -0
- package/agent-assets/skills/external-services/references/obsidian.md +2 -2
- package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +11 -83
- package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +15 -18
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +11 -6
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +11 -6
- package/agent-assets/skills/mail/SKILL.md +10 -18
- package/agent-assets/skills/mail/SKILL.native.claude.md +8 -7
- package/agent-assets/skills/mail/SKILL.native.codex.md +1 -1
- package/agent-assets/skills/mail/SKILL.native.gemini.md +1 -1
- package/agent-assets/skills/mail/references/api.md +10 -3
- package/agent-assets/skills/mail/references/examples.md +2 -1
- package/agent-assets/skills/mail/references/providers.md +1 -1
- package/agent-assets/skills/managed-tasks/SKILL.md +48 -81
- package/agent-assets/skills/managed-tasks/references/errors.md +33 -19
- package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +7 -5
- package/agent-assets/skills/management-policy/SKILL.md +42 -42
- package/agent-assets/skills/management-policy/curation.json +1 -1
- package/agent-assets/skills/management-policy/references/policy-workflow.md +11 -12
- package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
- package/agent-assets/skills/notify/SKILL.md +14 -16
- package/agent-assets/skills/notify/references/priority.md +28 -20
- package/agent-assets/skills/notion/SKILL.delegated.claude.md +2 -2
- package/agent-assets/skills/notion/SKILL.delegated.codex.md +2 -2
- package/agent-assets/skills/notion/SKILL.delegated.gemini.md +2 -2
- package/agent-assets/skills/notion/SKILL.md +17 -17
- package/agent-assets/skills/notion/SKILL.native.claude.md +11 -7
- package/agent-assets/skills/notion/SKILL.native.codex.md +10 -5
- package/agent-assets/skills/notion/SKILL.native.gemini.md +10 -5
- package/agent-assets/skills/observations/SKILL.md +29 -28
- package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
- package/agent-assets/skills/project-doc/SKILL.md +10 -7
- package/agent-assets/skills/project-doc/curation.json +3 -3
- package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +8 -5
- package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +5 -5
- package/agent-assets/skills/reading/SKILL.md +18 -42
- package/agent-assets/skills/reading/references/reading-taste.md +7 -7
- package/agent-assets/skills/roadmap/SKILL.md +8 -24
- package/agent-assets/skills/roadmap/curation.json +1 -1
- package/agent-assets/skills/roadmap/references/api.md +21 -11
- package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
- package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
- package/agent-assets/skills/roadmap/references/migration.md +12 -10
- package/agent-assets/skills/roadmap/references/retention.md +18 -0
- package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
- package/agent-assets/skills/schedule/SKILL.md +41 -50
- 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/importance.md +23 -0
- package/agent-assets/skills/schedule/references/model-selection.md +3 -3
- package/agent-assets/skills/schedule/references/recurrence-rule.md +7 -5
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +77 -70
- package/agent-assets/skills/today/SKILL.md +24 -83
- 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/references/today-skeleton.md +66 -0
- package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
- package/agent-assets/skills/today/seeds/section-shape.seed.json +7 -7
- package/agent-assets/skills/user-interview/SKILL.md +21 -93
- package/agent-assets/skills/user-interview/references/op-briefing.md +3 -3
- package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
- package/agent-assets/skills/user-interview/references/op-morning.md +1 -1
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +9 -1
- package/agent-assets/skills/user-profile/SKILL.md +29 -39
- package/agent-assets/skills/user-profile/curation.json +4 -4
- package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
- 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-ask/SKILL.md +1 -1
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +9 -8
- package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
- package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
- package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
- package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
- package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
- package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
- 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/feedback-capture.md +30 -0
- 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 +13 -4
- package/agent-assets/task-flows/message.received.dm_first.md +7 -3
- package/agent-assets/task-flows/routine.custom.md +3 -3
- package/agent-assets/task-flows/routine.evening_review.md +88 -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 +93 -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 +114 -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/task-flows/wiki.trace.md +1 -1
- 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 +58 -15
- package/package.json +5 -4
- package/scripts/commands/doctor.mjs +25 -10
- 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/process-identity.d.mts +46 -0
- package/scripts/lib/process-identity.mjs +193 -0
- package/scripts/lib/read-api-token.mjs +176 -0
- package/scripts/start.mjs +16 -5
- 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
|
@@ -32,9 +32,9 @@ and the `<integration-routing-table>` block in the session preamble.
|
|
|
32
32
|
|
|
33
33
|
## Source of Truth (READ FIRST)
|
|
34
34
|
|
|
35
|
-
Same as the direct-mode body — `
|
|
35
|
+
Same as the direct-mode body — `policies/management.md` →
|
|
36
36
|
`## Source of Truth` and `~/.personal-agent/integrations.md` →
|
|
37
|
-
`## Note Sources`. If `
|
|
37
|
+
`## Note Sources`. If `policies/management.md` Schedule != Google
|
|
38
38
|
Calendar, the native binding is irrelevant; route through the
|
|
39
39
|
provider-specific direct route (`/api/apple-calendar/*` or
|
|
40
40
|
`/api/calendar/outlook/*`).
|
|
@@ -120,7 +120,7 @@ this file.
|
|
|
120
120
|
<!-- service:apple-calendar -->
|
|
121
121
|
## Apple Calendar (iCloud CalDAV) — direct, unchanged
|
|
122
122
|
|
|
123
|
-
If `
|
|
123
|
+
If `policies/management.md` Schedule = Apple Calendar, use the
|
|
124
124
|
`/api/apple-calendar/*` routes documented in the base body. Apple
|
|
125
125
|
Calendar has no MCP connector; native-mode gating does not apply.
|
|
126
126
|
<!-- /service:apple-calendar -->
|
|
@@ -130,7 +130,7 @@ Calendar has no MCP connector; native-mode gating does not apply.
|
|
|
130
130
|
<!-- service:outlook-calendar -->
|
|
131
131
|
## Outlook Calendar (Microsoft Graph) — direct, unchanged
|
|
132
132
|
|
|
133
|
-
If `
|
|
133
|
+
If `policies/management.md` Schedule = Outlook Calendar, use
|
|
134
134
|
`/api/calendar/outlook/*` per the direct-mode body. No Outlook
|
|
135
135
|
connector ships for Codex today; native-mode gating does not apply.
|
|
136
136
|
<!-- /service:outlook-calendar -->
|
|
@@ -143,7 +143,7 @@ connector ships for Codex today; native-mode gating does not apply.
|
|
|
143
143
|
Same surface as the direct-mode body. Full CRUD via
|
|
144
144
|
`/api/obsidian/*`; requires the Obsidian app running. Omit `.md`
|
|
145
145
|
extensions from paths. Never use this skill to read or write the
|
|
146
|
-
agent's primary management vault (`today.md`, `roadmap.md`,
|
|
146
|
+
agent's primary management vault (`state/today.md`, `plans/roadmap.md`,
|
|
147
147
|
`projects/`, `rules/`, …) — that lives behind `/api/context/*`.
|
|
148
148
|
|
|
149
149
|
```bash
|
|
@@ -171,10 +171,10 @@ curl -s -X DELETE http://localhost:8321/api/obsidian/notes/Projects/Old
|
|
|
171
171
|
|
|
172
172
|
```bash
|
|
173
173
|
curl -s http://localhost:8321/api/github/repos
|
|
174
|
-
curl -s "http://localhost:8321/api/github/pulls?state=open"
|
|
174
|
+
curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open"
|
|
175
175
|
curl -s -X POST http://localhost:8321/api/github/pulls/comment \
|
|
176
176
|
-H 'Content-Type: application/json' \
|
|
177
|
-
-d '{"owner": "user", "repo": "repo", "
|
|
177
|
+
-d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}'
|
|
178
178
|
```
|
|
179
179
|
<!-- /service:github -->
|
|
180
180
|
|
|
@@ -33,7 +33,7 @@ and the `<integration-routing-table>` block in the session preamble.
|
|
|
33
33
|
|
|
34
34
|
## Source of Truth (READ FIRST)
|
|
35
35
|
|
|
36
|
-
Same files as the direct-mode body — `
|
|
36
|
+
Same files as the direct-mode body — `policies/management.md` →
|
|
37
37
|
`## Source of Truth` and `~/.personal-agent/integrations.md` →
|
|
38
38
|
`## Note Sources`. If Schedule != Google Calendar, route through the
|
|
39
39
|
provider-specific direct route (`/api/apple-calendar/*` or
|
|
@@ -124,7 +124,7 @@ materialised event to `/api/observations` per the section below.
|
|
|
124
124
|
## Apple Calendar (iCloud CalDAV) — direct, unchanged
|
|
125
125
|
|
|
126
126
|
Use `/api/apple-calendar/*` per the direct-mode body if
|
|
127
|
-
`
|
|
127
|
+
`policies/management.md` Schedule = Apple Calendar.
|
|
128
128
|
<!-- /service:apple-calendar -->
|
|
129
129
|
|
|
130
130
|
---
|
|
@@ -170,10 +170,10 @@ curl -s -X DELETE http://localhost:8321/api/obsidian/notes/Projects/Old
|
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
172
|
curl -s http://localhost:8321/api/github/repos
|
|
173
|
-
curl -s "http://localhost:8321/api/github/pulls?state=open"
|
|
173
|
+
curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open"
|
|
174
174
|
curl -s -X POST http://localhost:8321/api/github/pulls/comment \
|
|
175
175
|
-H 'Content-Type: application/json' \
|
|
176
|
-
-d '{"owner": "user", "repo": "repo", "
|
|
176
|
+
-d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}'
|
|
177
177
|
```
|
|
178
178
|
<!-- /service:github -->
|
|
179
179
|
|
|
@@ -7,7 +7,7 @@ description: Apple Calendar (iCloud CalDAV) reference — list/get/create/update
|
|
|
7
7
|
<!-- service:apple-calendar -->
|
|
8
8
|
## Apple Calendar (iCloud CalDAV)
|
|
9
9
|
|
|
10
|
-
Use this section **only when `
|
|
10
|
+
Use this section **only when `policies/management.md` Schedule = Apple Calendar**. The provider-routing table at the top of this skill is non-negotiable.
|
|
11
11
|
|
|
12
12
|
The route shape mirrors `/api/calendar/*` so prose patterns transfer: list → get → patch / create / delete. Differences are flagged below.
|
|
13
13
|
|
|
@@ -43,7 +43,7 @@ curl -s -X POST http://localhost:8321/api/apple-calendar/events \
|
|
|
43
43
|
-H 'Content-Type: application/json' \
|
|
44
44
|
-d '{"summary": "Team meeting", "start": "2026-04-26T14:00:00+09:00", "end": "2026-04-26T15:00:00+09:00"}'
|
|
45
45
|
```
|
|
46
|
-
Optional: `description`, `location`. **[Apple only]** `attendees`, `reminders`, `recurrence`, `visibility` from the Google shape are
|
|
46
|
+
Optional: `description`, `location`. **[Apple only]** `attendees`, `reminders`, `recurrence`, `visibility` from the Google shape are **rejected** — the Apple schema is `.strict()`, so including any of them fails the whole request with `400 validation_error` and no event is created (the same applies to PATCH). iCloud invitations and reminder defaults belong to the user's Apple ID and the agent should not author them. If a user asks for those, tell them and stop — do not include the fields in the request.
|
|
47
47
|
|
|
48
48
|
### Update event (write — Autonomous)
|
|
49
49
|
```bash
|
|
@@ -7,7 +7,7 @@ description: Outlook Calendar reference (Microsoft Graph) — read-only on-deman
|
|
|
7
7
|
<!-- service:outlook-calendar -->
|
|
8
8
|
## Outlook Calendar (Microsoft Graph)
|
|
9
9
|
|
|
10
|
-
Use this section **only when `
|
|
10
|
+
Use this section **only when `policies/management.md` Schedule = Outlook Calendar**. The provider-routing table at the top of this skill is non-negotiable.
|
|
11
11
|
|
|
12
12
|
v1 is **read-only and on-demand** — there is no Outlook calendar poller, so `schedule.approaching` events do not fire for Outlook calendars (the user's own Outlook clients fill that gap). Write surfaces (create / update / delete) are deferred. If the user asks the agent to schedule or change an Outlook event, tell them you can read the calendar but must defer the write to them.
|
|
13
13
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
name: exec-errors
|
|
4
|
+
description: Delegated `/exec` error envelope — HTTP status, `error` code, retry guidance. Shared across the cross-backend SKILL.delegated.*.md Calendar variants.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Error envelope
|
|
8
|
+
|
|
9
|
+
`/exec` extends the direct-mode envelope with delegated-mode fields.
|
|
10
|
+
Discriminator: `body.mode === "delegated"`.
|
|
11
|
+
|
|
12
|
+
| HTTP | `error` | retry? | What to do |
|
|
13
|
+
|---|---|---|---|
|
|
14
|
+
| 400 | `validation_error` / `schema_too_large` | no | Fix the request body. |
|
|
15
|
+
| 409 | `mode_mismatch` | no | Calendar isn't delegated, OR your DM backend matches `delegatedBackend`. Re-read `integrations.md` and stop. |
|
|
16
|
+
| 409 | `precondition` | no | Mode/backend flipped during the queue wait. Re-check state and re-plan. |
|
|
17
|
+
| 429 | `task_quota_exhausted` | no | Daily cap reached; wait or surface. |
|
|
18
|
+
| 502 | `parse_error` / `schema_violation` | no (daemon already retried once) | Consider a simpler schema. |
|
|
19
|
+
| 502 | `tool_unavailable` | no | No connector tool fits the intent. Surface the gap. |
|
|
20
|
+
| 502 | `tool_failed` | maybe | Connector tool returned an error. Surface `body.message` verbatim; retry only if clearly transient. |
|
|
21
|
+
| 502 | `auth_error` | no | Connector signed out. Tell the user to re-authenticate it. |
|
|
22
|
+
| 502 | `policy_violation` | no | Subprocess attempted a tool outside the per-task allowlist (anti-injection). |
|
|
23
|
+
| 502 | `loop_aborted` | no | `maxToolCalls` exceeded. Bump the cap or simplify. |
|
|
24
|
+
| 502 | `budget_exhausted` | no | `maxBudgetUsd` exceeded. Caller can raise the cap. |
|
|
25
|
+
| 502 | `post_write_format_failure` | no | Write succeeded; formatting failed. Side effect is real — surface with the partial trace. |
|
|
26
|
+
| 503 | `delegated_proxy_busy` | yes | Daemon queue saturated. Backoff a few seconds, try once. |
|
|
27
|
+
| 503 | `task_mode_disabled` | no | Operator turned the kill switch off. Stop. |
|
|
28
|
+
| 504 | `timeout` | yes (1×) | Wall-clock fired. Retry once if intent was simple. |
|
|
29
|
+
| 500 | `subprocess_crashed` | no | Unhandled exception inside the subprocess. Surface and stop. |
|
|
30
|
+
|
|
31
|
+
Always preserve `body.message` verbatim when reporting to the user — it
|
|
32
|
+
carries the connector's own language.
|
|
@@ -9,8 +9,8 @@ description: External Obsidian vault CRUD — separate from the agent's primary
|
|
|
9
9
|
|
|
10
10
|
**Scope**: this skill targets a **separate** Obsidian vault the user maintains
|
|
11
11
|
alongside this app — e.g. a personal knowledge base. It is **not** the agent's
|
|
12
|
-
own primary management store. The agent's primary files (`today.md`,
|
|
13
|
-
`roadmap.md`, `projects/`, `rules/`, `routines/`, `user/`, `agent/`, …) live
|
|
12
|
+
own primary management store. The agent's primary files (`state/today.md`,
|
|
13
|
+
`plans/roadmap.md`, `projects/`, `rules/`, `routines/`, `user/`, `agent/`, …) live
|
|
14
14
|
in the primary vault and are reached via `/api/context/*` (see the `context`
|
|
15
15
|
skill). **Never** use this skill to read or write the primary vault.
|
|
16
16
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: reference
|
|
3
3
|
name: skills-crud
|
|
4
|
-
description: Dashboard-shaped CRUD for user-authored skills under
|
|
4
|
+
description: Dashboard-shaped CRUD for user-authored skills under <contextDir>/policies/skills/. Built-in skills are read-only (403).
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Skills Management
|
|
8
8
|
|
|
9
|
-
User-authored skills:
|
|
9
|
+
User-authored skills: `<contextDir>/policies/skills/{slug}/SKILL.md`. Built-in skills are read-only (403). Slug: lowercase kebab-case `[a-z0-9][a-z0-9-]*`, 1–64 chars.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
curl -s http://localhost:8321/api/skills # list all
|
|
@@ -22,6 +22,6 @@ Always `GET /api/skills` before creating (check name collisions). **Omit frontma
|
|
|
22
22
|
|
|
23
23
|
The description is the **only** routing signal the SDK uses to pick a
|
|
24
24
|
skill — keep it under 280 chars and make the trigger surface
|
|
25
|
-
distinct from every other skill in the manifest. Slug grammar
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
distinct from every other skill in the manifest. Slug grammar:
|
|
26
|
+
`^[a-z0-9][a-z0-9-]*$` (1-64 chars; a trailing hyphen is allowed,
|
|
27
|
+
no alphanumeric terminal required). PUT rejects collisions with built-in slugs.
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gmail-lifestyle
|
|
3
|
-
description: Load when the user mentions receipts / expenses / flights / hotels / trains /
|
|
3
|
+
description: Load when the user mentions receipts / expenses / flights / hotels / trains / a booking — Gmail-observer-derived travel bookings and receipt save-to-external-vault both live here.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash(curl *)
|
|
6
6
|
- Read
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# Gmail Lifestyle — travel bookings,
|
|
9
|
+
# Gmail Lifestyle — travel bookings, receipts
|
|
10
10
|
|
|
11
|
-
This skill merges
|
|
12
|
-
data the daemon's **Gmail observer** has scanned: travel bookings
|
|
13
|
-
|
|
14
|
-
attachments saved into the user's external Obsidian vault.
|
|
11
|
+
This skill merges two closely-related surfaces that both depend on
|
|
12
|
+
data the daemon's **Gmail observer** has scanned: travel bookings and
|
|
13
|
+
receipt attachments saved into the user's external Obsidian vault.
|
|
15
14
|
|
|
16
15
|
It is conditionally loaded — see the manifest predicate
|
|
17
16
|
`gmailLifestyleActive(db)` / `gmailLifestyleActiveForDm(db, msg)`
|
|
18
17
|
in `packages/daemon/src/core/skills-manifest.ts`. Routines load it
|
|
19
18
|
when there is fresh-or-pending data; DM events also load it on
|
|
20
|
-
trigger phrases (`receipt`, `expense`, `flight`, `train`,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
and the message-text triggers).
|
|
19
|
+
trigger phrases (`receipt`, `expense`, `flight`, `train`, plus the
|
|
20
|
+
user's primary-language equivalents — the predicate handles both the
|
|
21
|
+
structured triggers and the message-text triggers).
|
|
24
22
|
|
|
25
23
|
Output language: Policy C for user-facing summaries — see
|
|
26
24
|
`<output_language_policy>`. Path patterns and external API field
|
|
@@ -85,77 +83,6 @@ Reservation.
|
|
|
85
83
|
|
|
86
84
|
---
|
|
87
85
|
|
|
88
|
-
## Travel time / commute
|
|
89
|
-
|
|
90
|
-
Uses the Google Maps Directions API to estimate travel time between
|
|
91
|
-
locations. Computes departure times for calendar events with a
|
|
92
|
-
`location` field.
|
|
93
|
-
|
|
94
|
-
**Prerequisite**: `googleMapsApiKey` configured in the daemon's
|
|
95
|
-
secret store, with the Directions API enabled.
|
|
96
|
-
|
|
97
|
-
### When to use
|
|
98
|
-
|
|
99
|
-
- **Morning routine** — for today's calendar events with a location,
|
|
100
|
-
compute departure times and add to today.md `## Commute & Travel`.
|
|
101
|
-
- **User asks about commute / travel time** — query specific routes.
|
|
102
|
-
- **Pre-event reminders** — DM departure-time suggestions.
|
|
103
|
-
|
|
104
|
-
### Sourcing today's events
|
|
105
|
-
|
|
106
|
-
The right fetch path depends on Google Calendar's current mode
|
|
107
|
-
(read `<integration_modes>` injected at session start):
|
|
108
|
-
|
|
109
|
-
<!-- mode:direct:google_calendar -->
|
|
110
|
-
Direct mode → `GET /api/calendar/events?date=today&days=1`
|
|
111
|
-
(see the `external-services` skill).
|
|
112
|
-
<!-- /mode:direct:google_calendar -->
|
|
113
|
-
<!-- mode:delegated-same:google_calendar -->
|
|
114
|
-
Same-backend delegated → use this session backend's native Calendar
|
|
115
|
-
list-events MCP tool. `/api/calendar/events` returns 410.
|
|
116
|
-
<!-- /mode:delegated-same:google_calendar -->
|
|
117
|
-
<!-- mode:delegated-cross:google_calendar -->
|
|
118
|
-
Cross-backend delegated → `POST /api/integrations/google_calendar/exec`
|
|
119
|
-
with a natural-language `task` + `outputSchema` (see the
|
|
120
|
-
`external-services` skill — cross-backend variant for worked
|
|
121
|
-
examples).
|
|
122
|
-
<!-- /mode:delegated-cross:google_calendar -->
|
|
123
|
-
<!-- mode:native:google_calendar -->
|
|
124
|
-
Native mode → use this session backend's native Calendar list-events
|
|
125
|
-
MCP tool (same call shape as `delegated-same`). The materialized
|
|
126
|
-
`external-services` skill body (`SKILL.native.<session-backend>.md`)
|
|
127
|
-
lists the per-backend tool names. The daemon does not proxy in
|
|
128
|
-
native mode; `/api/calendar/events` returns 410 and
|
|
129
|
-
`/api/integrations/google_calendar/exec` returns 410 too.
|
|
130
|
-
<!-- /mode:native:google_calendar -->
|
|
131
|
-
<!-- mode:disabled:google_calendar -->
|
|
132
|
-
Disabled → skip this section; there is no calendar to source events
|
|
133
|
-
from.
|
|
134
|
-
<!-- /mode:disabled:google_calendar -->
|
|
135
|
-
|
|
136
|
-
### API
|
|
137
|
-
|
|
138
|
-
Full `/api/travel-time` reference (point-to-point + for-event) is in
|
|
139
|
-
the dedicated reference below.
|
|
140
|
-
|
|
141
|
-
{{> ref:travel-time-api }}
|
|
142
|
-
|
|
143
|
-
### Formatting — today.md
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
## Commute & Travel
|
|
147
|
-
14:00 Team meeting @ WeWork Times Square — depart by 13:15 (transit, 40 min)
|
|
148
|
-
18:30 Dinner @ Restaurant ABC — depart by 18:00 (transit, 25 min)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Only include events that have a `location` field. Omit the section
|
|
152
|
-
when no events have locations today.
|
|
153
|
-
|
|
154
|
-
Mode display names: transit → Transit, driving → Driving, walking →
|
|
155
|
-
Walking, bicycling → Bicycle.
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
86
|
## Receipts
|
|
160
87
|
|
|
161
88
|
The daemon's Gmail observer scans travel-booking emails for PDF /
|
|
@@ -170,8 +97,9 @@ user's **external Obsidian vault**.
|
|
|
170
97
|
> **external** Obsidian vault (user's personal knowledge base reached
|
|
171
98
|
> via `/api/obsidian/*`), **not** the primary management store
|
|
172
99
|
> reached via `/api/context/*`. The agent's own state files
|
|
173
|
-
> (`today.md`, `roadmap.md`, `projects/*`, `
|
|
174
|
-
> `routines/*`, `agent
|
|
100
|
+
> (`state/today.md`, `plans/roadmap.md`, `plans/projects/*`, `identity/*`,
|
|
101
|
+
> `policies/*`, `policies/routines/*`, `journal/agent.md`) live in the
|
|
102
|
+
> primary store and must
|
|
175
103
|
> **never** receive receipt attachments. See the
|
|
176
104
|
> `external-services` skill's obsidian reference for the external
|
|
177
105
|
> vault's full CRUD surface.
|
|
@@ -41,6 +41,7 @@ Response:
|
|
|
41
41
|
{
|
|
42
42
|
"id": 1,
|
|
43
43
|
"providerMsgId": "18f...",
|
|
44
|
+
"accountId": "...",
|
|
44
45
|
"attachmentId": "ANGj...",
|
|
45
46
|
"filename": "receipt.pdf",
|
|
46
47
|
"mimeType": "application/pdf",
|
|
@@ -55,6 +56,9 @@ Response:
|
|
|
55
56
|
}
|
|
56
57
|
```
|
|
57
58
|
|
|
59
|
+
`accountId` identifies the source mail account; `POST /receipts/:id/download`
|
|
60
|
+
uses it to resolve the provider.
|
|
61
|
+
|
|
58
62
|
## GET /api/receipts/summary
|
|
59
63
|
|
|
60
64
|
```bash
|
|
@@ -68,8 +68,17 @@ curl -s "http://localhost:8321/api/travel-bookings/upcoming?limit=10"
|
|
|
68
68
|
|
|
69
69
|
## PATCH /api/travel-bookings/:id
|
|
70
70
|
|
|
71
|
+
Accepts `{"status": "..."}` and/or `{"destination": "..."}`. Valid
|
|
72
|
+
status values are `upcoming`, `completed`, `cancelled`.
|
|
73
|
+
|
|
71
74
|
```bash
|
|
75
|
+
# Update status
|
|
72
76
|
curl -s -X PATCH "http://localhost:8321/api/travel-bookings/1" \
|
|
73
77
|
-H "Content-Type: application/json" \
|
|
74
78
|
-d '{"status": "completed"}'
|
|
79
|
+
|
|
80
|
+
# Correct a parsed destination
|
|
81
|
+
curl -s -X PATCH "http://localhost:8321/api/travel-bookings/1" \
|
|
82
|
+
-H "Content-Type: application/json" \
|
|
83
|
+
-d '{"destination": "San Francisco"}'
|
|
75
84
|
```
|
|
@@ -90,7 +90,7 @@ Response shape on success:
|
|
|
90
90
|
`outputSchema` is **required** — the subprocess emits exactly one JSON
|
|
91
91
|
object as its final message and the daemon validates it. Schemas
|
|
92
92
|
larger than 4 KB are rejected (`schema_too_large`). Caps default to
|
|
93
|
-
`maxToolCalls=
|
|
93
|
+
`maxToolCalls=8`, `maxBudgetUsd=0.05`, `timeoutMs=60000` — bump them via
|
|
94
94
|
the request body up to the hard caps (15 / 0.50 / 300000) when a task
|
|
95
95
|
genuinely needs more.
|
|
96
96
|
|
|
@@ -101,8 +101,7 @@ should set `cacheable: true` so a repeat invocation within 60s returns
|
|
|
101
101
|
~5ms from the in-memory LRU. The cache key includes the integration
|
|
102
102
|
state version, so flipping `deniedTools` or `delegatedBackend` purges
|
|
103
103
|
entries automatically. Cache hits still write a `delegated_task.exec`
|
|
104
|
-
audit row with `cost_usd=0` and `detail.cacheHit=true
|
|
105
|
-
stays correct.
|
|
104
|
+
audit row with `cost_usd=0` and `detail.cacheHit=true`.
|
|
106
105
|
|
|
107
106
|
Never set `cacheable: true` on:
|
|
108
107
|
- destructive-confirm second calls (`allowDestructive: true`),
|
|
@@ -205,11 +204,12 @@ curl -s -X POST http://localhost:8321/api/integrations/gmail/exec \
|
|
|
205
204
|
## Default deny floor
|
|
206
205
|
|
|
207
206
|
The setup wizard pre-populates `gmail.deniedTools` with the connector's
|
|
208
|
-
destructive defaults
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
the
|
|
207
|
+
destructive defaults. `/exec` honors the deny list, distinguishing two
|
|
208
|
+
cases: if **every** connector tool is denied → `403 denied_tool` (no
|
|
209
|
+
surface to plan against, rejected up front); if usable tools remain but
|
|
210
|
+
the specific tool a planned task needs is denied (or no tool fits) →
|
|
211
|
+
`502 tool_unavailable`. In both cases, surface that to the user and ask
|
|
212
|
+
whether to lift the relevant deny before retrying.
|
|
213
213
|
|
|
214
214
|
## Decision rules
|
|
215
215
|
|
|
@@ -236,6 +236,7 @@ Discriminator: `body.mode === "delegated"`.
|
|
|
236
236
|
| 400 | `validation_error` / `schema_too_large` | no | Fix the request body. |
|
|
237
237
|
| 409 | `mode_mismatch` | no | Gmail isn't delegated, OR your DM backend matches `delegatedBackend`. Re-read `integrations.md` and stop. |
|
|
238
238
|
| 409 | `precondition` | no | Mode/backend was flipped while the call queued. Re-read `integrations.md` and re-plan. |
|
|
239
|
+
| 403 | `denied_tool` | no | Every tool in the connector is denied — task mode has no surface to plan against. Surface to the user and ask whether to lift the deny. |
|
|
239
240
|
| 429 | `task_quota_exhausted` | no | Daily cap reached; wait or surface. |
|
|
240
241
|
| 502 | `parse_error` / `schema_violation` | no (daemon already retried once) | Consider a simpler schema. |
|
|
241
242
|
| 502 | `tool_unavailable` | no | No connector tool fits the intent. Surface the gap to the user. |
|
|
@@ -262,23 +263,19 @@ curl -s -X POST http://localhost:8321/api/notify \
|
|
|
262
263
|
-d '{"message": "Sent reply to alice@example.com (Re: Proposal)"}'
|
|
263
264
|
```
|
|
264
265
|
|
|
265
|
-
Do not call `/api/notify` for routine reads / drafts / searches.
|
|
266
|
-
default posture is autonomous; the user's `deniedTools` is the
|
|
267
|
-
hard-stop, on-demand retrospective covers awareness, and `/api/notify`
|
|
268
|
-
is the small hammer for "speak up if I'm about to do something
|
|
269
|
-
unusual."
|
|
266
|
+
Do not call `/api/notify` for routine reads / drafts / searches.
|
|
270
267
|
|
|
271
268
|
## Cost / retrospective
|
|
272
269
|
|
|
273
270
|
Every `/exec` writes one row to `agent_actions` with
|
|
274
|
-
`action_type='delegated_task.exec'` (token + USD breakdown
|
|
275
|
-
|
|
276
|
-
vars). When the user asks what you did:
|
|
271
|
+
`action_type='delegated_task.exec'` (token + USD breakdown). When the
|
|
272
|
+
user asks what you did:
|
|
277
273
|
|
|
278
274
|
```bash
|
|
279
275
|
curl -s "http://localhost:8321/api/agent/actions?kind=delegated_task.exec&since=2026-04-25T00:00:00Z&limit=50"
|
|
280
276
|
```
|
|
281
277
|
|
|
282
278
|
Summarise from the returned `actions` array — each row carries
|
|
283
|
-
`detail.
|
|
284
|
-
|
|
279
|
+
`detail.taskHash` (a hash, NOT the task text — the verbatim intent is
|
|
280
|
+
deliberately not persisted, so do not try to read intent prose from it),
|
|
281
|
+
cost, cache hit flag, and timestamp.
|
|
@@ -85,7 +85,7 @@ Response shape on success:
|
|
|
85
85
|
`outputSchema` is **required** — the subprocess emits exactly one JSON
|
|
86
86
|
object as its final message and the daemon validates it. Schemas
|
|
87
87
|
larger than 4 KB are rejected (`schema_too_large`). Caps default to
|
|
88
|
-
`maxToolCalls=
|
|
88
|
+
`maxToolCalls=8`, `maxBudgetUsd=0.05`, `timeoutMs=60000` — bump them
|
|
89
89
|
via the request body up to the hard caps (15 / 0.50 / 300000) when a
|
|
90
90
|
task genuinely needs more.
|
|
91
91
|
|
|
@@ -193,9 +193,12 @@ curl -sS -X POST http://localhost:8321/api/integrations/gmail/exec \
|
|
|
193
193
|
## Default deny floor
|
|
194
194
|
|
|
195
195
|
The setup wizard pre-populates `gmail.deniedTools` with the connector's
|
|
196
|
-
destructive defaults. `/exec` honors the deny list
|
|
197
|
-
|
|
198
|
-
to
|
|
196
|
+
destructive defaults. `/exec` honors the deny list, distinguishing two
|
|
197
|
+
cases: if **every** connector tool is denied → `403 denied_tool` (no
|
|
198
|
+
surface to plan against, rejected up front); if usable tools remain but
|
|
199
|
+
the specific tool a planned task needs is denied (or no tool fits) →
|
|
200
|
+
`502 tool_unavailable`. In both cases, surface that to the user and ask
|
|
201
|
+
whether to lift the relevant deny before retrying.
|
|
199
202
|
|
|
200
203
|
## Decision rules
|
|
201
204
|
|
|
@@ -218,6 +221,7 @@ Discriminator: `body.mode === "delegated"`.
|
|
|
218
221
|
| 400 | `validation_error` / `schema_too_large` | no | Fix the request body. |
|
|
219
222
|
| 409 | `mode_mismatch` | no | Gmail isn't delegated, OR your DM backend matches `delegatedBackend`. Re-read `integrations.md` and stop. |
|
|
220
223
|
| 409 | `precondition` | no | Mode/backend was flipped during queue wait. Re-read `integrations.md` and re-plan. |
|
|
224
|
+
| 403 | `denied_tool` | no | Every tool in the connector is denied — no surface to plan against. Surface to the user and ask whether to lift the deny. |
|
|
221
225
|
| 429 | `task_quota_exhausted` | no | Daily cap reached; wait or surface. |
|
|
222
226
|
| 502 | `parse_error` / `schema_violation` | no (daemon already retried once) | Consider a simpler schema. |
|
|
223
227
|
| 502 | `tool_unavailable` | no | No connector tool fits. Surface the gap. |
|
|
@@ -257,5 +261,6 @@ curl -sS "http://localhost:8321/api/agent/actions?kind=delegated_task.exec&since
|
|
|
257
261
|
```
|
|
258
262
|
|
|
259
263
|
Summarise from the returned `actions` array — each row carries
|
|
260
|
-
`detail.
|
|
261
|
-
|
|
264
|
+
`detail.taskHash` (a hash, NOT the task text — the verbatim intent is
|
|
265
|
+
deliberately not persisted, so do not try to read intent prose from it),
|
|
266
|
+
cost, cache hit flag, and timestamp.
|
|
@@ -83,7 +83,7 @@ Response shape on success:
|
|
|
83
83
|
`outputSchema` is **required** — the subprocess emits exactly one JSON
|
|
84
84
|
object as its final message and the daemon validates it. Schemas
|
|
85
85
|
larger than 4 KB are rejected (`schema_too_large`). Caps default to
|
|
86
|
-
`maxToolCalls=
|
|
86
|
+
`maxToolCalls=8`, `maxBudgetUsd=0.05`, `timeoutMs=60000` — bump them
|
|
87
87
|
via the request body up to the hard caps (15 / 0.50 / 300000) when a
|
|
88
88
|
task genuinely needs more.
|
|
89
89
|
|
|
@@ -187,9 +187,12 @@ curl -sS -X POST http://localhost:8321/api/integrations/gmail/exec \
|
|
|
187
187
|
## Default deny floor
|
|
188
188
|
|
|
189
189
|
The setup wizard pre-populates `gmail.deniedTools` with the connector's
|
|
190
|
-
destructive defaults. `/exec` honors the deny list
|
|
191
|
-
|
|
192
|
-
to
|
|
190
|
+
destructive defaults. `/exec` honors the deny list, distinguishing two
|
|
191
|
+
cases: if **every** connector tool is denied → `403 denied_tool` (no
|
|
192
|
+
surface to plan against, rejected up front); if usable tools remain but
|
|
193
|
+
the specific tool a planned task needs is denied (or no tool fits) →
|
|
194
|
+
`502 tool_unavailable`. In both cases, surface that to the user and ask
|
|
195
|
+
whether to lift the relevant deny before retrying.
|
|
193
196
|
|
|
194
197
|
## Decision rules
|
|
195
198
|
|
|
@@ -212,6 +215,7 @@ Discriminator: `body.mode === "delegated"`.
|
|
|
212
215
|
| 400 | `validation_error` / `schema_too_large` | no | Fix the request body. |
|
|
213
216
|
| 409 | `mode_mismatch` | no | Gmail isn't delegated, OR your DM backend matches `delegatedBackend`. Re-read `integrations.md` and stop. |
|
|
214
217
|
| 409 | `precondition` | no | Mode/backend was flipped during queue wait. Re-read `integrations.md` and re-plan. |
|
|
218
|
+
| 403 | `denied_tool` | no | Every tool in the connector is denied — no surface to plan against. Surface to the user and ask whether to lift the deny. |
|
|
215
219
|
| 429 | `task_quota_exhausted` | no | Daily cap reached; wait or surface. |
|
|
216
220
|
| 502 | `parse_error` / `schema_violation` | no (daemon already retried once) | Consider a simpler schema. |
|
|
217
221
|
| 502 | `tool_unavailable` | no | No connector tool fits. Surface the gap. |
|
|
@@ -251,5 +255,6 @@ curl -sS "http://localhost:8321/api/agent/actions?kind=delegated_task.exec&since
|
|
|
251
255
|
```
|
|
252
256
|
|
|
253
257
|
Summarise from the returned `actions` array — each row carries
|
|
254
|
-
`detail.
|
|
255
|
-
|
|
258
|
+
`detail.taskHash` (a hash, NOT the task text — the verbatim intent is
|
|
259
|
+
deliberately not persisted, so do not try to read intent prose from it),
|
|
260
|
+
cost, cache hit flag, and timestamp.
|
|
@@ -99,16 +99,10 @@ includes dormant and unhealthy rows that every operation will reject.
|
|
|
99
99
|
### Send vs draft
|
|
100
100
|
- **Prefer drafts.** Create via `POST /mail/:acct/drafts`. The user sends
|
|
101
101
|
from the provider's web UI.
|
|
102
|
-
- Direct send (`POST /mail/:acct/messages/send`)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
`/api/integrations/:key/exec` task-mode chokepoint via the per-task
|
|
107
|
-
allowed-tools envelope. In direct mode, the `/api/mail/*` route
|
|
108
|
-
handler has no equivalent deny check today, so a send call is what
|
|
109
|
-
it appears to be: a send.) When you judge the user would want to
|
|
110
|
-
know about a send immediately (e.g. a reply to a stranger), call
|
|
111
|
-
`POST /api/notify` yourself.
|
|
102
|
+
- Direct send (`POST /mail/:acct/messages/send`) is autonomous — no owner
|
|
103
|
+
DM, no deny gate (see api.md for the `deniedTools`-scope nuance). When
|
|
104
|
+
you judge the user would want to know about a send immediately (e.g. a
|
|
105
|
+
reply to a stranger), call `POST /api/notify` yourself.
|
|
112
106
|
- Never include `bcc` unless the user explicitly asks for it.
|
|
113
107
|
|
|
114
108
|
### Replies — RFC-2822 headers are the source of truth
|
|
@@ -118,7 +112,9 @@ all four kinds.
|
|
|
118
112
|
|
|
119
113
|
1. Fetch the thread metadata: `GET /api/mail/:acct/threads/:threadId?body=none`
|
|
120
114
|
(returns `messages[]` in chronological order without raw HTML bodies).
|
|
121
|
-
2. From the last message, pull `rfc822MsgId`
|
|
115
|
+
2. From the last message, pull `rfc822MsgId` (thread message objects carry
|
|
116
|
+
no `references` field — you SUPPLY `references` in the reply block below,
|
|
117
|
+
you do not read it off the message).
|
|
122
118
|
3. Build the `reply` block:
|
|
123
119
|
```json
|
|
124
120
|
{
|
|
@@ -198,13 +194,9 @@ curl -s "http://localhost:8321/api/mail/ACCT/messages/MSG/body?format=raw&chunk=
|
|
|
198
194
|
deny list. The daemon does not DM the owner before the call. Single
|
|
199
195
|
ops only; if you're about to trash 3+ messages at once, stop and ask
|
|
200
196
|
the user — the agent's own judgment is the gate, not the daemon.
|
|
201
|
-
- **Delegated mode**:
|
|
202
|
-
|
|
203
|
-
`
|
|
204
|
-
skill entirely (same-backend, native MCP). If you somehow reach
|
|
205
|
-
`/api/mail/*` from this body while Gmail is delegated, the route
|
|
206
|
-
returns `410 integration_delegated` — re-read `integrations.md` and
|
|
207
|
-
use `POST /api/integrations/gmail/exec` (task mode) instead.
|
|
197
|
+
- **Delegated / native mode**: see §0 for routing. A `/api/mail/*` call
|
|
198
|
+
that hits a delegated/native gate returns `410` (`integration_delegated`
|
|
199
|
+
/ `integration_native`) — re-read `integrations.md` and dispatch per §0.
|
|
208
200
|
|
|
209
201
|
## 3. Provider capability matrix
|
|
210
202
|
|
|
@@ -102,7 +102,7 @@ When you fetch Gmail data during a routine (e.g. `routine.hourly_check`'s
|
|
|
102
102
|
Step 0a), POST each materialised thread to the daemon's
|
|
103
103
|
`/api/observations` endpoint so subsequent runs can dedup. The daemon
|
|
104
104
|
computes `contentHash` server-side via
|
|
105
|
-
`@
|
|
105
|
+
`@aitne/shared/observations-hash` — pass the raw `payload`
|
|
106
106
|
verbatim; do **not** compute the hash yourself (LLM-side hashes drift
|
|
107
107
|
between runs and from the delegated-sync-worker's hash, breaking
|
|
108
108
|
`delegated → native` flip dedup).
|
|
@@ -159,9 +159,10 @@ window (§11.3.1) with HTTP 409; on 409 stop and re-read
|
|
|
159
159
|
|
|
160
160
|
## Cost / audit
|
|
161
161
|
|
|
162
|
-
Every native MCP call
|
|
163
|
-
|
|
164
|
-
`
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
Every native MCP call is logged to the `mcp_tool_calls` table
|
|
163
|
+
(`server_id`, `tool_name`, `event_type`, `session_id`, `ok` / `error`,
|
|
164
|
+
`called_at`, `duration_ms`) — NOT to `agent_actions`, and with no
|
|
165
|
+
per-call token or provider columns. The operator's cost view attributes
|
|
166
|
+
native spend by server / namespace from those rows so it can see the
|
|
167
|
+
shift after a flip. You do not query this yourself — just call the
|
|
168
|
+
connector and POST observations.
|
|
@@ -112,7 +112,7 @@ and RFC-2822 reply chain shape are unchanged for non-Gmail accounts.
|
|
|
112
112
|
|
|
113
113
|
POST each materialised Gmail thread fetched in a routine to
|
|
114
114
|
`/api/observations`. The daemon computes `contentHash` server-side via
|
|
115
|
-
`@
|
|
115
|
+
`@aitne/shared/observations-hash`; pass `payload` verbatim.
|
|
116
116
|
|
|
117
117
|
**Batch when you have more than one thread.** Use
|
|
118
118
|
`POST /api/observations/batch` with up to 200 items in a single
|
|
@@ -119,7 +119,7 @@ for non-Gmail accounts.
|
|
|
119
119
|
|
|
120
120
|
POST each materialised Gmail message fetched in a routine to
|
|
121
121
|
`/api/observations`. The daemon computes `contentHash` server-side via
|
|
122
|
-
the shared util in `@
|
|
122
|
+
the shared util in `@aitne/shared/observations-hash`; pass
|
|
123
123
|
`payload` verbatim.
|
|
124
124
|
|
|
125
125
|
**Batch when you have more than one message.** Use
|