import type { ModelFamily } from '../config/model-profile-registry.js'; import type { TaskEnvelope } from './task-envelope.js'; import type { TaskCompletedEventType } from './wire-schema.js'; import type { ErrorCode } from '../error-codes.js'; export declare const coerceErrorCode: (code: string | null) => ErrorCode | null; export declare const clampStageCost: (n: number) => number; export declare const clampTaskCost: (n: number) => number; export declare const clampInputTokens: (n: number) => number; export declare const clampOutputTokens: (n: number) => number; export declare const clampCachedTokens: (n: number) => number; export declare const clampFilesWrittenCount: (n: number) => number; export declare const clampTurnCount: (n: number) => number; /** The wire caps `concernCount` at 150. Unclamped, a reviewer that raised more * failed the schema parse and the uploader dropped the ENTIRE event — the one * outcome worse than an inaccurate count. */ export declare const clampConcernCount: (n: number) => number; export declare const clampDurationMsStage: (n: number) => number; export declare const clampDurationMsTotal: (n: number) => number; /** * Normalize a raw model ID into its canonical name and family. * * Combines prefix stripping (extractCanonicalModelName) with profile * lookup (findModelProfile) into a single call. Callers that need both * the canonical form and the family without reaching into routing * internals should use this entry point. * * Idempotent: the canonical output of normalizeModel, when fed back * in as input, produces the same canonical output. */ export declare function normalizeModel(rawModelId: string): { canonical: string; family: ModelFamily; }; export declare function mapStatusToWire(status: TaskEnvelope['status'], errCode: string | null, wasCancelled?: boolean): { terminalStatus: 'ok' | 'timeout' | 'error' | 'unavailable' | 'cancelled'; workerStatus: 'done' | 'done_with_concerns' | 'failed' | 'cancelled'; }; export declare function toWireRecord(env: TaskEnvelope, opts: { toolMode: 'none' | 'readonly' | 'no-shell' | 'full'; implementerModel: string; implementerTier: 'standard' | 'complex' | 'main'; mainModelFamily: ModelFamily; }): TaskCompletedEventType; //# sourceMappingURL=to-wire-record.d.ts.map