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

Function readKeyValue

orchestrate/skills/orchestrate/scripts/core/handoff.ts:131–138  ·  view source on GitHub ↗
(args: { handoff: string; key: string })

Source from the content-addressed store, hash-verified

129}
130
131function readKeyValue(args: { handoff: string; key: string }): string | null {
132 const re = new RegExp(`^${args.key}\\s*:\\s*([^\\r\\n]+)`, "im");
133 const match = re.exec(args.handoff);
134 if (!match) return null;
135 const raw = match[1].trim();
136 if (raw.length === 0) return null;
137 return raw.replace(/^`([^`]+)`$/, "$1").trim();
138}
139
140function normalizeEnumValue(raw: string): string {
141 return raw.toLowerCase().replace(/[\s_]+/g, "-");

Callers 1

parseHandoffFailureModeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected