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

Function snapshotDevProcess

runner/server.mjs:182–194  ·  view source on GitHub ↗
(runId, live)

Source from the content-addressed store, hash-verified

180 return found;
181}
182
183async function handleLiveExec(runId, input) {
184 if (!input || typeof input.command !== "string" || !input.command || input.command.length > 1_000) throw new Error("command is required");
185 const live = requireLiveWorkspace(runId);
186 const receipt = { type: "command", ...(await run(input.command, live.workspace, input.timeoutMs)) };
187 return { ok: receipt.code === 0, receipt };
188}
189
190async function handleLiveRead(runId, path) {
191 const live = requireLiveWorkspace(runId);
192 const fullPath = assertSafePath(live.workspace, path);
193 return { ok: true, path, content: await readFile(fullPath, "utf8") };
194}
195
196async function handleLiveWrite(runId, input) {
197 if (!input || typeof input.path !== "string" || typeof input.content !== "string") throw new Error("path and content are required");

Callers 2

handleLiveDevFunction · 0.85
livePreviewTargetFunction · 0.85

Calls 1

redactFunction · 0.85

Tested by

no test coverage detected