export const mcpCreateResourceDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.mcp.createResource", kind: "service", required: true, description: "Runtime-owned MCP resource creation support. BaseTool shapes the mutation request and never writes resources directly." },
    { dependencyId: "runtime.governancePlane.mcpApproval", kind: "permission", required: true, description: "dryRun:false requires explicit runtime guard approval before resource creation." },
    { dependencyId: "runtime.mcp.resourceLifecycle", kind: "runtime", required: true, description: "Resource persistence, revisions, conflict checks, transports, and cleanup remain with runtime." },
];
export function createHostExecutorMcpCreateResourceProvider(executor) {
    const createResource = executor?.mcp?.createResource;
    if (createResource === undefined)
        return undefined;
    return async (request, context) => {
        const result = await createResource({ ...request, context });
        if (!result.ok)
            throw new Error(result.error.message);
        return result.output;
    };
}
