import { ExcludePaths } from '@webpieces/rules-config'; import { ToolKind, NormalizedToolInput, BlockedResult, HookMode, Rule, Violation, EditContext, FileContext, BashContext } from './types'; export declare function filterByExcludedPaths(rules: readonly Rule[], relativePath: string, ex: ExcludePaths): readonly Rule[]; export declare function effectiveBashCwd(command: string, cwd: string): string; export declare function isGitOrGhCommand(command: string): boolean; export declare function run(toolKind: ToolKind, input: NormalizedToolInput, cwd: string, mode?: HookMode): BlockedResult | null; export declare function runBash(command: string, cwd: string, mode?: HookMode): BlockedResult | null; /** * The Read path. Deliberately NOT `run()`: * * - NO config-sync check. A rule present in code but missing from webpieces.config.json blocks * every Write/Edit/Bash by design — but applying that to Read would mean an upgrade that adds * any new rule instantly blocks the agent from reading the very config file it must edit to fix * it. Reads must never carry that failure mode. * - NO general rule loop. Only READ_SCOPED_GUARDS run, so no code-style rule can ever see a Read. * - Fails OPEN everywhere, including on a thrown rule (the caller catches and allows). * * Returns null (allow) unless the one guard fires. */ export declare function runRead(filePath: string, cwd: string, mode?: HookMode): BlockedResult | null; export declare function runRuleCheck(rule: Rule, ctx: EditContext | FileContext | BashContext): readonly Violation[];