gc
Run all store-maintenance tasks in one call: decay, dedup, orphans, and FTS rebuild. Combines four housekeeping steps safe and idempotent.
Instructions
Run all store-maintenance tasks in one call: decay, dedup, orphans, FTS.
Combines four housekeeping steps:
1. Decay confidence on patterns idle beyond the staleness threshold.
2. Merge near-duplicates using the given similarity threshold.
3. Remove alias entries whose target no longer exists.
4. Rebuild the SQLite FTS index for accurate search results.
Safe and idempotent — running more than once per day is fine. For
finer control, the individual steps are available as find_duplicates()
+ alias_pattern() + (internal) decay.
Args:
dedup_threshold: Similarity cutoff for step 2, 0.0-1.0. Default
0.75. See find_duplicates() for tuning notes.
Returns:
Dict with keys: "decay" (dict with "decayed" and "deleted"),
"dedup" (dict with "found" and "applied"), "orphans_cleaned"
(int), "fts_rebuilt" (bool).
Prefer housekeep() for discoverability; gc() remains supported for
existing clients.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dedup_threshold | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||