refactor(hooks): remove beast-mode system integration
Remove the beast-mode-system hook and all transform wiring so Copilot-specific prompt injection is fully eliminated from the runtime pipeline.
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
createClaudeCodeHooksHook,
|
||||
createKeywordDetectorHook,
|
||||
createThinkingBlockValidatorHook,
|
||||
createBeastModeSystemHook,
|
||||
} from "../../hooks"
|
||||
import {
|
||||
contextCollector,
|
||||
@@ -18,7 +17,6 @@ export type TransformHooks = {
|
||||
keywordDetector: ReturnType<typeof createKeywordDetectorHook> | null
|
||||
contextInjectorMessagesTransform: ReturnType<typeof createContextInjectorMessagesTransformHook>
|
||||
thinkingBlockValidator: ReturnType<typeof createThinkingBlockValidatorHook> | null
|
||||
beastModeSystem: ReturnType<typeof createBeastModeSystemHook> | null
|
||||
}
|
||||
|
||||
export function createTransformHooks(args: {
|
||||
@@ -65,19 +63,10 @@ export function createTransformHooks(args: {
|
||||
)
|
||||
: null
|
||||
|
||||
const beastModeSystem = isHookEnabled("beast-mode-system")
|
||||
? safeCreateHook(
|
||||
"beast-mode-system",
|
||||
() => createBeastModeSystemHook(),
|
||||
{ enabled: safeHookEnabled },
|
||||
)
|
||||
: null
|
||||
|
||||
return {
|
||||
claudeCodeHooks,
|
||||
keywordDetector,
|
||||
contextInjectorMessagesTransform,
|
||||
thinkingBlockValidator,
|
||||
beastModeSystem,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import type { CreatedHooks } from "../create-hooks"
|
||||
|
||||
export function createSystemTransformHandler(args: {
|
||||
hooks: CreatedHooks
|
||||
}): (input: { sessionID: string }, output: { system: string[] }) => Promise<void> {
|
||||
return async (input, output): Promise<void> => {
|
||||
await args.hooks.beastModeSystem?.["experimental.chat.system.transform"]?.(
|
||||
input,
|
||||
output,
|
||||
)
|
||||
}
|
||||
export function createSystemTransformHandler(): (
|
||||
input: { sessionID: string },
|
||||
output: { system: string[] },
|
||||
) => Promise<void> {
|
||||
return async (): Promise<void> => {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user