MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / parseResumeContent

Function parseResumeContent

packages/react/src/api/shell-host.ts:93–103  ·  view source on GitHub ↗
(raw: unknown)

Source from the content-addressed store, hash-verified

91 * user's decision (accept/decline/cancel) still deserves to reach the server.
92 */
93const parseResumeContent = (raw: unknown): Record<string, unknown> | undefined => {
94 if (typeof raw !== "string" || raw === "{}") return undefined;
95 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: JSON.parse over a value the shell built; a malformed body must not lose the user's answer
96 try {
97 // oxlint-disable-next-line executor/no-json-parse -- boundary: the resume content arrives as an opaque JSON string across the shell's postMessage bridge
98 const parsed: unknown = JSON.parse(raw);
99 return isRecord(parsed) ? parsed : undefined;
100 } catch {
101 return undefined;
102 }
103};
104
105const prefersDark = (): boolean =>
106 typeof globalThis.window !== "undefined" &&

Callers 1

createHttpShellHostFunction · 0.85

Calls 1

isRecordFunction · 0.70

Tested by

no test coverage detected