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

Function notifyJob

src/index.js:577–581  ·  view source on GitHub ↗
(directory, job, reason)

Source from the content-addressed store, hash-verified

575async function writeState(directory, sessionID, state) {
576 await withStateWriteLock(directory, sessionID, async () => {
577 await ensureDir(stateDir(directory));
578 const target = statePath(directory, sessionID);
579 const baseline = state?.[STATE_BASELINE];
580 let jobs = structuredClone(state.jobs || []);
581 if (Array.isArray(baseline)) {
582 const current = await readStateFile(directory, sessionID);
583 jobs = mergeStateJobs(baseline, jobs, current.jobs || []);
584 state.jobs = structuredClone(jobs);

Callers 2

finalizeActiveRunFunction · 0.85
maybeRunDueJobsFunction · 0.85

Calls 1

runShellCommandFunction · 0.85

Tested by

no test coverage detected