/** * Loads stream rules (regex guards matched against the model's streaming * output — see gg-agent `stream-rules.ts`) from markdown files: * * ~/.gg/rules/*.md user rules (trusted) * /.gg/rules/*.md project rules (untrusted; override user rules by name) * * No rules ship built in. Example `.gg/rules/no-console-log.md`: * * --- * name: no-console-log * trigger: console\.log\( * scope: tool # text | tool | both (default both) * tools: [edit, write] # optional; restricts tool-scope matching * --- * Do not add console.log calls. Use the project logger (`log()` from * core/logger.ts) instead. * * `trigger` is a JavaScript regex source; `/source/flags` form is accepted * with flags from `imsu`. The body is the reminder shown to the model when the * rule fires (trimmed, capped at 1,000 chars). Project triggers longer than * 300 chars or with nested quantifiers (catastrophic-backtracking risk) are * skipped. Invalid files are skipped with a WARN log; loading never throws. */ import type { StreamRule } from "@kenkaiiii/gg-agent"; export declare const MAX_STREAM_RULES = 50; export declare const MAX_STREAM_RULE_REMINDER_CHARS = 1000; export declare const MAX_PROJECT_TRIGGER_CHARS = 300; /** Load user + project stream rules. Project rules override user rules with the same name. */ export declare function loadStreamRules(cwd: string, home?: string): Promise;