mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
28 lines
1.6 KiB
Markdown
28 lines
1.6 KiB
Markdown
<!-- Generated by scripts/gen-website-api.ts — do not edit by hand. Run `pnpm run gen-website-api` to regenerate. -->
|
|
|
|
# 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](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/spill/spill/src/index.ts#L45)
|
|
|
|
### ctx.spillStore.saveText(input)
|
|
|
|
```ts website-api
|
|
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](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/spill/spill/src/index.ts#L55)
|