import type { RuntimeModelReference } from "@mono-agent/runtime-adapter"; import type { AgentHarnessRequest } from "../types.js"; export declare function createDefaultRunId(): string; /** * Derives a run's `source` (and optional `sourceDetail`) from its request * metadata, for the recorder factory input. Priority order mirrors how each * channel/trigger stamps `request.metadata`: * 1. `metadata.source === "web"` or `"tui"` (the operator endpoint injects this) * 2. `metadata.cron` present → "cron", detail = `metadata.cron.jobId` (string) * 3. `metadata.webhook` present → "webhook", detail = `metadata.webhook.endpointName` (string) * 4. `metadata.slack` / `metadata.telegram` / `metadata.messenger` present → * that channel name * 5. otherwise falls back to {@link deriveRunSource}'s conversationId-prefix * derivation, so unrecognized/legacy metadata still gets a best-effort source. * Never throws — `metadata` is `Record | undefined` and any * unexpected shape (e.g. `cron` not itself a record) just falls through. */ export declare function runSourceFromRequest(request: Pick): { readonly source?: string; readonly sourceDetail?: string; }; /** * A cron/proactive request carries a `cron` metadata block (set by the cron * scheduler when it fires a job). Used to scope the proactive-session-isolation * opt-in to scheduled runs without touching interactive turns. */ export declare function isCronRequest(request: AgentHarnessRequest): boolean; /** * This reader selects the requested session primary before context assembly; * its metadata precedence must match agent-app readOverride so the declared * binding and executed model agree. */ export declare function requestSessionModel(request: AgentHarnessRequest, defaultModel: RuntimeModelReference): RuntimeModelReference; export declare function requestOverridesModel(request: AgentHarnessRequest, defaultModel: RuntimeModelReference): boolean; //# sourceMappingURL=request-routing.d.ts.map