Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }` |
Expand Down Expand Up @@ -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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] scoringWeights?: ScoringWeights is the advertised contract this ticket is closing, but ScoringWeights is never defined in SKILL.md. Agents reading only this file still cannot see { semantic?, recency?, recencyHalfLifeDays?, importance? }.

Suggestion: Add the ScoringWeights interface next to RecallOptions (same fields as packages/sdk/src/types.ts). A one-liner that sort: "recent" is newest-wins (over-fetch then write-time) and scoringWeights only re-ranks the cosine window would match the SDK docs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added ScoringWeights next to RecallOptions, plus the sort vs weights one-liner.

}

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[];
Expand Down
Loading