MCPcopy Create free account
hub / github.com/cursor/plugins / visit

Function visit

orchestrate/skills/orchestrate/scripts/schemas.ts:342–362  ·  view source on GitHub ↗
(name: string, path: string[])

Source from the content-addressed store, hash-verified

340 tasks.map(task => [task.name, "white"])
341 );
342 const visit = (name: string, path: string[]): void => {
343 const current = color.get(name);
344 if (current === "gray") {
345 const cycle = [...path.slice(path.indexOf(name)), name];
346 ctx.addIssue({
347 code: z.ZodIssueCode.custom,
348 path: ["tasks"],
349 message: `dependsOn cycle: ${cycle.join(" -> ")}`,
350 });
351 return;
352 }
353 if (current === "black") return;
354 color.set(name, "gray");
355 const task = byName.get(name);
356 if (task) {
357 for (const dep of normalizedDependsOn(task)) {
358 if (byName.has(dep)) visit(dep, [...path, name]);
359 }
360 }
361 color.set(name, "black");
362 };
363 for (const task of tasks) visit(task.name, []);
364});
365

Callers 1

schemas.tsFile · 0.70

Calls 1

normalizedDependsOnFunction · 0.70

Tested by

no test coverage detected