/**
 * dispatch.ts — framework-agnostic port of the dispatch (guidance-out) logic.
 *
 * Ports the pure logic of `the-portal/pages/api/instar/dispatches/index.ts` out of
 * the Next.js handler: the dispatch type/priority vocab, the semver comparison used
 * for version-compat filtering (an agent only receives a dispatch whose
 * [minVersion, maxVersion] window includes the agent's version), the list query
 * filter (since/type/version), and the create-dedup title normalization. The HTTP
 * wiring + storage are excluded (the app-placement decision); this is the reusable
 * core. Reference is TypeScript, so equivalence is by faithful transcription +
 * exhaustive both-sides-of-boundary tests (not a cross-runtime parity harness).
 */
export declare const DISPATCH_TYPES: readonly ["strategy", "behavioral", "lesson", "configuration", "security", "action"];
export type DispatchType = typeof DISPATCH_TYPES[number];
export declare const DISPATCH_PRIORITIES: readonly ["low", "normal", "high", "critical"];
export type DispatchPriority = typeof DISPATCH_PRIORITIES[number];
export declare const SEMVER_RE: RegExp;
export declare function isValidDispatchType(type: unknown): type is DispatchType;
export declare function isValidDispatchPriority(p: unknown): p is DispatchPriority;
/** Port of parseVersion: leading major.minor.patch → [n,n,n]; [0,0,0] if unparseable. */
export declare function parseVersion(v: string): [number, number, number];
/** Port of isVersionGte: version >= min (major.minor.patch, equal counts as gte). */
export declare function isVersionGte(version: string, min: string): boolean;
/** Port of isVersionLte: version <= max (equal counts as lte). */
export declare function isVersionLte(version: string, max: string): boolean;
export interface DispatchRecord {
    dispatchId: string;
    type: string;
    title: string;
    content?: string;
    priority?: string;
    minVersion?: string | null;
    maxVersion?: string | null;
    active?: boolean;
    createdAt?: string;
    [k: string]: unknown;
}
/**
 * Port of handleList's version-compat filter: a dispatch is included only if the
 * agent's version is within its [minVersion, maxVersion] window. Mirrors the
 * reference — applied only when the agent sent a valid-semver version; otherwise
 * all candidates pass (the caller gates on SEMVER_RE before calling).
 */
export declare function filterDispatchesForVersion(dispatches: DispatchRecord[], version: string): DispatchRecord[];
/** Port of the create-path title normalization used for dedup: trim + cap at 500 chars. */
export declare function normalizeDispatchTitle(title: string): string;
//# sourceMappingURL=dispatch.d.ts.map