Liking cljdoc? Tell your friends :D

fractal-engine.session


fork-session!clj

(fork-session! cfg source-handle target-store-hint)
(fork-session! cfg source-handle target-store-hint opts)
source

latest-complete-snapshotclj

(latest-complete-snapshot state)
source

resume-session!clj

(resume-session! cfg source-handle)
(resume-session! cfg source-handle opts)
source

run-turn!clj

(run-turn! session user-message)
source

run-turn-async!clj

(run-turn-async! session user-message)

Run one turn on a background daemon thread. Returns a promise that delivers the turn result map. A turn that throws delivers {:status :error :error ...} instead of escaping, so a deref or poll never surprises the caller. The session event stream updates live throughout — poll projection/progress (or load-node) on the session locator to watch the turn settle, then deref the promise for the result. Refuses to start (throws :fractal/turn-in-flight) if a turn is already running on this handle.

Run one turn on a background daemon thread. Returns a promise that delivers the
turn result map. A turn that throws delivers {:status :error :error ...} instead
of escaping, so a deref or poll never surprises the caller. The session event stream
updates live throughout — poll `projection/progress` (or `load-node`) on the
session locator to watch the turn settle, then deref the promise for the result.
Refuses to start (throws :fractal/turn-in-flight) if a turn is already running on
this handle.
sourceraw docstring

session-handleclj

(session-handle state cfg ns-sym ops)
source

start-session!clj

(start-session! cfg)
(start-session! cfg
                {:keys [id logical-id kind parent cache-id overlay store-root
                        alias title origin]})

Start a fresh session in the canonical SQLite + BlobStore root. Opts may carry an :overlay — an extra, session-level system instruction appended to the base behavior in the single system message. It is a standing specialization for the whole session (e.g. codebrain's brain role), stated once at birth and carried across every turn and resume via the message history; it is NOT the per-turn task. Kept to one combined system message so it is provider-agnostic (some adapters honor only the first system).

Start a fresh session in the canonical SQLite + BlobStore root.
Opts may carry an `:overlay` — an extra, session-level system instruction
appended to the base behavior in the single system message. It is a standing
specialization for the whole session (e.g. codebrain's brain role), stated once
at birth and carried across every turn and resume via the message history; it
is NOT the per-turn task. Kept to one combined system message so it is
provider-agnostic (some adapters honor only the first system).
sourceraw docstring

stop-session!clj

(stop-session! session)
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