Skip to main content

Session Record

@vcjdeboer/session-recordv2026.09.18.3· 18d agoMODELS
01README

Never lose how a result was computed. A language-agnostic provenance ledger for interactive data-science sessions: append one immutable, content-checksummed record per executed cell/chunk — its code, value, figures, console output, warnings, packages, and even runtime-declared functions with their internal dependencies — from any client (R/RStudio, Python/Jupyter, targets, …). One append-only ledger, one record per cell, identical shape across languages: the foundation the rest of the session-* suite fills, seals, and replays. Capture the real computation as it happens, so a session can be audited, sealed (session-witness), or re-run later — not reconstructed from memory.

02Models1
@vcjdeboer/session-recordv2026.09.18.3session_record.ts
fn record(language: string, clientName?: string, clientVersion?: string, runtimeName?: string, runtimeKind?: string, codeLanguage?: string, codePath: string, valueSummaryPath?: string, consolePath?: string, plotPath?: string, framePath?: string, objectPath?: string, inputsManifest?: string, functionsManifest?: string, readsManifest?: string, outputsManifest?: string, warningsPath?: string, sysmetaPath?: string, optionsPath?: string, loadedPath?: string, installedPath?: string, reproStatePath?: string, seq?: string, session?: string, executionCount?: string, execTimestamp?: string, errorPath?: string, errorType?: string, status?: string, durationMs?: string)
Record one code execution's input→code→output triple (language-agnostic passive ledger)
ArgumentTypeDescription
languagestringREQUIRED. Language discriminator: 'r' | 'python' | 'julia' | 'javascript'.
clientName?stringRecorder name, e.g. 'swamprecord'.
clientVersion?stringRecorder version string.
runtimeName?stringRuntime/build name: 'R' | 'webr' | 'cpython' | 'julia' | 'IRkernel'.
runtimeKind?stringRuntime kind: 'repl' | 'script' | 'jupyter-kernel' | 'pluto' | 'browser'.
codeLanguage?stringPer-cell foreign code language (e.g. %%bash in a py kernel).
codePathstringREQUIRED. Path to a file containing the executed source.
valueSummaryPath?stringPath to a file holding the value summary (R: str()).
consolePath?stringPath to a file holding printed/console output (stdout), capped.
plotPath?stringPath to a PNG if the value was a plot -> artifact kind=image.
framePath?stringPath to a CSV if the value was a data frame -> artifact kind=table.
objectPath?stringPath to an RDS if the value was a list/other -> artifact kind=object.
inputsManifest?stringPath to a TSV of read workspace bindings, one per line:
functionsManifest?stringPath to a TSV of user functions the run touched, one per line:
readsManifest?stringPath to a TSV of files the run READ, one per line:
outputsManifest?stringPath to a TSV of files the run WROTE, one per line:
warningsPath?stringPath to a TSV of warnings, one per line:
sysmetaPath?stringPath to a 4-line positional file:
optionsPath?stringR sidecar: path to reproducibility options, 'key=value' per line.
loadedPath?stringR sidecar: path to attached packages, 'pkg version' per line.
installedPath?stringR sidecar: path to ALL installed packages, 'pkg version' per line.
reproStatePath?stringPath to a BINARY RNG-state file. Set only when the run consumed the RNG.
seq?stringPer-(session,client) sequence number. NOT globally monotonic.
session?stringSession id; scopes seq across re-sources / restarts.
executionCount?stringJupyter [n] execution count (per-kernel).
execTimestamp?stringClient-side ISO timestamp of when the code ran.
errorPath?stringPath to a file with the error message (when status='error').
errorType?stringException class/type (Python KeyError/ValueError; R leaves empty).
status?stringExecution status: 'ok' or 'error'. Defaults to 'ok'.
durationMs?stringWall-clock execution duration in milliseconds (client-measured).
fn query(session?: string)
Roll up a session across the ledger's versions — counts + all warnings/functions/errors — using swamp's in-process queryData (version enumeration) + readResource (per-version content). No subprocess, no datastore.
ArgumentTypeDescription
session?stringSession to roll up. Empty selects the LATEST session in the ledger.

Resources

execution(infinite)— One recorded code execution (any language): inputs + code + value
query(infinite)— Cross-version session rollup (counts + warnings/functions/errors), built in-process via queryData + readResource

Files

artifact(application/octet-stream)— A value artifact (artifact-<session>-<seq>-<idx>); mediaType per-write
reprostate(application/octet-stream)— RNG-state file (reprostate-<session>-<seq>)
input(application/octet-stream)— Full data of a small input (input-<session>-<seq>-<name>)
readin(application/octet-stream)— Full data of a small file the run READ (readin-<session>-<seq>-<i>-<name>)
fileout(application/octet-stream)— A file the run WROTE (fileout-<session>-<seq>-<i>-<name>)
03Previous Versions8
2026.09.18.2
2026.09.18.1
2026.09.05.2
2026.09.05.1
2026.07.16.1
2026.06.29.1

Modified 1 models

2026.06.21.2
2026.06.21.1
04Stats
A
100 / 100
Downloads
15
Archive size
22.7 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels