fix(cli): return nonzero status for operation failures (#121)

This commit is contained in:
morluto
2026-07-14 06:33:34 +08:00
committed by GitHub
parent 73852202d4
commit 00c187e32b
9 changed files with 207 additions and 55 deletions
-13
View File
@@ -25,19 +25,6 @@ export interface ProcessCliErrorOutput {
readonly message: string;
}
/** Distinguish a safe process-command failure from successful Evidence. */
export const isProcessCliErrorOutput = (
value: unknown,
): value is ProcessCliErrorOutput =>
typeof value === "object" &&
value !== null &&
"error" in value &&
value.error === "Process command failed" &&
"category" in value &&
typeof value.category === "string" &&
"message" in value &&
typeof value.message === "string";
/** Capture one JSON scenario through the same policy and evidence contract as MCP. */
export const captureProcessScenarioFile = async (path: string) => {
try {