Session Record
@vcjdeboer/session-recordv2026.09.18.3
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.
02Models
@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)
| Argument | Type | Description |
|---|---|---|
| language | string | REQUIRED. Language discriminator: 'r' | 'python' | 'julia' | 'javascript'. |
| clientName? | string | Recorder name, e.g. 'swamprecord'. |
| clientVersion? | string | Recorder version string. |
| runtimeName? | string | Runtime/build name: 'R' | 'webr' | 'cpython' | 'julia' | 'IRkernel'. |
| runtimeKind? | string | Runtime kind: 'repl' | 'script' | 'jupyter-kernel' | 'pluto' | 'browser'. |
| codeLanguage? | string | Per-cell foreign code language (e.g. %%bash in a py kernel). |
| codePath | string | REQUIRED. Path to a file containing the executed source. |
| valueSummaryPath? | string | Path to a file holding the value summary (R: str()). |
| consolePath? | string | Path to a file holding printed/console output (stdout), capped. |
| plotPath? | string | Path to a PNG if the value was a plot -> artifact kind=image. |
| framePath? | string | Path to a CSV if the value was a data frame -> artifact kind=table. |
| objectPath? | string | Path to an RDS if the value was a list/other -> artifact kind=object. |
| inputsManifest? | string | Path to a TSV of read workspace bindings, one per line: |
| functionsManifest? | string | Path to a TSV of user functions the run touched, one per line: |
| readsManifest? | string | Path to a TSV of files the run READ, one per line: |
| outputsManifest? | string | Path to a TSV of files the run WROTE, one per line: |
| warningsPath? | string | Path to a TSV of warnings, one per line: |
| sysmetaPath? | string | Path to a 4-line positional file: |
| optionsPath? | string | R sidecar: path to reproducibility options, 'key=value' per line. |
| loadedPath? | string | R sidecar: path to attached packages, 'pkg version' per line. |
| installedPath? | string | R sidecar: path to ALL installed packages, 'pkg version' per line. |
| reproStatePath? | string | Path to a BINARY RNG-state file. Set only when the run consumed the RNG. |
| seq? | string | Per-(session,client) sequence number. NOT globally monotonic. |
| session? | string | Session id; scopes seq across re-sources / restarts. |
| executionCount? | string | Jupyter [n] execution count (per-kernel). |
| execTimestamp? | string | Client-side ISO timestamp of when the code ran. |
| errorPath? | string | Path to a file with the error message (when status='error'). |
| errorType? | string | Exception class/type (Python KeyError/ValueError; R leaves empty). |
| status? | string | Execution status: 'ok' or 'error'. Defaults to 'ok'. |
| durationMs? | string | Wall-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.
| Argument | Type | Description |
|---|---|---|
| session? | string | Session 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 Versions
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