mirror of
https://gh-proxy.org/https://github.com/klinsmaya/portal-template-default.git
synced 2026-11-10 01:57:59 +08:00
10 lines
340 B
JavaScript
10 lines
340 B
JavaScript
import { isProcessTerminationCommand, QA_PROCESS_GUARD_REASON } from './qa-guard-rules.mjs';
|
|
|
|
export const FactoryQaGuard = async () => ({
|
|
'tool.execute.before': async (input, output) => {
|
|
if (input.tool === 'bash' && isProcessTerminationCommand(output.args?.command)) {
|
|
throw new Error(QA_PROCESS_GUARD_REASON);
|
|
}
|
|
},
|
|
});
|