import type { BuildTaskPacketInput, ContextRepository, TaskPacketV1, ContextBrokerOptions } from "./types.js"; export type ContextBrokerErrorCode = "mission-not-found" | "task-not-found" | "invalid-input" | "revision-mismatch"; export declare class ContextBrokerError extends Error { readonly code: ContextBrokerErrorCode; constructor(code: ContextBrokerErrorCode, message: string); } export interface ContextBuildOutput { readonly packet: TaskPacketV1; readonly includedCanonicalItemIds: readonly string[]; readonly omittedCount: number; } export declare class ContextBroker { private readonly repository; private readonly options; constructor(repository: ContextRepository, options?: ContextBrokerOptions); buildPacket(input: BuildTaskPacketInput): Readonly; buildPacketResult(input: BuildTaskPacketInput): ContextBuildOutput; buildPacketAsync(input: BuildTaskPacketInput): Promise>; private readCanonicalItems; private selectItems; private fitPacketBudget; } export declare function buildTaskPacket(repository: ContextRepository, input: BuildTaskPacketInput, options?: ContextBrokerOptions): Readonly; export declare const createTaskPacket: typeof buildTaskPacket; export declare const buildContextPacket: typeof buildTaskPacket;