MCPcopy Create free account
hub / github.com/acoyfellow/cloudbox / readStateRunId

Function readStateRunId

scripts/cloudbox-live-sync.mjs:44–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44async function readStateRunId() {
45 const statePath = new URL(`file://${process.cwd()}/.cloudbox-live.json`);
46 const raw = await readFile(statePath, "utf8").catch(() => null);
47 if (!raw) return null;
48 const state = JSON.parse(raw);
49 return typeof state?.runId === "string" && state.runId ? state.runId : null;
50}
51
52function queue(_event, filename) {
53 if (!filename) return;

Callers 1

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected