fix(build): restore tool policy typing

This commit is contained in:
Peter Steinberger
2026-01-15 04:33:35 +00:00
parent 1baa55c145
commit eb3e865f15
3 changed files with 28 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ import {
validateConfigSchemaParams,
validateConfigSetParams,
} from "../protocol/index.js";
import type { GatewayRequestHandlers } from "./types.js";
import type { GatewayRequestHandlers, RespondFn } from "./types.js";
function resolveBaseHash(params: unknown): string | null {
const raw = (params as { baseHash?: unknown })?.baseHash;
@@ -39,7 +39,7 @@ function resolveBaseHash(params: unknown): string | null {
function requireConfigBaseHash(
params: unknown,
snapshot: Awaited<ReturnType<typeof readConfigFileSnapshot>>,
respond: (ok: boolean, payload?: unknown, error?: unknown) => void,
respond: RespondFn,
): boolean {
if (!snapshot.exists) return true;
if (typeof snapshot.raw !== "string" || !snapshot.hash) {