diff --git a/SKILL.md b/SKILL.md index 062f727e4..de3272a0b 100644 --- a/SKILL.md +++ b/SKILL.md @@ -152,7 +152,7 @@ const stored = await memwal.waitForRememberJob(accepted.job_id, { |---|---|---| | `remember(text, namespace?)` | Accept one memory job immediately | `{ job_id, status }` | | `rememberAndWait(text, namespace?, opts?)` | Store one memory and wait for completion | `{ id, job_id, blob_id, owner, namespace }` | -| `recall({ query, limit?, topK?, namespace?, maxDistance? })` *(preferred)* or `recall(query, limit?, namespace?)` | Semantic search for memories | `{ results: [{ blob_id, text, distance }], total }` | +| `recall({ query, limit?, topK?, namespace?, maxDistance?, sort?, scoringWeights? })` *(preferred)* or `recall(query, limit?, namespace?)` | Semantic search for memories | `{ results: [{ blob_id, text, distance }], total }` | | `analyze(text, namespace?)` | Extract facts and accept one memory job per fact | `{ job_ids, facts, fact_count, status, owner }` | | `analyzeAndWait(text, namespace?, opts?)` | Extract facts and wait for all fact jobs to complete | `{ results, facts, total, succeeded, failed, owner }` | | `restore(namespace, limit?)` | Rebuild missing index entries from Walrus | `{ restored, skipped, failed, total, namespace, owner, truncated }` | @@ -208,9 +208,19 @@ interface RecallOptions { topK?: number; // alias of limit; if both are set, topK wins namespace?: string; maxDistance?: number; + sort?: "relevance" | "recent"; + scoringWeights?: ScoringWeights; // sent as scoring_weights; omit to keep cosine order +} + +interface ScoringWeights { + semantic?: number; // default 1 + recency?: number; // default 0 + recencyHalfLifeDays?: number; // default 30 + importance?: number; // default 0 } // `topK` and `limit` are aliases for the same value; if both are provided, `topK` takes precedence. +// `sort: "recent"` is newest-wins (over-fetch then write-time). `scoringWeights` only re-ranks the cosine window. interface RememberBulkAcceptedResult { job_ids: string[];