// Optional semantic reranker seam for the connected-context assembler (Epic #177,
// Issue #183). Interface ONLY — no live model calls in this PR. A future PR will add a
// keiko-model-gateway-backed implementation behind capability + privacy + budget guards.
// The default `disabledReranker` is always unavailable and the assembler treats that as
// "skip reranking" rather than as an error.
// No `await` in the body — use the resolve/reject pattern from prior PRs to avoid the
// `@typescript-eslint/require-await` lint while preserving the async surface.
function unavailable() {
    try {
        return Promise.resolve({
            available: false,
            reason: "reranker-not-configured",
        });
    }
    catch (error) {
        return Promise.reject(error instanceof Error ? error : new Error(String(error)));
    }
}
function identity(candidates, _atomsByPath, _topK) {
    try {
        return Promise.resolve(candidates);
    }
    catch (error) {
        return Promise.reject(error instanceof Error ? error : new Error(String(error)));
    }
}
export const disabledReranker = {
    name: "disabled-reranker",
    isAvailable: unavailable,
    rerank: identity,
};
