A flight-recorder tool for AI agents and developers working at the REPL.
Captures Fulcro events (transactions, network activity, state changes, UISM transitions, statechart transitions) into a queryable log. Optimized for the workflow: clear -> do something -> inspect what happened.
Usage:
(require '[com.fulcrologic.fulcro.inspect.repl-tool :as rt])
(rt/install! app)
(rt/clear!)
;; ... do something in the app ...
(rt/digest) ;; structured summary of what happened
(rt/tx-log) ;; just transactions
Events are stored in the app's runtime-atom and bounded to a configurable max size.
A default-app atom allows calling functions without passing app every time.
A flight-recorder tool for AI agents and developers working at the REPL. Captures Fulcro events (transactions, network activity, state changes, UISM transitions, statechart transitions) into a queryable log. Optimized for the workflow: clear -> do something -> inspect what happened. Usage: ```clojure (require '[com.fulcrologic.fulcro.inspect.repl-tool :as rt]) (rt/install! app) (rt/clear!) ;; ... do something in the app ... (rt/digest) ;; structured summary of what happened (rt/tx-log) ;; just transactions ``` Events are stored in the app's runtime-atom and bounded to a configurable max size. A default-app atom allows calling functions without passing `app` every time.
(clear!)(clear! app)Clear the event log. Returns the current timestamp (useful as a :since marker).
Clear the event log. Returns the current timestamp (useful as a `:since` marker).
(digest)(digest app-or-opts)(digest app {:keys [since]})Structured summary of activity since the last clear (or a given timestamp). Answers: "I did X, did it work, and what changed?"
Returns a map with:
Structured summary of activity since the last clear (or a given timestamp). Answers: "I did X, did it work, and what changed?" Returns a map with: - :window - time range and event count - :transactions - mutation summaries - :network - correlated network activity - :uism - UISM transitions - :statecharts - statechart transitions - :state-changes - aggregated state diff
(events)(events app-or-opts)(events app {:keys [category since last]})Return captured events, optionally filtered.
Options:
clear!); only events after this timeReturn captured events, optionally filtered. Options: - :category - One of :tx, :net, :db, :uism, :statechart - :since - Timestamp (e.g. from `clear!`); only events after this time - :last - Return only the last N events
(install! app)(install! app {:keys [max-events] :or {max-events 200}})Register the repl-tool on the given app and set it as the default app.
Options:
Register the repl-tool on the given app and set it as the default app. Options: - :max-events - Maximum events to retain (default 200)
(network-log)(network-log app)Return correlated network events grouped by request-id. Each entry contains :request-id, :remote, :status (:pending/:finished/:failed), :request-edn, :response-edn, :error, :started-at, :finished-at, :duration-ms.
Return correlated network events grouped by request-id. Each entry contains :request-id, :remote, :status (:pending/:finished/:failed), :request-edn, :response-edn, :error, :started-at, :finished-at, :duration-ms.
(statechart-log)(statechart-log app)Return statechart transition events with :statechart/session-id, :statechart/event, :statechart/data, :statechart/configuration.
Return statechart transition events with :statechart/session-id, :statechart/event, :statechart/data, :statechart/configuration.
(tx-log)(tx-log app)Return transaction events, each with :tx, :component, :ident, :remotes.
Return transaction events, each with :tx, :component, :ident, :remotes.
(uism-log)(uism-log app)Return UISM transition events with :uism/asm-id, :uism/event-id, :uism/event-data.
Return UISM transition events with :uism/asm-id, :uism/event-id, :uism/event-data.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |