/**
 * Destination-check scheduler — periodic tick counter for destination_check
 * rules.
 *
 * Per `docs/opensquid-real-design.md` §"Destination-check" + §"Phases 2–7
 * summary": destination_check rules fire every N tool calls (not every
 * tool call). The scheduler maintains a per-rule counter in session-scoped
 * state, increments it on each tool_call event, and reports which rules
 * are "due" so the caller (the pre-tool-use hook in a later wiring task)
 * can invoke `check_destination` on just those rules.
 *
 * Counting semantics:
 *
 *   - Only `tool_call` events should drive the counter. Other event kinds
 *     (`prompt_submit`, `stop`, `session_end`) do NOT tick. Callers must
 *     gate their invocation on event kind; this module trusts that and
 *     unconditionally ticks every time it's called.
 *
 *   - A rule with `interval.every_n_tool_calls = N` fires on the Nth tool
 *     call after a fresh start (or after the previous fire). On fire, the
 *     counter resets to 0 so the next firing requires another N ticks.
 *
 *   - Rules are keyed `${pack.name}::${skill.name}::${rule.id}` so multiple
 *     packs / skills / rules with the same `id` stay isolated. The key is
 *     also the value returned in the `dueRules` list, so callers can index
 *     back into their pack tree.
 *
 * Persistence:
 *
 *   - Counters live at `sessionStateFile(sessionId, 'destination-counters')`
 *     — a JSON file inside the session's state dir. ENOENT on first read
 *     yields a fresh `{ byRule: {} }`.
 *
 *   - Writes use mkdir-then-writeFile (no atomic rename in Phase 4 —
 *     concurrent hook invocations against the same session are rare in
 *     practice, and `proper-lockfile` is deferred per the task spec's risk
 *     callout). If a corrupted JSON ever surfaces, the read swallows it
 *     and re-initialises the counter to zero, accepting the eventual-
 *     consistency cost.
 *
 *   - JSON.parse failures (corrupted file) fall through the same catch
 *     as ENOENT — the safer behaviour is "reset rather than crash the
 *     hook binary mid-tool-call". Callers don't see the difference.
 *
 * Imports from: node:fs/promises, node:path, ./paths.js, ./types.js.
 * Imported by: src/runtime/index.ts (re-export); future pre-tool-use hook
 * wiring (call sites land alongside the in-process registry dispatch).
 */
import type { Pack } from './types.js';
export declare function destinationRuleKey(packName: string, skillName: string, ruleId: string): string;
export declare function maybeRunDestinationChecks(sessionId: string, packs: Pack[]): Promise<string[]>;
//# sourceMappingURL=destination_scheduler.d.ts.map