Liking cljdoc? Tell your friends :D

fractal.engine.compaction

L3 · compaction (07 §4) — v1's mechanism, adapted to SCI vars + the event-sourced store. assess/should-compact? estimate request tokens vs the model window (ceil(chars/4), :unknown-window-chars fallback). compact-session! summarizes the transcript via the root model into ONE continuation frame, snapshots the vars for durability, and appends a SINGLE :session/compacted event (no torn-write window). It does NOT restore/clear the live vars.

L3 · compaction (07 §4) — v1's mechanism, adapted to SCI vars + the
event-sourced store. `assess`/`should-compact?` estimate request tokens vs the
model window (ceil(chars/4), `:unknown-window-chars` fallback). `compact-session!`
summarizes the transcript via the root model into ONE continuation frame,
snapshots the vars for durability, and appends a SINGLE `:session/compacted`
event (no torn-write window). It does NOT restore/clear the live vars.
raw docstring

assessclj

(assess request cfg)

Estimate the assembled REQUEST and report {:tokens :window :ratio :compact? :hard?}. Mid-step run-step! uses :hard? only (07 §3).

Estimate the assembled REQUEST and report {:tokens :window :ratio :compact?
:hard?}. Mid-step run-step! uses :hard? only (07 §3).
sourceraw docstring

compact-session!clj

(compact-session! handle)

Summarize the completed transcript into ONE continuation frame and append a single :session/compacted event (vars-ref + the stamped compact message + the prune boundary). The live SCI vars are untouched (03 §6).

Summarize the completed transcript into ONE continuation frame and append a
single :session/compacted event (vars-ref + the stamped compact message +
the prune boundary). The live SCI vars are untouched (03 §6).
sourceraw docstring

format-transcriptclj

(format-transcript hydrated-messages)

A role-labeled transcript over hydrated :message/content (the shape the formatter consumes — GD41/GD11).

A role-labeled transcript over hydrated :message/content (the shape the
formatter consumes — GD41/GD11).
sourceraw docstring

should-compact?clj

(should-compact? view cfg)

Pre-turn gate (07 §2): does the current transcript exceed :compact-at? Estimated over the view's kept messages (no store/hydration needed).

Pre-turn gate (07 §2): does the current transcript exceed :compact-at?
Estimated over the view's kept messages (no store/hydration needed).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close