Skip to main content

Module scratch

Module scratch 

Source
Expand description

Scratchpad store for ephemeral agent working notes.

Scratch entries are stored locally at /asd/v1/scratch/<scratch_id> and are not synced to the sidecar or subject to the policy gate.

§Lifecycle

scratch_write  →  Draft
scratch_update →  Draft   (content updated, updated_at refreshed)
scratch_discard →  Discarded
scratch_promote → Promoted  (ledger entry created first; pass entry_id here)
scratch_clean  → permanent delete of Discarded/Promoted older than filter

§Filtering

ScratchFilter is OR-free: every Some field must match (AND semantics). exclude_expired defaults to true — expired drafts are hidden unless the caller opts in.

Structs§

AsgScratchStore
ScratchStore backed by an ASG Repository.
CleanFilter
Predicate used by ScratchStore::clean_entries to select entries for permanent deletion.
ScratchFilter
Predicate applied by ScratchStore::list_entries. All Some fields must match (AND semantics).

Traits§

ScratchStore
Scratch-entry CRUD operations.