/** SPDX-License-Identifier: MIT */ import { Hono } from "hono"; import type { Config } from "./config.js"; import { CacheStore } from "./store/sqlite.js"; import type { IntentAdjudicator } from "./adjudicator/types.js"; import { type Stats } from "./stats.js"; export type CacheHitEvent = { tier: "exact" | "jev" | "turn_exact" | "turn_jev"; savedUsd: number; totalSavedUsd: number; preview: string; intent?: number; }; export type CacheMissEvent = { spentUsd: number; preview: string; }; export type AppHooks = { onHit?: (event: CacheHitEvent) => void; onMiss?: (event: CacheMissEvent) => void; }; /** Optional deps for tests / custom backends without forking HIT logic. */ export type AppDeps = { adjudicator?: IntentAdjudicator; }; export type App = { app: Hono; store: CacheStore; stats: Stats; config: Config; close: () => void; }; export declare function createApp(cfg: Config, hooks?: AppHooks, deps?: AppDeps): App;