mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
1.6 KiB
1.6 KiB
ctx.spillStore
SpillStore (abstract seam) — provided by @deepseek-ai/dsh-spill.
Abstract spill storage service. Subclass, implement saveText, and load the subclass as a plugin — it registers as ctx.spillStore (one implementation per context; loading a second throws, cordis' standard duplicate-service behavior).
Semantics every implementation must honor:
- saveText persists the FULL
contentverbatim and returns an opaque locator, exact byte length, and model-facing retrieval guidance. - Storage is scoped by the request's SaveTextSpill.owner session; the backend chooses a private (not world-readable) location and a collision-free name derived from — never equal to — the caller's
suggestedName. saveTextREJECTS on a real storage failure (permissions, ENOSPC, backend unavailable); the caller decides how to degrade (the spill policy treats a rejection as best-effort and keeps the inline result).
ctx.spillStore.saveText(input)
abstract saveText(input: SaveTextSpill): Promise<SpillRef>
Persist input.content to a session-scoped spill artifact.
input— the owner, provenance, suggested name, and full text to save.
Returns the saved artifact's SpillRef; rejects on a storage failure.