# forget

사용자가 소유한 control boundary를 통해 검토된 memory, TODO 또는 Ledger record를 삭제하며, soft deletion은 복구 가능하고 hard deletion은 영구적입니다.

- Canonical: https://docs.xmemo.dev/ko/docs/tools/forget
- Locale: ko-KR
- Content-Locale: ko-KR
- Canonical-Content-Digest: bb7f8a7e884de0a466e30a2d8258aa343fb87510c0c9530b1bf1ab2166c17e21
- Edition-Digest: 0628e6591ac609d961afcd5f81984818ab6aae17a6c50edf7c3014be98429a15
- Source-Revision: sha256:baae372498e8bb0029d0bb3dbb87a802d40981f421cdfa74d518c0c5e6352ed3

## Tool Reference: `forget`

### Purpose

사용자가 소유한 control boundary를 통해 선택한 memory, TODO 또는 Ledger-backed record를 삭제합니다. Public contract는 soft 및 hard deletion만 다루며, content를 제자리에서 바꾸려면 redact_memory를 사용합니다.

### Parameters

- `memory_id` (string, optional): 제거할 record의 정확한 reference입니다. target보다 우선합니다.
- `target` (string, optional): 정확한 reference를 사용할 수 없을 때의 설명용 target입니다.
- `mode` (string, optional, default: soft): 'soft'(기본값, 복구 가능) 또는 'hard'(영구적이며 먼저 명시적인 user confirmation 필요)입니다. 'soft_delete' 및 'hard_delete' alias도 허용되고 빈 값은 soft를 뜻합니다. 그 밖의 값은 거부됩니다.
- `reason` (string, optional): 삭제와 함께 기록할 짧은 audit reason입니다.

### Returns

성공 text에는 영향을 받은 opaque reference와 lifecycle status가 표시됩니다. Soft deletion은 restore path를 통해 복구할 수 있지만 hard deletion은 복구할 수 없습니다.

### Errors

- Validation failure: 'soft'/'soft_delete'/'hard'/'hard_delete' 이외의 mode가 제공되었거나 replacement_content가 설정되었습니다 (redact_memory 사용).
- 401/403: token에 필요한 write/delete capability가 없거나 target에 접근할 수 없습니다.
- Ambiguous target: query_hint가 여러 record와 일치하거나 정확한 target을 확정할 수 없습니다.
- Invalid mode: hard deletion은 추론되지 않으며 지원되지 않는 mode는 public surface에서 거부됩니다.
- Not found or lifecycle conflict: 선택한 memory, TODO 또는 Ledger record가 이미 없거나 변경되었습니다.

### Examples

#### 정확한 record를 복구 가능하게 제거



```typescript
forget({
  target: "memory-id-from-recall",
  mode: "soft",
  reason: "User requested removal"
})
```

### Related Tools

- [search_memory](/docs/tools/search): destructive action 전에 엄격하고 승인된 결과를 찾습니다.
- [remember](/docs/tools/remember): 실제로 필요할 때만 새 영구 record를 생성합니다.
- [todos](/docs/tools/todos): task state를 직접 관리하고 검토된 삭제에만 forget을 사용합니다.
- [ledger](/docs/tools/ledger): governed Ledger dispatcher를 통해 financial record를 관리합니다.

## 삭제 확인

이전에 memory를 반환한 search를 다시 실행합니다. entry가 더 이상 나타나지 않을 때만 삭제가 확인됩니다.

```ts
search_memory({ query: "<the removed content>", limit: 5 })
// -> the removed entry must be absent
```

