@aitne-sh/aitne 0.1.7 → 0.1.8
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 +195 -829
- package/agent-assets/agent-profiles/_safety.md +49 -17
- package/agent-assets/agent-profiles/profile-importer.md +1 -1
- package/agent-assets/agent-profiles/routine.md +4 -3
- package/agent-assets/docs/concepts/agent-day.md +6 -1
- package/agent-assets/docs/concepts/auth-health.md +10 -1
- package/agent-assets/docs/concepts/backends-and-tiers.md +74 -40
- package/agent-assets/docs/concepts/costs-and-quotas.md +25 -5
- package/agent-assets/docs/concepts/delegated-mode.md +147 -68
- package/agent-assets/docs/concepts/memory-model.md +9 -4
- package/agent-assets/docs/concepts/observations.md +13 -1
- package/agent-assets/docs/concepts/process-keys.md +20 -5
- package/agent-assets/docs/concepts/routines.md +38 -20
- package/agent-assets/docs/concepts/safety-model.md +30 -13
- package/agent-assets/docs/concepts/skills.md +12 -7
- package/agent-assets/docs/features/integrations/calendar.md +1 -1
- package/agent-assets/docs/features/integrations/git.md +2 -2
- package/agent-assets/docs/features/integrations/github.md +9 -2
- package/agent-assets/docs/features/integrations/mail.md +1 -1
- package/agent-assets/docs/features/integrations/notion.md +34 -6
- package/agent-assets/docs/features/integrations/obsidian.md +7 -2
- package/agent-assets/docs/features/lifestyle/git.md +4 -7
- package/agent-assets/docs/features/lifestyle/receipts.md +17 -2
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +15 -0
- package/agent-assets/docs/features/lifestyle/travel-time.md +7 -1
- package/agent-assets/docs/features/memory-files/agent-journal.md +2 -2
- package/agent-assets/docs/features/memory-files/projects.md +6 -0
- package/agent-assets/docs/features/memory-files/roadmap.md +5 -0
- package/agent-assets/docs/features/memory-files/today.md +1 -0
- package/agent-assets/docs/features/memory-files/user-profile.md +6 -0
- package/agent-assets/docs/features/messaging/bang-commands.md +20 -10
- package/agent-assets/docs/features/messaging/discord.md +12 -1
- package/agent-assets/docs/features/messaging/overview.md +10 -7
- package/agent-assets/docs/features/messaging/slack.md +13 -1
- package/agent-assets/docs/features/messaging/telegram.md +7 -1
- package/agent-assets/docs/features/messaging/whatsapp.md +12 -1
- package/agent-assets/docs/features/operations/activity-and-conversations.md +2 -2
- package/agent-assets/docs/features/operations/approvals.md +6 -0
- package/agent-assets/docs/features/operations/backend-routing.md +7 -0
- package/agent-assets/docs/features/operations/cost-tracking.md +6 -0
- package/agent-assets/docs/features/operations/notifications.md +6 -0
- package/agent-assets/docs/features/operations/schedule-approaching.md +22 -9
- package/agent-assets/docs/features/routines/custom-routines.md +10 -4
- package/agent-assets/docs/features/routines/evening-review.md +1 -1
- package/agent-assets/docs/features/routines/hourly-check.md +1 -1
- package/agent-assets/docs/features/routines/morning-routine.md +24 -15
- package/agent-assets/docs/features/routines/weekly-review.md +38 -12
- package/agent-assets/docs/features/wiki/commands.md +11 -0
- package/agent-assets/docs/features/wiki/overview.md +13 -3
- package/agent-assets/docs/getting-started/01-what-is-this.md +32 -11
- package/agent-assets/docs/getting-started/02-first-steps.md +17 -4
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +21 -11
- package/agent-assets/docs/getting-started/04-first-day.md +14 -0
- package/agent-assets/docs/glossary.md +65 -12
- package/agent-assets/docs/guides/add-a-custom-routine.md +12 -0
- package/agent-assets/docs/guides/backup-and-restore.md +16 -2
- package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +6 -0
- package/agent-assets/docs/guides/build-your-wiki.md +14 -0
- package/agent-assets/docs/guides/change-which-model-handles-x.md +7 -0
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +16 -0
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +6 -0
- package/agent-assets/docs/guides/import-knowledge-file.md +11 -0
- package/agent-assets/docs/guides/install-and-run.md +20 -4
- package/agent-assets/docs/guides/maintain-wiki-health.md +6 -0
- package/agent-assets/docs/guides/migrate-machines.md +13 -1
- package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +9 -0
- package/agent-assets/docs/guides/pause-the-agent.md +12 -4
- package/agent-assets/docs/guides/reinstall-cleanly.md +19 -4
- package/agent-assets/docs/guides/setup-wizard.md +20 -9
- package/agent-assets/docs/guides/switch-default-backend.md +10 -1
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +5 -0
- package/agent-assets/docs/reference/api.md +29 -1
- package/agent-assets/docs/reference/cli-commands.md +22 -3
- package/agent-assets/docs/reference/config.md +37 -5
- package/agent-assets/docs/reference/disallowed-tools.md +13 -0
- package/agent-assets/docs/reference/keyboard-shortcuts.md +13 -0
- package/agent-assets/docs/reference/process-keys.md +70 -20
- package/agent-assets/docs/reference/skills.md +27 -9
- package/agent-assets/docs/troubleshooting/auth-failed.md +7 -2
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +13 -1
- package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +10 -0
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +11 -0
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +9 -4
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +12 -0
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +7 -1
- package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +5 -0
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +5 -0
- package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/skill-curation/SKILL.md +2 -2
- package/agent-assets/skills/agent-actions/SKILL.md +122 -0
- package/agent-assets/skills/attach/SKILL.md +1 -2
- package/agent-assets/skills/context/SKILL.md +36 -454
- package/agent-assets/skills/context/references/api.md +220 -0
- package/agent-assets/skills/context/references/required-frontmatter.md +73 -0
- package/agent-assets/skills/context/references/snapshot-files.md +103 -0
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +1 -1
- package/agent-assets/skills/docs-search/SKILL.md +13 -13
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +5 -7
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +5 -7
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +5 -7
- package/agent-assets/skills/external-services/SKILL.md +6 -259
- package/agent-assets/skills/external-services/SKILL.native.claude.md +1 -2
- package/agent-assets/skills/external-services/SKILL.native.codex.md +1 -2
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +1 -2
- package/agent-assets/skills/external-services/references/calendar-apple.md +97 -0
- package/agent-assets/skills/external-services/references/calendar-google.md +72 -0
- package/agent-assets/skills/external-services/references/calendar-outlook.md +36 -0
- package/agent-assets/skills/external-services/references/github.md +17 -0
- package/agent-assets/skills/external-services/references/obsidian.md +49 -0
- package/agent-assets/skills/external-services/references/skills-crud.md +27 -0
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +224 -0
- package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +93 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +75 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +59 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +1 -1
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +1 -1
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +1 -1
- package/agent-assets/skills/mail/SKILL.md +9 -114
- package/agent-assets/skills/mail/SKILL.native.claude.md +1 -1
- 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 +108 -0
- package/agent-assets/skills/mail/references/examples.md +70 -0
- package/agent-assets/skills/mail/references/providers.md +8 -8
- package/agent-assets/skills/managed-tasks/SKILL.md +472 -0
- package/agent-assets/skills/managed-tasks/references/errors.md +70 -0
- package/agent-assets/skills/managed-tasks/references/output-path.md +75 -0
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +86 -0
- package/agent-assets/skills/management-policy/SKILL.md +33 -105
- package/agent-assets/skills/management-policy/references/policy-workflow.md +101 -0
- package/agent-assets/skills/notify/SKILL.md +6 -78
- package/agent-assets/skills/notify/references/priority.md +60 -0
- 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.md +6 -10
- package/agent-assets/skills/notion/SKILL.native.claude.md +1 -2
- package/agent-assets/skills/notion/SKILL.native.codex.md +1 -2
- package/agent-assets/skills/notion/SKILL.native.gemini.md +1 -2
- package/agent-assets/skills/observations/SKILL.md +1 -6
- package/agent-assets/skills/project-doc/SKILL.md +1 -5
- package/agent-assets/skills/reading/SKILL.md +2 -2
- package/agent-assets/skills/roadmap/SKILL.md +37 -135
- package/agent-assets/skills/roadmap/references/api.md +100 -0
- package/agent-assets/skills/roadmap/references/cross-check.md +73 -0
- package/agent-assets/skills/roadmap/references/migration.md +56 -0
- package/agent-assets/skills/roadmap/references/preparation-timeline.md +2 -2
- package/agent-assets/skills/schedule/SKILL.md +52 -88
- package/agent-assets/skills/schedule/references/batch.md +93 -0
- package/agent-assets/skills/schedule/references/errors.md +214 -0
- package/agent-assets/skills/schedule/references/model-selection.md +96 -0
- package/agent-assets/skills/schedule/references/recurrence-rule.md +86 -0
- package/agent-assets/skills/schedule/references/recurring.md +185 -0
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +13 -15
- package/agent-assets/skills/today/SKILL.md +27 -57
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +113 -0
- package/agent-assets/skills/user-interview/SKILL.md +12 -59
- package/agent-assets/skills/user-interview/references/op-briefing.md +51 -0
- package/agent-assets/skills/user-interview/references/op-morning.md +59 -0
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +1 -1
- package/agent-assets/skills/user-profile/SKILL.md +43 -63
- package/agent-assets/skills/user-profile/references/character-preferences.md +83 -0
- package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +28 -0
- package/agent-assets/skills/wiki/wiki-ask/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-connect/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-graduate/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-lint/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-trace/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +0 -1
- package/agent-assets/system-prompts/routine-fetch-window.md +68 -0
- package/agent-assets/system-prompts/skill-index-instruction.md +26 -0
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +18 -11
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +16 -9
- package/agent-assets/task-flows/_partials/capture-user-info.md +24 -0
- package/agent-assets/task-flows/_partials/confirm-subflow.md +68 -0
- package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +35 -0
- package/agent-assets/task-flows/_partials/dm-intent.project.md +391 -0
- package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +20 -11
- package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +17 -9
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +18 -12
- package/agent-assets/task-flows/knowledge.import.md +1 -1
- package/agent-assets/task-flows/message.received.dm.md +13 -15
- package/agent-assets/task-flows/message.received.dm_first.md +10 -14
- package/agent-assets/task-flows/routine.custom.md +3 -1
- package/agent-assets/task-flows/routine.evening_review.md +39 -163
- package/agent-assets/task-flows/routine.fetch_window.md +17 -12
- package/agent-assets/task-flows/routine.hourly_check.md +16 -8
- package/agent-assets/task-flows/routine.hourly_check.triage.md +1 -1
- package/agent-assets/task-flows/routine.monthly_review.md +46 -4
- package/agent-assets/task-flows/routine.morning_routine_journal.md +113 -0
- package/agent-assets/task-flows/routine.morning_routine_today.md +673 -0
- package/agent-assets/task-flows/routine.roadmap_refresh.md +60 -15
- package/agent-assets/task-flows/routine.user_profile_sweep.md +9 -10
- package/agent-assets/task-flows/routine.weekly_review.md +285 -70
- package/agent-assets/task-flows/scheduled.dm.md +8 -8
- package/agent-assets/task-flows/scheduled.task.md +5 -5
- package/agent-assets/task-flows/setup.initial.md +165 -245
- package/agent-assets/task-flows/wiki.ingest_url.md +1 -1
- package/agent-assets/templates/_manifest.json +7 -7
- package/agent-assets/templates/dossiers/_index.md +1 -1
- package/agent-assets/templates/rules/journal-format.md +145 -38
- package/agent-assets/templates/user/expertise.md +4 -2
- package/agent-assets/templates/user/goals.md +4 -2
- package/agent-assets/templates/user/people.md +8 -2
- package/agent-assets/templates/user/personal.md +4 -2
- package/agent-assets/templates/user/work.md +4 -2
- package/bin/aitne.mjs +8 -1
- package/package.json +4 -4
- package/scripts/commands/doctor.mjs +52 -0
- package/scripts/commands/run-now.mjs +202 -0
- package/scripts/commands/verify.mjs +264 -0
- package/agent-assets/docs/features/routines/monthly-review.md +0 -65
- package/agent-assets/skills/management-task-modify/SKILL.md +0 -203
- package/agent-assets/skills/management-task-register/SKILL.md +0 -330
- package/agent-assets/skills/management-task-stop/SKILL.md +0 -166
- package/agent-assets/skills/receipts/SKILL.md +0 -134
- package/agent-assets/skills/travel/SKILL.md +0 -132
- package/agent-assets/skills/travel-time/SKILL.md +0 -158
- package/agent-assets/task-flows/routine.morning_routine.md +0 -322
- package/agent-assets/task-flows/routine.morning_routine_initial.md +0 -204
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
name: api
|
|
4
|
+
description: Canonical /api/context/* surface — read / write / list / lock / archive / restore / health / repair / action-log. Organised by operation.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /api/context/* — Operation reference
|
|
8
|
+
|
|
9
|
+
Body submission follows `_safety.md` "Daemon-API body submission":
|
|
10
|
+
small section PATCHes use inline `-d '{...}'`; full-file PUT uses the
|
|
11
|
+
stdin heredoc `-d @- <<'JSON'` shape because the body runs multi-KB.
|
|
12
|
+
|
|
13
|
+
Add `X-Lock-Id: <today_write_lock_id>` (for `today.md`) or
|
|
14
|
+
`X-Lock-Id: <roadmap_write_lock_id>` (for `roadmap.md`) on every
|
|
15
|
+
PUT / PATCH when the matching lock-id tag is in your context — the
|
|
16
|
+
daemon emits the tag only while the corresponding lock is held by
|
|
17
|
+
this session.
|
|
18
|
+
|
|
19
|
+
## Read
|
|
20
|
+
|
|
21
|
+
### GET /api/context/:path
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -s http://localhost:8321/api/context/roadmap
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Response: `{ "content": "...", "lastModified": "ISO8601" }` or `404`.
|
|
28
|
+
Returns the **entire file** — no section-level GET. Path traversal is
|
|
29
|
+
rejected; the trailing `.md` is implicit (do not include it in the
|
|
30
|
+
URL).
|
|
31
|
+
|
|
32
|
+
### GET /api/context/list/:dir
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
curl -s http://localhost:8321/api/context/list/projects
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Response: `{ "files": [{ "name", "lastModified" }, …] }`. Use this to
|
|
39
|
+
enumerate `projects/`, `weekly/`, `monthly/`, `user/`, `rules/`,
|
|
40
|
+
`routines/`, `inbox/` before deciding a write target.
|
|
41
|
+
|
|
42
|
+
### GET /api/context/today/reconciliation
|
|
43
|
+
|
|
44
|
+
Returns the Morning Routine's reconciliation report for `today.md`
|
|
45
|
+
(which mail/calendar/Notion sources contributed what to User Tasks /
|
|
46
|
+
Agent Plan). Read-only diagnostic surface; not the place to write
|
|
47
|
+
changes.
|
|
48
|
+
|
|
49
|
+
### GET /api/context/health
|
|
50
|
+
|
|
51
|
+
Returns a file-by-file health report — missing frontmatter, stale
|
|
52
|
+
`updated`, validator failures. Read-only.
|
|
53
|
+
|
|
54
|
+
## Write
|
|
55
|
+
|
|
56
|
+
### PUT /api/context/:path — Full replace
|
|
57
|
+
|
|
58
|
+
Fields:
|
|
59
|
+
|
|
60
|
+
| Field | Type | Description |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `content` | string (required) | Full file body, including frontmatter and H1 where the file's validator requires them. |
|
|
63
|
+
| `expectedMtime` | string (optional) | ISO 8601. When present the daemon returns `409` if the current mtime differs — race protection for read-modify-write loops. |
|
|
64
|
+
|
|
65
|
+
Add `X-Lock-Id: <lock-id>` when writing a locked file (`today.md`,
|
|
66
|
+
`roadmap.md`). Snapshots the prior content for restore.
|
|
67
|
+
|
|
68
|
+
Common rejections:
|
|
69
|
+
|
|
70
|
+
- `400 {error:"validation_error", message, path}` — file-specific
|
|
71
|
+
validator failed (e.g. `today.md` line-1 date regex, `roadmap.md`
|
|
72
|
+
transition guard, required frontmatter missing on `user/*.md` /
|
|
73
|
+
`rules/*.md` / `projects/*.md` / `daily/*.md` / `weekly/*.md` /
|
|
74
|
+
`monthly/*.md`).
|
|
75
|
+
- `409 {error:"lock_held"}` — another session holds the file's write
|
|
76
|
+
lock. Retry with backoff (30s × 3).
|
|
77
|
+
- `422` — file-specific schema mismatch (e.g. `today.md` line-1
|
|
78
|
+
agent-day mismatch — the error echoes both the supplied date and
|
|
79
|
+
the daemon's current agent-day).
|
|
80
|
+
|
|
81
|
+
`rules/management.md` is user-controlled policy: modify only when the
|
|
82
|
+
user explicitly asks, and preserve every unrelated section.
|
|
83
|
+
|
|
84
|
+
### PATCH /api/context/:path — Section operation
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
curl -s -X PATCH http://localhost:8321/api/context/today \
|
|
88
|
+
-H 'Content-Type: application/json' \
|
|
89
|
+
-d '{"section": "agent_log", "mode": "append", "content": "- 09:35 Processed meeting summary"}'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
| Field | Type | Description |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| `section` | string | snake_case of the heading (e.g. `learned_context`, `agent_log`, `log`). **Omit for `append_to_file`**; required for every other mode. |
|
|
95
|
+
| `mode` | `append` \| `replace` \| `clear` \| `clear_before` \| `append_to_file` | Default `append`. |
|
|
96
|
+
| `content` | string | Ignored for `clear` / `clear_before`. |
|
|
97
|
+
| `cutoff` | string | **Required when `mode: "clear_before"`.** SQLite format `YYYY-MM-DD HH:MM:SS` (zero-padded). Removes bullet rows whose `- [YYYY-MM-DD HH:MM:SS]` timestamp is ≤ cutoff. |
|
|
98
|
+
| `maxEntries` | number | Optional for `mode: "append"`. After appending, trim oldest bullet entries from the top of the section body so at most `maxEntries` bullets remain. Non-bullet lines are preserved. SignalDetector uses cap = 20. |
|
|
99
|
+
|
|
100
|
+
Mode semantics:
|
|
101
|
+
|
|
102
|
+
- `append` — add `content` to the end of the section body. Preserves siblings byte-for-byte.
|
|
103
|
+
- `replace` — replace the entire section body with `content`. **Read-before-write is mandatory** — `replace` does not merge; sending just one bullet erases every sibling. The skill body's "Worked example" shows the GET-merge-PATCH pattern.
|
|
104
|
+
- `clear` — drop the section body, keep the heading.
|
|
105
|
+
- `clear_before` — rolling-log trim, drops bullets with timestamps ≤ `cutoff`. Non-bullet lines preserved. Race-safe consumption shape for `Raw Signals` and similar logs.
|
|
106
|
+
- `append_to_file` — omit `section`, append `content` to the end of the file. The intended first-write path when a section header does not exist yet: include the header inside `content` (`"\n## Section\n- bullet\n"`). Also the only write shape for files with no canonical section schema (`agent/journal.md`).
|
|
107
|
+
|
|
108
|
+
Common rejections (informational responses worth knowing):
|
|
109
|
+
|
|
110
|
+
- `400 {error:"section_not_found", section, availableSections:[…]}` — the section name did not match. `availableSections` lists every snake_cased heading the file actually has; pick the closest match and retry. Do NOT retry the same `section` value.
|
|
111
|
+
- `400 {error:"validation_error", message, path}` — content failed the file-specific validator.
|
|
112
|
+
- `400 {error:"cutoff_required", message}` — `clear_before` was called without a valid `cutoff`.
|
|
113
|
+
- `409 {error:"lock_held"}` — file's write lock is held by another session.
|
|
114
|
+
|
|
115
|
+
### DELETE /api/context/:path
|
|
116
|
+
|
|
117
|
+
Removes the file (snapshot first). The daemon only allows DELETE on a
|
|
118
|
+
small set of paths — notably `routines/custom/<slug>` (after the user
|
|
119
|
+
asks to retire a custom routine). Most files are NOT delete-eligible
|
|
120
|
+
(e.g. `today.md`, `roadmap.md`, `user/profile.md`); the daemon returns
|
|
121
|
+
`400 {error:"path_not_deletable"}` for those.
|
|
122
|
+
|
|
123
|
+
## Lifecycle
|
|
124
|
+
|
|
125
|
+
### POST /api/context/archive-today
|
|
126
|
+
|
|
127
|
+
Rotates `today.md` → `yesterday.md` (synthesized `daily/YYYY-MM-DD.md`
|
|
128
|
+
is now written by the Morning Routine, not this endpoint). Called by
|
|
129
|
+
the Morning Routine during day rotation; other sessions should NOT
|
|
130
|
+
invoke this directly.
|
|
131
|
+
|
|
132
|
+
### POST /api/context/restore-snapshot/:id
|
|
133
|
+
|
|
134
|
+
Restores the file from snapshot `id` (the daemon snapshots every PUT /
|
|
135
|
+
PATCH / DELETE). Diagnostic / recovery surface; never part of a normal
|
|
136
|
+
write path. The snapshot listing endpoint is `GET /api/context/health`
|
|
137
|
+
adjacent and is dashboard-only — agents should not rely on it in flows.
|
|
138
|
+
|
|
139
|
+
### POST /api/context/repair/stub
|
|
140
|
+
|
|
141
|
+
Auto-repairs a stubbed file (e.g. a file that exists but has only the
|
|
142
|
+
H1) by re-running its template seed. Recovery surface; called only
|
|
143
|
+
when `GET /api/context/health` reports the file as stubbed.
|
|
144
|
+
|
|
145
|
+
## Locks
|
|
146
|
+
|
|
147
|
+
`today.md` and `roadmap.md` are locked files: `PUT` / `PATCH` requires
|
|
148
|
+
the lock to be held by the calling session, and the daemon emits an
|
|
149
|
+
`X-Lock-Id` header value that must be echoed on each request via the
|
|
150
|
+
`X-Lock-Id:` header.
|
|
151
|
+
|
|
152
|
+
### Morning-routine lock (today.md)
|
|
153
|
+
|
|
154
|
+
| Action | Verb | Path |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| Acquire | `POST` | `/api/context/lock/morning-routine` |
|
|
157
|
+
| Release | `DELETE` | `/api/context/lock/morning-routine` (body `{"lockId":"…"}`) |
|
|
158
|
+
|
|
159
|
+
The dispatcher auto-acquires this lock for `routine.morning_routine`
|
|
160
|
+
and surfaces the id via `<today_write_lock_id>` in the prompt context.
|
|
161
|
+
Other sessions get `409 today_write_lock_held` on PUT / PATCH while
|
|
162
|
+
the lock is held — back off 30 s and retry up to 3 times.
|
|
163
|
+
|
|
164
|
+
### Roadmap lock
|
|
165
|
+
|
|
166
|
+
| Action | Verb | Path |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| Acquire | `POST` | `/api/context/lock/roadmap` |
|
|
169
|
+
| Release | `DELETE` | `/api/context/lock/roadmap` (body `{"lockId":"…"}`) |
|
|
170
|
+
|
|
171
|
+
The dispatcher auto-acquires for `routine.roadmap_refresh`. Other
|
|
172
|
+
flows (DM handler, evening sweeper) can acquire / release manually.
|
|
173
|
+
PUT / PATCH returns `409 roadmap_write_lock_held` while held by
|
|
174
|
+
another session — same 30 s × 3 retry pattern.
|
|
175
|
+
|
|
176
|
+
**Path-name gotchas** (these return `404 {"error":"unknown_route", …}`
|
|
177
|
+
with a hint pointing at the correct path):
|
|
178
|
+
|
|
179
|
+
- `POST /api/context/roadmap/lock` — order reversed.
|
|
180
|
+
- `POST /api/context/roadmap/write-lock` — order reversed and wrong noun.
|
|
181
|
+
- `POST /api/context/lock/roadmap-write` — wrong noun.
|
|
182
|
+
|
|
183
|
+
A `401 {"error":"unauthorized"}` from a path you believe is correct
|
|
184
|
+
means the path is still wrong (the lock endpoints are Autonomous-tier
|
|
185
|
+
so no bearer token is required).
|
|
186
|
+
|
|
187
|
+
## Roadmap-specific writes
|
|
188
|
+
|
|
189
|
+
### POST /api/context/roadmap/id
|
|
190
|
+
|
|
191
|
+
Mints a new stable entry id (`rm-YYYYMMDD-<hash>`) for a roadmap row.
|
|
192
|
+
Requires `X-Lock-Id: <roadmap_write_lock_id>`.
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
curl -s -X POST http://localhost:8321/api/context/roadmap/id \
|
|
196
|
+
-H 'Content-Type: application/json' \
|
|
197
|
+
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
198
|
+
-d '{"creationDate":"YYYY-MM-DD"}'
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
The roadmap API also validates ID uniqueness on PUT / PATCH and runs a
|
|
202
|
+
transition guard: if an entry id survives from previous → next
|
|
203
|
+
content, every previous `completed …` row for that id must still
|
|
204
|
+
exist byte-for-byte. If an entry id disappears entirely, removal is
|
|
205
|
+
accepted only when the retention window permits it or the operator
|
|
206
|
+
bypass header is used.
|
|
207
|
+
|
|
208
|
+
## Action log
|
|
209
|
+
|
|
210
|
+
### POST /api/action/log
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
curl -s -X POST http://localhost:8321/api/action/log \
|
|
214
|
+
-H 'Content-Type: application/json' \
|
|
215
|
+
-d '{"actionType": "observation", "detail": "reviewed 6 pending changes, added 2 tasks", "result": "success"}'
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Records an entry in `agent_actions` for the dashboard's audit feed.
|
|
219
|
+
Not the same as `today.md ## Agent Log` (that's a markdown surface;
|
|
220
|
+
this is a SQLite row). Risk tier: Autonomous.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
name: required-frontmatter
|
|
4
|
+
description: YAML frontmatter required by /api/context/* validators on full-file PUT — per-glob type/owner/updated values, H1 requirement.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Required frontmatter — guarded files
|
|
8
|
+
|
|
9
|
+
Full-file `PUT /api/context/<path>` for the following globs is rejected
|
|
10
|
+
(`400 validation_error`) unless the body opens with the matching YAML
|
|
11
|
+
frontmatter followed by at least one H1 heading.
|
|
12
|
+
|
|
13
|
+
Use today's date (the value from `<current_agent_day date="…" />`) for
|
|
14
|
+
`updated`. The daemon does not auto-fill `updated`; an outdated value
|
|
15
|
+
trips the Evening Review's stale-file detector.
|
|
16
|
+
|
|
17
|
+
## Per-glob frontmatter
|
|
18
|
+
|
|
19
|
+
| File glob | `type` | `owner` | Required H1 |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| `projects/*.md` | `project` | `shared` | Yes |
|
|
22
|
+
| `daily/*.md` | `daily` | `agent` | Yes |
|
|
23
|
+
| `weekly/*.md` | `weekly` | `agent` | Yes |
|
|
24
|
+
| `monthly/*.md` | `monthly` | `agent` | Yes |
|
|
25
|
+
| `rules/*.md` | `rule` | `shared` | Yes |
|
|
26
|
+
| `user/*.md` | `user` | `shared` | Yes |
|
|
27
|
+
|
|
28
|
+
Every glob also requires `updated: YYYY-MM-DD`.
|
|
29
|
+
|
|
30
|
+
## Skeleton
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
---
|
|
34
|
+
type: <from table>
|
|
35
|
+
owner: <from table>
|
|
36
|
+
updated: YYYY-MM-DD
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
# <Title>
|
|
40
|
+
|
|
41
|
+
…body…
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Section-level PATCH
|
|
45
|
+
|
|
46
|
+
`PATCH /api/context/<path>` (`section` + `mode`) **preserves existing
|
|
47
|
+
frontmatter** byte-for-byte. You do not need to re-supply the
|
|
48
|
+
frontmatter on PATCH. The validator only re-runs the frontmatter check
|
|
49
|
+
on `PUT` (full replace).
|
|
50
|
+
|
|
51
|
+
## Files outside the table
|
|
52
|
+
|
|
53
|
+
`today.md`, `roadmap.md`, `agent/journal.md`, and `rules/policies/*.md`
|
|
54
|
+
have their own validators (date-line regex, transition guard, append-
|
|
55
|
+
only mode, policy schema). The frontmatter rules in this reference do
|
|
56
|
+
not apply to them — see each owning skill for the specifics.
|
|
57
|
+
|
|
58
|
+
## Common 400 envelope
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"error": "validation_error",
|
|
63
|
+
"message": "user/people.md is missing required frontmatter field: updated",
|
|
64
|
+
"path": "user/people.md"
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The `message` field names the offending field. Re-PUT with the
|
|
69
|
+
corrected frontmatter; the daemon does not partially repair the body.
|
|
70
|
+
|
|
71
|
+
`POST /api/context/repair/stub` is the recovery path for a file that
|
|
72
|
+
exists but has only the H1 — it re-runs the template seed. Do not use
|
|
73
|
+
it to bypass a frontmatter validation failure on your own PUT body.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
name: snapshot-files
|
|
4
|
+
description: Weekly / monthly review snapshots, rules / routines files — who writes, when, with what cadence and frontmatter.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Snapshot files — weekly / monthly / rules / routines
|
|
8
|
+
|
|
9
|
+
These files live in the primary management vault under
|
|
10
|
+
`weekly/`, `monthly/`, `rules/`, and `routines/`. They are not part
|
|
11
|
+
of the day-to-day context churn (`today.md`, `roadmap.md`,
|
|
12
|
+
`projects/*.md`); they accumulate slowly and are written by routines
|
|
13
|
+
or by explicit user request.
|
|
14
|
+
|
|
15
|
+
## weekly/*.md, monthly/*.md
|
|
16
|
+
|
|
17
|
+
| File | Path | Cadence | Writer | Verb |
|
|
18
|
+
|---|---|---|---|---|
|
|
19
|
+
| Weekly review | `weekly/YYYY-Www.md` | Friday Weekly Review only | `routine.weekly_review` | `PUT` (full body) |
|
|
20
|
+
| Monthly review | `monthly/YYYY-MM.md` | Month-end Monthly Review only | `routine.monthly_review` | `PUT` (full body) |
|
|
21
|
+
|
|
22
|
+
Notes:
|
|
23
|
+
|
|
24
|
+
- Monthly files are **user-facing only** — agent-side metrics (cost,
|
|
25
|
+
retry counts, self-critique) go to `agent/journal.md`, not here.
|
|
26
|
+
- Weekly file name uses ISO week (`YYYY-Www` — `2026-W19`, not
|
|
27
|
+
`2026-W5`); pad the week to two digits.
|
|
28
|
+
- Never write `weekly/*.md` or `monthly/*.md` on any other day. The
|
|
29
|
+
Morning Routine, Hourly Check, Evening Review, and DM handlers do
|
|
30
|
+
not produce these files; if you are not the matching review
|
|
31
|
+
routine, do not PUT this path.
|
|
32
|
+
- `PATCH` is technically accepted but unusual. The normal write is a
|
|
33
|
+
single full-body `PUT` at the end of the review session.
|
|
34
|
+
- **Weekly leverage contract.** `weekly/YYYY-Www.md` carries three
|
|
35
|
+
load-bearing H2 sections — `## Carry Over to Next Week`,
|
|
36
|
+
`## Next Week Focus`, `## Lessons for Next Week` — that the
|
|
37
|
+
morning_routine lifts mechanically via the `<previous_week>` context
|
|
38
|
+
block every morning of the next ISO week. Headings must match
|
|
39
|
+
verbatim (digest extractor is header-regex bound); caps are 5 / 3 /
|
|
40
|
+
3 bullets respectively; empty sections render as `(none recorded)`
|
|
41
|
+
downstream. Full design: `docs/design/appendices/weekly-next-week-leverage.md`.
|
|
42
|
+
|
|
43
|
+
## agent/journal.md
|
|
44
|
+
|
|
45
|
+
| Field | Value |
|
|
46
|
+
|---|---|
|
|
47
|
+
| Owner | agent |
|
|
48
|
+
| User-facing | No — never read in DMs / briefings / notifications |
|
|
49
|
+
| Write verb | `PATCH mode: "append_to_file"` (no `section` needed) |
|
|
50
|
+
|
|
51
|
+
Weekly sections: `## Weekly YYYY-Www` (What worked / slipped /
|
|
52
|
+
improvements / Metrics). Monthly: `## Monthly YYYY-MM` (follow-up /
|
|
53
|
+
self-critique / gap / adjustments / Metrics). The Evening Review,
|
|
54
|
+
Weekly Review, and Monthly Review each append their own block.
|
|
55
|
+
|
|
56
|
+
**Nothing from this file should appear in notifications.** The journal
|
|
57
|
+
is the agent's private metrics surface, not user-readable content.
|
|
58
|
+
|
|
59
|
+
## rules/*.md, routines/*.md
|
|
60
|
+
|
|
61
|
+
User-controlled policy and routine files. Only modify when the user
|
|
62
|
+
explicitly asks to change the policy or routine itself.
|
|
63
|
+
|
|
64
|
+
### `rules/*.md`
|
|
65
|
+
|
|
66
|
+
- Preserve unrelated sections verbatim. PATCH the one section the
|
|
67
|
+
user is changing; do not full-body PUT.
|
|
68
|
+
- `rules/management.md` is the durable management policy file —
|
|
69
|
+
modify only when the user explicitly asks.
|
|
70
|
+
|
|
71
|
+
### `rules/policies/<slug>.md` and `rules/policies/_index.md`
|
|
72
|
+
|
|
73
|
+
Route to the `management-policy` skill. It owns the read-before-write,
|
|
74
|
+
similarity-detection, and pause/resume fan-out for durable policies.
|
|
75
|
+
**Do not hand-edit from this skill.** A direct PATCH here bypasses the
|
|
76
|
+
similarity check and the dossier / routine fan-out.
|
|
77
|
+
|
|
78
|
+
### `routines/<cadence>.md` (built-in cadences)
|
|
79
|
+
|
|
80
|
+
- Cadences: `morning`, `evening`, `weekly`, `monthly`, `hourly`.
|
|
81
|
+
- Keep the existing frontmatter. Keep a `## Checks` section.
|
|
82
|
+
- Append or edit `### <label>` blocks under `## Checks`; each block
|
|
83
|
+
is one user-authored rule the cadence runs.
|
|
84
|
+
|
|
85
|
+
### `routines/custom/<slug>.md`
|
|
86
|
+
|
|
87
|
+
Full-file `PUT` is usually safest. Required frontmatter:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
type: rule
|
|
91
|
+
slug: <kebab-name>
|
|
92
|
+
cron: '<cron expression>'
|
|
93
|
+
process_key: <ProcessKey from packages/shared/src/process-key.ts>
|
|
94
|
+
enabled: true
|
|
95
|
+
backend_tier: lite | medium | high
|
|
96
|
+
max_budget_usd: <number>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The file body must also contain a `## Checks` section.
|
|
100
|
+
|
|
101
|
+
Deleting a custom routine uses `DELETE /api/context/routines/custom/<slug>`
|
|
102
|
+
**only** after the user asks to retire it. The daemon snapshots the
|
|
103
|
+
prior content for restore.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{ "path": "today.md", "purpose": "today's schedule, tasks, agent log, handoff", "sections": [{ "heading": "## Schedule", "contains": "today's events" }, { "heading": "## Tasks", "contains": "open tasks" }, { "heading": "## Agent Notes", "contains": "agent observations" }] },
|
|
5
5
|
{ "path": "roadmap.md", "purpose": "long-horizon agent action plan + Long-term Plans", "sections": [{ "heading": "## Annual Goals", "contains": "year-scope outcomes" }, { "heading": "## Quarterly Milestones", "contains": "quarter-scope deliverables" }, { "heading": "## Focus Areas", "contains": "current themes of work" }] },
|
|
6
6
|
{ "path": "projects/*.md", "purpose": "per-project state summaries (slug-named)", "sections": [{ "heading": "## Overview", "contains": "what the project is about" }, { "heading": "## Lifecycle Phases", "contains": "phase ladder for the project" }] },
|
|
7
|
-
{ "path": "weekly/*.md", "purpose": "weekly review snapshots (YYYY-Www)", "sections": [{ "heading": "## Highlights", "contains": "wins
|
|
7
|
+
{ "path": "weekly/*.md", "purpose": "weekly review snapshots (YYYY-Www); Carry Over / Next Week Focus / Lessons are lifted into next week's morning_routine via <previous_week>", "sections": [{ "heading": "## Highlights", "contains": "wins of the week" }, { "heading": "## Open Loops", "contains": "tasks/commitments still pending" }, { "heading": "## Carry Over to Next Week", "contains": "open loops to carry over (max 5) with one-line reason" }, { "heading": "## Next Week Focus", "contains": "top priorities for next week (max 3)" }, { "heading": "## Lessons for Next Week", "contains": "behavioral observation → action (max 3)" }] },
|
|
8
8
|
{ "path": "monthly/*.md", "purpose": "monthly review snapshots (YYYY-MM)", "sections": [{ "heading": "## Theme", "contains": "the month's overall theme" }] },
|
|
9
9
|
{ "path": "rules/*.md", "purpose": "user-controlled policy files", "sections": [{ "heading": "## Why", "contains": "rationale for the rule" }, { "heading": "## How", "contains": "concrete rule shape" }] },
|
|
10
10
|
{ "path": "user/*.md", "purpose": "user identity and preferences dictionary", "sections": [{ "heading": "## Identity", "contains": "name role tz" }] },
|
|
@@ -31,22 +31,22 @@ the FTS query in three steps:
|
|
|
31
31
|
| Input | Topic |
|
|
32
32
|
|---|---|
|
|
33
33
|
| "what is delegated mode?" | `delegated mode` |
|
|
34
|
-
| "delegated
|
|
34
|
+
| "什么是 delegated 模式?" | `delegated模式` |
|
|
35
35
|
| "tell me about ProcessKey" | `ProcessKey` |
|
|
36
|
-
| "ProcessKey
|
|
36
|
+
| "ProcessKey 是什么?" | `ProcessKey` |
|
|
37
37
|
| "how does the morning routine work?" | `morning routine` |
|
|
38
|
-
| "
|
|
38
|
+
| "早晨例行公事是怎么运作的?" | `早晨例行公事` |
|
|
39
39
|
|
|
40
40
|
2. **Split at script boundaries.** If the topic mixes Latin and CJK
|
|
41
41
|
without spaces, insert a space at every Latin↔CJK boundary. FTS5
|
|
42
42
|
quotes each whitespace-separated token as a phrase before
|
|
43
|
-
AND-joining; an unsplit `delegated
|
|
43
|
+
AND-joining; an unsplit `delegated模式` becomes one unmatchable
|
|
44
44
|
trigram phrase.
|
|
45
45
|
|
|
46
46
|
| Input | Split |
|
|
47
47
|
|---|---|
|
|
48
|
-
| `delegated
|
|
49
|
-
| `ProcessKey
|
|
48
|
+
| `delegated模式` | `delegated 模式` |
|
|
49
|
+
| `ProcessKey列表` | `ProcessKey 列表` |
|
|
50
50
|
|
|
51
51
|
3. **Latin wins.** If the split topic contains both Latin and CJK
|
|
52
52
|
tokens, drop the CJK tokens. The corpus is English; CJK is the
|
|
@@ -56,9 +56,9 @@ the FTS query in three steps:
|
|
|
56
56
|
|
|
57
57
|
| Input | Final query |
|
|
58
58
|
|---|---|
|
|
59
|
-
| `delegated
|
|
60
|
-
| `ProcessKey
|
|
61
|
-
|
|
|
59
|
+
| `delegated 模式` | `delegated` |
|
|
60
|
+
| `ProcessKey 列表` | `ProcessKey` |
|
|
61
|
+
| `早晨例行公事` | `早晨例行公事` (passes through; may miss) |
|
|
62
62
|
|
|
63
63
|
## Endpoints
|
|
64
64
|
|
|
@@ -113,14 +113,14 @@ Optional filters supported by both `term-search` and `search`:
|
|
|
113
113
|
## Worked example
|
|
114
114
|
|
|
115
115
|
```
|
|
116
|
-
Operator: "delegated
|
|
116
|
+
Operator: "什么是 delegated 模式?"
|
|
117
117
|
|
|
118
118
|
Step 1 — extract topic:
|
|
119
|
-
Strip "
|
|
119
|
+
Strip "什么是 / ?" → "delegated模式"
|
|
120
120
|
Step 2 — split scripts:
|
|
121
|
-
"delegated
|
|
121
|
+
"delegated模式" → "delegated 模式"
|
|
122
122
|
Step 3 — Latin wins:
|
|
123
|
-
"delegated
|
|
123
|
+
"delegated 模式" → "delegated"
|
|
124
124
|
Step 4 — call:
|
|
125
125
|
curl -s "http://localhost:8321/api/docs/term-search?q=delegated&limit=5"
|
|
126
126
|
Top hit:
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: external-services
|
|
3
|
-
description: Load when the task
|
|
3
|
+
description: Load when the task touches Google Calendar, Obsidian, GitHub, or Skills CRUD AND Google Calendar is cross-backend delegated from a Claude DM session. Calendar calls route through `POST /api/integrations/google_calendar/exec`; other surfaces keep their direct routes.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash(curl *)
|
|
6
|
-
- Bash(jq *)
|
|
7
6
|
- Read
|
|
8
7
|
---
|
|
9
8
|
|
|
@@ -22,8 +21,7 @@ Claude in this session).
|
|
|
22
21
|
|
|
23
22
|
The rest of this skill — Obsidian, GitHub, recurring schedules, one-shot
|
|
24
23
|
scheduling, skills CRUD — works identically to the direct-mode body.
|
|
25
|
-
Refer to that body for those services; **only the Calendar section
|
|
26
|
-
below changes** under cross-backend delegation.
|
|
24
|
+
Refer to that body for those services; **only the Calendar section below changes** under cross-backend delegation.
|
|
27
25
|
|
|
28
26
|
To check which backend currently owns the Calendar connector, read
|
|
29
27
|
`~/.personal-agent/integrations.md`. The `/exec` body below is
|
|
@@ -332,9 +330,9 @@ curl -s -X POST http://localhost:8321/api/schedule/dm \
|
|
|
332
330
|
```bash
|
|
333
331
|
curl -s -X POST http://localhost:8321/api/schedule \
|
|
334
332
|
-H 'Content-Type: application/json' \
|
|
335
|
-
-d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "
|
|
333
|
+
-d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "tier": "medium", "taskContext": {"scheduledBy": "dm_conversation"}}'
|
|
336
334
|
```
|
|
337
|
-
Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `model` (
|
|
335
|
+
Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `tier` (`lite`/`medium`/`high`) **or** `model` (registered id like `claude-opus-4-7`, legacy alias `sonnet`/`opus`, or composite `<backendId>/<modelId>`) — mutually exclusive, `taskContext` (optional metadata). See the `schedule` skill body for the full surface and `/api/schedule/options` for the live model list.
|
|
338
336
|
|
|
339
337
|
### Manage pending items
|
|
340
338
|
```bash
|
|
@@ -343,7 +341,7 @@ curl -s -X PATCH http://localhost:8321/api/schedule/42 \
|
|
|
343
341
|
-H 'Content-Type: application/json' -d '{"time": "2026-04-06T17:00:00-04:00"}' # edit
|
|
344
342
|
curl -s -X DELETE http://localhost:8321/api/schedule/42 # cancel
|
|
345
343
|
```
|
|
346
|
-
Editable: `time`, `description`, `message` (dm only), `model`, `taskContext`. Only `pending` items.
|
|
344
|
+
Editable: `time`, `description`, `message` (dm only), `tier` (or `model`, mutually exclusive — pass `null` to clear), `taskContext`. Only `pending` items.
|
|
347
345
|
|
|
348
346
|
### Time discipline
|
|
349
347
|
- Absolute ISO 8601 with offset required — no relative times.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: external-services
|
|
3
|
-
description: Load when the task
|
|
3
|
+
description: Load when the task touches Google Calendar, Obsidian, GitHub, or Skills CRUD AND Google Calendar is cross-backend delegated from a Codex CLI DM session. Calendar calls route through `POST /api/integrations/google_calendar/exec`; other surfaces keep their direct routes.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash(curl *)
|
|
6
|
-
- Bash(jq *)
|
|
7
6
|
- Read
|
|
8
7
|
---
|
|
9
8
|
|
|
@@ -22,8 +21,7 @@ these calls (Calendar is not delegated to Codex here).
|
|
|
22
21
|
|
|
23
22
|
The rest of this skill — Obsidian, GitHub, recurring schedules, one-shot
|
|
24
23
|
scheduling, skills CRUD — works identically to the direct-mode body.
|
|
25
|
-
Refer to that body for those services; **only the Calendar section
|
|
26
|
-
below changes** under cross-backend delegation.
|
|
24
|
+
Refer to that body for those services; **only the Calendar section below changes** under cross-backend delegation.
|
|
27
25
|
|
|
28
26
|
To check which backend currently owns the Calendar connector, read
|
|
29
27
|
`~/.personal-agent/integrations.md`. The `/exec` body below is
|
|
@@ -312,9 +310,9 @@ curl -s -X POST http://localhost:8321/api/schedule/dm \
|
|
|
312
310
|
```bash
|
|
313
311
|
curl -s -X POST http://localhost:8321/api/schedule \
|
|
314
312
|
-H 'Content-Type: application/json' \
|
|
315
|
-
-d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "
|
|
313
|
+
-d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "tier": "medium", "taskContext": {"scheduledBy": "dm_conversation"}}'
|
|
316
314
|
```
|
|
317
|
-
Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `model` (
|
|
315
|
+
Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `tier` (`lite`/`medium`/`high`) **or** `model` (registered id like `claude-opus-4-7`, legacy alias `sonnet`/`opus`, or composite `<backendId>/<modelId>`) — mutually exclusive, `taskContext` (optional metadata). See the `schedule` skill body for the full surface and `/api/schedule/options` for the live model list.
|
|
318
316
|
|
|
319
317
|
### Manage pending items
|
|
320
318
|
```bash
|
|
@@ -323,7 +321,7 @@ curl -s -X PATCH http://localhost:8321/api/schedule/42 \
|
|
|
323
321
|
-H 'Content-Type: application/json' -d '{"time": "2026-04-06T17:00:00-04:00"}' # edit
|
|
324
322
|
curl -s -X DELETE http://localhost:8321/api/schedule/42 # cancel
|
|
325
323
|
```
|
|
326
|
-
Editable: `time`, `description`, `message` (dm only), `model`, `taskContext`. Only `pending` items.
|
|
324
|
+
Editable: `time`, `description`, `message` (dm only), `tier` (or `model`, mutually exclusive — pass `null` to clear), `taskContext`. Only `pending` items.
|
|
327
325
|
|
|
328
326
|
### Time discipline
|
|
329
327
|
- Absolute ISO 8601 with offset required — no relative times.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: external-services
|
|
3
|
-
description: Load when the task
|
|
3
|
+
description: Load when the task touches Google Calendar, Obsidian, GitHub, or Skills CRUD AND Google Calendar is cross-backend delegated from a Gemini CLI DM session. Calendar calls route through `POST /api/integrations/google_calendar/exec`; other surfaces keep their direct routes.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash(curl *)
|
|
6
|
-
- Bash(jq *)
|
|
7
6
|
- Read
|
|
8
7
|
---
|
|
9
8
|
|
|
@@ -24,8 +23,7 @@ a different backend than the one running the DM.
|
|
|
24
23
|
|
|
25
24
|
The rest of this skill — Obsidian, GitHub, recurring schedules, one-shot
|
|
26
25
|
scheduling, skills CRUD — works identically to the direct-mode body.
|
|
27
|
-
Refer to that body for those services; **only the Calendar section
|
|
28
|
-
below changes** under cross-backend delegation.
|
|
26
|
+
Refer to that body for those services; **only the Calendar section below changes** under cross-backend delegation.
|
|
29
27
|
|
|
30
28
|
To check which backend currently owns the Calendar connector, read
|
|
31
29
|
`~/.personal-agent/integrations.md`. The skill body assumes Codex
|
|
@@ -310,9 +308,9 @@ curl -s -X POST http://localhost:8321/api/schedule/dm \
|
|
|
310
308
|
```bash
|
|
311
309
|
curl -s -X POST http://localhost:8321/api/schedule \
|
|
312
310
|
-H 'Content-Type: application/json' \
|
|
313
|
-
-d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "
|
|
311
|
+
-d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "tier": "medium", "taskContext": {"scheduledBy": "dm_conversation"}}'
|
|
314
312
|
```
|
|
315
|
-
Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `model` (
|
|
313
|
+
Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `tier` (`lite`/`medium`/`high`) **or** `model` (registered id like `claude-opus-4-7`, legacy alias `sonnet`/`opus`, or composite `<backendId>/<modelId>`) — mutually exclusive, `taskContext` (optional metadata). See the `schedule` skill body for the full surface and `/api/schedule/options` for the live model list.
|
|
316
314
|
|
|
317
315
|
### Manage pending items
|
|
318
316
|
```bash
|
|
@@ -321,7 +319,7 @@ curl -s -X PATCH http://localhost:8321/api/schedule/42 \
|
|
|
321
319
|
-H 'Content-Type: application/json' -d '{"time": "2026-04-06T17:00:00-04:00"}' # edit
|
|
322
320
|
curl -s -X DELETE http://localhost:8321/api/schedule/42 # cancel
|
|
323
321
|
```
|
|
324
|
-
Editable: `time`, `description`, `message` (dm only), `model`, `taskContext`. Only `pending` items.
|
|
322
|
+
Editable: `time`, `description`, `message` (dm only), `tier` (or `model`, mutually exclusive — pass `null` to clear), `taskContext`. Only `pending` items.
|
|
325
323
|
|
|
326
324
|
### Time discipline
|
|
327
325
|
- Absolute ISO 8601 with offset required — no relative times.
|