MCPcopy Create free account
hub / github.com/backnotprop/plannotator / semCandidates

Function semCandidates

packages/shared/semantic-diff.ts:205–221  ·  view source on GitHub ↗
(runtime: SemanticDiffRuntime)

Source from the content-addressed store, hash-verified

203}
204
205function semCandidates(runtime: SemanticDiffRuntime): SemCandidate[] {
206 const candidates: SemCandidate[] = [];
207 const explicit = runtime.env.PLANNOTATOR_SEM_PATH?.trim();
208
209 if (explicit) {
210 candidates.push({ command: explicit, source: "env", explicit: true });
211 return candidates;
212 }
213
214 const managed = getManagedSemBinaryPath(runtime.dataDir, runtime.platform);
215 if (runtime.fileExists(managed)) {
216 candidates.push({ command: managed, source: "managed", explicit: false });
217 }
218
219 candidates.push(...pathCandidates(runtime));
220 return candidates;
221}
222
223export function parseSemVersion(stdout: string): string | null {
224 const match = stdout.trim().match(/^sem\s+([0-9]+(?:\.[0-9]+){1,3}(?:[-+][^\s]+)?)/);

Callers 1

resolveSemFunction · 0.85

Calls 3

getManagedSemBinaryPathFunction · 0.85
pathCandidatesFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected