MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / emit

Function emit

tools/spec-loop/hooks/gate.ts:168–175  ·  view source on GitHub ↗
(decision: "approve" | "block", reason?: string)

Source from the content-addressed store, hash-verified

166}
167
168function emit(decision: "approve" | "block", reason?: string): never {
169 const out: { decision: string; reason?: string } = { decision };
170 if (reason !== undefined && reason !== "") {
171 out.reason = reason;
172 }
173 process.stdout.write(`${JSON.stringify(out)}\n`);
174 process.exit(0);
175}
176
177function allow(reason?: string): never {
178 emit("approve", reason);

Callers 2

allowFunction · 0.70
blockFunction · 0.70

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected