Files
deepseek-harness/website/zh-CN/api/harness/spill-store.md
2026-07-17 21:19:33 +08:00

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 content verbatim 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.
  • saveText REJECTS 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).

Source

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.

Source