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

Function updateJobState

src/index.js:1428–1436  ·  view source on GitHub ↗
(directory, client, sessionID, args, updater, message)

Source from the content-addressed store, hash-verified

1426 return job?.goalRequireChecksPass !== false && Array.isArray(job?.goalChecks) && job.goalChecks.length > 0;
1427}
1428function goalProgressSnapshot(job) {
1429 return {
1430 status: job?.goalStatus || "",
1431 progressCount: Array.isArray(job?.goalProgress) ? job.goalProgress.length : 0,
1432 evidence: String(job?.goalEvidence || ""),
1433 checksPassedAt: Number(job?.goalChecksPassedAt || 0),
1434 lastGoalCheckAt: Number(job?.lastGoalCheckAt || 0),
1435 lastVerifyAt: Number(job?.lastVerifyAt || 0),
1436 lastVerifyCode: Number.isFinite(Number(job?.lastVerifyCode)) ? Number(job.lastVerifyCode) : undefined
1437 };
1438}
1439function goalMadeMeaningfulProgress(beforeJob, afterJob) {

Callers 1

handleCommandFunction · 0.85

Calls 5

readStateFunction · 0.85
matchJobFunction · 0.85
writeStateFunction · 0.85
scheduleDueWorkFunction · 0.85
toastFunction · 0.85

Tested by

no test coverage detected