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

Function resolveRunBranch

orchestrate/skills/orchestrate/scripts/core/handoff.ts:34–46  ·  view source on GitHub ↗
(args: {
  handoffBody: string;
  runBranches: ReadonlyArray<{ branch?: string | null }>;
  fallback: string;
})

Source from the content-addressed store, hash-verified

32 * before the first successful handoff).
33 */
34export function resolveRunBranch(args: {
35 handoffBody: string;
36 runBranches: ReadonlyArray<{ branch?: string | null }>;
37 fallback: string;
38}): string {
39 const fromBody = parseHandoffBranch(args.handoffBody);
40 if (fromBody) return fromBody;
41 for (const b of args.runBranches) {
42 const trimmed = b.branch?.trim();
43 if (trimmed) return trimmed;
44 }
45 return args.fallback;
46}
47
48/**
49 * Extract a verification verdict from a handoff body. Reads the canonical

Callers 2

waitAndHandoffMethod · 0.90

Calls 1

parseHandoffBranchFunction · 0.85

Tested by

no test coverage detected