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

Function runNow

src/index.js:1549–1557  ·  view source on GitHub ↗
(directory, client, sessionID, args)

Source from the content-addressed store, hash-verified

1547 const parsed = parseGoalToolText(args, ["summary", "evidence"]);
1548 const manualOverride = args.manual === true || args.manualOverride === true;
1549 const completionEvidence = parsed.evidence || job.goalEvidence || "";
1550 const skipEvidenceGate = manualOverride || args.allowWeakEvidence === true || job.goalRequireEvidence === false;
1551 const skipCheckGate = manualOverride || args.allowFailingChecks === true || job.goalRequireChecksPass === false;
1552 if (!skipEvidenceGate && !hasConcreteGoalEvidence(completionEvidence)) {
1553 return await rejectGoalCompletion(directory, sessionID, state, job, "concrete evidence is required before the goal tool can complete the goal");
1554 }
1555 if (!skipCheckGate && goalRequiresPassingChecks(job) && !goalChecksPassed(job)) {
1556 return await rejectGoalCompletion(directory, sessionID, state, job, "configured goal checks have not passed yet");
1557 }
1558 job.goalStatus = "completed";
1559 job.enabled = false;
1560 job.paused = true;

Callers 1

handleCommandFunction · 0.85

Calls 5

readStateFunction · 0.85
matchJobFunction · 0.85
writeStateFunction · 0.85
toastFunction · 0.85
maybeRunDueJobsFunction · 0.85

Tested by

no test coverage detected