MCPcopy Create free account
hub / github.com/ByBrawe/opencode-loop / createCheckpoint

Function createCheckpoint

src/index.js:760–779  ·  view source on GitHub ↗
(directory, sessionID, job, client)

Source from the content-addressed store, hash-verified

758 return context;
759}
760function deleteSessionExecutionContext(sessionID) {
761 sessionExecutionContexts.delete(sessionID);
762}
763
764// src/source/opencode/host.js
765var SERVICE = "opencode-loop";
766function fireSdk(client, label, method, ...argsList) {
767 const pending = Promise.resolve().then(() => sdkCall(method, ...argsList));
768 pending.catch((error) => {
769 log(client, "warn", `${label} failed`, { error: sdkErrorMessage(error) }).catch(() => {});
770 });
771 return pending;
772}
773async function executeTuiCommand(client, command) {
774 if (!client?.tui?.executeCommand)
775 throw new Error("client.tui.executeCommand is not available");
776 return await sdkCall(client.tui.executeCommand.bind(client.tui), { body: { command } }, { command });
777}
778function compactTuiCommandName(command = "compact") {
779 const normalized = String(command || "compact").replace(/^\/+/, "").trim().toLowerCase();
780 if (normalized === "compact" || normalized === "summarize")
781 return "session_compact";
782 return;

Callers 1

finalizeActiveRunFunction · 0.85

Calls 5

runProcessFunction · 0.85
stateDirFunction · 0.85
safeIDFunction · 0.85
ensureDirFunction · 0.85
toastFunction · 0.85

Tested by

no test coverage detected