/** Tool policy helpers (Rust-backed). */
import { anthropicToolIsMcpNative, anthropicToolIsSystemNative, appendDescriptionReinstateEntriesNative, catalogNeedsPartitionNative, catalogNeedsPrunedRecomposeNative, chunkToolIdNative, directRootOptionalChunksForToolNative, dropRecomposedToolsWithEmptyPropertiesNative, effectivePolicyNative, entriesForPolicyNative, filterRecomposeJsonEntriesNative, fullPassThroughNative, isDecomposedOptionalPropertyChunkNative, isDecomposedToolRootChunkNative, isDescriptionPolicyNative, isDirectRootOptionalPropertyChunkNative, isMcpOptionalChunkNative, isMcpRootChunkNative, isNonSystemChunkNative, isNonSystemToolIdNative, isSystemChunkNative, isSystemOptionalChunkNative, isSystemRootChunkNative, isSystemToolIdNative, mergeCatalogNative, mergeToolsPreservingOrderNative, mitigateEmptyOptionalPropertiesNative, mcpRequiredEnumValuesNative, mcpToolsPassThroughNative, needsDescriptionReinstateNative, needsPartitionNative, needsPrunedRecomposeNative, optionalLeafSurvivedRerankNative, partitionCatalogNative, policyContextFromValuesNative, requestPassThroughNative, requiredEnumValuesByToolNative, restoreMcpToolsNative, restoreSystemToolsNative, rootChunkPropertiesEmptyNative, rootToolIdFromChunkNative, scoringPolicyNative, splitAnthropicToolsNative, stashMcpToolsNative, stashSystemToolsNative, systemRequiredEnumValuesNative, systemToolsPassThroughNative, toolIdHadEmptyOriginalRootPropertiesNative, toolIdHasEmptyDecomposedRootNative, toolPassThroughNative, toolPoliciesNative, toolsForCatalogNative, PolicyContextNative, } from "./native.js";
export { PolicyContextNative as PolicyContext };
export function toolPolicies() {
    return toolPoliciesNative();
}
export function policyContextFromValues(config) {
    return policyContextFromValuesNative(config);
}
export function effectivePolicy(toolId, ctx) {
    return effectivePolicyNative(ctx, toolId);
}
export function toolPassThrough(toolId, ctx) {
    return toolPassThroughNative(ctx, toolId);
}
export function rootToolIdFromChunk(item) {
    return rootToolIdFromChunkNative(item);
}
export function requestPassThrough(tools, ctx) {
    return requestPassThroughNative(ctx, tools);
}
export function isNonSystemToolId(toolId) {
    return isNonSystemToolIdNative(toolId);
}
export function isSystemToolId(toolId) {
    return isSystemToolIdNative(toolId);
}
export function chunkToolId(item) {
    return chunkToolIdNative(item);
}
export function isNonSystemChunk(item) {
    return isNonSystemChunkNative(item);
}
export function isSystemChunk(item) {
    return isSystemChunkNative(item);
}
export function isDecomposedToolRootChunk(item) {
    return isDecomposedToolRootChunkNative(item);
}
export function isDecomposedOptionalPropertyChunk(item) {
    return isDecomposedOptionalPropertyChunkNative(item);
}
export function isSystemRootChunk(item) {
    return isSystemRootChunkNative(item);
}
export function isMcpRootChunk(item) {
    return isMcpRootChunkNative(item);
}
export function isSystemOptionalChunk(item) {
    return isSystemOptionalChunkNative(item);
}
export function isMcpOptionalChunk(item) {
    return isMcpOptionalChunkNative(item);
}
export function needsPartition(ctx) {
    return needsPartitionNative(ctx);
}
export function needsPrunedRecompose(ctx) {
    return needsPrunedRecomposeNative(ctx);
}
export function systemToolsPassThrough(ctx) {
    return systemToolsPassThroughNative(ctx);
}
export function mcpToolsPassThrough(ctx) {
    return mcpToolsPassThroughNative(ctx);
}
export function fullPassThrough(ctx) {
    return fullPassThroughNative(ctx);
}
export function catalogNeedsPartition(data, ctx) {
    return catalogNeedsPartitionNative(data, ctx);
}
export function catalogNeedsPrunedRecompose(data, ctx) {
    return catalogNeedsPrunedRecomposeNative(data, ctx);
}
export function partitionCatalog(data, ctx) {
    return partitionCatalogNative(data, ctx);
}
export function mergeCatalog(processed, pinned) {
    return mergeCatalogNative(processed, pinned);
}
export function stashSystemTools(tools) {
    return stashSystemToolsNative(tools);
}
export function restoreSystemTools(stash) {
    return restoreSystemToolsNative(stash);
}
export function stashMcpTools(tools) {
    return stashMcpToolsNative(tools);
}
export function restoreMcpTools(stash) {
    return restoreMcpToolsNative(stash);
}
export function mergeToolsPreservingOrder(original, prunedByName, stashedByName) {
    return mergeToolsPreservingOrderNative(original, prunedByName, stashedByName);
}
export function anthropicToolIsSystem(tool) {
    return anthropicToolIsSystemNative(tool);
}
export function anthropicToolIsMcp(tool) {
    return anthropicToolIsMcpNative(tool);
}
export function splitAnthropicTools(tools) {
    const result = splitAnthropicToolsNative(tools);
    return [result.nonSystem, result.system];
}
export function entriesForPolicy(allEntries, ctx) {
    return entriesForPolicyNative(ctx, allEntries);
}
export function toolsForCatalog(tools, ctx) {
    return toolsForCatalogNative(ctx, tools);
}
export function systemRequiredEnumValues(data) {
    return systemRequiredEnumValuesNative(data);
}
export function mcpRequiredEnumValues(data) {
    return mcpRequiredEnumValuesNative(data);
}
export function requiredEnumValuesByTool(data) {
    return requiredEnumValuesByToolNative(data);
}
export function optionalLeafSurvivedRerank(item, ctx, rerankScore, llmSelectedPaths) {
    return optionalLeafSurvivedRerankNative(item, ctx, rerankScore ?? undefined, llmSelectedPaths === undefined || llmSelectedPaths === null
        ? undefined
        : [...llmSelectedPaths]);
}
export function filterRecomposeJsonEntries(jsonList, ctx, rerankScore, llmSelectedPaths) {
    return filterRecomposeJsonEntriesNative(jsonList, ctx, rerankScore ?? undefined, llmSelectedPaths === undefined || llmSelectedPaths === null
        ? undefined
        : [...llmSelectedPaths]);
}
export function mitigateEmptyOptionalProperties(entries, catalogIndex, ctx, postRerankScored, pipeline) {
    return mitigateEmptyOptionalPropertiesNative(entries, catalogIndex, ctx, postRerankScored ?? undefined, pipeline);
}
export function appendDescriptionReinstateEntries(entries, buildCatalog, catalogIndex, ctx) {
    return appendDescriptionReinstateEntriesNative(entries, buildCatalog, catalogIndex, ctx);
}
export function needsDescriptionReinstate(ctx) {
    return needsDescriptionReinstateNative(ctx);
}
export function isDescriptionPolicy(policy) {
    return isDescriptionPolicyNative(policy);
}
export function scoringPolicy(policy) {
    return scoringPolicyNative(policy);
}
export function directRootOptionalChunksForTool(items, toolId) {
    return directRootOptionalChunksForToolNative(items, toolId);
}
export function rootChunkPropertiesEmpty(item) {
    return rootChunkPropertiesEmptyNative(item);
}
export function toolIdHasEmptyDecomposedRoot(catalogIndex, toolId) {
    return toolIdHasEmptyDecomposedRootNative(catalogIndex, toolId);
}
export function toolIdHadEmptyOriginalRootProperties(catalogIndex, toolId) {
    return toolIdHadEmptyOriginalRootPropertiesNative(catalogIndex, toolId);
}
export function isDirectRootOptionalPropertyChunk(item) {
    return isDirectRootOptionalPropertyChunkNative(item);
}
export function dropRecomposedToolsWithEmptyProperties(tools, catalogIndex, ctx) {
    return dropRecomposedToolsWithEmptyPropertiesNative(tools, catalogIndex, ctx);
}
//# sourceMappingURL=policies.js.map