Sesh SDK
Use the same conversion path as the CLI inside your own harness. The package is ESM, includes TypeScript declarations, and has no runtime package dependencies. Node.js 24+ is required.
Install
The preview release lives in a private GitHub repository. Authenticate with an account that has repository access; npm registry publishing is deferred.
gh release download sesh-v0.1.0 --repo techsavvyash/clanker --pattern 'techsavvyash-sesh-0.1.0.tgz'
npm install ./techsavvyash-sesh-0.1.0.tgzPrepare and continue
import { spawn } from "node:child_process";
import { prepareHandoff, writeHandoff } from "@techsavvyash/sesh";
const handoff = await prepareHandoff({
from: "codex",
to: "claude",
sourcePath: "/path/to/rollout.jsonl",
cwd: "/path/to/project"
});
console.log(handoff.report); // Review transformations and losses first.
await writeHandoff(handoff);
spawn(handoff.resume.bin, handoff.resume.args, {
cwd: handoff.cwd,
stdio: "inherit"
});Pause the source before transferring. Launching the destination uses its own installed tools, permissions, and authenticated account. Workspace files and credentials are not copied.
| API | Responsibility |
|---|---|
convertSession({ from, to, text, sourcePath?, cwd?, turns?, allowIncomplete? }) | Convert JSONL in memory and return native lines, a fidelity report, destination path and resume arguments |
prepareHandoff({ from, to, sourcePath, ...options }) | Read a selected file and prepare the same conversion result |
writeHandoff(handoff, optionalDestinationFile) | Explicitly create a private destination file, refusing to overwrite an existing file |
resolveHarness(name).discover({ cwdRealpath, all }) | Discover source sessions for a project or across projects |
listHarnesses() / registerHarness(harness) | Inspect or extend the available adapters |
Preparation does not write, launch a process, log, or call a model. Each conversion gets a new destination session identity. Repeated conversion creates another branch, not continuous synchronization. Incomplete tool calls block conversion by default; allowIncomplete explicitly permits missing-result placeholders, never tool re-execution or a claim that the tool succeeded.
See the CLI reference, live demo, and handoff model. Back to Sesh.