mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
feat(notes): list + update + append + add_tag tools for the AI
Makes the "read all notes and tag them #Natur/#Technologie/…" use case fully functional. Four new ModuleTool entries in notes/tools.ts: - list_notes(limit?, query?, includeArchived?) — auto, read-only. Returns id + title + excerpt so the planner can reference concrete notes without dumping full bodies. - update_note(noteId, title?, content?) — proposable. Destructive full overwrite. Docstring nudges toward append_to_note when applicable. - append_to_note(noteId, content) — proposable, non-destructive. Handles the trailing-newline separator so markdown stays clean. - add_tag_to_note(noteId, tag) — proposable, idempotent, case-insensitive. Strips leading #, replaces spaces with _, skips if already present. Exactly the categorization primitive the user asked for. All three writes are added to AI_PROPOSABLE_TOOL_NAMES so both the webapp policy and mana-ai's boot-time drift guard agree (now 11 tools). Mirrored in services/mana-ai/src/planner/tools.ts. AiProposalInbox mounted on /notes so approvals land inline in the notes module too (already appears in the mission-detail cross-module inbox via the earlier commit). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fdc1c0023a
commit
4d9b16a683
4 changed files with 252 additions and 0 deletions
|
|
@ -25,6 +25,9 @@ export const AI_PROPOSABLE_TOOL_NAMES = [
|
|||
'visit_place',
|
||||
'undo_drink',
|
||||
'save_news_article',
|
||||
'update_note',
|
||||
'append_to_note',
|
||||
'add_tag_to_note',
|
||||
] as const;
|
||||
|
||||
export type AiProposableToolName = (typeof AI_PROPOSABLE_TOOL_NAMES)[number];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue