Skip to main content

Session Patch

@vcjdeboer/session-patchv2026.07.16.1· 9d agoMODELS
01README

Capture a PyLabRobot lab protocol ONCE as a sealed, citable IDENTITY, then lower that single intent onto whatever hardware you have — byte-exact, reproducible, provenance-tracked. seal freezes a .patch.yaml into a content-addressed bytestring (encoded as MIDI UMP/SysEx) and records the 64-hex patch sha you cite, plus its four sealed artifacts (patch/ump/syx/manifest) as a typed resource: the exact bytes of a scientific intent, pinned. run lowers ONE sealed sha through a chosen PLR driver and records the run — status, invocations, device calls, and the full NDJSON event stream — the provenance of how an intent became machine calls. resource_model captures the content-addressed deck layout (slots + role->labware) a run binds to; init scaffolds the store. The thesis in one line: the SAME sealed sha lowers to device-appropriate calls that DIFFER — a channel pipette runs pick_up_tips -> aspirate -> dispense -> drop_tips while a Labcyte Echo runs open_source_plate -> run_picklist -> close; same intent, transposed per device, 'the diff is the answer'. A pure-TypeScript codec/player makes identity byte-exact (flip one byte -> ContentHashError) and reproduces every run call-for-call.

02Models1
@vcjdeboer/session-patchv2026.07.16.1session_patch.ts

Global Arguments

ArgumentTypeDescription
pythonBinstring
patchModulestring
engineCwdstring
repoDirstring
fn init(dir: string)
Scaffold the engine's content-addressed `.patch/` store (one-time). Wraps `patch init <dir>` so the whole flow — init, seal, run — is swamp-native with no drop to the raw CLI.
ArgumentTypeDescription
dirstring
fn resource_model(ref: string)
Capture a resource model (deck layout) as a typed `resource_model` resource — the deck slots + role maps + content-address a `run` binds to. Wraps `resource-model show <ref>`.
ArgumentTypeDescription
refstring
fn seal(patchYaml: string)
Seal a .patch.yaml into the engine's content-addressed store and record the 64-hex patch sha + the four sealed artifacts as a typed `patch` resource.
ArgumentTypeDescription
patchYamlstring
fn run(ref: string, adapter: enum, innerBackend: string, resourceModel: string)
Lower ONE sealed Patch (by sha or yaml path) through a PLR adapter and record the run: status, invocations, plr calls, plus the full NDJSON event stream as an `events` blob. The SAME sealed sha under plr-legacy vs plr-v1b1 lowers to device-appropriate calls that differ.
ArgumentTypeDescription
refstring
adapterenum
innerBackendstring
resourceModelstring

Resources

patch(infinite)— A sealed Patch: the 64-hex content-address sha that IS the patch identity, plus the four engine artifacts (patch/ump/syx/manifest) and the source .patch.yaml. The canonical, citable statement of scientific intent.
run(infinite)— The outcome of lowering one sealed Patch through a PLR adapter (plr-legacy | plr-v1b1): status, invocation + plr-call counts, the run_failed payload if any. The full NDJSON event stream is offloaded to the `events` file.
repo(infinite)— A scaffolded engine `.patch/` store (the content-addressed Patch repository) created by `init` — the one-time home for sealed patches and runs.
resource_model(infinite)— A captured resource model (deck layout): the deck slots, the role -> slot / name / labware-constraint maps, and the engine's content-address (hash_id). The 'what is on the deck' provenance a `run` binds to via its resourceModel ref.
03Previous Versions1
2026.07.10.1
04Stats
A
100 / 100
Downloads
0
Archive size
18.9 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