docs: show recall() scoringWeights on SKILL.md (WALM-616) - #899
HoangDucBach wants to merge 2 commits into
Conversation
The TypeScript gap already shipped in 0.1.6. Agent docs still listed the old RecallOptions, which is how GH #708 concluded recency ranking was unreachable.
ducnmm
left a comment
There was a problem hiding this comment.
Summary
Docs-only: SKILL.md now lists sort and scoringWeights on recall() / RecallOptions. That matches origin/dev (recall() already POSTs scoring_weights since 0.1.6). No dump needed. MCP memwal_recall is untouched.
Issue counts by severity
- bugs: 0
- suggestions: 1
- nits: 0
| namespace?: string; | ||
| maxDistance?: number; | ||
| sort?: "relevance" | "recent"; | ||
| scoringWeights?: ScoringWeights; // sent as scoring_weights; omit to keep cosine order |
There was a problem hiding this comment.
[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.
There was a problem hiding this comment.
Added ScoringWeights next to RecallOptions, plus the sort vs weights one-liner.
Agents reading only this file still could not see the weight fields.
ducnmm
left a comment
There was a problem hiding this comment.
LGTM, documentation updates match the SDK options.
Ticket
WALM-616 — https://linear.app/mysten-labs/issue/WALM-616
GH #708 — #708
What changed?
recall()already sendsscoring_weightswhenRecallOptions.scoringWeightsis set (shipped in 0.1.6). Existing tests inrecall-created-at.test.mjspin the wire body.SKILL.mdstill listed the oldrecall({ query, limit?, topK?, namespace?, maxDistance? })/RecallOptionswithoutscoringWeightsorsort. That is the copy GH recall() cannot use recency-weighted ranking that already exists in the SDK — it's implemented, typed, and wired, but only reachable through recallManual() #708 used to conclude recency ranking was unreachable.Why is this needed?
Agents reading
SKILL.mdstill cannot seescoringWeightsonrecall(). The SDK gap is already closed; this is the remaining advertised contract.Scope
SKILL.mdonly. No MCPmemwal_recallchange (WALM-428).Out of scope
sort=recent(WALM-428)recall()still does not sendscoring_weightsHow was this tested?
Commands:
npm test --prefix packages/sdk(includesrecall sends scoringWeights as snake_case scoring_weights)Verify
recall({ query, scoringWeights: { semantic: 1, recency: 0.5 } })POSTsscoring_weightsscoringWeightsand the body has noscoring_weightskeymemwal_recallschema unchangedRisks
Docs-only. No runtime change.
Author checklist
npm test --prefix packages/sdk)