Liking cljdoc? Tell your friends :D

fractal-engine.artifacts

The artifact layer. Holds the live session state, emits events into the append-only journal (the source of truth), and materializes projection files at boundaries. State changes go through emit! -> event/apply-event; the table files (session/messages/turns/evals/calls/snapshots) and derived views (final/usage/tree) are rebuilt by checkpoint!, not on every event.

The artifact layer. Holds the live session state, emits events into the
append-only journal (the source of truth), and materializes projection files at
boundaries. State changes go through `emit!` -> `event/apply-event`; the table
files (session/messages/turns/evals/calls/snapshots) and derived views
(final/usage/tree) are rebuilt by `checkpoint!`, not on every event.
raw docstring

add-call!clj

(add-call! state call)
source

add-eval!clj

(add-eval! state eval-row)
source

add-event!clj

(add-event! state event)

Emit an annotation/lifecycle event (no row change of its own). Returns the event id for compatibility with existing call sites.

Emit an annotation/lifecycle event (no row change of its own). Returns the
event id for compatibility with existing call sites.
sourceraw docstring

add-message!clj

(add-message! state role content)
(add-message! state role content turn-id)
(add-message! state role content turn-id extra)
source

add-snapshot!clj

(add-snapshot! state snapshot)
source

add-turn!clj

(add-turn! state turn)
source

add-turn-id!clj

(add-turn-id! state turn-id k value)
source

add-turn-ids!clj

(add-turn-ids! state turn-id k values)
source

artifact-versionclj

source

blob-ref!clj

(blob-ref! dir rel-path value)
source

checkpoint!clj

(checkpoint! state)

Materialize the projection files from the current view. Called at boundaries (turn end, status change, session stop), not per event. The journal already holds every event; these files are derived views for inspection, resume, and fingerprints.

Materialize the projection files from the current view. Called at boundaries
(turn end, status change, session stop), not per event. The journal already holds
every event; these files are derived views for inspection, resume, and fingerprints.
sourceraw docstring

child-call-typesclj

source

child-idclj

(child-id n)
source

current-turnclj

(current-turn state turn-id)
source

derive-treeclj

(derive-tree dir session calls)
source

derive-usageclj

(derive-usage dir calls)
source

emit!clj

(emit! state event)

Record one event: assign its id and timestamp, append it to the journal (the durable source of truth, O(1)), then fold it into the in-memory view. Serialized per session so the journal order and the view stay consistent under the parallel fanout of map-lm/map-rlm. The reentrant monitor lets update-turn!/update-call! read-then-emit atomically. Does NOT write projection files — that is checkpoint!, called at boundaries.

Record one event: assign its id and timestamp, append it to the journal (the
durable source of truth, O(1)), then fold it into the in-memory view. Serialized
per session so the journal order and the view stay consistent under the parallel
fanout of map-lm/map-rlm. The reentrant monitor lets `update-turn!`/`update-call!`
read-then-emit atomically. Does NOT write projection files — that is `checkpoint!`,
called at boundaries.
sourceraw docstring

ensure-dir!clj

(ensure-dir! p)
source

flush!clj

source

formatted-ednclj

(formatted-edn value)
source

inline-byte-thresholdclj

source

leaf-call-typesclj

source

mark-error!clj

(mark-error! state error)
source

mark-final!clj

(mark-final! state value)
source

new-state!clj

(new-state! {:keys [dir id kind provider parent resumed-from forked-from
                    cache-id]})
source

next-counter!clj

(next-counter! state k)
source

pathclj

(path dir & parts)
source

project-valueclj

(project-value value)
(project-value value depth)
source

provider-call-typesclj

source

read-edn-fileclj

(read-edn-file file default)
source

read-refclj

(read-ref dir ref)
source

rebuild-derived!clj

(rebuild-derived! state)
source

root-call-typesclj

source

session-idclj

(session-id)
source

surfaceclj

source

surface-versionclj

source

update-call!clj

(update-call! state call-id f & args)
source

update-status!clj

(update-status! state status)
source

update-turn!clj

(update-turn! state turn-id f & args)
source

value-bytesclj

(value-bytes value)
source

value-ref!clj

(value-ref! dir value)
(value-ref! dir
            value
            {:keys [path threshold] :or {threshold inline-byte-threshold}})
source

value-summaryclj

(value-summary value)
source

write-edn!clj

(write-edn! file value)
source

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