@aitne-sh/aitne 0.1.3 → 0.1.5
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 +151 -147
- package/agent-assets/agent-profiles/_safety.md +14 -0
- package/agent-assets/agent-profiles/conversational.md +23 -1
- package/agent-assets/agent-profiles/observer.md +15 -0
- package/agent-assets/agent-profiles/routine-fetch-window.md +128 -0
- package/agent-assets/agent-profiles/routine.md +16 -0
- package/agent-assets/agent-profiles/task.md +15 -0
- package/agent-assets/docs/concepts/auth-health.md +25 -9
- package/agent-assets/docs/concepts/backends-and-tiers.md +40 -4
- package/agent-assets/docs/concepts/costs-and-quotas.md +87 -25
- package/agent-assets/docs/concepts/delegated-mode.md +7 -13
- package/agent-assets/docs/concepts/memory-model.md +14 -1
- package/agent-assets/docs/concepts/observations.md +19 -1
- package/agent-assets/docs/concepts/process-keys.md +5 -0
- package/agent-assets/docs/concepts/routines.md +22 -10
- package/agent-assets/docs/concepts/safety-model.md +3 -8
- package/agent-assets/docs/concepts/skills.md +36 -1
- package/agent-assets/docs/features/integrations/calendar.md +74 -3
- package/agent-assets/docs/features/integrations/git.md +4 -4
- package/agent-assets/docs/features/integrations/github.md +75 -107
- package/agent-assets/docs/features/lifestyle/git.md +169 -22
- package/agent-assets/docs/features/messaging/overview.md +10 -1
- package/agent-assets/docs/features/routines/morning-routine.md +1 -1
- package/agent-assets/docs/getting-started/01-what-is-this.md +30 -12
- package/agent-assets/docs/getting-started/02-first-steps.md +15 -4
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +17 -2
- package/agent-assets/docs/guides/install-and-run.md +10 -1
- package/agent-assets/docs/guides/setup-wizard.md +43 -6
- package/agent-assets/docs/guides/switch-default-backend.md +7 -3
- package/agent-assets/docs/reference/skills.md +10 -1
- package/agent-assets/docs/troubleshooting/auth-failed.md +27 -8
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +35 -12
- package/agent-assets/skills/context/SKILL.md +6 -0
- package/agent-assets/skills/external-services/SKILL.md +4 -0
- package/agent-assets/skills/external-services/SKILL.native.claude.md +320 -0
- package/agent-assets/skills/external-services/SKILL.native.codex.md +243 -0
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +237 -0
- package/agent-assets/skills/mail/SKILL.md +42 -14
- package/agent-assets/skills/mail/SKILL.native.claude.md +175 -0
- package/agent-assets/skills/mail/SKILL.native.codex.md +165 -0
- package/agent-assets/skills/mail/SKILL.native.gemini.md +169 -0
- package/agent-assets/skills/management-task-modify/SKILL.md +2 -1
- package/agent-assets/skills/management-task-stop/SKILL.md +2 -2
- package/agent-assets/skills/notify/SKILL.md +4 -4
- package/agent-assets/skills/notion/SKILL.md +6 -0
- package/agent-assets/skills/notion/SKILL.native.claude.md +202 -0
- package/agent-assets/skills/notion/SKILL.native.codex.md +166 -0
- package/agent-assets/skills/notion/SKILL.native.gemini.md +167 -0
- package/agent-assets/skills/observations/SKILL.md +29 -4
- package/agent-assets/skills/project-doc/SKILL.md +6 -0
- package/agent-assets/skills/reading/SKILL.md +2 -0
- package/agent-assets/skills/roadmap/SKILL.md +19 -4
- package/agent-assets/skills/today/SKILL.md +32 -6
- package/agent-assets/skills/user-interview/SKILL.md +1 -1
- package/agent-assets/skills/user-profile/SKILL.md +7 -0
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +119 -0
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +101 -0
- package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +113 -0
- package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +97 -0
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +104 -0
- package/agent-assets/task-flows/git.project.refresh_architecture.md +24 -1
- package/agent-assets/task-flows/message.received.dm.md +3 -0
- package/agent-assets/task-flows/message.received.dm.native.claude.md +76 -0
- package/agent-assets/task-flows/message.received.dm.native.codex.md +57 -0
- package/agent-assets/task-flows/message.received.dm.native.gemini.md +70 -0
- package/agent-assets/task-flows/message.received.dm_first.md +3 -0
- package/agent-assets/task-flows/message.received.dm_first.native.claude.md +56 -0
- package/agent-assets/task-flows/message.received.dm_first.native.codex.md +48 -0
- package/agent-assets/task-flows/message.received.dm_first.native.gemini.md +54 -0
- package/agent-assets/task-flows/routine.evening_review.md +28 -1
- package/agent-assets/task-flows/routine.fetch_window.md +93 -0
- package/agent-assets/task-flows/routine.hourly_check.md +44 -5
- package/agent-assets/task-flows/routine.monthly_review.md +13 -2
- package/agent-assets/task-flows/routine.morning_routine.md +55 -42
- package/agent-assets/task-flows/routine.morning_routine_initial.md +37 -38
- package/agent-assets/task-flows/routine.roadmap_refresh.md +45 -49
- package/agent-assets/task-flows/routine.today_refresh.md +53 -96
- package/agent-assets/task-flows/routine.weekly_review.md +40 -17
- package/agent-assets/task-flows/scheduled.dm.md +13 -11
- package/agent-assets/task-flows/scheduled.task.md +2 -2
- package/agent-assets/task-flows/setup.initial.md +53 -25
- package/agent-assets/task-flows/setup.update.md +1 -1
- package/agent-assets/templates/README.md +13 -6
- package/package.json +47 -23
- package/agent-assets/task-flows/routine.hourly_check.delegated.claude.md +0 -405
- package/agent-assets/task-flows/routine.hourly_check.delegated.codex.md +0 -400
- package/agent-assets/task-flows/routine.hourly_check.delegated.gemini.md +0 -404
- package/scripts/check-redaction-coverage.mjs +0 -109
- package/scripts/commands.md +0 -0
- package/scripts/message-discipline-digest.mjs +0 -535
- package/scripts/poc/google-connector-inheritance/REPORT.md +0 -197
- package/scripts/poc/google-connector-inheritance/claude-sdk-probe.mjs +0 -79
- package/scripts/remint-roadmap-ids.mjs +0 -257
- package/scripts/smoke-obsidian-api.mjs +0 -166
package/README.md
CHANGED
|
@@ -62,11 +62,11 @@ Three things make Aitne different:
|
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
65
|
-
## A day with Aitne
|
|
65
|
+
## A day with Aitne
|
|
66
66
|
|
|
67
67
|
> A real walkthrough of one user's Tuesday.
|
|
68
68
|
|
|
69
|
-
**04:00 — While you sleep.** Aitne reads yesterday's handoff, your calendar for today, the last 24 hours of mail across
|
|
69
|
+
**04:00 — While you sleep.** Aitne reads yesterday's handoff, your calendar for today, the last 24 hours of mail across your accounts, new commits in your repos, and the pending observations from Notion. It generates `today.md` and queues a Morning Briefing DM for after quiet hours end.
|
|
70
70
|
|
|
71
71
|
**07:30 — Slack DM lands as you grab coffee:**
|
|
72
72
|
> Good morning. 3 things to flag:
|
|
@@ -77,7 +77,7 @@ Three things make Aitne different:
|
|
|
77
77
|
> Today: 2 meetings, 4 tasks. Light day. Reply `end` to close, or just talk to me.
|
|
78
78
|
|
|
79
79
|
**09:15 — You DM Aitne:** *"Tell Sarah I'll review by 11. And book lunch with Mark on Thursday — somewhere near his office."*
|
|
80
|
-
Aitne drafts the Slack reply to Sarah, finds 3 lunch slots Thursday, checks Mark's last 5 lunch venues from your
|
|
80
|
+
Aitne drafts the Slack reply to Sarah, finds 3 lunch slots Thursday, checks Mark's last 5 lunch venues from your `people.md`, suggests Tartine. You confirm. Done.
|
|
81
81
|
|
|
82
82
|
**11:30 — Hourly check fires.** A new commit in your repo modified the API contract you're about to ship. Aitne adds a note to `Agent Notes` on `today.md` and DMs once: *"⚠️ Heads up — `auth.ts:84` was just changed by @Yuki. Want me to summarize the diff?"*
|
|
83
83
|
|
|
@@ -112,19 +112,20 @@ A non-exhaustive list. Click any group to expand.
|
|
|
112
112
|
<details>
|
|
113
113
|
<summary><b>📧 Mail across all your accounts</b></summary>
|
|
114
114
|
|
|
115
|
-
- Unified inbox across Gmail, Outlook, Yahoo, iCloud
|
|
115
|
+
- Unified inbox across Gmail, Outlook, Yahoo, and iCloud (OAuth or app-password / IMAP)
|
|
116
116
|
- Local FTS5 full-text search across **every** account ("find emails about acme last quarter")
|
|
117
|
-
- Auto-classify, label, and archive (Gmail)
|
|
117
|
+
- Auto-classify, label, and archive (Gmail) — full filter rules across all providers
|
|
118
118
|
- Draft replies in your style ("draft a polite no to this conference invite")
|
|
119
119
|
- Forwarded receipts → auto-extracted to a structured `receipts` table tagged with category, vendor, amount
|
|
120
120
|
- Daily digest of unread mail in the morning briefing
|
|
121
|
+
- IMAP IDLE for near-real-time delivery; PDF/image attachments are extracted and indexed
|
|
121
122
|
</details>
|
|
122
123
|
|
|
123
124
|
<details>
|
|
124
125
|
<summary><b>📓 Knowledge: Obsidian, Notion, your own notes</b></summary>
|
|
125
126
|
|
|
126
127
|
- Use your existing Obsidian vault as Aitne's primary memory store — wiki-links keep working
|
|
127
|
-
- Append to your daily note via the official Obsidian CLI
|
|
128
|
+
- Append to your daily note via the official Obsidian CLI (`obsidian create` / `daily:append`)
|
|
128
129
|
- Full Notion page & database CRUD — query, create, update, archive
|
|
129
130
|
- "Summarize what I wrote about this project last month" — across vault layers
|
|
130
131
|
- Auto-link new notes to existing concepts ("this is related to your `agent-architecture.md` from March")
|
|
@@ -134,10 +135,11 @@ A non-exhaustive list. Click any group to expand.
|
|
|
134
135
|
<summary><b>📦 Code, Git, GitHub</b></summary>
|
|
135
136
|
|
|
136
137
|
- Local Git: `git log`, `git diff`, `git show` exposed via daemon proxy
|
|
137
|
-
- GitHub: PR lists, comments, issues, webhook receivers
|
|
138
|
+
- GitHub: PR lists, comments, issues, webhook receivers (HMAC-verified)
|
|
138
139
|
- Per-repo cron triggers — "every Monday at 09:00, summarize merged PRs into `projects/<repo>.md`"
|
|
139
140
|
- "Why did this build break?" — agent reads CI status + diff + traces
|
|
140
141
|
- Auto-detect when a coworker modified a file you're about to ship
|
|
142
|
+
- Unified Repositories: one row pairs a local clone with a GitHub remote; the doctor flags drift
|
|
141
143
|
</details>
|
|
142
144
|
|
|
143
145
|
<details>
|
|
@@ -146,17 +148,18 @@ A non-exhaustive list. Click any group to expand.
|
|
|
146
148
|
- Unified task view across GitHub Issues, mail-derived TODOs, and your own `today.md`
|
|
147
149
|
- Per-project Markdown files with auto-maintained status, deadlines, and people
|
|
148
150
|
- Long-term roadmap with quarterly milestones
|
|
149
|
-
- "Carry this to tomorrow" — handoff between today.md
|
|
151
|
+
- "Carry this to tomorrow" — handoff between `today.md`, `daily/`, `weekly/`, `monthly/`
|
|
150
152
|
- Auto-detect recurring chores and set up reminders
|
|
151
153
|
</details>
|
|
152
154
|
|
|
153
155
|
<details>
|
|
154
|
-
<summary><b>📚 Reading,
|
|
156
|
+
<summary><b>📚 Reading, lifestyle, voice</b></summary>
|
|
155
157
|
|
|
156
158
|
- Import Kindle highlights, build a reading-taste profile
|
|
157
159
|
- Friday book recommendation DM based on your taste
|
|
158
|
-
- Receipts auto-organized by month into your
|
|
160
|
+
- Receipts auto-organized by month into your vault
|
|
159
161
|
- Travel itinerary roll-up surfaced before each trip
|
|
162
|
+
- **Voice attachments** — send a voice memo, get a Whisper-transcribed message (opt-in, runs locally)
|
|
160
163
|
</details>
|
|
161
164
|
|
|
162
165
|
<details>
|
|
@@ -232,7 +235,7 @@ flowchart TB
|
|
|
232
235
|
**Key properties:**
|
|
233
236
|
|
|
234
237
|
- **Plain Markdown.** You can `cat`, `vim`, `obsidian`, or `cp` any of these files. There is no proprietary format. Uninstall and the memory is still yours.
|
|
235
|
-
- **Layered retention.** `today.md` rotates to `yesterday.md` once per agent-day. `daily/` files are persistent by design (synthesized journal). `weekly/` is pruned after 1 year
|
|
238
|
+
- **Layered retention.** `today.md` rotates to `yesterday.md` once per agent-day. `daily/` files are persistent by design (synthesized journal). `weekly/` is pruned after 1 year. `agent/journal.md` keeps the most recent ~12 weekly + 24 monthly sections. SQLite-backed history (messages, agent_actions) is pruned after 90 days.
|
|
236
239
|
- **Always-injected context.** Every session starts with `user/profile.md` + `rules/management.md` + `today.md` already loaded — the agent never has to "search for context."
|
|
237
240
|
- **You can always intervene.** Edit any file by hand. The agent picks up your changes on the next routine.
|
|
238
241
|
|
|
@@ -266,20 +269,12 @@ graph LR
|
|
|
266
269
|
|
|
267
270
|
Every interaction shapes Aitne's understanding of you, *implicitly*. No buttons. No surveys. Just talk to it.
|
|
268
271
|
|
|
269
|
-
|
|
270
|
-
flowchart LR
|
|
271
|
-
A["📨 Pre-Action<br/>read user/profile.md<br/>inject preferences"] --> B["🤖 Action<br/>generate response<br/>in your style"]
|
|
272
|
-
B --> C["👁️ Post-Action<br/>Signal Detector logs:<br/>· ignored notifications<br/>(no reply within 30 min)<br/>· correction phrases<br/>(shorter, in Japanese, …)"]
|
|
273
|
-
C --> D["🌆 Evening Review<br/>raw signals → character<br/>or → user/profile.md<br/>Learned Context"]
|
|
274
|
-
D --> A
|
|
275
|
-
```
|
|
272
|
+
The Signal Detector tags each turn for **tone-class signals** (corrections like "be shorter", "no preamble") and **attribute-class signals** (durable facts like "I'm allergic to nuts"). The Evening Review interprets the raw signals on the next pass:
|
|
276
273
|
|
|
277
|
-
|
|
274
|
+
- **Tone** → updates the `character` runtime-config field, applied to every backend's system prompt.
|
|
275
|
+
- **Attribute** → updates `user/profile.md` Learned Context.
|
|
278
276
|
|
|
279
|
-
|
|
280
|
-
**Attribute-class signals** (durable facts like "I'm allergic to nuts", "my partner's name is Mei") → updates `user/profile.md` Learned Context.
|
|
281
|
-
|
|
282
|
-
The Evening Review enforces the line between these: a signal like "I prefer concise replies" is *tone* (goes to character). A signal like "my flight is on Friday" is *attribute* (goes to profile).
|
|
277
|
+
The line between the two is enforced server-side: a signal like "I prefer concise replies" is *tone* (goes to character). A signal like "my flight is on Friday" is *attribute* (goes to profile).
|
|
283
278
|
|
|
284
279
|
---
|
|
285
280
|
|
|
@@ -301,13 +296,14 @@ Aitne has a dedicated set of management skills — `management-task-register`, `
|
|
|
301
296
|
| *"Switch to Codex for code reviews from now on"* | Updates `process_backend_config` mapping |
|
|
302
297
|
|
|
303
298
|
Behind the scenes, the agent maps natural language to one of:
|
|
304
|
-
|
|
299
|
+
|
|
300
|
+
- `PATCH /api/config` — runtime config (~100 keys)
|
|
305
301
|
- `PUT /api/context/*` — Markdown memory (locked, validated, snapshotted)
|
|
306
302
|
- `DELETE /api/schedule/:id` / `POST /api/recurring-schedules` — scheduling
|
|
307
303
|
- `PATCH /api/config/character` — tone
|
|
308
|
-
- `POST /api/triggers` — cron-driven custom routines
|
|
304
|
+
- `POST /api/triggers` — cron-driven custom routines
|
|
309
305
|
|
|
310
|
-
Every change is journaled to `agent_actions` with `source_kind=user_directive`.
|
|
306
|
+
Every change is journaled to `agent_actions` with `source_kind=user_directive`. Audit anything you don't recognize via `aitne audit`.
|
|
311
307
|
|
|
312
308
|
---
|
|
313
309
|
|
|
@@ -346,8 +342,6 @@ flowchart LR
|
|
|
346
342
|
style RUN fill:#fae8ff,stroke:#a855f7
|
|
347
343
|
```
|
|
348
344
|
|
|
349
|
-
### What this means in practice
|
|
350
|
-
|
|
351
345
|
| You already have… | In Aitne it just works |
|
|
352
346
|
|---|---|
|
|
353
347
|
| A Claude Code MCP server connected to your company's internal API | Every Aitne session can use it. No code changes. |
|
|
@@ -356,19 +350,7 @@ flowchart LR
|
|
|
356
350
|
| Your Gemini auth + project preferences | Inherited automatically. |
|
|
357
351
|
| Skills you wrote for `~/.claude/skills/` | Imported on demand. |
|
|
358
352
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
```
|
|
362
|
-
Claude Code / Codex / Gemini ships a new feature
|
|
363
|
-
↓
|
|
364
|
-
New connectors, plugins, MCP servers, skills appear
|
|
365
|
-
↓
|
|
366
|
-
The backend Aitne controls gets more capable
|
|
367
|
-
↓
|
|
368
|
-
You get those capabilities in Aitne — with zero config change
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
Aitne is a *proxy* over the AI runtimes you already use. As they grow, you grow.
|
|
353
|
+
**The growth flywheel:** Claude Code / Codex / Gemini ship a new connector → Aitne picks it up on next session → you get it for free.
|
|
372
354
|
|
|
373
355
|
---
|
|
374
356
|
|
|
@@ -390,8 +372,8 @@ flowchart TB
|
|
|
390
372
|
|
|
391
373
|
subgraph SVC["🔌 Connected apps"]
|
|
392
374
|
direction TB
|
|
393
|
-
SV1["📅 Google Calendar"]
|
|
394
|
-
SV2["📧 Gmail · Outlook · Yahoo · iCloud
|
|
375
|
+
SV1["📅 Google Calendar · Outlook Calendar"]
|
|
376
|
+
SV2["📧 Gmail · Outlook · Yahoo · iCloud"]
|
|
395
377
|
SV3["📓 Notion · Obsidian"]
|
|
396
378
|
SV4["📦 GitHub · local Git"]
|
|
397
379
|
SV5["🗺️ Google Maps"]
|
|
@@ -427,11 +409,12 @@ flowchart TB
|
|
|
427
409
|
| 💬 **Reactive on every chat platform** | Slack · Telegram · Discord · WhatsApp · Web dashboard |
|
|
428
410
|
| 🧠 **Multi-backend brain** | Claude (Opus 4.7 / Sonnet 4.6 / Haiku 4.5) · Codex CLI · Gemini CLI |
|
|
429
411
|
| 📝 **MD-centric memory** | Plain Markdown you own — `today.md` · `roadmap.md` · `projects/*` · `daily/` · `weekly/` · `monthly/` |
|
|
430
|
-
| 🔌 **23 built-in skills** | Calendar, mail, Notion, Obsidian, schedule, roadmap, receipts, travel, reading, … |
|
|
431
|
-
|
|
|
412
|
+
| 🔌 **23 built-in skills** | Calendar, mail, Notion, Obsidian, schedule, roadmap, receipts, travel, reading, voice, … |
|
|
413
|
+
| 🔁 **4-mode integration framework** | `direct` (daemon polls) · `delegated` (backend's connector) · `native` (main backend MCP on demand) · `disabled` |
|
|
414
|
+
| 🛡️ **Four-layer safety** | SDK allowlist · PreToolUse hooks · daemon API risk tiers · absolute-block layer that holds even in Allow mode |
|
|
432
415
|
| 🪪 **Local-first & private** | Binds to `127.0.0.1`. No telemetry. Secrets in OS Keychain. Zero cloud state. |
|
|
433
416
|
| 🧰 **Production tooling** | Background daemon · `aitne doctor` · cost analytics · auth health monitor with auto-recovery |
|
|
434
|
-
| 🌍 **Speak any language** | The LLM handles it — talk to Aitne in Japanese, English, German, anything. |
|
|
417
|
+
| 🌍 **Speak any language** | The LLM handles it — talk to Aitne in Japanese, English, German, anything. `primaryLanguage` config nudges its outputs too. |
|
|
435
418
|
|
|
436
419
|
---
|
|
437
420
|
|
|
@@ -463,7 +446,7 @@ flowchart TB
|
|
|
463
446
|
npm install -g @aitne-sh/aitne@latest
|
|
464
447
|
```
|
|
465
448
|
|
|
466
|
-
|
|
449
|
+
Installs the `aitne` CLI globally with the daemon, dashboard, and built-in agent assets.
|
|
467
450
|
|
|
468
451
|
### 2. Bring at least one AI backend
|
|
469
452
|
|
|
@@ -497,11 +480,19 @@ aitne status
|
|
|
497
480
|
```
|
|
498
481
|
|
|
499
482
|
```
|
|
500
|
-
Aitne
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
483
|
+
Aitne status:
|
|
484
|
+
|
|
485
|
+
Daemon: running (PID 12345)
|
|
486
|
+
Uptime: 1m 23s
|
|
487
|
+
API: http://127.0.0.1:8321
|
|
488
|
+
Platforms: slack, dashboard
|
|
489
|
+
Backends: claude
|
|
490
|
+
Dashboard: running (PID 12346)
|
|
491
|
+
URL: http://localhost:3000
|
|
492
|
+
|
|
493
|
+
Last action: 2026-05-11T07:30:14Z (routine.morning_routine)
|
|
494
|
+
Today: 6 action(s) · $0.043 spent
|
|
495
|
+
Next: 2026-05-11T18:00:00Z routine.evening_review
|
|
505
496
|
```
|
|
506
497
|
|
|
507
498
|
That's it. Open `http://localhost:3000` and finish the wizard.
|
|
@@ -533,7 +524,7 @@ npm install -g @aitne-sh/aitne@latest
|
|
|
533
524
|
```bash
|
|
534
525
|
npm install -g @anthropic-ai/claude-code
|
|
535
526
|
claude --version
|
|
536
|
-
claude auth login
|
|
527
|
+
claude auth login # uses your Claude subscription
|
|
537
528
|
```
|
|
538
529
|
|
|
539
530
|
#### OpenAI Codex CLI
|
|
@@ -552,7 +543,7 @@ gemini --version
|
|
|
552
543
|
# OAuth handled automatically on first use
|
|
553
544
|
```
|
|
554
545
|
|
|
555
|
-
You can install all three. Per-process tier routing lets you mix-and-match: Sonnet for
|
|
546
|
+
You can install all three. Per-process tier routing lets you mix-and-match: Sonnet for routines and DMs, Haiku for delegated/polling, Codex for code-heavy work, Gemini for free-tier headroom — and Opus only on the keys that genuinely need it (first-day morning routine, knowledge import, opt-in heavy task mode).
|
|
556
547
|
|
|
557
548
|
### Step 3 — Launch and run the wizard
|
|
558
549
|
|
|
@@ -560,23 +551,27 @@ You can install all three. Per-process tier routing lets you mix-and-match: Sonn
|
|
|
560
551
|
aitne start
|
|
561
552
|
```
|
|
562
553
|
|
|
563
|
-
Aitne builds (if needed), launches both processes, and opens `http://localhost:3000/setup`. The wizard walks
|
|
564
|
-
|
|
565
|
-
1. **Backend** — default backend (Claude / Codex / Gemini)
|
|
566
|
-
2. **Vault mode** — plain (`~/.personal-agent/context/`) or your existing Obsidian vault
|
|
567
|
-
3. **Execution mode** — *Safe* (strict) or *Allow* (relaxed for plugins/MCP). Absolute-block layer holds in both.
|
|
568
|
-
4. **Google** — OAuth for Gmail and Calendar (optional)
|
|
569
|
-
5. **Messaging platforms** — Slack, Telegram, Discord, WhatsApp (optional)
|
|
570
|
-
6. **Integrations** — `direct` / `delegated` / `disabled` per service
|
|
571
|
-
7. **Character** — free-form 1,000-char tone & style description
|
|
554
|
+
Aitne builds (if needed), launches both processes, and opens `http://localhost:3000/setup`. The wizard walks 9 screens:
|
|
572
555
|
|
|
573
|
-
|
|
556
|
+
| # | Step | What it asks |
|
|
557
|
+
|---|---|---|
|
|
558
|
+
| 1 | **Basics** | Agent display name + primary language |
|
|
559
|
+
| 2 | **Vault** | Plain (`~/.personal-agent/context/`) or your existing Obsidian vault path |
|
|
560
|
+
| 3 | **AI Backend** | Pick the main backend (Claude / Codex / Gemini), authenticate (API key or CLI login), choose execution mode (Safe vs. Allow) |
|
|
561
|
+
| 4 | **Mail** | Gmail (OAuth) · Outlook (OAuth) · Yahoo / iCloud (IMAP + app password) — each card sets `direct` / `delegated` / `native` mode where supported |
|
|
562
|
+
| 5 | **Calendar** | Google Calendar (OAuth) · Outlook Calendar (OAuth or user-managed MCP) — same mode picker per card |
|
|
563
|
+
| 6 | **Note** | Notion (OAuth) and an optional secondary Obsidian vault path to watch |
|
|
564
|
+
| 7 | **Messaging** | Slack · Telegram · Discord · WhatsApp pairing |
|
|
565
|
+
| 8 | **Rules** | A short conversation with the agent — it interviews you and stages a `character` block + a `management-rules` block, which you confirm before saving |
|
|
566
|
+
| 9 | **Done** | Summary; agent runs its first `setup` session |
|
|
567
|
+
|
|
568
|
+
Required steps: Basics, Vault, AI Backend, Rules. Everything else exposes a **Skip** button — you can come back later from `/connections/*` or `/settings/*`.
|
|
574
569
|
|
|
575
570
|
### Step 4 — Verify
|
|
576
571
|
|
|
577
572
|
```bash
|
|
578
|
-
aitne status # PIDs, uptime,
|
|
579
|
-
aitne doctor #
|
|
573
|
+
aitne status # PIDs, uptime, connected platforms, backends, today's spend
|
|
574
|
+
aitne doctor # install diagnostic
|
|
580
575
|
aitne logs -f # tail the daemon log
|
|
581
576
|
```
|
|
582
577
|
|
|
@@ -590,8 +585,8 @@ aitne logs -f # tail the daemon log
|
|
|
590
585
|
|---|---|
|
|
591
586
|
| `aitne start [--no-open]` | Build if stale, launch daemon + dashboard in background. Opens browser unless `--no-open`. |
|
|
592
587
|
| `aitne stop` | Graceful shutdown (SIGTERM → SIGKILL after 10 s). |
|
|
593
|
-
| `aitne restart [--clean-context]` | Stop then start. `--clean-context` wipes `context/` after a tarball backup. |
|
|
594
|
-
| `aitne status` | PIDs, uptime,
|
|
588
|
+
| `aitne restart [--no-open] [--clean-context]` | Stop then start. `--clean-context` wipes `context/` after a tarball backup. |
|
|
589
|
+
| `aitne status` | PIDs, uptime, connected platforms, backends, today's spend, last action, next scheduled item. |
|
|
595
590
|
| `aitne logs [-f] [-n N] [-d]` | Tail the daemon log. `-d` = dashboard log. `-f` = follow. `-n N` = last N lines. |
|
|
596
591
|
| `aitne dev` | Foreground mode (full stdio, useful for debugging). |
|
|
597
592
|
| `aitne build` | Force a build (skip the mtime gate). |
|
|
@@ -602,7 +597,7 @@ aitne logs -f # tail the daemon log
|
|
|
602
597
|
|---|---|
|
|
603
598
|
| `aitne setup` | Re-open the dashboard `/setup` wizard. Auto-starts the daemon if needed. |
|
|
604
599
|
| `aitne open` | Open the dashboard in your browser. |
|
|
605
|
-
| `aitne doctor` |
|
|
600
|
+
| `aitne doctor [--json]` | 9 install checks; the repository-drift check expands into one extra row per repo whose `origin` no longer matches its registered slug. |
|
|
606
601
|
| `aitne audit [flags]` | Read the agent action log directly from SQLite. |
|
|
607
602
|
| `aitne version [--json]` | Version, Node, install path, last build time. |
|
|
608
603
|
| `aitne update [--check]` | Print the npm command to upgrade. `--check` makes one network call. |
|
|
@@ -627,10 +622,11 @@ aitne logs -f # tail the daemon log
|
|
|
627
622
|
2. Daemon port (`PA_API_PORT`, default 8321) is bindable
|
|
628
623
|
3. Dashboard port (`PA_DASHBOARD_PORT`, default 3000) is bindable
|
|
629
624
|
4. OS secret store usable (`security` / `secret-tool` / `PA_MASTER_PASSWORD`)
|
|
630
|
-
5. At least one backend CLI (`claude`, `codex`, or `gemini`) responds
|
|
625
|
+
5. At least one backend CLI (`claude`, `codex`, or `gemini`) responds
|
|
631
626
|
6. `~/.personal-agent` exists and is writable
|
|
632
627
|
7. `better-sqlite3` native binding loads
|
|
633
628
|
8. `agent-assets/skills/` is reachable
|
|
629
|
+
9. Repository drift — one row per paired-local + GitHub repo whose `origin` no longer matches the registered `<owner>/<repo>`
|
|
634
630
|
|
|
635
631
|
---
|
|
636
632
|
|
|
@@ -650,7 +646,7 @@ flowchart TB
|
|
|
650
646
|
subgraph DAEMON["⚙️ Aitne daemon (Hono :8321)"]
|
|
651
647
|
direction TB
|
|
652
648
|
EB[EventBus<br/>priority heap]
|
|
653
|
-
DI[Dispatcher<br/>
|
|
649
|
+
DI[Dispatcher<br/>semaphores: 2 reactive +<br/>3 autonomous]
|
|
654
650
|
BR[BackendRouter<br/>ProcessKey → tier → backend<br/>+ fallback]
|
|
655
651
|
AC[Agent Core<br/>IAgentCore interface]
|
|
656
652
|
OB[Observers<br/>Git · GitHub · Obsidian ·<br/>Notion · Calendar · Mail]
|
|
@@ -690,14 +686,14 @@ flowchart TB
|
|
|
690
686
|
### Two execution paths
|
|
691
687
|
|
|
692
688
|
**Reactive path** — owner DMs/mentions, cron routines, calendar approach events, scheduled tasks
|
|
693
|
-
→ Event source → EventBus → Dispatcher → BackendRouter → Agent → output to user
|
|
689
|
+
→ Event source → EventBus → Dispatcher → BackendRouter → Agent → output to user.
|
|
694
690
|
|
|
695
691
|
**Polling path** — Obsidian, Git, GitHub, Notion, Calendar, Mail change detection
|
|
696
692
|
→ Observer → `observations` table (UPSERT, with `actor='user'|'agent'`)
|
|
697
693
|
… time passes …
|
|
698
|
-
→ Hourly cron →
|
|
694
|
+
→ Hourly cron → Stage 2 lite-tier triage → Stage 3 full `routine.hourly_check` (if escalated) → agent reads pending → updates `today.md` / `roadmap.md` → notifies if needed.
|
|
699
695
|
|
|
700
|
-
|
|
696
|
+
`AgentWriteTracker` prevents agent → observer → agent loops by tagging the agent's own writes so the hourly check filters them out. A pre-pass `routine.fetch_window` session fans out per-account fetches into the `observations` table before each routine runs.
|
|
701
697
|
|
|
702
698
|
### Repo layout
|
|
703
699
|
|
|
@@ -709,7 +705,7 @@ packages/
|
|
|
709
705
|
|
|
710
706
|
agent-assets/ # Read by the daemon at session-init time
|
|
711
707
|
├── agent-profiles/ # Persona MD per backend (CLAUDE.md / AGENTS.md / GEMINI.md)
|
|
712
|
-
├── skills/ # 23 built-in skills (
|
|
708
|
+
├── skills/ # 23 built-in skills (context, calendar, mail, notion, …)
|
|
713
709
|
├── task-flows/ # Per-event prompt templates (one per event type)
|
|
714
710
|
└── templates/ # Scaffold MD copied to context/ on first run
|
|
715
711
|
|
|
@@ -740,9 +736,9 @@ Everything the agent writes lives under `PA_DATA_DIR` (default `~/.personal-agen
|
|
|
740
736
|
│ ├── routines/ # Per-cadence checklist rulebooks
|
|
741
737
|
│ ├── dossiers/ # Carry-forward state per routine
|
|
742
738
|
│ ├── projects/ # One file per active project + Obsidian Bases view
|
|
743
|
-
│ ├── daily/<YYYY-MM-DD>.md # Synthesized daily journal (
|
|
744
|
-
│ ├── weekly/<YYYY-Www>.md # Weekly review (1 yr)
|
|
745
|
-
│ ├── monthly/<YYYY-MM>.md # Monthly review (
|
|
739
|
+
│ ├── daily/<YYYY-MM-DD>.md # Synthesized daily journal (persistent by design)
|
|
740
|
+
│ ├── weekly/<YYYY-Www>.md # Weekly review (1 yr file retention)
|
|
741
|
+
│ ├── monthly/<YYYY-MM>.md # Monthly review (persistent by design)
|
|
746
742
|
│ ├── inbox/ # Optional paste bucket
|
|
747
743
|
│ └── agent/
|
|
748
744
|
│ ├── journal.md # Private agent self-reflection
|
|
@@ -756,13 +752,9 @@ Everything the agent writes lives under `PA_DATA_DIR` (default `~/.personal-agen
|
|
|
756
752
|
└── run/ # PID files for daemon + dashboard
|
|
757
753
|
```
|
|
758
754
|
|
|
759
|
-
### Always-injected context
|
|
760
|
-
|
|
761
|
-
Every session starts with `user/profile.md` + `rules/management.md` + `today.md` injected. The agent never has to "search for context."
|
|
762
|
-
|
|
763
755
|
### Write chokepoint
|
|
764
756
|
|
|
765
|
-
Context-MD writes go through `curl http://localhost:8321/api/context/<path>` rather than the SDK's `Edit`/`Write` tools. This is enforced by skill instructions plus the absolute-block path globs that deny SDK writes to secret paths (`.env`, `~/.ssh`, `~/.aws`, `~/.personal-agent/secrets/**`, …). Routing context writes through the daemon API gives
|
|
757
|
+
Context-MD writes go through `curl http://localhost:8321/api/context/<path>` rather than the SDK's `Edit`/`Write` tools on those paths. This is enforced by **skill instructions** (the bundled skills only ever invoke the daemon API) plus the **absolute-block path globs** that hard-deny SDK writes to secret paths (`.env`, `~/.ssh`, `~/.aws`, `~/.gnupg`, `~/.personal-agent/secrets/**`, …). Routing context writes through the daemon API gives one chokepoint for locks (`today.md` write lock), frontmatter validation, and snapshots (30-day `md_file_snapshots` retention).
|
|
766
758
|
|
|
767
759
|
---
|
|
768
760
|
|
|
@@ -786,8 +778,9 @@ Every kind of work has a `ProcessKey` mapped to a tier (`lite` / `medium` / `hig
|
|
|
786
778
|
| `routine.morning_routine` | medium | Daily plan generation — the highest-value recurring process |
|
|
787
779
|
| `routine.evening_review` | medium | Today wrap-up |
|
|
788
780
|
| `routine.weekly_review`, `routine.monthly_review` | medium | Cadence summaries |
|
|
789
|
-
| `routine.hourly_check` | medium |
|
|
790
|
-
| `routine.hourly_check.triage` | lite | Stage 2
|
|
781
|
+
| `routine.hourly_check` | medium | Stage 3 observation aggregation |
|
|
782
|
+
| `routine.hourly_check.triage` | lite | Stage 2 escalate-vs-log-only gate |
|
|
783
|
+
| `routine.fetch_window` | lite | Pre-pass fan-out fetcher for routines |
|
|
791
784
|
| `message.dm`, `message.mention` | medium | DM and channel response |
|
|
792
785
|
| `dashboard.chat` | medium | Web chat |
|
|
793
786
|
| `dashboard.docs_qa` | medium (tier-locked) | Docs panel — never burns Opus quota |
|
|
@@ -796,9 +789,10 @@ Every kind of work has a `ProcessKey` mapped to a tier (`lite` / `medium` / `hig
|
|
|
796
789
|
| `calendar.change`, `gmail_classify` | lite | Polling-derived events |
|
|
797
790
|
| `git.*`, `github.*` (event triage) | lite | Git/GitHub event triage |
|
|
798
791
|
| `delegated_task` | lite | Delegated subprocess task mode |
|
|
792
|
+
| `delegated_task_heavy` | high | Opt-in destructive-write task mode |
|
|
799
793
|
| `observation.summarize` | lite | Per-observation classification |
|
|
800
794
|
|
|
801
|
-
Configure each ProcessKey's backend & tier from the dashboard `/settings/models` page. The router fails over to a fallback backend automatically on `BackendQuotaError` or `BackendDecisiveFailure
|
|
795
|
+
Configure each ProcessKey's backend & tier from the dashboard `/settings/models` page. The router fails over to a fallback backend automatically on `BackendQuotaError` or `BackendDecisiveFailure`, re-materializing the fallback's instruction file + skill directories into the session workdir.
|
|
802
796
|
|
|
803
797
|
---
|
|
804
798
|
|
|
@@ -818,19 +812,18 @@ Configure each ProcessKey's backend & tier from the dashboard `/settings/models`
|
|
|
818
812
|
|
|
819
813
|
| Provider | Auth | Features |
|
|
820
814
|
|---|---|---|
|
|
821
|
-
| **Gmail** | `googleapis` OAuth2 | Read · send · drafts · labels · IMAP IDLE · classifier |
|
|
815
|
+
| **Gmail** | `googleapis` OAuth2 | Read · send · drafts · labels · IMAP IDLE · classifier · attachment extraction |
|
|
822
816
|
| **Outlook** | `@azure/msal-node` Graph API | Read · send · drafts · folders |
|
|
823
|
-
| **Yahoo** | IMAP +
|
|
824
|
-
| **iCloud** | IMAP + app password | Read · send |
|
|
825
|
-
| **Generic IMAP** | username + password | Read |
|
|
817
|
+
| **Yahoo** | IMAP + app password | Read · send · IMAP IDLE |
|
|
818
|
+
| **iCloud** | IMAP + app password | Read · send · IMAP IDLE |
|
|
826
819
|
|
|
827
|
-
Local FTS5 full-text search runs across **every** account via `GET /api/mail/search?q=...`.
|
|
820
|
+
Local FTS5 full-text search runs across **every** account via `GET /api/mail/search?q=...`. The classifier (`mail-classifier`) tags messages across all providers; the Gmail-specific classifier auto-applies labels.
|
|
828
821
|
|
|
829
822
|
### Knowledge & docs
|
|
830
823
|
|
|
831
|
-
- **Obsidian** — read directly via `Read`; write via the official Obsidian CLI
|
|
824
|
+
- **Obsidian** — read directly via `Read`; write via the official Obsidian CLI (`obsidian create`, `obsidian append`, `obsidian daily:append`, …); `chokidar` watches the vault for user edits
|
|
832
825
|
- **Notion** — `@notionhq/client` REST API; full page + database CRUD
|
|
833
|
-
- **Custom MCP servers** — register via `/api/mcp/servers
|
|
826
|
+
- **Custom MCP servers** — register via `/api/mcp/servers`; materialized into the per-session workdir so backends use them transparently
|
|
834
827
|
|
|
835
828
|
### Code
|
|
836
829
|
|
|
@@ -839,68 +832,76 @@ Local FTS5 full-text search runs across **every** account via `GET /api/mail/sea
|
|
|
839
832
|
|
|
840
833
|
### Calendar & travel
|
|
841
834
|
|
|
842
|
-
- **Google Calendar** — full event CRUD, freebusy, calendar list, 15-min approaching reminders
|
|
835
|
+
- **Google Calendar** — `googleapis` OAuth2; full event CRUD, freebusy, calendar list, 15-min approaching reminders
|
|
836
|
+
- **Outlook Calendar** — Microsoft Graph via `@azure/msal-node` in direct mode, or user-managed MCP in delegated / native modes
|
|
837
|
+
- **iCloud Calendar** — CalDAV via `tsdav` (Apple Calendar service; reachable from any platform)
|
|
843
838
|
- **Google Maps** — Directions API for travel-time estimation tied to calendar events
|
|
844
839
|
|
|
845
840
|
### Lifestyle
|
|
846
841
|
|
|
847
|
-
- **Receipts** — auto-extracts PDF/image attachments from
|
|
842
|
+
- **Receipts** — auto-extracts PDF/image attachments from mail with category detection
|
|
848
843
|
- **Travel bookings** — auto-extracts flight, hotel, restaurant, train confirmations
|
|
849
844
|
- **Reading** — Kindle My Clippings importer; reading-taste profile; weekly book recommendations
|
|
845
|
+
- **Voice** — opt-in Whisper transcription (`ffmpeg-static` + `@huggingface/transformers`) runs locally on voice attachments. Install via `POST /api/voice/install`.
|
|
850
846
|
|
|
851
847
|
### Integration delegation modes
|
|
852
848
|
|
|
853
|
-
Each integration runs in one of
|
|
849
|
+
Each integration runs in one of **four** modes:
|
|
854
850
|
|
|
855
|
-
| Mode | Auth held by | Setup cost | Capabilities |
|
|
856
|
-
|
|
857
|
-
| **`direct`** | Daemon (OAuth in OS Keychain) | 5–6 vendor-console steps | Full feature set |
|
|
858
|
-
| **`delegated`** |
|
|
859
|
-
| **`
|
|
851
|
+
| Mode | Auth held by | Polling? | Setup cost | Capabilities |
|
|
852
|
+
|---|---|---|---|---|
|
|
853
|
+
| **`direct`** | Daemon (OAuth in OS Keychain) | Daemon poller | 5–6 vendor-console steps | Full feature set |
|
|
854
|
+
| **`delegated`** | Main backend's connector | Cron `delegated-sync-worker` (per-cadence opt-in) | None — backend already authed | Reduced (whatever the connector exposes) |
|
|
855
|
+
| **`native`** | Main backend's connector | No daemon polling — agent reaches the integration in-turn via MCP | None | On-demand only; observations posted via `/api/observations` |
|
|
856
|
+
| **`disabled`** | — | No | — | Off |
|
|
857
|
+
|
|
858
|
+
`delegated` runs the backend's connector on a cron cadence (default-off, opt-in per cadence). `native` skips polling entirely and routes calls in-band during DMs / hourly checks. Outlook Mail and Outlook Calendar are *user-managed-connector* native: install the MCP yourself, Aitne synthesises a probe pass.
|
|
860
859
|
|
|
861
|
-
|
|
860
|
+
Every mode change goes through `POST /api/integrations/:key/probe` and the per-key flip lock — a live capability check is mandatory before flipping to `delegated` or `native`.
|
|
862
861
|
|
|
863
862
|
---
|
|
864
863
|
|
|
865
864
|
## Safety model
|
|
866
865
|
|
|
867
|
-
Aitne
|
|
866
|
+
Aitne stacks **four** independent safety layers. The bottom layer holds even when the upper layers are widened by the user.
|
|
868
867
|
|
|
869
868
|
### Layer 1 — SDK permission model
|
|
870
869
|
|
|
871
870
|
```typescript
|
|
872
|
-
//
|
|
871
|
+
// Safe (strict) mode — claude-tool-collection.ts:CLAUDE_DEFAULT_ALLOWED_TOOLS
|
|
873
872
|
permissionMode: "dontAsk"
|
|
874
873
|
allowedTools: ["Read", "Glob", "Grep", "Write", "Edit", "Skill",
|
|
875
874
|
"Bash(curl *)", "Bash(git *)", "Bash(jq *)"]
|
|
876
|
-
disallowedTools:
|
|
877
|
-
// Write/Edit on secret paths (.env, ~/.ssh, ~/.aws, ~/.personal-agent/secrets, …)
|
|
878
|
-
// are blocked by path-glob entries in the absolute-block layer.
|
|
875
|
+
disallowedTools: ALWAYS_DISALLOWED_TOOLS + dashboard overrides
|
|
879
876
|
```
|
|
880
877
|
|
|
881
|
-
|
|
878
|
+
Allow mode swaps to `permissionMode: "bypassPermissions"` but the absolute-block layer below still applies.
|
|
879
|
+
|
|
880
|
+
### Layer 2 — PreToolUse hooks (Claude, Safe mode)
|
|
882
881
|
|
|
883
|
-
|
|
882
|
+
In Safe mode, every `Bash(curl ...)` invocation is parsed: the hostname must be `localhost` or `127.0.0.1` and the port must match the daemon's `apiPort`. Connection-override flags (`--connect-to`, `--resolve`, `--proxy`, `-x`, `--socks`, `-K`) are also rejected. A parallel `jq` hook blocks `--rawfile` / env-leak filters. In Allow mode the curl/jq pair is skipped, but the absolute-block hook (below) and the context-write attribution hook still run. Vault writes are attributed to the agent via `AgentWriteTracker` so they don't loop back as observations.
|
|
884
883
|
|
|
885
|
-
### Layer
|
|
884
|
+
### Layer 3 — Daemon API risk tiers
|
|
886
885
|
|
|
887
886
|
| Tier | Examples | Auth required |
|
|
888
887
|
|---|---|---|
|
|
889
|
-
| **Autonomous** | `GET /api/context/*`, `POST /api/notify`, `POST /api/schedule` | None (localhost only) |
|
|
888
|
+
| **Autonomous** | `GET /api/context/*`, `POST /api/notify`, `POST /api/schedule`, `POST /api/observations` | None (localhost only) |
|
|
890
889
|
| **ReadSensitive** | `GET /api/observations`, `GET /api/calendar/events`, `GET /api/mail/search` | `X-Read-Token` or Bearer |
|
|
891
|
-
| **Approve** | `PATCH /api/config`, `POST /api/setup/*`, `POST /api/system/factory-reset`, `POST /api/triggers`, `/api/repositories`, `/api/mcp/servers` | Bearer |
|
|
890
|
+
| **Approve** | `PATCH /api/config`, `POST /api/setup/*`, `POST /api/system/factory-reset`, `POST /api/triggers`, `/api/repositories`, `/api/mcp/servers`, `/api/integrations` | Bearer |
|
|
892
891
|
|
|
893
|
-
### Absolute-block layer (`ALWAYS_DISALLOWED_TOOLS`)
|
|
892
|
+
### Layer 4 — Absolute-block layer (`ALWAYS_DISALLOWED_TOOLS`)
|
|
894
893
|
|
|
895
|
-
Hard-blocked in **both Safe and Allow** modes.
|
|
894
|
+
Hard-blocked in **both Safe and Allow** modes. `bypassPermissions` and `allowedToolsOverride` cannot widen past this:
|
|
896
895
|
|
|
897
|
-
- Recursive delete: `rm -rf *`, `rm -r *`
|
|
896
|
+
- Recursive delete: `rm -rf *`, `rm -r *`, `rm --recursive*` (every flag-bundle variant)
|
|
898
897
|
- Privilege escalation: `sudo *`, `doas *`, `su *`
|
|
899
898
|
- Pipe-to-shell RCE: `curl * | sh`, `wget * | bash`, `bash <(...)`
|
|
900
899
|
- Platform secret CLI: `security *`, `secret-tool *`, `cmdkey *`
|
|
901
900
|
- Secret file reads/writes: `.env`, `~/.ssh/**`, `~/.gnupg/**`, `~/.aws/**`, `~/.config/gcloud/**`
|
|
902
901
|
- Daemon-managed secrets: `~/.personal-agent/secrets/**`, `~/.personal-agent/whatsapp/auth/**`
|
|
903
902
|
|
|
903
|
+
Every blocked attempt lands in `agent_actions` with `action_type='blocked_absolute'`.
|
|
904
|
+
|
|
904
905
|
### Other guarantees
|
|
905
906
|
|
|
906
907
|
- **Localhost-only API** — daemon binds to `127.0.0.1` only
|
|
@@ -925,19 +926,19 @@ Hard-blocked in **both Safe and Allow** modes. Even `bypassPermissions` cannot w
|
|
|
925
926
|
| `autonomousDailyCostCapUsd` | null (alert-only) | yes |
|
|
926
927
|
| `autonomousMonthlyCostCapUsd` | null (alert-only) | yes |
|
|
927
928
|
| Per-ProcessKey `maxBudgetUsd` (in `process_backend_config`) | per-row, set from `/settings/models` | yes |
|
|
928
|
-
| `delegated_task`
|
|
929
|
+
| `delegated_task` hard caps | `maxToolCalls=15` · `maxBudgetUsd=$0.50` · `timeoutMs=300_000` | no (compile-time) |
|
|
929
930
|
|
|
930
931
|
### Typical day's spend
|
|
931
932
|
|
|
932
933
|
```
|
|
933
|
-
04:00 Morning Routine (
|
|
934
|
-
07:00 Morning Briefing (Sonnet)
|
|
935
|
-
09:00 Hourly Check (Sonnet)
|
|
936
|
-
12:00 Hourly Check (Sonnet)
|
|
937
|
-
12:55 DM response (
|
|
938
|
-
18:00 Evening Review (Sonnet)
|
|
934
|
+
04:00 Morning Routine (Sonnet) ~$0.15
|
|
935
|
+
07:00 Morning Briefing (Sonnet) ~$0.03
|
|
936
|
+
09:00 Hourly Check (Sonnet) ~$0.05
|
|
937
|
+
12:00 Hourly Check (Sonnet) ~$0.03
|
|
938
|
+
12:55 DM response (Sonnet) ~$0.08
|
|
939
|
+
18:00 Evening Review (Sonnet) ~$0.15
|
|
939
940
|
─────────────────────────────────────────────────
|
|
940
|
-
Total
|
|
941
|
+
Total ~$0.49
|
|
941
942
|
```
|
|
942
943
|
|
|
943
944
|
If you're on a Claude / Codex / Gemini subscription, none of this hits a metered API key — it consumes your subscription quota directly. Quota exhaustion is detected, dedupe-notified once per 2-hour window, and the next hourly tick retries automatically.
|
|
@@ -958,33 +959,31 @@ PA_DASHBOARD_PORT=3000
|
|
|
958
959
|
PA_LOG_LEVEL=info # trace | debug | info | warn | error
|
|
959
960
|
```
|
|
960
961
|
|
|
961
|
-
### Pre-seeding
|
|
962
|
+
### Pre-seeding identifiers via env (optional)
|
|
963
|
+
|
|
964
|
+
Bot **tokens and OAuth credentials** always live in the OS keychain — they're never read from environment variables. The wizard's Messaging step (or `/connections/*`) is the single entry point. The few non-secret identifiers you *can* pre-seed for fully scripted installs:
|
|
962
965
|
|
|
963
966
|
```bash
|
|
964
|
-
#
|
|
965
|
-
PA_SLACK_BOT_TOKEN=xoxb-...
|
|
966
|
-
PA_SLACK_APP_TOKEN=xapp-...
|
|
967
|
+
# Owner identifiers (non-secret — let messaging adapters know who you are)
|
|
967
968
|
PA_SLACK_OWNER_USER_ID=U...
|
|
968
|
-
|
|
969
|
-
# Telegram
|
|
970
|
-
PA_TELEGRAM_BOT_TOKEN=...
|
|
971
969
|
PA_TELEGRAM_OWNER_CHAT_ID=...
|
|
972
|
-
|
|
973
|
-
# Discord
|
|
974
|
-
PA_DISCORD_BOT_TOKEN=...
|
|
975
970
|
PA_DISCORD_OWNER_USER_ID=...
|
|
971
|
+
PA_WHATSAPP_ENABLED=true
|
|
972
|
+
PA_WHATSAPP_OWNER_PHONE=...
|
|
973
|
+
|
|
974
|
+
# Obsidian vault paths
|
|
975
|
+
PA_PRIMARY_VAULT_PATH=~/Documents/MyVault
|
|
976
|
+
PA_EXTERNAL_OBSIDIAN_VAULT_PATH=~/Documents/SecondaryVault
|
|
976
977
|
|
|
977
|
-
#
|
|
978
|
-
|
|
979
|
-
PA_GIT_REPOS='["/path/to/repo1"]'
|
|
980
|
-
PA_GITHUB_REPOS='["owner/repo"]'
|
|
978
|
+
# Notion default database routing
|
|
979
|
+
PA_NOTION_DATABASE_IDS='{"tasks":"abc...","notes":"def..."}'
|
|
981
980
|
```
|
|
982
981
|
|
|
983
|
-
|
|
982
|
+
Everything else — bot tokens, OAuth refresh tokens, Notion API key, GitHub token, Google Maps key, Apple Calendar credentials — is set from the dashboard `/connections` page (or via the setup wizard) and lives in the keychain.
|
|
984
983
|
|
|
985
984
|
### Runtime settings
|
|
986
985
|
|
|
987
|
-
The dashboard `/settings` tree exposes ~
|
|
986
|
+
The dashboard `/settings` tree exposes ~100 runtime keys. The headline ones:
|
|
988
987
|
|
|
989
988
|
- **Schedule** — `timezone`, `dayBoundaryHour`, hourly check window & interval, cron schedules
|
|
990
989
|
- **Notifications** — `quietHoursStart/End`, `maxNotificationsPerHour`, `maxNotificationsPerDay`, `batchIntervalMinutes`
|
|
@@ -994,6 +993,9 @@ The dashboard `/settings` tree exposes ~80 runtime keys. The headline ones:
|
|
|
994
993
|
- **Cost** — daily / monthly soft caps with 80% and 100% alerts
|
|
995
994
|
- **Mail** — provider list, poll interval, IMAP IDLE on/off
|
|
996
995
|
- **Character** — 1,000-char free-form tone description
|
|
996
|
+
- **Language** — `primaryLanguage` nudges output language for DMs, knowledge, and vault writes
|
|
997
|
+
- **Voice** — `voiceTranscriptionEnabled`, `voiceTranscriptionModel`, `voiceTranscriptionPrimaryLanguage`
|
|
998
|
+
- **Delegated task mode** — kill switch, per-day quota, heavy-tier opt-in, cache / pool / structured-output toggles
|
|
997
999
|
|
|
998
1000
|
…or just DM the agent: *"Don't run hourly checks on weekends."*
|
|
999
1001
|
|
|
@@ -1044,7 +1046,7 @@ The build did not complete. Run `aitne build` and check for TypeScript errors.
|
|
|
1044
1046
|
|
|
1045
1047
|
### Port already in use
|
|
1046
1048
|
|
|
1047
|
-
Change `PA_API_PORT` in `.env`. To find the conflicting process:
|
|
1049
|
+
Change `PA_API_PORT` (or `PA_DASHBOARD_PORT`) in `.env`. To find the conflicting process:
|
|
1048
1050
|
|
|
1049
1051
|
```bash
|
|
1050
1052
|
# macOS / Linux
|
|
@@ -1063,11 +1065,11 @@ npm config get prefix
|
|
|
1063
1065
|
|
|
1064
1066
|
### SQLite errors on startup
|
|
1065
1067
|
|
|
1066
|
-
The DB can be reset safely — your Markdown memory in `context/` is untouched:
|
|
1068
|
+
The DB can be reset safely — your Markdown memory in `context/` is untouched. The `*` clears the WAL + SHM companion files:
|
|
1067
1069
|
|
|
1068
1070
|
```bash
|
|
1069
1071
|
aitne stop
|
|
1070
|
-
rm ~/.personal-agent/data/personal_agent.db*
|
|
1072
|
+
rm ~/.personal-agent/data/personal_agent.db*
|
|
1071
1073
|
# Remove-Item "$env:USERPROFILE\.personal-agent\data\personal_agent.db*" # Windows
|
|
1072
1074
|
aitne start
|
|
1073
1075
|
```
|
|
@@ -1076,7 +1078,7 @@ aitne start
|
|
|
1076
1078
|
|
|
1077
1079
|
```bash
|
|
1078
1080
|
aitne doctor # confirms which backend failed
|
|
1079
|
-
claude auth login
|
|
1081
|
+
claude auth login # re-auth Claude
|
|
1080
1082
|
codex login --device-auth # re-auth Codex
|
|
1081
1083
|
# Gemini re-auth happens automatically via the dashboard banner
|
|
1082
1084
|
```
|
|
@@ -1110,9 +1112,10 @@ pnpm clean # remove all build artifacts and node_modules
|
|
|
1110
1112
|
|
|
1111
1113
|
| Layer | Stack |
|
|
1112
1114
|
|---|---|
|
|
1113
|
-
| **Daemon** | Node.js 22 · Hono · `@anthropic-ai/claude-agent-sdk` · `@slack/bolt` · `telegraf` · `discord.js` ·
|
|
1115
|
+
| **Daemon** | Node.js 22 · Hono · `@anthropic-ai/claude-agent-sdk` · `@slack/bolt` · `telegraf` · `discord.js` · `@whiskeysockets/baileys` · `googleapis` · `@azure/msal-node` · `@notionhq/client` · `@octokit/rest` · `tsdav` · `chokidar` · `node-cron` · `heap-js` · `pino` · `zod` |
|
|
1114
1116
|
| **Storage** | `better-sqlite3` (WAL + FTS5 trigram) · OS Keychain · plain Markdown |
|
|
1115
1117
|
| **Dashboard** | Next.js 16 (App Router) · React 19 · Tailwind CSS 4 · shadcn/ui · TanStack Query · Recharts · Monaco Editor |
|
|
1118
|
+
| **Voice** | `ffmpeg-static` · `@huggingface/transformers` (Whisper, opt-in) |
|
|
1116
1119
|
| **Monorepo** | pnpm 10.x workspaces · Turborepo · TypeScript 5.8 · Vitest 3 |
|
|
1117
1120
|
|
|
1118
1121
|
### Conventions
|
|
@@ -1131,10 +1134,11 @@ pnpm clean # remove all build artifacts and node_modules
|
|
|
1131
1134
|
| Change event routing | `src/core/dispatcher.ts` + `src/core/event-bus.ts` |
|
|
1132
1135
|
| Add a backend or change tier mapping | `packages/shared/src/process-key.ts` + `src/core/backends/backend-router.ts` |
|
|
1133
1136
|
| Add an API route | `src/api/routes/` + register in `src/api/server.ts` |
|
|
1134
|
-
| Add an integration | `src/
|
|
1137
|
+
| Add an integration | `packages/shared/src/integrations.ts` (registry) + `src/services/<name>/` + optional `src/observers/` |
|
|
1135
1138
|
| Edit a built-in skill | `agent-assets/skills/<slug>/SKILL.md` |
|
|
1136
1139
|
| Edit an event task flow | `agent-assets/task-flows/<eventType>.md` |
|
|
1137
1140
|
| Change risk classification | `src/safety/risk-classifier.ts` |
|
|
1141
|
+
| Change the absolute-block layer | `src/safety/always-disallowed.ts` |
|
|
1138
1142
|
| Change auth health / recovery | `src/core/backends/auth-health-monitor.ts` + `auth-recovery.ts` |
|
|
1139
1143
|
|
|
1140
1144
|
---
|
|
@@ -1154,7 +1158,7 @@ In your OS-native credential store (macOS Keychain / libsecret / DPAPI). Never i
|
|
|
1154
1158
|
Yes — Claude Code, OpenAI Codex, and Google Gemini CLI are all supported. Pick one or all three. Per-process tier routing lets you mix-and-match.
|
|
1155
1159
|
|
|
1156
1160
|
**Do I need an API key?**
|
|
1157
|
-
|
|
1161
|
+
No metered API key required — Aitne uses your subscription quota via the official CLIs (`claude auth login`, `codex login`, `gemini`). If you'd rather pay-as-you-go, supply `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `GEMINI_API_KEY` in the wizard.
|
|
1158
1162
|
|
|
1159
1163
|
**Can I edit the agent's memory directly?**
|
|
1160
1164
|
Yes — that's the entire point. Open `~/.personal-agent/context/today.md` in your editor, change anything, save. The agent picks up your edits on the next routine. Any edit is *just text in a file* — no proprietary format, no migration headaches if you uninstall.
|
|
@@ -1172,7 +1176,7 @@ Yes. Aitne reads your `~/.claude/`, `~/.codex/`, `~/.gemini/` configs on session
|
|
|
1172
1176
|
The AI backends and reactive messaging need internet (to hit those services). The daemon, dashboard, observers (Git, Obsidian local), and Markdown memory are entirely offline.
|
|
1173
1177
|
|
|
1174
1178
|
**Does it support languages other than English?**
|
|
1175
|
-
Yes. Talk to it in your native language — Japanese, German, Spanish, anything. The LLM handles it
|
|
1179
|
+
Yes. Talk to it in your native language — Japanese, German, Spanish, anything. The LLM handles it; the `primaryLanguage` setting nudges DM / knowledge / vault outputs into that language too. Implementation code remains English-only.
|
|
1176
1180
|
|
|
1177
1181
|
**Is this for my whole team?**
|
|
1178
1182
|
No — Aitne is **single-owner by design**. Group chats and multi-user channels are filtered at the adapter layer. If you want a team agent, run one Aitne per teammate.
|