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

Function parseLoopArgs

src/index.js:150–315  ·  view source on GitHub ↗
(raw, defaults = {})

Source from the content-addressed store, hash-verified

148 compactEveryMs: defaults.compactEveryMs ?? 0,
149 testCommand: defaults.testCommand,
150 verifyCommand: defaults.verifyCommand,
151 preflightCommand: defaults.preflightCommand,
152 postrunCommand: defaults.postrunCommand,
153 notifyCommand: defaults.notifyCommand,
154 branch: defaults.branch,
155 branchDone: false,
156 goalStatus: defaults.goalStatus,
157 goalFile: defaults.goalFile,
158 goalAcceptance: Array.isArray(defaults.goalAcceptance) ? [...defaults.goalAcceptance] : [],
159 goalChecks: Array.isArray(defaults.goalChecks) ? [...defaults.goalChecks] : [],
160 goalCompleteWhenChecksPass: defaults.goalCompleteWhenChecksPass ?? false,
161 goalRequireEvidence: defaults.goalRequireEvidence,
162 goalRequireChecksPass: defaults.goalRequireChecksPass,
163 goalEvidenceFile: defaults.goalEvidenceFile,
164 goalSummary: defaults.goalSummary || "",
165 goalEvidence: defaults.goalEvidence || "",
166 goalBlockedReason: defaults.goalBlockedReason || "",
167 goalProgress: Array.isArray(defaults.goalProgress) ? [...defaults.goalProgress] : [],
168 maxNoProgress: defaults.maxNoProgress,
169 noProgressCount: defaults.noProgressCount ?? 0,
170 lastProgressAt: defaults.lastProgressAt ?? 0,
171 noOverlap: defaults.noOverlap ?? true,
172 safe: defaults.safe ?? false,
173 quiet: defaults.quiet ?? false,
174 askNever: defaults.askNever ?? false,
175 pauseOnVerifyFail: defaults.pauseOnVerifyFail ?? false,
176 gitCheckpoint: defaults.gitCheckpoint ?? false,
177 checkpointOnly: defaults.checkpointOnly ?? false,
178 dryRun: defaults.dryRun ?? false,
179 multi: defaults.multi ?? false,
180 batch: defaults.batch ?? 0,
181 runCount: 0,
182 failureCount: 0,
183 lastRunAt: 0,
184 lastCompactAt: 0,
185 lastCompactRunCount: 0,
186 watchSnapshot: {},
187 watchTriggered: false,
188 createdAt: new Date().toISOString(),
189 enabled: true,
190 paused: false
191 };
192 let found;
193 let value;
194 [found, rest] = takeFlag(rest, "--no-now");
195 if (found)
196 job.immediate = false;
197 [found, rest] = takeFlag(rest, "--now");
198 if (found)
199 job.immediate = true;
200 [found, rest] = takeFlag(rest, "--no-overlap");
201 if (found)
202 job.noOverlap = true;
203 [found, rest] = takeFlag(rest, "--allow-overlap");
204 if (found)
205 job.noOverlap = false;
206 [found, rest] = takeFlag(rest, "--safe");
207 if (found)

Callers 1

addLoopFunction · 0.85

Calls 9

splitFirstFunction · 0.85
parseDurationFunction · 0.85
nowFunction · 0.85
takeFlagFunction · 0.85
takeFlagValueFunction · 0.85
parsePositiveIntFunction · 0.85
stripOuterQuotesFunction · 0.85
parseCompactEveryFunction · 0.85
takeAllFlagValuesFunction · 0.85

Tested by

no test coverage detected