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

Function readSectionValue

orchestrate/skills/orchestrate/scripts/core/handoff.ts:118–129  ·  view source on GitHub ↗
(args: {
  handoff: string;
  heading: string;
})

Source from the content-addressed store, hash-verified

116}
117
118function readSectionValue(args: {
119 handoff: string;
120 heading: string;
121}): string | null {
122 const re = new RegExp(`^##\\s+${args.heading}\\s*\\r?\\n([^\\r\\n]*)`, "m");
123 const match = re.exec(args.handoff);
124 if (!match) return null;
125 const raw = match[1].trim();
126 if (raw.length === 0) return null;
127 if (raw.startsWith("##")) return null;
128 return raw.replace(/^`([^`]+)`$/, "$1").trim();
129}
130
131function readKeyValue(args: { handoff: string; key: string }): string | null {
132 const re = new RegExp(`^${args.key}\\s*:\\s*([^\\r\\n]+)`, "im");

Callers 3

parseHandoffVerificationFunction · 0.85
parseHandoffFailureModeFunction · 0.85
parseHandoffPrNumberFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected