feat: personal notes, each person's standing instructions for how Jarvis answers them

A personalNotes tool (add, list, delete the asker's own notes) offered only
with a notes backend. The app keeps the notes in config/notes.json and sends
the asker's with every voice, chat and task reply; the reply engine puts them
in a <person_notes> fence as that person's preferences, which never permit an
action or a tool. The worker's schedule bridge becomes a shared app bridge
for schedule_action and note_action. A 사람별 지침 screen edits and deletes
any note; features.notes turns the tool and the notes off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-14 17:10:53 +09:00
parent e4b6327cf9
commit a5bd25b86f
32 changed files with 901 additions and 91 deletions

View File

@@ -200,7 +200,8 @@ which carry Discord's own time.
-> {"type": "chat_edit", "channel": "...", "message_id": "...", "text": "..."}
-> {"type": "chat_delete", "channel": "...", "message_id": "..."}
-> {"type": "reply", "id": "r1", "user": "<id>", "text": "...", "via": "voice", "speak": true}
// via chat: optional "channel" it was written in
// via chat: optional "channel" it was written in;
// optional "notes": the asker's standing instructions
<- {"type": "reply_text", "id": "r1", "text": "...", "failed": false}
-> {"type": "reply_delivered", "id": "c1", "ok": true} // a chat answer was posted (ok: false: it was not)
-> {"type": "prepare", "user": "<id>", "text": "..."} // a call still being said; nothing comes back
@@ -347,6 +348,25 @@ the schedules (`app/src/admin.spec.md`, "Schedules"):
(`speak: true` is `bad_message`), and its answer is not stored; the app delivers it. It waits for
LLM switches like any reply.
### Personal notes
The brain's personalNotes tool (`src/jarvis/tools/builtin/personal_notes.spec.md`) asks the app,
which keeps each person's standing instructions and sends the asker's with every `reply`
(`app/src/admin.spec.md`, "Personal notes"):
```
-> {"type": "reply", ..., "notes": ["나한테는 반말로 해"]} // optional; at most 20, each at most 300 characters
<- {"type": "note_action", "id": "n1", "action": "add|list|delete", "user": "<id>", "via": "voice|chat",
"channel": "...", "text": "...", "note": "<id>"} // add: text; delete: note
-> {"type": "note_action_result", "id": "n1", "ok": true, "item": {...}} // or "items", or ok false with "error"
```
- `notes` that are not a list of at most 20 strings of at most 300 characters are `bad_message`.
The brain puts them in the reply's prompt (`person_notes`); a scheduled task (`via: "task"`) gets
them too, but no notes tool.
- Every voice and chat reply gets a notes backend for its asker; ids and waiting are those of chat
and schedule actions.
### Background collection (M6)
With `JARVIS_COLLECT_PATH` set, the worker collects on its own thread, apart from the voice and the