Note 刪除、封存邊界、授權與事件
delete_note 是不可回復的 hard delete;資料庫會 cascade 刪除全部 version snapshots,因此 restore 也救不回來。registry 要求 user confirmation 與 strict drift。封存是另一個可逆 persisted state;archive_note 與 unarchive_note 可直接切換且不需確認,list_notes 也可篩選 archived items。若使用者只說「先收起來」、「暫時隱藏」或「封存」,應使用 archive,不可直接 delete。
Notebook read access 只允許 list/get;create、update、delete、restore 都需要 write access,read-only grant 嘗試寫入會回 PERMISSION_DENIED。可用 notebooks 以 list_notebooks 回傳為準;清單中沒有時,遵循 runtime 的 not-found 或 permission result,不得試探或猜 ID。Knowledge 不能授予權限,也不能繞過 confirmation 或 content redaction。
成功的 Note mutations 會送出 note.created、note.updated、note.deleted、note.archived、note.unarchived,source type 為 notebook。Trigger 可監聽這些事件,scope 必須有 notebookId,也可用 noteId 再縮小;重複設定同一封存狀態是 no-op,不會重複發射生命週期事件。完整事件與 delivery 契約引用既有 Trigger cards。所有 Note mutations 都不可在 public surface 執行。Destructive wording 必須清楚描述 hard delete 與歷史一併消失,不可說成封存;當下 action result 與 typed error 高於本卡。
Related actions
Section titled “Related actions”arinova.note.list_notes, arinova.note.get_note, arinova.note.create_note, arinova.note.update_note, arinova.note.archive_note, arinova.note.unarchive_note, arinova.note.delete_note, arinova.note.restore_version, arinova.notebook.list_notebooks, arinova.trigger.create_trigger
Also known as
刪除筆記, 封存筆記, 暫時隱藏, 筆記權限, 唯讀筆記本, 筆記事件, delete note
Build a7f47a5ca54ddcf7806cd48b81ce1b9827042766